From b889e81668bc5ddf9807fa2003081f2ea52b175c Mon Sep 17 00:00:00 2001 From: Yunchi Wang <54880216+wyunchi-ms@users.noreply.github.com> Date: Sat, 14 May 2022 08:49:57 +0800 Subject: [PATCH 1/5] Remove src/CDN --- src/Cdn/Cdn.Test/Cdn.Test.csproj | 17 - src/Cdn/Cdn.Test/Properties/AssemblyInfo.cs | 50 - .../ScenarioTests/AfdCustomDomainTests.cs | 40 - .../ScenarioTests/AfdCustomDomainTests.ps1 | 66 - .../ScenarioTests/AfdEndpointTests.cs | 54 - .../ScenarioTests/AfdEndpointTests.ps1 | 136 - .../ScenarioTests/AfdOriginGroupTests.cs | 54 - .../ScenarioTests/AfdOriginGroupTests.ps1 | 121 - .../Cdn.Test/ScenarioTests/AfdOriginTests.cs | 47 - .../Cdn.Test/ScenarioTests/AfdOriginTests.ps1 | 109 - .../Cdn.Test/ScenarioTests/AfdProfileTests.cs | 54 - .../ScenarioTests/AfdProfileTests.ps1 | 118 - .../Cdn.Test/ScenarioTests/AfdRouteTests.cs | 40 - .../Cdn.Test/ScenarioTests/AfdRouteTests.ps1 | 74 - .../Cdn.Test/ScenarioTests/AfdRuleSetTests.cs | 40 - .../ScenarioTests/AfdRuleSetTests.ps1 | 60 - .../Cdn.Test/ScenarioTests/AfdRuleTests.cs | 33 - .../Cdn.Test/ScenarioTests/AfdRuleTests.ps1 | 42 - .../ScenarioTests/AfdSecurityPolicyTests.cs | 33 - .../ScenarioTests/AfdSecurityPolicyTests.ps1 | 34 - .../Cdn.Test/ScenarioTests/CdnTestRunner.cs | 56 - .../ScenarioTests/ChinaCdnProfileTests.cs | 33 - .../ScenarioTests/ChinaCdnProfileTests.ps1 | 25 - src/Cdn/Cdn.Test/ScenarioTests/Common.ps1 | 134 - .../ScenarioTests/CustomDomainTests.cs | 68 - .../ScenarioTests/CustomDomainTests.ps1 | 285 - .../Cdn.Test/ScenarioTests/EndpointTests.cs | 96 - .../Cdn.Test/ScenarioTests/EndpointTests.ps1 | 577 -- .../ScenarioTests/OriginGroupTests.cs | 48 - .../ScenarioTests/OriginGroupTests.ps1 | 192 - src/Cdn/Cdn.Test/ScenarioTests/OriginTests.cs | 54 - .../Cdn.Test/ScenarioTests/OriginTests.ps1 | 167 - .../Cdn.Test/ScenarioTests/ProfileTests.cs | 75 - .../Cdn.Test/ScenarioTests/ProfileTests.ps1 | 217 - .../ScenarioTests/SubscriptionTests.cs | 40 - .../ScenarioTests/SubscriptionTests.ps1 | 36 - .../TestCreateAfdCustomDomain.json | 347 - .../TestCreateAfdEndpoint.json | 1184 --- .../TestGetAfdEndpoint.json | 1478 ---- .../TestRemoveAfdEndpoint.json | 1610 ----- .../TestSetAfdEndpoint.json | 1550 ---- .../TestCreateAfdOriginGroup.json | 1091 --- .../TestGetAfdOriginGroup.json | 1346 ---- .../TestRemoveAfdOriginGroup.json | 1418 ---- .../TestSetAfdOriginGroup.json | 1202 ---- .../TestCreateAfdOrigin.json | 1422 ---- .../TestGetAfdOrigin.json | 1425 ---- .../TestGetAfdOriginGroup.json | 561 -- .../TestSetAfdOrigin.json | 1698 ----- .../TestCreatePremiumAfdProfile.json | 790 -- .../TestCreateStandardAfdProfile.json | 1018 --- .../TestGetStandardAfdProfile.json | 1147 --- .../TestRemovePremiumAfdProfile.json | 889 --- .../TestGetAfdRoute.json | 1125 --- .../TestCreateAfdRuleSet.json | 857 --- .../TestRemoveAfdRuleSet.json | 1115 --- .../TestCreateAfdRule.json | 816 --- .../TestGetAfdSecurityPolicy.json | 920 --- .../TestProfileList.json | 77 - ...iCustomDomainHttpsWithRunningEndpoint.json | 2052 ------ ...omainEnableDisableWithRunningEndpoint.json | 2502 ------- ...tomDomainGetRemoveWithRunningEndpoint.json | 2559 ------- ...tomDomainGetRemoveWithStoppedEndpoint.json | 2823 -------- ...tCustomDomainHttpsWithRunningEndpoint.json | 2298 ------ ...nCustomDomainHttpsWithRunningEndpoint.json | 2565 ------- .../EndpointValidateProbeUrl.json | 152 - .../TestEndpointCreateWithDsa.json | 1692 ----- .../TestEndpointCreateWithRulesEngine.json | 1896 ----- .../TestEndpointCrudAndAction.json | 2466 ------- ...ndpointCrudAndActionWithAllProperties.json | 5457 -------------- ...dAndActionWithAllPropertiesWithPiping.json | 6324 ----------------- .../TestEndpointCrudAndActionWithPiping.json | 2610 ------- .../TestEndpointGeoFilters.json | 1704 ----- .../TestEndpointPipeline.json | 3067 -------- .../TestEndpointResourceUsage.json | 1491 ---- .../TestCreateOriginGroup.json | 1694 ----- .../TestGetSetOriginGroup.json | 1762 ----- .../TestRemoveOriginGroup.json | 1967 ----- ...tOriginGetSetWhenEndpointDoesnotExist.json | 1875 ----- .../TestOriginGetSetWithRunningEndpoint.json | 1950 ----- .../TestOriginGetSetWithStoppedEndpoint.json | 2079 ------ .../TestSetOriginProperties.json | 1761 ----- .../ProfileGetSupportedOptimizationType.json | 920 --- .../TestProfileCrud.json | 1631 ----- .../TestProfileCrudWithPiping.json | 1421 ---- .../TestProfileDeleteWithEndpoints.json | 1545 ---- .../TestProfileGetResourceUsage.json | 921 --- .../TestProfilePipeline.json | 2623 ------- .../TestSkuCreate.json | 3023 -------- .../TestSubscriptionEdgeNode.json | 74 - .../TestSubscriptionGetResourceUsage.json | 74 - src/Cdn/Cdn.sln | 67 - .../GetAzFrontDoorCdnCustomDomain.cs | 124 - .../NewAzFrontDoorCdnCustomDomain.cs | 96 - .../RemoveAzFrontDoorCdnCustomDomain.cs | 101 - .../SetAzFrontDoorCdnCustomDomain.cs | 90 - .../AfdEndpoint/GetAzFrontDoorCdnEndpoint.cs | 122 - .../AfdEndpoint/NewAzFrontDoorCdnEndpoint.cs | 70 - .../RemoveAzFrontDoorCdnEndpoint.cs | 101 - .../AfdEndpoint/SetAzFrontDoorCdnEndpoint.cs | 94 - src/Cdn/Cdn/AfdHelpers/AfdModelExtensions.cs | 230 - src/Cdn/Cdn/AfdHelpers/AfdUtilities.cs | 235 - src/Cdn/Cdn/AfdModels/PSAfdCustomDomain.cs | 34 - src/Cdn/Cdn/AfdModels/PSAfdEndpoint.cs | 22 - src/Cdn/Cdn/AfdModels/PSAfdOrigin.cs | 44 - src/Cdn/Cdn/AfdModels/PSAfdOriginGroup.cs | 34 - src/Cdn/Cdn/AfdModels/PSAfdProfile.cs | 22 - src/Cdn/Cdn/AfdModels/PSAfdRoute.cs | 43 - src/Cdn/Cdn/AfdModels/PSAfdRule.cs | 29 - src/Cdn/Cdn/AfdModels/PSAfdRuleAction.cs | 19 - .../PSAfdRuleCacheExpirationAction.cs | 22 - .../PSAfdRuleCacheKeyQueryStringAction.cs | 22 - src/Cdn/Cdn/AfdModels/PSAfdRuleCondition.cs | 32 - .../Cdn/AfdModels/PSAfdRuleHeaderAction.cs | 26 - .../PSAfdRuleOriginGroupOverrideAction.cs | 20 - src/Cdn/Cdn/AfdModels/PSAfdRuleSet.cs | 19 - .../AfdModels/PSAfdRuleUrlRedirectAction.cs | 30 - .../AfdModels/PSAfdRuleUrlRewriteAction.cs | 24 - src/Cdn/Cdn/AfdModels/PSAfdSecret.cs | 30 - src/Cdn/Cdn/AfdModels/PSAfdSecurityPolicy.cs | 27 - src/Cdn/Cdn/AfdModels/PSArmBaseResource.cs | 28 - src/Cdn/Cdn/AfdModels/PSArmTrackedResource.cs | 31 - .../AfdModels/SharedPrivateLinkResource.cs | 33 - .../Cdn/AfdOrigin/GetAzFrontDoorCdnOrigin.cs | 152 - .../Cdn/AfdOrigin/NewAzFrontDoorCdnOrigin.cs | 152 - .../AfdOrigin/RemoveAzFrontDoorCdnOrigin.cs | 107 - .../Cdn/AfdOrigin/SetAzFrontDoorCdnOrigin.cs | 274 - .../GetAzFrontDoorCdnOriginGroup.cs | 122 - .../NewAzFrontDoorCdnOriginGroup.cs | 141 - .../RemoveAzFrontDoorCdnOriginGroup.cs | 103 - .../SetAzFrontDoorCdnOriginGroup.cs | 272 - .../AfdProfile/GetAzFrontDoorCdnProfile.cs | 114 - .../AfdProfile/NewAzFrontDoorCdnProfile.cs | 76 - .../AfdProfile/RemoveAzFrontDoorCdnProfile.cs | 101 - .../AfdProfile/SetAzFrontDoorCdnProfile.cs | 84 - .../Cdn/AfdRoute/GetAzFrontDoorCdnRoute.cs | 125 - .../Cdn/AfdRoute/NewAzFrontDoorCdnRoute.cs | 85 - .../Cdn/AfdRoute/RemoveAzFrontDoorCdnRoute.cs | 109 - .../Cdn/AfdRoute/SetAzFrontDoorCdnRoute.cs | 179 - src/Cdn/Cdn/AfdRule/GetAzFrontDoorCdnRule.cs | 128 - src/Cdn/Cdn/AfdRule/NewAzFrontDoorCdnRule.cs | 427 -- .../AfdRule/NewAzFrontDoorCdnRuleAction.cs | 159 - .../AfdRule/NewAzFrontDoorCdnRuleCondition.cs | 64 - .../Cdn/AfdRule/RemoveAzFrontDoorCdnRule.cs | 108 - .../AfdRuleSet/GetAzFrontDoorCdnRuleSet.cs | 121 - .../AfdRuleSet/NewAzFrontDoorCdnRuleSet.cs | 59 - .../AfdRuleSet/RemoveAzFrontDoorCdnRuleSet.cs | 102 - .../Cdn/AfdSecret/GetAzFrontDoorCdnSecret.cs | 121 - .../Cdn/AfdSecret/NewAzFrontDoorCdnSecret.cs | 87 - .../AfdSecret/RemoveAzFrontDoorCdnSecret.cs | 103 - .../Cdn/AfdSecret/SetAzFrontDoorCdnSecret.cs | 86 - .../GetAzFrontDoorCdnSecurityPolicy.cs | 120 - .../NewAzFrontDoorCdnSecurityPolicy.cs | 84 - .../RemoveAzFrontDoorCdnSecurityPolicy.cs | 100 - .../SetAzFrontDoorCdnSecurityPolicy.cs | 156 - src/Cdn/Cdn/Az.Cdn.psd1 | 173 - src/Cdn/Cdn/Cdn.csproj | 23 - src/Cdn/Cdn/ChangeLog.md | 77 - src/Cdn/Cdn/Common/AfdConstants.cs | 163 - src/Cdn/Cdn/Common/AzureCdnCmdletBase.cs | 93 - src/Cdn/Cdn/Common/Constants.cs | 22 - .../DisableAzureRmCdnCustomDomain.cs | 83 - .../DisableAzureRmCdnCustomDomainHttps.cs | 108 - .../EnableAzureRmCdnCustomDomain.cs | 81 - .../EnableAzureRmCdnCustomDomainHttps.cs | 144 - .../CustomDomain/GetAzureRmCdnCustomDomain.cs | 80 - .../CustomDomain/NewAzureRmCdnCustomDomain.cs | 105 - .../RemoveAzureRmCdnCustomDomain.cs | 93 - src/Cdn/Cdn/EdgeNodes/PSCIDRIpAddress.cs | 29 - src/Cdn/Cdn/EdgeNodes/PSEdgeNode.cs | 27 - src/Cdn/Cdn/EdgeNodes/PSIpAddressGroup.cs | 36 - .../ConfirmAzureRmCdnEndpointProbeUrl.cs | 40 - src/Cdn/Cdn/Endpoint/GetAzureRmCdnEndpoint.cs | 69 - .../GetAzureRmCdnEndpointNameAvailability.cs | 40 - .../GetAzureRmCdnEndpointResourceUsage.cs | 64 - .../Endpoint/NewAzCdnDdliveryRuleCondition.cs | 75 - .../Cdn/Endpoint/NewAzCdnDeliveryPolicy.cs | 60 - src/Cdn/Cdn/Endpoint/NewAzCdnDeliveryRule.cs | 51 - .../Endpoint/NewAzCdnDeliveryRuleAction.cs | 172 - src/Cdn/Cdn/Endpoint/NewAzureRmCdnEndpoint.cs | 291 - .../PublishAzureRmCdnEndpointContent.cs | 69 - .../Cdn/Endpoint/RemoveAzureRmCdnEndnpoint.cs | 89 - src/Cdn/Cdn/Endpoint/SetAzureRmCdnEndpoint.cs | 75 - .../Cdn/Endpoint/StartAzureRmCdnEndpoint.cs | 69 - .../Cdn/Endpoint/StopAzureRmCdnEndpoint.cs | 66 - .../Endpoint/TestAzureRmCdnCustomDomain.cs | 70 - .../UnpublishAzureRmCdnEndpointContent.cs | 72 - src/Cdn/Cdn/Helpers/CdnMessageHelper.cs | 25 - src/Cdn/Cdn/Helpers/ModelExtensions.cs | 943 --- src/Cdn/Cdn/Helpers/OriginGroupUtilities.cs | 65 - .../Helpers/ResourceIdentifierExtensions.cs | 51 - .../Cdn/Models/CustomDomain/PSCustomDomain.cs | 83 - .../PSCustomDomainResourceState.cs | 23 - .../PSCustomHttpsProvisioningState.cs | 44 - .../PSCustomHttpsProvisioningSubstate.cs | 87 - .../PSCacheExpirationActionParameters.cs | 29 - .../Endpoint/PSCheckNameAvailabilityOutput.cs | 25 - .../Endpoint/PSCustomDomainInvalidReason.cs | 22 - .../Models/Endpoint/PSDeepCreatedOrigin.cs | 27 - .../Cdn/Models/Endpoint/PSDeliveryPolicy.cs | 26 - src/Cdn/Cdn/Models/Endpoint/PSDeliveryRule.cs | 32 - .../Models/Endpoint/PSDeliveryRuleAction.cs | 24 - .../PSDeliveryRuleCacheExpirationAction.cs | 25 - ...PSDeliveryRuleCacheKeyQueryStringAction.cs | 27 - .../Endpoint/PSDeliveryRuleCondition.cs | 35 - .../Endpoint/PSDeliveryRuleHeaderAction.cs | 31 - .../PSDeliveryRuleUrlRedirectAction.cs | 35 - .../PSDeliveryRuleUrlRewriteAction.cs | 29 - src/Cdn/Cdn/Models/Endpoint/PSEndpoint.cs | 91 - .../Endpoint/PSEndpointResourceState.cs | 26 - src/Cdn/Cdn/Models/Endpoint/PSGeoFilter.cs | 27 - .../Cdn/Models/Endpoint/PSGeoFilterAction.cs | 23 - src/Cdn/Cdn/Models/Endpoint/PSLoadInput.cs | 23 - src/Cdn/Cdn/Models/Endpoint/PSPurgeInput.cs | 23 - .../Endpoint/PSQueryStringCachingBehavior.cs | 24 - .../Endpoint/PSValidateCustomDomainInput.cs | 21 - .../Endpoint/PSValidateCustomDomainOutput.cs | 25 - .../Models/Endpoint/PSValidateProbeOutput.cs | 25 - src/Cdn/Cdn/Models/Origin/PSOrigin.cs | 92 - .../Models/Origin/PSOriginResourceState.cs | 23 - .../Cdn/Models/OriginGroup/PSOriginGroup.cs | 83 - .../OriginGroup/PSOriginGroupResourceState.cs | 27 - src/Cdn/Cdn/Models/PSProvisioningState.cs | 37 - src/Cdn/Cdn/Models/PSResourceUsage.cs | 42 - src/Cdn/Cdn/Models/PSResources.cs | 43 - src/Cdn/Cdn/Models/PSTrackedResources.cs | 34 - .../Cdn/Models/Profile/PSOptimizationType.cs | 32 - src/Cdn/Cdn/Models/Profile/PSProfile.cs | 56 - .../Models/Profile/PSProfileResourceState.cs | 26 - src/Cdn/Cdn/Models/Profile/PSSku.cs | 21 - src/Cdn/Cdn/Models/Profile/PSSkuName.cs | 34 - src/Cdn/Cdn/Models/Profile/PSSsoUri.cs | 21 - src/Cdn/Cdn/Origin/GetAzureRmCdnOrigin.cs | 90 - src/Cdn/Cdn/Origin/NewAzCdnOrigin.cs | 150 - src/Cdn/Cdn/Origin/RemoveAzCdnOrigin.cs | 103 - src/Cdn/Cdn/Origin/SetAzureRmCdnOrigin.cs | 150 - .../Cdn/OriginGroups/GetAzCdnOriginGroup.cs | 74 - .../Cdn/OriginGroups/NewAzCdnOriginGroup.cs | 151 - .../Cdn/OriginGroups/RmAzCdnOriginGroup.cs | 100 - .../Cdn/OriginGroups/SetAzCdnOriginGroup.cs | 151 - src/Cdn/Cdn/Profile/GetAzureRmCdnProfile.cs | 108 - .../GetAzureRmCdnProfileResourceUsage.cs | 58 - .../Cdn/Profile/GetAzureRmCdnProfileSsoUrl.cs | 55 - ...reRmCdnProfileSupportedOptimizationType.cs | 59 - src/Cdn/Cdn/Profile/NewAzureRmCdnProfile.cs | 109 - .../Cdn/Profile/RemoveAzureRmCdnProfile.cs | 111 - src/Cdn/Cdn/Profile/SetAzureRmCdnProfile.cs | 55 - src/Cdn/Cdn/Properties/AssemblyInfo.cs | 29 - src/Cdn/Cdn/Properties/Resources.Designer.cs | 279 - src/Cdn/Cdn/Properties/Resources.resx | 192 - src/Cdn/Cdn/StartupScripts/sample.ps1 | 1 - .../Cdn/Subscription/GetAzureRmCdnEdgeNode.cs | 40 - .../GetAzureRmCdnSubscriptionResourceUsage.cs | 37 - src/Cdn/Cdn/help/Az.Cdn.md | 235 - .../Cdn/help/Confirm-AzCdnEndpointProbeURL.md | 83 - src/Cdn/Cdn/help/Disable-AzCdnCustomDomain.md | 190 - .../help/Disable-AzCdnCustomDomainHttps.md | 214 - src/Cdn/Cdn/help/Enable-AzCdnCustomDomain.md | 190 - .../Cdn/help/Enable-AzCdnCustomDomainHttps.md | 214 - src/Cdn/Cdn/help/Get-AzCdnCustomDomain.md | 166 - src/Cdn/Cdn/help/Get-AzCdnEdgeNode.md | 77 - src/Cdn/Cdn/help/Get-AzCdnEndpoint.md | 168 - .../help/Get-AzCdnEndpointNameAvailability.md | 82 - .../help/Get-AzCdnEndpointResourceUsage.md | 154 - src/Cdn/Cdn/help/Get-AzCdnOrigin.md | 189 - src/Cdn/Cdn/help/Get-AzCdnOriginGroup.md | 143 - src/Cdn/Cdn/help/Get-AzCdnProfile.md | 112 - .../Cdn/help/Get-AzCdnProfileResourceUsage.md | 120 - src/Cdn/Cdn/help/Get-AzCdnProfileSsoUrl.md | 123 - ...t-AzCdnProfileSupportedOptimizationType.md | 119 - .../Get-AzCdnSubscriptionResourceUsage.md | 65 - .../help/Get-AzFrontDoorCdnCustomDomain.md | 150 - .../Cdn/help/Get-AzFrontDoorCdnEndpoint.md | 149 - src/Cdn/Cdn/help/Get-AzFrontDoorCdnOrigin.md | 164 - .../Cdn/help/Get-AzFrontDoorCdnOriginGroup.md | 150 - src/Cdn/Cdn/help/Get-AzFrontDoorCdnProfile.md | 113 - src/Cdn/Cdn/help/Get-AzFrontDoorCdnRoute.md | 164 - src/Cdn/Cdn/help/Get-AzFrontDoorCdnRule.md | 163 - src/Cdn/Cdn/help/Get-AzFrontDoorCdnRuleSet.md | 149 - src/Cdn/Cdn/help/Get-AzFrontDoorCdnSecret.md | 149 - .../help/Get-AzFrontDoorCdnSecurityPolicy.md | 150 - src/Cdn/Cdn/help/New-AzCdnCustomDomain.md | 214 - src/Cdn/Cdn/help/New-AzCdnDeliveryPolicy.md | 98 - src/Cdn/Cdn/help/New-AzCdnDeliveryRule.md | 128 - .../Cdn/help/New-AzCdnDeliveryRuleAction.md | 359 - .../help/New-AzCdnDeliveryRuleCondition.md | 163 - src/Cdn/Cdn/help/New-AzCdnEndpoint.md | 656 -- src/Cdn/Cdn/help/New-AzCdnOrigin.md | 320 - src/Cdn/Cdn/help/New-AzCdnOriginGroup.md | 252 - src/Cdn/Cdn/help/New-AzCdnProfile.md | 182 - .../help/New-AzFrontDoorCdnCustomDomain.md | 208 - .../Cdn/help/New-AzFrontDoorCdnEndpoint.md | 153 - src/Cdn/Cdn/help/New-AzFrontDoorCdnOrigin.md | 305 - .../Cdn/help/New-AzFrontDoorCdnOriginGroup.md | 261 - src/Cdn/Cdn/help/New-AzFrontDoorCdnProfile.md | 153 - src/Cdn/Cdn/help/New-AzFrontDoorCdnRoute.md | 184 - src/Cdn/Cdn/help/New-AzFrontDoorCdnRule.md | 220 - .../Cdn/help/New-AzFrontDoorCdnRuleAction.md | 376 - .../help/New-AzFrontDoorCdnRuleCondition.md | 157 - src/Cdn/Cdn/help/New-AzFrontDoorCdnRuleSet.md | 138 - src/Cdn/Cdn/help/New-AzFrontDoorCdnSecret.md | 215 - .../help/New-AzFrontDoorCdnSecurityPolicy.md | 169 - .../Cdn/help/Publish-AzCdnEndpointContent.md | 165 - src/Cdn/Cdn/help/Remove-AzCdnCustomDomain.md | 201 - src/Cdn/Cdn/help/Remove-AzCdnEndpoint.md | 204 - src/Cdn/Cdn/help/Remove-AzCdnOrigin.md | 212 - src/Cdn/Cdn/help/Remove-AzCdnOriginGroup.md | 212 - src/Cdn/Cdn/help/Remove-AzCdnProfile.md | 185 - .../help/Remove-AzFrontDoorCdnCustomDomain.md | 181 - .../Cdn/help/Remove-AzFrontDoorCdnEndpoint.md | 196 - .../Cdn/help/Remove-AzFrontDoorCdnOrigin.md | 212 - .../help/Remove-AzFrontDoorCdnOriginGroup.md | 196 - .../Cdn/help/Remove-AzFrontDoorCdnProfile.md | 181 - .../Cdn/help/Remove-AzFrontDoorCdnRoute.md | 212 - src/Cdn/Cdn/help/Remove-AzFrontDoorCdnRule.md | 212 - .../Cdn/help/Remove-AzFrontDoorCdnRuleSet.md | 196 - .../Cdn/help/Remove-AzFrontDoorCdnSecret.md | 196 - .../Remove-AzFrontDoorCdnSecurityPolicy.md | 197 - src/Cdn/Cdn/help/Set-AzCdnEndpoint.md | 150 - src/Cdn/Cdn/help/Set-AzCdnOrigin.md | 347 - src/Cdn/Cdn/help/Set-AzCdnOriginGroup.md | 253 - src/Cdn/Cdn/help/Set-AzCdnProfile.md | 130 - .../help/Set-AzFrontDoorCdnCustomDomain.md | 192 - .../Cdn/help/Set-AzFrontDoorCdnEndpoint.md | 175 - src/Cdn/Cdn/help/Set-AzFrontDoorCdnOrigin.md | 318 - .../Cdn/help/Set-AzFrontDoorCdnOriginGroup.md | 283 - src/Cdn/Cdn/help/Set-AzFrontDoorCdnProfile.md | 160 - src/Cdn/Cdn/help/Set-AzFrontDoorCdnRoute.md | 301 - src/Cdn/Cdn/help/Set-AzFrontDoorCdnSecret.md | 215 - .../help/Set-AzFrontDoorCdnSecurityPolicy.md | 191 - src/Cdn/Cdn/help/Start-AzCdnEndpoint.md | 189 - src/Cdn/Cdn/help/Stop-AzCdnEndpoint.md | 189 - src/Cdn/Cdn/help/Test-AzCdnCustomDomain.md | 157 - .../help/Unpublish-AzCdnEndpointContent.md | 202 - .../documentation/current-breaking-changes.md | 51 - .../upcoming-breaking-changes.md | 28 - 336 files changed, 124654 deletions(-) delete mode 100644 src/Cdn/Cdn.Test/Cdn.Test.csproj delete mode 100644 src/Cdn/Cdn.Test/Properties/AssemblyInfo.cs delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/AfdCustomDomainTests.cs delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/AfdCustomDomainTests.ps1 delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/AfdEndpointTests.cs delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/AfdEndpointTests.ps1 delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/AfdOriginGroupTests.cs delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/AfdOriginGroupTests.ps1 delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/AfdOriginTests.cs delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/AfdOriginTests.ps1 delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/AfdProfileTests.cs delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/AfdProfileTests.ps1 delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/AfdRouteTests.cs delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/AfdRouteTests.ps1 delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/AfdRuleSetTests.cs delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/AfdRuleSetTests.ps1 delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/AfdRuleTests.cs delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/AfdRuleTests.ps1 delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/AfdSecurityPolicyTests.cs delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/AfdSecurityPolicyTests.ps1 delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/CdnTestRunner.cs delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/ChinaCdnProfileTests.cs delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/ChinaCdnProfileTests.ps1 delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/Common.ps1 delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/CustomDomainTests.cs delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/CustomDomainTests.ps1 delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/EndpointTests.cs delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/EndpointTests.ps1 delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/OriginGroupTests.cs delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/OriginGroupTests.ps1 delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/OriginTests.cs delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/OriginTests.ps1 delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/ProfileTests.cs delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/ProfileTests.ps1 delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/SubscriptionTests.cs delete mode 100644 src/Cdn/Cdn.Test/ScenarioTests/SubscriptionTests.ps1 delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdCustomDomainTests/TestCreateAfdCustomDomain.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdEndpointTests/TestCreateAfdEndpoint.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdEndpointTests/TestGetAfdEndpoint.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdEndpointTests/TestRemoveAfdEndpoint.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdEndpointTests/TestSetAfdEndpoint.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginGroupTests/TestCreateAfdOriginGroup.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginGroupTests/TestGetAfdOriginGroup.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginGroupTests/TestRemoveAfdOriginGroup.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginGroupTests/TestSetAfdOriginGroup.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginTests/TestCreateAfdOrigin.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginTests/TestGetAfdOrigin.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginTests/TestGetAfdOriginGroup.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginTests/TestSetAfdOrigin.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdProfileTests/TestCreatePremiumAfdProfile.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdProfileTests/TestCreateStandardAfdProfile.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdProfileTests/TestGetStandardAfdProfile.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdProfileTests/TestRemovePremiumAfdProfile.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdRouteTests/TestGetAfdRoute.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdRuleSetTests/TestCreateAfdRuleSet.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdRuleSetTests/TestRemoveAfdRuleSet.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdRuleTests/TestCreateAfdRule.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdSecurityPolicyTests/TestGetAfdSecurityPolicy.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ChinaCdnProfileTests/TestProfileList.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestAkamaiCustomDomainHttpsWithRunningEndpoint.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestCustomDomainEnableDisableWithRunningEndpoint.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestCustomDomainGetRemoveWithRunningEndpoint.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestCustomDomainGetRemoveWithStoppedEndpoint.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestMicrosoftCustomDomainHttpsWithRunningEndpoint.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestVerizonCustomDomainHttpsWithRunningEndpoint.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/EndpointValidateProbeUrl.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCreateWithDsa.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCreateWithRulesEngine.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCrudAndAction.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCrudAndActionWithAllProperties.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCrudAndActionWithAllPropertiesWithPiping.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCrudAndActionWithPiping.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointGeoFilters.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointPipeline.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointResourceUsage.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginGroupTests/TestCreateOriginGroup.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginGroupTests/TestGetSetOriginGroup.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginGroupTests/TestRemoveOriginGroup.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginTests/TestOriginGetSetWhenEndpointDoesnotExist.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginTests/TestOriginGetSetWithRunningEndpoint.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginTests/TestOriginGetSetWithStoppedEndpoint.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginTests/TestSetOriginProperties.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/ProfileGetSupportedOptimizationType.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfileCrud.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfileCrudWithPiping.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfileDeleteWithEndpoints.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfileGetResourceUsage.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfilePipeline.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestSkuCreate.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.SubscriptionTests/TestSubscriptionEdgeNode.json delete mode 100644 src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.SubscriptionTests/TestSubscriptionGetResourceUsage.json delete mode 100644 src/Cdn/Cdn.sln delete mode 100644 src/Cdn/Cdn/AfdCustomDomain/GetAzFrontDoorCdnCustomDomain.cs delete mode 100644 src/Cdn/Cdn/AfdCustomDomain/NewAzFrontDoorCdnCustomDomain.cs delete mode 100644 src/Cdn/Cdn/AfdCustomDomain/RemoveAzFrontDoorCdnCustomDomain.cs delete mode 100644 src/Cdn/Cdn/AfdCustomDomain/SetAzFrontDoorCdnCustomDomain.cs delete mode 100644 src/Cdn/Cdn/AfdEndpoint/GetAzFrontDoorCdnEndpoint.cs delete mode 100644 src/Cdn/Cdn/AfdEndpoint/NewAzFrontDoorCdnEndpoint.cs delete mode 100644 src/Cdn/Cdn/AfdEndpoint/RemoveAzFrontDoorCdnEndpoint.cs delete mode 100644 src/Cdn/Cdn/AfdEndpoint/SetAzFrontDoorCdnEndpoint.cs delete mode 100644 src/Cdn/Cdn/AfdHelpers/AfdModelExtensions.cs delete mode 100644 src/Cdn/Cdn/AfdHelpers/AfdUtilities.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSAfdCustomDomain.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSAfdEndpoint.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSAfdOrigin.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSAfdOriginGroup.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSAfdProfile.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSAfdRoute.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSAfdRule.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSAfdRuleAction.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSAfdRuleCacheExpirationAction.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSAfdRuleCacheKeyQueryStringAction.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSAfdRuleCondition.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSAfdRuleHeaderAction.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSAfdRuleOriginGroupOverrideAction.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSAfdRuleSet.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSAfdRuleUrlRedirectAction.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSAfdRuleUrlRewriteAction.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSAfdSecret.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSAfdSecurityPolicy.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSArmBaseResource.cs delete mode 100644 src/Cdn/Cdn/AfdModels/PSArmTrackedResource.cs delete mode 100644 src/Cdn/Cdn/AfdModels/SharedPrivateLinkResource.cs delete mode 100644 src/Cdn/Cdn/AfdOrigin/GetAzFrontDoorCdnOrigin.cs delete mode 100644 src/Cdn/Cdn/AfdOrigin/NewAzFrontDoorCdnOrigin.cs delete mode 100644 src/Cdn/Cdn/AfdOrigin/RemoveAzFrontDoorCdnOrigin.cs delete mode 100644 src/Cdn/Cdn/AfdOrigin/SetAzFrontDoorCdnOrigin.cs delete mode 100644 src/Cdn/Cdn/AfdOriginGroup/GetAzFrontDoorCdnOriginGroup.cs delete mode 100644 src/Cdn/Cdn/AfdOriginGroup/NewAzFrontDoorCdnOriginGroup.cs delete mode 100644 src/Cdn/Cdn/AfdOriginGroup/RemoveAzFrontDoorCdnOriginGroup.cs delete mode 100644 src/Cdn/Cdn/AfdOriginGroup/SetAzFrontDoorCdnOriginGroup.cs delete mode 100644 src/Cdn/Cdn/AfdProfile/GetAzFrontDoorCdnProfile.cs delete mode 100644 src/Cdn/Cdn/AfdProfile/NewAzFrontDoorCdnProfile.cs delete mode 100644 src/Cdn/Cdn/AfdProfile/RemoveAzFrontDoorCdnProfile.cs delete mode 100644 src/Cdn/Cdn/AfdProfile/SetAzFrontDoorCdnProfile.cs delete mode 100644 src/Cdn/Cdn/AfdRoute/GetAzFrontDoorCdnRoute.cs delete mode 100644 src/Cdn/Cdn/AfdRoute/NewAzFrontDoorCdnRoute.cs delete mode 100644 src/Cdn/Cdn/AfdRoute/RemoveAzFrontDoorCdnRoute.cs delete mode 100644 src/Cdn/Cdn/AfdRoute/SetAzFrontDoorCdnRoute.cs delete mode 100644 src/Cdn/Cdn/AfdRule/GetAzFrontDoorCdnRule.cs delete mode 100644 src/Cdn/Cdn/AfdRule/NewAzFrontDoorCdnRule.cs delete mode 100644 src/Cdn/Cdn/AfdRule/NewAzFrontDoorCdnRuleAction.cs delete mode 100644 src/Cdn/Cdn/AfdRule/NewAzFrontDoorCdnRuleCondition.cs delete mode 100644 src/Cdn/Cdn/AfdRule/RemoveAzFrontDoorCdnRule.cs delete mode 100644 src/Cdn/Cdn/AfdRuleSet/GetAzFrontDoorCdnRuleSet.cs delete mode 100644 src/Cdn/Cdn/AfdRuleSet/NewAzFrontDoorCdnRuleSet.cs delete mode 100644 src/Cdn/Cdn/AfdRuleSet/RemoveAzFrontDoorCdnRuleSet.cs delete mode 100644 src/Cdn/Cdn/AfdSecret/GetAzFrontDoorCdnSecret.cs delete mode 100644 src/Cdn/Cdn/AfdSecret/NewAzFrontDoorCdnSecret.cs delete mode 100644 src/Cdn/Cdn/AfdSecret/RemoveAzFrontDoorCdnSecret.cs delete mode 100644 src/Cdn/Cdn/AfdSecret/SetAzFrontDoorCdnSecret.cs delete mode 100644 src/Cdn/Cdn/AfdSecurityPolicy/GetAzFrontDoorCdnSecurityPolicy.cs delete mode 100644 src/Cdn/Cdn/AfdSecurityPolicy/NewAzFrontDoorCdnSecurityPolicy.cs delete mode 100644 src/Cdn/Cdn/AfdSecurityPolicy/RemoveAzFrontDoorCdnSecurityPolicy.cs delete mode 100644 src/Cdn/Cdn/AfdSecurityPolicy/SetAzFrontDoorCdnSecurityPolicy.cs delete mode 100644 src/Cdn/Cdn/Az.Cdn.psd1 delete mode 100644 src/Cdn/Cdn/Cdn.csproj delete mode 100644 src/Cdn/Cdn/ChangeLog.md delete mode 100644 src/Cdn/Cdn/Common/AfdConstants.cs delete mode 100644 src/Cdn/Cdn/Common/AzureCdnCmdletBase.cs delete mode 100644 src/Cdn/Cdn/Common/Constants.cs delete mode 100644 src/Cdn/Cdn/CustomDomain/DisableAzureRmCdnCustomDomain.cs delete mode 100644 src/Cdn/Cdn/CustomDomain/DisableAzureRmCdnCustomDomainHttps.cs delete mode 100644 src/Cdn/Cdn/CustomDomain/EnableAzureRmCdnCustomDomain.cs delete mode 100644 src/Cdn/Cdn/CustomDomain/EnableAzureRmCdnCustomDomainHttps.cs delete mode 100644 src/Cdn/Cdn/CustomDomain/GetAzureRmCdnCustomDomain.cs delete mode 100644 src/Cdn/Cdn/CustomDomain/NewAzureRmCdnCustomDomain.cs delete mode 100644 src/Cdn/Cdn/CustomDomain/RemoveAzureRmCdnCustomDomain.cs delete mode 100644 src/Cdn/Cdn/EdgeNodes/PSCIDRIpAddress.cs delete mode 100644 src/Cdn/Cdn/EdgeNodes/PSEdgeNode.cs delete mode 100644 src/Cdn/Cdn/EdgeNodes/PSIpAddressGroup.cs delete mode 100644 src/Cdn/Cdn/Endpoint/ConfirmAzureRmCdnEndpointProbeUrl.cs delete mode 100644 src/Cdn/Cdn/Endpoint/GetAzureRmCdnEndpoint.cs delete mode 100644 src/Cdn/Cdn/Endpoint/GetAzureRmCdnEndpointNameAvailability.cs delete mode 100644 src/Cdn/Cdn/Endpoint/GetAzureRmCdnEndpointResourceUsage.cs delete mode 100644 src/Cdn/Cdn/Endpoint/NewAzCdnDdliveryRuleCondition.cs delete mode 100644 src/Cdn/Cdn/Endpoint/NewAzCdnDeliveryPolicy.cs delete mode 100644 src/Cdn/Cdn/Endpoint/NewAzCdnDeliveryRule.cs delete mode 100644 src/Cdn/Cdn/Endpoint/NewAzCdnDeliveryRuleAction.cs delete mode 100644 src/Cdn/Cdn/Endpoint/NewAzureRmCdnEndpoint.cs delete mode 100644 src/Cdn/Cdn/Endpoint/PublishAzureRmCdnEndpointContent.cs delete mode 100644 src/Cdn/Cdn/Endpoint/RemoveAzureRmCdnEndnpoint.cs delete mode 100644 src/Cdn/Cdn/Endpoint/SetAzureRmCdnEndpoint.cs delete mode 100644 src/Cdn/Cdn/Endpoint/StartAzureRmCdnEndpoint.cs delete mode 100644 src/Cdn/Cdn/Endpoint/StopAzureRmCdnEndpoint.cs delete mode 100644 src/Cdn/Cdn/Endpoint/TestAzureRmCdnCustomDomain.cs delete mode 100644 src/Cdn/Cdn/Endpoint/UnpublishAzureRmCdnEndpointContent.cs delete mode 100644 src/Cdn/Cdn/Helpers/CdnMessageHelper.cs delete mode 100644 src/Cdn/Cdn/Helpers/ModelExtensions.cs delete mode 100644 src/Cdn/Cdn/Helpers/OriginGroupUtilities.cs delete mode 100644 src/Cdn/Cdn/Helpers/ResourceIdentifierExtensions.cs delete mode 100644 src/Cdn/Cdn/Models/CustomDomain/PSCustomDomain.cs delete mode 100644 src/Cdn/Cdn/Models/CustomDomain/PSCustomDomainResourceState.cs delete mode 100644 src/Cdn/Cdn/Models/CustomDomain/PSCustomHttpsProvisioningState.cs delete mode 100644 src/Cdn/Cdn/Models/CustomDomain/PSCustomHttpsProvisioningSubstate.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSCacheExpirationActionParameters.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSCheckNameAvailabilityOutput.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSCustomDomainInvalidReason.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSDeepCreatedOrigin.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSDeliveryPolicy.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSDeliveryRule.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleAction.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleCacheExpirationAction.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleCacheKeyQueryStringAction.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleCondition.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleHeaderAction.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleUrlRedirectAction.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleUrlRewriteAction.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSEndpoint.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSEndpointResourceState.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSGeoFilter.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSGeoFilterAction.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSLoadInput.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSPurgeInput.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSQueryStringCachingBehavior.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSValidateCustomDomainInput.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSValidateCustomDomainOutput.cs delete mode 100644 src/Cdn/Cdn/Models/Endpoint/PSValidateProbeOutput.cs delete mode 100644 src/Cdn/Cdn/Models/Origin/PSOrigin.cs delete mode 100644 src/Cdn/Cdn/Models/Origin/PSOriginResourceState.cs delete mode 100644 src/Cdn/Cdn/Models/OriginGroup/PSOriginGroup.cs delete mode 100644 src/Cdn/Cdn/Models/OriginGroup/PSOriginGroupResourceState.cs delete mode 100644 src/Cdn/Cdn/Models/PSProvisioningState.cs delete mode 100644 src/Cdn/Cdn/Models/PSResourceUsage.cs delete mode 100644 src/Cdn/Cdn/Models/PSResources.cs delete mode 100644 src/Cdn/Cdn/Models/PSTrackedResources.cs delete mode 100644 src/Cdn/Cdn/Models/Profile/PSOptimizationType.cs delete mode 100644 src/Cdn/Cdn/Models/Profile/PSProfile.cs delete mode 100644 src/Cdn/Cdn/Models/Profile/PSProfileResourceState.cs delete mode 100644 src/Cdn/Cdn/Models/Profile/PSSku.cs delete mode 100644 src/Cdn/Cdn/Models/Profile/PSSkuName.cs delete mode 100644 src/Cdn/Cdn/Models/Profile/PSSsoUri.cs delete mode 100644 src/Cdn/Cdn/Origin/GetAzureRmCdnOrigin.cs delete mode 100644 src/Cdn/Cdn/Origin/NewAzCdnOrigin.cs delete mode 100644 src/Cdn/Cdn/Origin/RemoveAzCdnOrigin.cs delete mode 100644 src/Cdn/Cdn/Origin/SetAzureRmCdnOrigin.cs delete mode 100644 src/Cdn/Cdn/OriginGroups/GetAzCdnOriginGroup.cs delete mode 100644 src/Cdn/Cdn/OriginGroups/NewAzCdnOriginGroup.cs delete mode 100644 src/Cdn/Cdn/OriginGroups/RmAzCdnOriginGroup.cs delete mode 100644 src/Cdn/Cdn/OriginGroups/SetAzCdnOriginGroup.cs delete mode 100644 src/Cdn/Cdn/Profile/GetAzureRmCdnProfile.cs delete mode 100644 src/Cdn/Cdn/Profile/GetAzureRmCdnProfileResourceUsage.cs delete mode 100644 src/Cdn/Cdn/Profile/GetAzureRmCdnProfileSsoUrl.cs delete mode 100644 src/Cdn/Cdn/Profile/GetAzureRmCdnProfileSupportedOptimizationType.cs delete mode 100644 src/Cdn/Cdn/Profile/NewAzureRmCdnProfile.cs delete mode 100644 src/Cdn/Cdn/Profile/RemoveAzureRmCdnProfile.cs delete mode 100644 src/Cdn/Cdn/Profile/SetAzureRmCdnProfile.cs delete mode 100644 src/Cdn/Cdn/Properties/AssemblyInfo.cs delete mode 100644 src/Cdn/Cdn/Properties/Resources.Designer.cs delete mode 100644 src/Cdn/Cdn/Properties/Resources.resx delete mode 100644 src/Cdn/Cdn/StartupScripts/sample.ps1 delete mode 100644 src/Cdn/Cdn/Subscription/GetAzureRmCdnEdgeNode.cs delete mode 100644 src/Cdn/Cdn/Subscription/GetAzureRmCdnSubscriptionResourceUsage.cs delete mode 100644 src/Cdn/Cdn/help/Az.Cdn.md delete mode 100644 src/Cdn/Cdn/help/Confirm-AzCdnEndpointProbeURL.md delete mode 100644 src/Cdn/Cdn/help/Disable-AzCdnCustomDomain.md delete mode 100644 src/Cdn/Cdn/help/Disable-AzCdnCustomDomainHttps.md delete mode 100644 src/Cdn/Cdn/help/Enable-AzCdnCustomDomain.md delete mode 100644 src/Cdn/Cdn/help/Enable-AzCdnCustomDomainHttps.md delete mode 100644 src/Cdn/Cdn/help/Get-AzCdnCustomDomain.md delete mode 100644 src/Cdn/Cdn/help/Get-AzCdnEdgeNode.md delete mode 100644 src/Cdn/Cdn/help/Get-AzCdnEndpoint.md delete mode 100644 src/Cdn/Cdn/help/Get-AzCdnEndpointNameAvailability.md delete mode 100644 src/Cdn/Cdn/help/Get-AzCdnEndpointResourceUsage.md delete mode 100644 src/Cdn/Cdn/help/Get-AzCdnOrigin.md delete mode 100644 src/Cdn/Cdn/help/Get-AzCdnOriginGroup.md delete mode 100644 src/Cdn/Cdn/help/Get-AzCdnProfile.md delete mode 100644 src/Cdn/Cdn/help/Get-AzCdnProfileResourceUsage.md delete mode 100644 src/Cdn/Cdn/help/Get-AzCdnProfileSsoUrl.md delete mode 100644 src/Cdn/Cdn/help/Get-AzCdnProfileSupportedOptimizationType.md delete mode 100644 src/Cdn/Cdn/help/Get-AzCdnSubscriptionResourceUsage.md delete mode 100644 src/Cdn/Cdn/help/Get-AzFrontDoorCdnCustomDomain.md delete mode 100644 src/Cdn/Cdn/help/Get-AzFrontDoorCdnEndpoint.md delete mode 100644 src/Cdn/Cdn/help/Get-AzFrontDoorCdnOrigin.md delete mode 100644 src/Cdn/Cdn/help/Get-AzFrontDoorCdnOriginGroup.md delete mode 100644 src/Cdn/Cdn/help/Get-AzFrontDoorCdnProfile.md delete mode 100644 src/Cdn/Cdn/help/Get-AzFrontDoorCdnRoute.md delete mode 100644 src/Cdn/Cdn/help/Get-AzFrontDoorCdnRule.md delete mode 100644 src/Cdn/Cdn/help/Get-AzFrontDoorCdnRuleSet.md delete mode 100644 src/Cdn/Cdn/help/Get-AzFrontDoorCdnSecret.md delete mode 100644 src/Cdn/Cdn/help/Get-AzFrontDoorCdnSecurityPolicy.md delete mode 100644 src/Cdn/Cdn/help/New-AzCdnCustomDomain.md delete mode 100644 src/Cdn/Cdn/help/New-AzCdnDeliveryPolicy.md delete mode 100644 src/Cdn/Cdn/help/New-AzCdnDeliveryRule.md delete mode 100644 src/Cdn/Cdn/help/New-AzCdnDeliveryRuleAction.md delete mode 100644 src/Cdn/Cdn/help/New-AzCdnDeliveryRuleCondition.md delete mode 100644 src/Cdn/Cdn/help/New-AzCdnEndpoint.md delete mode 100644 src/Cdn/Cdn/help/New-AzCdnOrigin.md delete mode 100644 src/Cdn/Cdn/help/New-AzCdnOriginGroup.md delete mode 100644 src/Cdn/Cdn/help/New-AzCdnProfile.md delete mode 100644 src/Cdn/Cdn/help/New-AzFrontDoorCdnCustomDomain.md delete mode 100644 src/Cdn/Cdn/help/New-AzFrontDoorCdnEndpoint.md delete mode 100644 src/Cdn/Cdn/help/New-AzFrontDoorCdnOrigin.md delete mode 100644 src/Cdn/Cdn/help/New-AzFrontDoorCdnOriginGroup.md delete mode 100644 src/Cdn/Cdn/help/New-AzFrontDoorCdnProfile.md delete mode 100644 src/Cdn/Cdn/help/New-AzFrontDoorCdnRoute.md delete mode 100644 src/Cdn/Cdn/help/New-AzFrontDoorCdnRule.md delete mode 100644 src/Cdn/Cdn/help/New-AzFrontDoorCdnRuleAction.md delete mode 100644 src/Cdn/Cdn/help/New-AzFrontDoorCdnRuleCondition.md delete mode 100644 src/Cdn/Cdn/help/New-AzFrontDoorCdnRuleSet.md delete mode 100644 src/Cdn/Cdn/help/New-AzFrontDoorCdnSecret.md delete mode 100644 src/Cdn/Cdn/help/New-AzFrontDoorCdnSecurityPolicy.md delete mode 100644 src/Cdn/Cdn/help/Publish-AzCdnEndpointContent.md delete mode 100644 src/Cdn/Cdn/help/Remove-AzCdnCustomDomain.md delete mode 100644 src/Cdn/Cdn/help/Remove-AzCdnEndpoint.md delete mode 100644 src/Cdn/Cdn/help/Remove-AzCdnOrigin.md delete mode 100644 src/Cdn/Cdn/help/Remove-AzCdnOriginGroup.md delete mode 100644 src/Cdn/Cdn/help/Remove-AzCdnProfile.md delete mode 100644 src/Cdn/Cdn/help/Remove-AzFrontDoorCdnCustomDomain.md delete mode 100644 src/Cdn/Cdn/help/Remove-AzFrontDoorCdnEndpoint.md delete mode 100644 src/Cdn/Cdn/help/Remove-AzFrontDoorCdnOrigin.md delete mode 100644 src/Cdn/Cdn/help/Remove-AzFrontDoorCdnOriginGroup.md delete mode 100644 src/Cdn/Cdn/help/Remove-AzFrontDoorCdnProfile.md delete mode 100644 src/Cdn/Cdn/help/Remove-AzFrontDoorCdnRoute.md delete mode 100644 src/Cdn/Cdn/help/Remove-AzFrontDoorCdnRule.md delete mode 100644 src/Cdn/Cdn/help/Remove-AzFrontDoorCdnRuleSet.md delete mode 100644 src/Cdn/Cdn/help/Remove-AzFrontDoorCdnSecret.md delete mode 100644 src/Cdn/Cdn/help/Remove-AzFrontDoorCdnSecurityPolicy.md delete mode 100644 src/Cdn/Cdn/help/Set-AzCdnEndpoint.md delete mode 100644 src/Cdn/Cdn/help/Set-AzCdnOrigin.md delete mode 100644 src/Cdn/Cdn/help/Set-AzCdnOriginGroup.md delete mode 100644 src/Cdn/Cdn/help/Set-AzCdnProfile.md delete mode 100644 src/Cdn/Cdn/help/Set-AzFrontDoorCdnCustomDomain.md delete mode 100644 src/Cdn/Cdn/help/Set-AzFrontDoorCdnEndpoint.md delete mode 100644 src/Cdn/Cdn/help/Set-AzFrontDoorCdnOrigin.md delete mode 100644 src/Cdn/Cdn/help/Set-AzFrontDoorCdnOriginGroup.md delete mode 100644 src/Cdn/Cdn/help/Set-AzFrontDoorCdnProfile.md delete mode 100644 src/Cdn/Cdn/help/Set-AzFrontDoorCdnRoute.md delete mode 100644 src/Cdn/Cdn/help/Set-AzFrontDoorCdnSecret.md delete mode 100644 src/Cdn/Cdn/help/Set-AzFrontDoorCdnSecurityPolicy.md delete mode 100644 src/Cdn/Cdn/help/Start-AzCdnEndpoint.md delete mode 100644 src/Cdn/Cdn/help/Stop-AzCdnEndpoint.md delete mode 100644 src/Cdn/Cdn/help/Test-AzCdnCustomDomain.md delete mode 100644 src/Cdn/Cdn/help/Unpublish-AzCdnEndpointContent.md delete mode 100644 src/Cdn/documentation/current-breaking-changes.md delete mode 100644 src/Cdn/documentation/upcoming-breaking-changes.md diff --git a/src/Cdn/Cdn.Test/Cdn.Test.csproj b/src/Cdn/Cdn.Test/Cdn.Test.csproj deleted file mode 100644 index 2de27820debf..000000000000 --- a/src/Cdn/Cdn.Test/Cdn.Test.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - Cdn - - - - - - $(LegacyAssemblyPrefix)$(PsModuleName)$(AzTestAssemblySuffix).ScenarioTests - - - - - - - \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/Properties/AssemblyInfo.cs b/src/Cdn/Cdn.Test/Properties/AssemblyInfo.cs deleted file mode 100644 index 3e90deaedbf0..000000000000 --- a/src/Cdn/Cdn.Test/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,50 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Reflection; -using System.Runtime.InteropServices; -using Xunit; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Microsoft.Azure.Commands.Cdn.Test")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Microsoft.Azure.Commands.Cdn.Test")] -[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("822d5889-438f-4c18-9c06-f5db728d417d")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("4.0.0")] -[assembly: AssemblyFileVersion("4.0.0")] -[assembly: CollectionBehavior(DisableTestParallelization = true)] diff --git a/src/Cdn/Cdn.Test/ScenarioTests/AfdCustomDomainTests.cs b/src/Cdn/Cdn.Test/ScenarioTests/AfdCustomDomainTests.cs deleted file mode 100644 index 21c400a2c38a..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/AfdCustomDomainTests.cs +++ /dev/null @@ -1,40 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; - -namespace Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest -{ - public class AfdCustomDomainTests : CdnTestRunner - { - public AfdCustomDomainTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) - { - } - - [Fact(Skip = "Test is flaky due to creation of custom domain issue which prolongs response time. Will enable once RP issue is resolved.")] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestCreateAfdCustomDomain() - { - TestRunner.RunTestScript("Test-CreateAfdCustomDomain"); - } - - [Fact(Skip = "Test is flaky due to RP issue which prolongs response time. Will enable once RP issue is resolved.")] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestGetAfdCustomDomain() - { - TestRunner.RunTestScript("Test-GetAfdCustomDomain"); - } - } -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/AfdCustomDomainTests.ps1 b/src/Cdn/Cdn.Test/ScenarioTests/AfdCustomDomainTests.ps1 deleted file mode 100644 index 0db2ed5f6923..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/AfdCustomDomainTests.ps1 +++ /dev/null @@ -1,66 +0,0 @@ -# ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---------------------------------------------------------------------------------- - -function Test-CreateAfdCustomDomain -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft AFD Profile - New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $customDomainName = getAssetName - - $hostName = "$customDomainName.azfdtests.xyz" - - $customDomain = New-AzFrontDoorCdnCustomDomain -ResourceGroupName $resourceGroupName -ProfileName $profileName -CustomDomainName $customDomainName -HostName $hostName - - Assert-AreEqual $customDomain.Name $customDomainName - Assert-AreEqual $customDomain.HostName $hostName - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -function Test-GetAfdCustomDomain -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft AFD Profile - New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $customDomainName = getAssetName - - $hostName = "$customDomainName.azfdtests.xyz" - - New-AzFrontDoorCdnCustomDomain -ResourceGroupName $resourceGroupName -ProfileName $profileName -CustomDomainName $customDomainName -HostName $hostName - - $customDomain = Get-AzFrontDoorCdnCustomDomain -ResourceGroupName $resourceGroupName -ProfileName $profileName -CustomDomainName $customDomainName - - Assert-AreEqual $customDomain.Name $customDomainName - Assert-AreEqual $customDomain.HostName $hostName - Assert-AreEqual $customDomain.ProvisioningState "Succeeded" - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/AfdEndpointTests.cs b/src/Cdn/Cdn.Test/ScenarioTests/AfdEndpointTests.cs deleted file mode 100644 index d6b1cd53dc46..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/AfdEndpointTests.cs +++ /dev/null @@ -1,54 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; - -namespace Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest -{ - public class AfdEndpointTests : CdnTestRunner - { - public AfdEndpointTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) - { - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestCreateAfdEndpoint() - { - TestRunner.RunTestScript("Test-CreateAfdEndpoint"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestGetAfdEndpoint() - { - TestRunner.RunTestScript("Test-GetAfdEndpoint"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestRemoveAfdEndpoint() - { - TestRunner.RunTestScript("Test-RemoveAfdEndpoint"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestSetAfdEndpoint() - { - TestRunner.RunTestScript("Test-SetAfdEndpoint"); - } - } -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/AfdEndpointTests.ps1 b/src/Cdn/Cdn.Test/ScenarioTests/AfdEndpointTests.ps1 deleted file mode 100644 index 7fb4ca49b4a7..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/AfdEndpointTests.ps1 +++ /dev/null @@ -1,136 +0,0 @@ -# ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---------------------------------------------------------------------------------- - -<# -.SYNOPSIS -Creates a Standard_AzureFrontDoor profile and endpoint -#> - -function Test-CreateAfdEndpoint -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft CDN Profile - $createdProfile = New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - Assert-AreEqual $profileName $createdProfile.Name - Assert-AreEqual $profileSku $createdProfile.Sku - Assert-AreEqual $createdProfile.Location "Global" - - $endpointName = getAssetName - - $createdEndpoint = New-AzFrontDoorCdnEndpoint -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName - - Assert-AreEqual $endpointName $createdEndpoint.Name - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Creates a Standard_AzureFrontDoor profile and endpoint, then gets the endpoint -#> - -function Test-GetAfdEndpoint -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft CDN Profile - $createdProfile = New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $endpointName = getAssetName - - New-AzFrontDoorCdnEndpoint -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName - - $endpoint = Get-AzFrontDoorCdnEndpoint -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName - - Assert-AreEqual $endpointName $endpoint.Name - Assert-AreEqual "Global" $endpoint.Location - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Creates a Standard_AzureFrontDoor profile and endpoint, then removes the endpoint -#> - -function Test-RemoveAfdEndpoint -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft CDN Profile - $createdProfile = New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $endpointName = getAssetName - - $createdEndpoint = New-AzFrontDoorCdnEndpoint -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName - - $isDeleted = Remove-AzFrontDoorCdnEndpoint -Endpoint $createdEndpoint -PassThru - - Assert-AreEqual $isDeleted true - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Creates a Standard_AzureFrontDoor profile and endpoint, then updates the endpoint -#> - -function Test-SetAfdEndpoint -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft CDN Profile - $createdProfile = New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $endpointName = getAssetName - - New-AzFrontDoorCdnEndpoint -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName - - $endpoint = Get-AzFrontDoorCdnEndpoint -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName - - $endpoint.Tags = @{"endpoint"="afd-standard"} - - $updatedEndpoint = Set-AzFrontDoorCdnEndpoint -Endpoint $endpoint - - Assert-AreEqual $endpoint.Tags["endpoint"] $updatedEndpoint.Tags["endpoint"] - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/ScenarioTests/AfdOriginGroupTests.cs b/src/Cdn/Cdn.Test/ScenarioTests/AfdOriginGroupTests.cs deleted file mode 100644 index 7c62cb6e3999..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/AfdOriginGroupTests.cs +++ /dev/null @@ -1,54 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; - -namespace Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest -{ - public class AfdOriginGroupTests : CdnTestRunner - { - public AfdOriginGroupTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) - { - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestCreateAfdOriginGroup() - { - TestRunner.RunTestScript("Test-CreateAfdOriginGroup"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestGetAfdOriginGroup() - { - TestRunner.RunTestScript("Test-GetAfdOriginGroup"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestSetAfdOriginGroup() - { - TestRunner.RunTestScript("Test-SetAfdOriginGroup"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestRemoveAfdOriginGroup() - { - TestRunner.RunTestScript("Test-RemoveAfdOriginGroup"); - } - } -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/AfdOriginGroupTests.ps1 b/src/Cdn/Cdn.Test/ScenarioTests/AfdOriginGroupTests.ps1 deleted file mode 100644 index 3637b5dd6a91..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/AfdOriginGroupTests.ps1 +++ /dev/null @@ -1,121 +0,0 @@ -# ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---------------------------------------------------------------------------------- - -<# -.SYNOPSIS -Creates a Standard_AzureFrontDoor profile and origin group -#> - -function Test-CreateAfdOriginGroup -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft CDN Profile - New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $originGroupName = getAssetName - $sampleSize = 2 - - $originGroup = New-AzFrontDoorCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -OriginGroupName $originGroupName -SampleSize $sampleSize - - Assert-AreEqual $originGroupName $originGroup.Name - Assert-AreEqual $originGroup.Type "Microsoft.Cdn/profiles/origingroups" - Assert-AreEqual $originGroup.SampleSize $sampleSize - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -function Test-GetAfdOriginGroup -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft CDN Profile - New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $originGroupName = getAssetName - $successfulSamplesRequired = 1 - - New-AzFrontDoorCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -OriginGroupName $originGroupName -SuccessfulSamplesRequired $successfulSamplesRequired - - $originGroup = Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -OriginGroupName $originGroupName - - Assert-AreEqual $originGroupName $originGroup.Name - Assert-AreEqual $originGroup.Type "Microsoft.Cdn/profiles/origingroups" - Assert-AreEqual $originGroup.SuccessfulSamplesRequired $successfulSamplesRequired - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -function Test-SetAfdOriginGroup -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft CDN Profile - New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $originGroupName = getAssetName - - New-AzFrontDoorCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -OriginGroupName $originGroupName -SampleSize 2 -SuccessfulSamplesRequired 1 - - Set-AzFrontDoorCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -OriginGroupName $originGroupName -SampleSize 6 -SuccessfulSamplesRequired 3 - - $originGroup = Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -OriginGroupName $originGroupName - - Assert-AreEqual $originGroup.SampleSize 6 - Assert-AreEqual $originGroup.SuccessfulSamplesRequired 3 - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -function Test-RemoveAfdOriginGroup -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft CDN Profile - $profile = New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $originGroupName = getAssetName - - $originGroup = New-AzFrontDoorCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -OriginGroupName $originGroupName -SampleSize 2 -SuccessfulSamplesRequired 1 - - Remove-AzFrontDoorCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -OriginGroupName $originGroupName - - Assert-ThrowsContains { Get-AzFrontDoorCdnOriginGroup -ResourceId $originGroup.Id } "NotFound" - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/ScenarioTests/AfdOriginTests.cs b/src/Cdn/Cdn.Test/ScenarioTests/AfdOriginTests.cs deleted file mode 100644 index 269ed35fc63b..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/AfdOriginTests.cs +++ /dev/null @@ -1,47 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; - -namespace Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest -{ - public class AfdOriginTests : CdnTestRunner - { - public AfdOriginTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) - { - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestCreateAfdOrigin() - { - TestRunner.RunTestScript("Test-CreateAfdOrigin"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestGetAfdOrigin() - { - TestRunner.RunTestScript("Test-GetAfdOrigin"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestSetAfdOrigin() - { - TestRunner.RunTestScript("Test-SetAfdOrigin"); - } - } -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/AfdOriginTests.ps1 b/src/Cdn/Cdn.Test/ScenarioTests/AfdOriginTests.ps1 deleted file mode 100644 index 58acc77ef9cd..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/AfdOriginTests.ps1 +++ /dev/null @@ -1,109 +0,0 @@ -# ---------------------------------------------------------------------------------- -# -# Copyright Microsoft CorporationRemove-AzFrontDoorCdn -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---------------------------------------------------------------------------------- - -function Test-CreateAfdOrigin -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft AFD Profile - New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $originGroupName = getAssetName - $sampleSize = 2 - - New-AzFrontDoorCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -OriginGroupName $originGroupName -SampleSize $sampleSize - - $originName = getAssetName - - $hostName = "contoso.com" - - $origin = New-AzFrontDoorCdnOrigin -ResourceGroupName $resourceGroupName -ProfileName $profileName -OriginGroupName $originGroupName -OriginName $originName -HostName $hostName - - Assert-AreEqual $hostName $origin.HostName - Assert-AreEqual $originGroupName $origin.OriginGroupName - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -function Test-GetAfdOrigin -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft AFD Profile - New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $originGroupName = getAssetName - $sampleSize = 2 - - New-AzFrontDoorCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -OriginGroupName $originGroupName -SampleSize $sampleSize - - $originName = getAssetName - - $hostName = "example.org" - - $newOrigin = New-AzFrontDoorCdnOrigin -ResourceGroupName $resourceGroupName -ProfileName $profileName -OriginGroupName $originGroupName -OriginName $originName -HostName $hostName - - $getOrigin = Get-AzFrontDoorCdnOrigin -ResourceGroupName $resourceGroupName -ProfileName $profileName -OriginGroupName $originGroupName -OriginName $originName - - Assert-AreEqual $newOrigin.HostName $getOrigin.HostName - Assert-AreEqual $newOrigin.ProfileName $getOrigin.ProfileName - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -function Test-SetAfdOrigin -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft AFD Profile - New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $originGroupName = getAssetName - $sampleSize = 2 - - New-AzFrontDoorCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -OriginGroupName $originGroupName -SampleSize $sampleSize - - $originName = getAssetName - - $hostName = "example.org" - - New-AzFrontDoorCdnOrigin -ResourceGroupName $resourceGroupName -ProfileName $profileName -OriginGroupName $originGroupName -OriginName $originName -HostName $hostName - - Set-AzFrontDoorCdnOrigin -ResourceGroupName $resourceGroupName -ProfileName $profileName -OriginGroupName $originGroupName -OriginName $originName -Priority 5 -Weight 10 - - $origin = Get-AzFrontDoorCdnOrigin -ResourceGroupName $resourceGroupName -ProfileName $profileName -OriginGroupName $originGroupName -OriginName $originName - - Assert-AreEqual $origin.Priority 5 - Assert-AreEqual $origin.Weight 10 - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/AfdProfileTests.cs b/src/Cdn/Cdn.Test/ScenarioTests/AfdProfileTests.cs deleted file mode 100644 index e290ee20d528..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/AfdProfileTests.cs +++ /dev/null @@ -1,54 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; - -namespace Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest -{ - public class AfdProfileTests : CdnTestRunner - { - public AfdProfileTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) - { - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestCreateStandardAfdProfile() - { - TestRunner.RunTestScript("Test-CreateStandardAfdProfile"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestCreatePremiumAfdProfile() - { - TestRunner.RunTestScript("Test-CreatePremiumAfdProfile"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestGetStandardAfdProfile() - { - TestRunner.RunTestScript("Test-GetStandardAfdProfile"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestRemovePremiumAfdProfile() - { - TestRunner.RunTestScript("Test-RemovePremiumAfdProfile"); - } - } -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/AfdProfileTests.ps1 b/src/Cdn/Cdn.Test/ScenarioTests/AfdProfileTests.ps1 deleted file mode 100644 index 80004368b8b0..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/AfdProfileTests.ps1 +++ /dev/null @@ -1,118 +0,0 @@ -# ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---------------------------------------------------------------------------------- - -<# -.SYNOPSIS -Creates a Standard_AzureFrontDoor profile -#> - -function Test-CreateStandardAfdProfile -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft CDN Profile - $createdProfile = New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - Assert-AreEqual $profileName $createdProfile.Name - Assert-AreEqual $profileSku $createdProfile.Sku - Assert-AreEqual $createdProfile.Location "Global" - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - - -<# -.SYNOPSIS -Creates a Premium_AzureFrontDoor profile -#> - -function Test-CreatePremiumAfdProfile -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Premium_AzureFrontDoor" - $profileTags = @{"ps-test-tag-name"="ps-test-tag-value"} - - # Create a Microsoft CDN Profile - $createdProfile = New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku -Tag $profileTags - - Assert-AreEqual $profileName $createdProfile.Name - Assert-AreEqual $profileSku $createdProfile.Sku - Assert-AreEqual $createdProfile.Location "Global" - Assert-AreEqual $profileTags["ps-test-tag-name"] $createdProfile.Tags["ps-test-tag-name"] - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Creates a Standard_AzureFrontDoor profile and Gets the profile after creating -#> - -function Test-GetStandardAfdProfile -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft CDN Profile - New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $profile = Get-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName - - Assert-AreEqual $profileName $profile.Name - Assert-AreEqual $profileSku $profile.Sku - Assert-AreEqual $profile.Location "Global" - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Creates a Premium_AzureFrontDoor profile and removes the profile after creating -#> - -function Test-RemovePremiumAfdProfile -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Premium_AzureFrontDoor" - - # Create a Microsoft CDN Profile - New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $isDeleted = Remove-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -PassThru - - Assert-AreEqual $isDeleted true - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/AfdRouteTests.cs b/src/Cdn/Cdn.Test/ScenarioTests/AfdRouteTests.cs deleted file mode 100644 index 48e52fcfde84..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/AfdRouteTests.cs +++ /dev/null @@ -1,40 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; - -namespace Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest -{ - public class AfdRouteTests : CdnTestRunner - { - public AfdRouteTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) - { - } - - [Fact(Skip = "Test is flaky due to creation of custom domain issue which prolongs response time. Will enable once RP issue is resolved.")] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestCreateAfdRoute() - { - TestRunner.RunTestScript("Test-CreateAfdRoute"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestGetAfdRoute() - { - TestRunner.RunTestScript("Test-GetAfdRoute"); - } - } -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/AfdRouteTests.ps1 b/src/Cdn/Cdn.Test/ScenarioTests/AfdRouteTests.ps1 deleted file mode 100644 index 7955ae139f33..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/AfdRouteTests.ps1 +++ /dev/null @@ -1,74 +0,0 @@ -# ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---------------------------------------------------------------------------------- - -function Test-CreateAfdRoute -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft AFD Profile - New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $endpointName = getAssetName - - $createdEndpoint = New-AzFrontDoorCdnEndpoint -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName - - $originGroupName = getAssetName - - $originGroup = New-AzFrontDoorCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -OriginGroupName $originGroupName -SampleSize 3 - - $customDomainName = getAssetName - - $hostName = "$customDomainName.azfdtests.xyz" - - $customDomain = New-AzFrontDoorCdnCustomDomain -ResourceGroupName $resourceGroupName -ProfileName $profileName -CustomDomainName $customDomainName -HostName $hostName - - $routeName = getAssetName - - $route = New-AzFrontDoorCdnRoute -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -RouteName $routeName -OriginGroupId $originGroup.Id -DomainId $customDomain.Id - - Assert-AreEqual $routeName $route.Name - Assert-AreEqual $originGroup.Id $route.OriginGroupId - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -function Test-GetAfdRoute -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft AFD Profile - $profile = New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $endpointName = getAssetName - - $endpoint = New-AzFrontDoorCdnEndpoint -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName - - $routeName = getAssetName - - Assert-ThrowsContains { Get-AzFrontDoorCdnRoute -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -RouteName $routeName } "NotFound" - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/ScenarioTests/AfdRuleSetTests.cs b/src/Cdn/Cdn.Test/ScenarioTests/AfdRuleSetTests.cs deleted file mode 100644 index 1d3c9cc7b1c5..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/AfdRuleSetTests.cs +++ /dev/null @@ -1,40 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; - -namespace Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest -{ - public class AfdRuleSetTests : CdnTestRunner - { - public AfdRuleSetTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) - { - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestCreateAfdRuleSet() - { - TestRunner.RunTestScript("Test-CreateAfdRuleSet"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestRemoveAfdRuleSet() - { - TestRunner.RunTestScript("Test-RemoveAfdRuleSet"); - } - } -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/AfdRuleSetTests.ps1 b/src/Cdn/Cdn.Test/ScenarioTests/AfdRuleSetTests.ps1 deleted file mode 100644 index 0b6e106554b4..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/AfdRuleSetTests.ps1 +++ /dev/null @@ -1,60 +0,0 @@ -# ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---------------------------------------------------------------------------------- - -function Test-CreateAfdRuleSet -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft AFD Profile - New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $ruleSetName = getAssetName - - $ruleSet = New-AzFrontDoorCdnRuleSet -ResourceGroupName $resourceGroupName -ProfileName $profileName -RuleSetName $ruleSetName - - Assert-AreEqual $ruleSetName $ruleSet.Name - Assert-AreEqual $ruleSet.Type "Microsoft.Cdn/profiles/rulesets" - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -function Test-RemoveAfdRuleSet -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft AFD Profile - New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $ruleSetName = getAssetName - - $ruleSet = New-AzFrontDoorCdnRuleSet -ResourceGroupName $resourceGroupName -ProfileName $profileName -RuleSetName $ruleSetName - - Get-AzFrontDoorCdnRuleSet -ResourceGroupName $resourceGroupName -ProfileName $profileName -RuleSetName $ruleSetName | Remove-AzFrontDoorCdnRuleSet - - Assert-ThrowsContains { Get-AzFrontDoorCdnRuleSet -ResourceId $ruleSet.Id } "NotFound" - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/ScenarioTests/AfdRuleTests.cs b/src/Cdn/Cdn.Test/ScenarioTests/AfdRuleTests.cs deleted file mode 100644 index 4abfd7791cd6..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/AfdRuleTests.cs +++ /dev/null @@ -1,33 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; - -namespace Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest -{ - public class AfdRuleTests : CdnTestRunner - { - public AfdRuleTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) - { - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestCreateAfdRule() - { - TestRunner.RunTestScript("Test-CreateAfdRule"); - } - } -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/AfdRuleTests.ps1 b/src/Cdn/Cdn.Test/ScenarioTests/AfdRuleTests.ps1 deleted file mode 100644 index c88bb02ebeca..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/AfdRuleTests.ps1 +++ /dev/null @@ -1,42 +0,0 @@ -# ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---------------------------------------------------------------------------------- - -function Test-CreateAfdRule -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft AFD Profile - New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - # Create Rule Set - $ruleSetName = getAssetName - $ruleSet = New-AzFrontDoorCdnRuleSet -ResourceGroupName $resourceGroupName -ProfileName $profileName -RuleSetName $ruleSetName - - # Create Rule - $ruleName = getAssetName - $ruleAction = New-AzFrontDoorCdnRuleAction -HeaderType ModifyRequestHeader -HeaderAction Overwrite -HeaderName "x-header-name" -HeaderValue "header-value" - $rule = New-AzFrontDoorCdnRule -ResourceGroupName $resourceGroupName -ProfileName $profileName -RuleSetName $ruleSetName -RuleName $ruleName -Action $ruleAction -Order 2 - - Assert-AreEqual $ruleSetName $ruleSet.Name - Assert-AreEqual $ruleName $rule.Name - Assert-AreEqual $rule.Type "Microsoft.Cdn/profiles/rulesets/rules" - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/ScenarioTests/AfdSecurityPolicyTests.cs b/src/Cdn/Cdn.Test/ScenarioTests/AfdSecurityPolicyTests.cs deleted file mode 100644 index cf0cead9f2a9..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/AfdSecurityPolicyTests.cs +++ /dev/null @@ -1,33 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; - -namespace Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest -{ - public class AfdSecurityPolicyTests : CdnTestRunner - { - public AfdSecurityPolicyTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) - { - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestGetAfdSecurityPolicy() - { - TestRunner.RunTestScript("Test-GetAfdSecurityPolicy"); - } - } -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/AfdSecurityPolicyTests.ps1 b/src/Cdn/Cdn.Test/ScenarioTests/AfdSecurityPolicyTests.ps1 deleted file mode 100644 index 0a7e538dc47f..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/AfdSecurityPolicyTests.ps1 +++ /dev/null @@ -1,34 +0,0 @@ -# ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---------------------------------------------------------------------------------- - -function Test-GetAfdSecurityPolicy -{ - # Set up required fields - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $profileSku = "Standard_AzureFrontDoor" - - # Create a Microsoft AFD Profile - $profile = New-AzFrontDoorCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Sku $profileSku - - $securityPolicyName = getAssetName - - Assert-ThrowsContains { Get-AzFrontDoorCdnSecurityPolicy -ResourceGroupName $resourceGroupName -ProfileName $profileName -SecurityPolicyName $securityPolicyName } "NotFound" - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - diff --git a/src/Cdn/Cdn.Test/ScenarioTests/CdnTestRunner.cs b/src/Cdn/Cdn.Test/ScenarioTests/CdnTestRunner.cs deleted file mode 100644 index 5369aa1cb8fa..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/CdnTestRunner.cs +++ /dev/null @@ -1,56 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections.Generic; -using Microsoft.Azure.Commands.TestFx; -using Xunit.Abstractions; - -namespace Microsoft.Azure.Commands.Cdn.Test.ScenarioTests -{ - public class CdnTestRunner - { - protected readonly ITestRunner TestRunner; - - protected CdnTestRunner(ITestOutputHelper output) - { - TestRunner = TestManager.CreateInstance(output) - .WithNewPsScriptFilename($"{GetType().Name}.ps1") - .WithProjectSubfolderForTests("ScenarioTests") - .WithCommonPsScripts(new[] - { - @"Common.ps1", - @"../AzureRM.Resources.ps1", - }) - .WithNewRmModules(helper => new[] - { - helper.RMProfileModule, - helper.GetRMModulePath("Az.Cdn.psd1") - }) - .WithNewRecordMatcherArguments( - userAgentsToIgnore: new Dictionary - { - {"Microsoft.Azure.Management.Resources.ResourceManagementClient", "2016-02-01"}, - }, - resourceProviders: new Dictionary - { - {"Microsoft.Resources", null}, - {"Microsoft.Features", null}, - {"Microsoft.Authorization", null}, - {"Microsoft.Compute", null} - } - ) - .Build(); - } - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/ScenarioTests/ChinaCdnProfileTests.cs b/src/Cdn/Cdn.Test/ScenarioTests/ChinaCdnProfileTests.cs deleted file mode 100644 index 2011d3136642..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/ChinaCdnProfileTests.cs +++ /dev/null @@ -1,33 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; - -namespace Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest -{ - public class ChinaCdnProfileTests : CdnTestRunner - { - public ChinaCdnProfileTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) - { - } - - [Fact(Skip = "Test needs to be run by the China CDN team")] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestProfileList() - { - TestRunner.RunTestScript("Test-ProfileList"); - } - } -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/ChinaCdnProfileTests.ps1 b/src/Cdn/Cdn.Test/ScenarioTests/ChinaCdnProfileTests.ps1 deleted file mode 100644 index 0a9fb0ac1c81..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/ChinaCdnProfileTests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -# ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---------------------------------------------------------------------------------- - -<# -.SYNOPSIS -Create Profile with different Sku -#> -function Test-ProfileList -{ - $retrievedProfile = Get-AzCdnProfile -ProfileName "cdn-billing-standard-bandwidth-avg" -ResourceGroupName "cdnbillingskus" - - Assert-NotNull $retrievedProfile - Assert-AreEqual "Standard_AvgBandWidth_ChinaCdn" $retrievedProfile.Sku.Name -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/ScenarioTests/Common.ps1 b/src/Cdn/Cdn.Test/ScenarioTests/Common.ps1 deleted file mode 100644 index 37e82be6c9b3..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/Common.ps1 +++ /dev/null @@ -1,134 +0,0 @@ -# ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---------------------------------------------------------------------------------- - -<# -.SYNOPSIS -Gets valid resource group name -#> -function Get-ResourceGroupName -{ - return getAssetName -} - -<# -.SYNOPSIS -Gets valid resource name -#> -function Get-ResourceName -{ - return getAssetName -} - -<# -.SYNOPSIS -Gets the default location for a provider -#> -function Get-ProviderLocation($provider) -{ - if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) - { - $namespace = $provider.Split("/")[0] - if($provider.Contains("/")) - { - $type = $provider.Substring($namespace.Length + 1) - $location = Get-AzResourceProvider -ProviderNamespace $namespace | where {$_.ResourceTypes[0].ResourceTypeName -eq $type} - - if ($location -eq $null) - { - return "West US" - } else - { - return $location.Locations[0] - } - } - - return "West US" - } - - return "WestUS" -} - -<# -.SYNOPSIS -Creates a resource group to use in tests -#> -function TestSetup-CreateResourceGroup -{ - $resourceGroupName = getAssetName - $rglocation = Get-ProviderLocation "North Europe" - $resourceGroup = New-AzResourceGroup -Name $resourceGroupName -location $rglocation -Force - return $resourceGroup -} - -<# -.SYNOPSIS -Asserts if two tags are equal -#> -function Assert-Tags($tags1, $tags2) -{ - if($tags1.count -ne $tags2.count) - { - throw "Tag size not equal. Tag1: $tags1.count Tag2: $tags2.count" - } - - foreach($key in $tags1.Keys) - { - if($tags1[$key] -ne $tags2[$key]) - { - throw "Tag content not equal. Key:$key Tags1:" + $tags1[$key] + "Tags2:" + $tags2[$key] - } - } -} - -<# -.SYNOPSIS -Asserts if two compression types are equal -#> -function Assert-CompressionTypes($types1, $types2) -{ - if($types1.Count -ne $types1.Count) - { - throw "Array size not equal. Types1: $types1.count Types2: $types2.count" - } - - foreach($value1 in $types1) - { - $found = $false - foreach($value2 in $types2) - { - if($value1.CompareTo($value2) -eq 0) - { - $found = $true - break - } - } - if(-Not($found)) - { - throw "Compression content not equal. " + $value1 + " cannot be found in second array" - } - } -} - -<# -.SYNOPSIS -Sleep in record mode only -#> -function SleepInRecordMode ([int]$SleepIntervalInSec) -{ - $mode = $env:AZURE_TEST_MODE - if ( $mode -ne $null -and $mode.ToUpperInvariant() -eq "RECORD") - { - Wait-Seconds $SleepIntervalInSec - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/ScenarioTests/CustomDomainTests.cs b/src/Cdn/Cdn.Test/ScenarioTests/CustomDomainTests.cs deleted file mode 100644 index 2d17733ae9be..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/CustomDomainTests.cs +++ /dev/null @@ -1,68 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; - -namespace Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest -{ - public class CustomDomainTests : CdnTestRunner - { - public CustomDomainTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) - { - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestCustomDomainEnableDisableWithRunningEndpoint() - { - TestRunner.RunTestScript("Test-CustomDomainEnableDisableWithRunningEndpoint"); - } - - [Fact(Skip = "Test is flaky due to creation of custom domain issue which prolongs response time. Will enable once RP issue is resolved.")] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestCustomDomainGetRemoveWithRunningEndpoint() - { - TestRunner.RunTestScript("Test-CustomDomainGetRemoveWithRunningEndpoint"); - } - - [Fact(Skip = "Test is flaky due to creation of custom domain issue which prolongs response time. Will enable once RP issue is resolved.")] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestCustomDomainGetRemoveWithStoppedEndpoint() - { - TestRunner.RunTestScript("Test-CustomDomainGetRemoveWithStoppedEndpoint"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestVerizonCustomDomainHttpsWithRunningEndpoint() - { - TestRunner.RunTestScript("Test-VerizonCustomDomainEnableHttpsWithRunningEndpoint"); - } - - [Fact(Skip = "Test is flaky due to creation of custom domain issue which prolongs response time. Will enable once RP issue is resolved.")] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestAkamaiCustomDomainHttpsWithRunningEndpoint() - { - TestRunner.RunTestScript("Test-AkamaiCustomDomainEnableHttpsWithRunningEndpoint"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestMicrosoftCustomDomainHttpsWithRunningEndpoint() - { - TestRunner.RunTestScript("Test-MicrosoftCustomDomainEnableHttpsWithRunningEndpoint"); - } - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/ScenarioTests/CustomDomainTests.ps1 b/src/Cdn/Cdn.Test/ScenarioTests/CustomDomainTests.ps1 deleted file mode 100644 index 752498e1cbd0..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/CustomDomainTests.ps1 +++ /dev/null @@ -1,285 +0,0 @@ -# ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---------------------------------------------------------------------------------- - -<# -.SYNOPSIS -Gets and removes custom domain with running endpoint. -#> -function Test-CustomDomainGetRemoveWithRunningEndpoint -{ - # Hard-coding host and endpoint names due to requirement for DNS CNAME - $endpointName = "testAkamaiEP" - $hostName = "testAkamai.dustydog.us" - - $customDomainName = getAssetName - - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Akamai" - $tags = @{"tag1" = "value1"; "tag2" = "value2"} - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku -Tag $tags - - $originName = getAssetName - $originHostName = "www.microsoft.com" - $createdEndpoint = New-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName - - $endpoint = Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - $validateResult = Test-AzCdnCustomDomain -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -CustomDomainHostName $hostName - Assert-True{$validateResult.CustomDomainValidated} - $validateResultbyPiping = Test-AzCdnCustomDomain -CdnEndpoint $endpoint -CustomDomainHostName $hostName - Assert-True{$validateResultbyPiping.CustomDomainValidated} - - $createdCustomDomain = $endpoint | New-AzCdnCustomDomain -HostName $hostName -CustomDomainName $customDomainName - Assert-AreEqual $customDomainName $createdCustomDomain.Name - Assert-AreEqual $hostName $createdCustomDomain.HostName - Assert-ThrowsContains { New-AzCdnCustomDomain -HostName $hostName -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "existing" - - $customDomain = $endpoint | Get-AzCdnCustomDomain -CustomDomainName $customDomainName - Assert-AreEqual $customDomainName $customDomain.Name - Assert-AreEqual $hostName $customDomain.HostName - - $removed = $customDomain | Remove-AzCdnCustomDomain -PassThru - Assert-True{$removed} - Assert-ThrowsContains { Remove-AzCdnCustomDomain -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "does not exist" - - Assert-ThrowsContains { Get-AzCdnCustomDomain -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "NotFound" - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Enables custom domain with running endpoint. -#> -function Test-CustomDomainEnableDisableWithRunningEndpoint -{ - # Hard-coding host and endpoint names due to requirement for DNS CNAME - $endpointName = "cdn-ps-test-msft" - $hostName = "a.cdn-ps-test-msft.azfdtest.xyz" - - $customDomainName = getAssetName - - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Microsoft" - $tags = @{"tag1" = "value1"; "tag2" = "value2"} - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku -Tag $tags - - $originName = getAssetName - $originHostName = "www.microsoft.com" - $createdEndpoint = New-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName - if ($endpoint.HostName -Match "azureedge-test\.net$") { - $hostName = 'a.cdn-ps-test-msft-df.azfdtest.xyz' - } - $endpoint = Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - $validateResult = Test-AzCdnCustomDomain -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -CustomDomainHostName $hostName - Assert-True{$validateResult.CustomDomainValidated} - $validateResultbyPiping = Test-AzCdnCustomDomain -CdnEndpoint $endpoint -CustomDomainHostName $hostName - Assert-True{$validateResultbyPiping.CustomDomainValidated} - - $createdCustomDomain = $endpoint | New-AzCdnCustomDomain -HostName $hostName -CustomDomainName $customDomainName - Assert-AreEqual $customDomainName $createdCustomDomain.Name - Assert-AreEqual $hostName $createdCustomDomain.HostName - - $customDomain = $endpoint | Get-AzCdnCustomDomain -CustomDomainName $customDomainName - Assert-AreEqual $customDomainName $customDomain.Name - Assert-AreEqual $hostName $customDomain.HostName - - $enabled = $customDomain | Enable-AzCdnCustomDomainHttps -PassThru - Assert-True{$enabled} - - $customDomain = $endpoint | Get-AzCdnCustomDomain -CustomDomainName $customDomainName - Assert-AreEqual "Enabling" $customDomain.CustomHttpsProvisioningState - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - - -<# -.SYNOPSIS -Gets and removes custom domain with stopped endpoint -#> -function Test-CustomDomainGetRemoveWithStoppedEndpoint -{ - # Hard-coding host and endpoint names due to requirement for DNS CNAME - $endpointName = "testAkamaiPS" - $hostName = "testAkamaiPS.azfdtest.xyz" - - $customDomainName = getAssetName - - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Akamai" - $tags = @{"tag1" = "value1"; "tag2" = "value2"} - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku -Tag $tags - - $originName = getAssetName - $originHostName = "www.microsoft.com" - $createdEndpoint = New-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName - - $endpoint = Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - $validateResult = Test-AzCdnCustomDomain -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -CustomDomainHostName $hostName - #Assert-True{$validateResult.CustomDomainValidated} - #$validateResultbyPiping = Test-AzCdnCustomDomain -CdnEndpoint $endpoint -CustomDomainHostName $hostName - #Assert-True{$validateResultbyPiping.CustomDomainValidated} - - $createdCustomDomain = New-AzCdnCustomDomain -HostName $hostName -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-AreEqual $customDomainName $createdCustomDomain.Name - Assert-AreEqual $hostName $createdCustomDomain.HostName - Assert-ThrowsContains { New-AzCdnCustomDomain -HostName $hostName -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "existing" - - $stopped = Stop-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - - $customDomain = Get-AzCdnCustomDomain -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-AreEqual $customDomainName $customDomain.Name - Assert-AreEqual $hostName $customDomain.HostName - - $removed = Remove-AzCdnCustomDomain -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -PassThru - Assert-True{$removed} - Assert-ThrowsContains { Remove-AzCdnCustomDomain -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "does not exist" - - Assert-ThrowsContains { Get-AzCdnCustomDomain -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "NotFound" - - Remove-AzureRmResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Enable Https for custom domain with running endpoint -#> -function Test-VerizonCustomDomainEnableHttpsWithRunningEndpoint -{ - # Hard-coding host and endpoint names due to requirement for DNS CNAME - $endpointName = "testVerizonEP" - $hostName = "testVerizon.dustydog.us" - - $customDomainName = getAssetName - - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Verizon" - $tags = @{"tag1" = "value1"; "tag2" = "value2"} - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku -Tag $tags - - $originName = getAssetName - $originHostName = "www.microsoft.com" - $createdEndpoint = New-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName - - $endpoint = Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - $validateResult = Test-AzCdnCustomDomain -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -CustomDomainHostName $hostName - Assert-True{$validateResult.CustomDomainValidated} - $validateResultbyPiping = Test-AzCdnCustomDomain -CdnEndpoint $endpoint -CustomDomainHostName $hostName - Assert-True{$validateResultbyPiping.CustomDomainValidated} - - $createdCustomDomain = New-AzCdnCustomDomain -HostName $hostName -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-AreEqual $customDomainName $createdCustomDomain.Name - Assert-AreEqual $hostName $createdCustomDomain.HostName - - $customDomain = Get-AzCdnCustomDomain -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-AreEqual $customDomainName $customDomain.Name - Assert-AreEqual $hostName $customDomain.HostName - - $enabled = $customDomain | Enable-AzCdnCustomDomainHttps -PassThru - Assert-True{$enabled} - - $customDomain = Get-AzCdnCustomDomain -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - - Assert-AreEqual $customDomain.CustomHttpsProvisioningState "Enabling" - - Remove-AzureRmResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Enable Https for custom domain with running endpoint -#> -function Test-AkamaiCustomDomainEnableHttpsWithRunningEndpoint -{ - # Hard-coding host and endpoint names due to requirement for DNS CNAME - $endpointName = "testAkamai" - $hostName = "testAkamai.dustydog.us" - - $customDomainName = getAssetName - - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Akamai" - $tags = @{"tag1" = "value1"; "tag2" = "value2"} - $profile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku -Tag $tags - - $originName = getAssetName - $originHostName = "www.microsoft.com" - $endpoint = New-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName - $validateResult = Test-AzCdnCustomDomain -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -CustomDomainHostName $hostName - Assert-True{$validateResult.CustomDomainValidated} - - $customDomain = New-AzCdnCustomDomain -HostName $hostName -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-AreEqual $customDomainName $customDomain.Name - Assert-AreEqual $hostName $customDomain.HostName - - $enabled = $customDomain | Enable-AzCdnCustomDomainHttps -PassThru - Assert-True{$enabled} - - $customDomain = Get-AzCdnCustomDomain -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-AreEqual $customDomain.CustomHttpsProvisioningState "Enabling" - - Remove-AzureRmResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Enable Https for custom domain with running endpoint -#> -function Test-MicrosoftCustomDomainEnableHttpsWithRunningEndpoint -{ - # Hard-coding host and endpoint names due to requirement for DNS CNAME - $endpointName = "cdn-ps-test-msft" - $hostName = "a.cdn-ps-test-msft.azfdtest.xyz" - - $customDomainName = getAssetName - - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Microsoft" - $tags = @{"tag1" = "value1"; "tag2" = "value2"} - $profile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku -Tag $tags - - $originName = getAssetName - $originHostName = "www.microsoft.com" - $endpoint = New-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName - if ($endpoint.HostName -Match "azureedge-test\.net$") { - $hostName = 'a.cdn-ps-test-msft-df.azfdtest.xyz' - } - - $validateResult = Test-AzCdnCustomDomain -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -CustomDomainHostName $hostName - Assert-True{$validateResult.CustomDomainValidated} - - $customDomain = New-AzCdnCustomDomain -HostName $hostName -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-AreEqual $customDomainName $customDomain.Name - Assert-AreEqual $hostName $customDomain.HostName - - $enabled = $customDomain | Enable-AzCdnCustomDomainHttps -PassThru - Assert-True{$enabled} - - $customDomain = Get-AzCdnCustomDomain -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-AreEqual $customDomain.CustomHttpsProvisioningState "Enabling" - - Remove-AzureRmResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/ScenarioTests/EndpointTests.cs b/src/Cdn/Cdn.Test/ScenarioTests/EndpointTests.cs deleted file mode 100644 index 3184441d24c7..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/EndpointTests.cs +++ /dev/null @@ -1,96 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; - -namespace Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest -{ - public class EndpointTests : CdnTestRunner - { - public EndpointTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) - { - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestEndpointCrudAndAction() - { - TestRunner.RunTestScript("Test-EndpointCrudAndAction"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestEndpointCreateWithRulesEngine() - { - TestRunner.RunTestScript("Test-EndpointCreateWithRulesEngine"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestEndpointCrudAndActionWithPiping() - { - TestRunner.RunTestScript("Test-EndpointCrudAndActionWithPiping"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestEndpointCrudAndActionWithAllProperties() - { - TestRunner.RunTestScript("Test-EndpointCrudAndActionWithAllProperties"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestEndpointCreateWithDsa() - { - TestRunner.RunTestScript("Test-EndpointCreateWithDSA"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestEndpointCrudAndActionWithAllPropertiesWithPiping() - { - TestRunner.RunTestScript("Test-EndpointCrudAndActionWithAllPropertiesWithPiping"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestEndpointPipeline() - { - TestRunner.RunTestScript("Test-EndpointPipeline"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestEndpointGeoFilters() - { - TestRunner.RunTestScript("Test-EndpointGeoFilters"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestEndpointResourceUsage() - { - TestRunner.RunTestScript("Test-EndpointResourceUsage"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void EndpointValidateProbeUrl() - { - TestRunner.RunTestScript("Test-EndpointValidateProbeUrl"); - } - } -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/EndpointTests.ps1 b/src/Cdn/Cdn.Test/ScenarioTests/EndpointTests.ps1 deleted file mode 100644 index f2a8c887417b..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/EndpointTests.ps1 +++ /dev/null @@ -1,577 +0,0 @@ -# ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---------------------------------------------------------------------------------- - -<# -.SYNOPSIS -Full Endpoint CRUD cycle -#> -function Test-EndpointCrudAndAction -{ - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Microsoft" - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku - - $endpointName = getAssetName - $originName = getAssetName - $originHostName = "www.microsoft.com" - - $nameAvailability = Get-AzCdnEndpointNameAvailability -EndpointName $endpointName - Assert-True{$nameAvailability.NameAvailable} - - $description = 'Sample delivery policy' - $action = New-AzCdnDeliveryRuleAction -HeaderActionType ModifyResponseHeader -Action Append -HeaderName "Access-Control-Allow-Origin" -Value "*" - $condition = New-AzCdnDeliveryRuleCondition -MatchVariable UrlPath -Operator Contains -MatchValue "abc" - $deliveryRule = New-AzCdnDeliveryRule -Name "Rule1" -Order 1 -Condition $condition -Action $action - $deliveryPolicy = New-AzCdnDeliveryPolicy -Description $description -Rule $deliveryRule - - $createdEndpoint = New-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName -DeliveryPolicy $deliveryPolicy - Assert-AreEqual $description $createdEndpoint.DeliveryPolicy.Description - Assert-AreEqual $endpointName $createdEndpoint.Name - Assert-AreEqual $profileName $createdEndpoint.ProfileName - Assert-AreEqual $resourceGroup.ResourceGroupName $createdEndpoint.ResourceGroupName - Assert-AreEqual $originName $createdEndpoint.Origins[0].Name - Assert-AreEqual $originHostName $createdEndpoint.Origins[0].HostName - - - $nameAvailability = Get-AzCdnEndpointNameAvailability -EndpointName $endpointName - Assert-False{$nameAvailability.NameAvailable} - - $stopped = Stop-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false -PassThru - $stoppedEndpoint = Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-True{$stopped} - Assert-AreEqual "Stopped" $stoppedEndpoint.ResourceState - - $started = Start-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -PassThru - $startedEndpoint = Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-True{$started} - Assert-AreEqual "Running" $startedEndpoint.ResourceState - - $validateResult = Test-AzCdnCustomDomain -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -CustomDomainHostName "unverifiedcustomdomain.com" - Assert-False{$validateResult.CustomDomainValidated} - - $endpointRemoved = Remove-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -PassThru -Force - Assert-True{$endpointRemoved} - - Assert-ThrowsContains { Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "NotFound" - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Create ENdpoint with RulesEngine config -#> -function Test-EndpointCreateWithRulesEngine -{ - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Microsoft" - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku - - $endpointName = getAssetName - $originName = getAssetName - $originHostName = "www.microsoft.com" - - $nameAvailability = Get-AzCdnEndpointNameAvailability -EndpointName $endpointName - Assert-True{$nameAvailability.NameAvailable} - - $description = 'Sample delivery policy' - $cond1 = New-AzCdnDeliveryRuleCondition -MatchVariable IsDevice -Operator Equal -MatchValue "Desktop" - $action1 = New-AzCdnDeliveryRuleAction -SourcePattern "/abc" -Destination "/def" -PreservePath - $action2 = New-AzCdnDeliveryRuleAction -QueryStringBehavior ExcludeAll -QueryParameter "abc","def" - $action3 = New-AzCdnDeliveryRuleAction -QueryStringBehavior IncludeAll - $redirect = New-AzCdnDeliveryRuleAction -RedirectType Found -DestinationProtocol MatchRequest - $rule0 = New-AzCdnDeliveryRule -Name "EmptyCondition" -Order 0 -Action $redirect,$action3 - $rule1 = New-AzCdnDeliveryRule -Name "Rule1" -Order 1 -Condition $cond1 -Action $action1,$action2 - $deliverypolicy = New-AzCdnDeliveryPolicy -Description $description -Rule $rule0,$rule1 - - $createdEndpoint = New-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName -DeliveryPolicy $deliveryPolicy - Assert-AreEqual $description $createdEndpoint.DeliveryPolicy.Description - Assert-AreEqual $endpointName $createdEndpoint.Name - Assert-AreEqual $deliverypolicy.Count $createdEndpoint.DeliveryPolicy.Count - Assert-AreEqual $profileName $createdEndpoint.ProfileName - Assert-AreEqual $resourceGroup.ResourceGroupName $createdEndpoint.ResourceGroupName - Assert-AreEqual $originName $createdEndpoint.Origins[0].Name - Assert-AreEqual $originHostName $createdEndpoint.Origins[0].HostName - - $endpointRemoved = Remove-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -PassThru -Force - Assert-True{$endpointRemoved} - - Assert-ThrowsContains { Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "NotFound" - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - - -<# -.SYNOPSIS -Endpoint cycle with piping -#> -function Test-EndpointCrudAndActionWithPiping -{ - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Microsoft" - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku - - $endpointName = getAssetName - $originName = getAssetName - $originHostName = "www.microsoft.com" - - $nameAvailability = Get-AzCdnEndpointNameAvailability -EndpointName $endpointName - Assert-True{$nameAvailability.NameAvailable} - $createdEndpoint = New-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName - - Assert-AreEqual $endpointName $createdEndpoint.Name - Assert-AreEqual $profileName $createdEndpoint.ProfileName - Assert-AreEqual $resourceGroup.ResourceGroupName $createdEndpoint.ResourceGroupName - Assert-AreEqual $originName $createdEndpoint.Origins[0].Name - Assert-AreEqual $originHostName $createdEndpoint.Origins[0].HostName - - $nameAvailability = Get-AzCdnEndpointNameAvailability -EndpointName $endpointName - Assert-False{$nameAvailability.NameAvailable} - - $stopped = Stop-AzCdnEndpoint -CdnEndpoint $createdEndpoint -Confirm:$false -PassThru - $stoppedEndpoint = Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-True{$stopped} - Assert-AreEqual "Stopped" $stoppedEndpoint.ResourceState - - $started = Start-AzCdnEndpoint -CdnEndpoint $createdEndpoint -PassThru - $startedEndpoint = Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-True{$started} - Assert-AreEqual "Running" $startedEndpoint.ResourceState - - $validateResultbyPiping = Test-AzCdnCustomDomain -CdnEndpoint $createdEndpoint -CustomDomainHostName "unverifiedcustomdomain.com" - Assert-False{$validateResultbyPiping.CustomDomainValidated} - - $startedEndpoint.OriginHostHeader = "www.microsoft.com" - $startedEndpoint.OriginPath = "/pictures" - $startedEndpoint.QueryStringCachingBehavior = "UseQueryString" - - $description = "Updated Delivery Policy" - $action = New-AzCdnDeliveryRuleAction -HeaderActionType ModifyResponseHeader -Action Append -HeaderName "Access-Control-Allow-Origin" -Value "*" - $condition = New-AzCdnDeliveryRuleCondition -MatchVariable UrlPath -Operator Contains -MatchValue "abc" - $newRule = New-AzCdnDeliveryRule -Name "Rule1" -Order 1 -Condition $condition -Action $action - $deliveryPolicy = New-AzCdnDeliveryPolicy -Description $description -Rule $newRule - - $startedEndpoint.DeliveryPolicy = $deliveryPolicy - - $updatedEndpoint = Set-AzCdnEndpoint -CdnEndpoint $startedEndpoint - Assert-AreEqual $startedEndpoint.OriginHostHeader $updatedEndpoint.OriginHostHeader - Assert-AreEqual $startedEndpoint.OriginPath $updatedEndpoint.OriginPath - Assert-AreEqual $startedEndpoint.QueryStringCachingBehavior $updatedEndpoint.QueryStringCachingBehavior - Assert-AreEqual $startedEndpoint.DeliveryPolicy.Description $updatedEndpoint.DeliveryPolicy.Description - - $endpointRemoved = Remove-AzCdnEndpoint -CdnEndpoint $createdEndpoint -Force -PassThru - Assert-True{$endpointRemoved} - - Assert-ThrowsContains { Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "NotFound" - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Endpoint cycle with all of the properties -#> -function Test-EndpointCrudAndActionWithAllProperties -{ - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Verizon" - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku - - $endpointName = getAssetName - $originName = getAssetName - $originHostHeader = "www.microsoft.com" - $originPath = "/videos" - $contentTypeToCompress = @("application/json", "text/html") - $isCompressionEnabled = $true - $isHttpAllowed = $true - $isHttpsAllowed = $true - $queryStringCachingBehavior = "BypassCaching" - $httpPort = 123 - $httpsPort = 456 - $optimizationType = "GeneralWebDelivery" - $tags = @{"tag1" = "value1"; "tag2" = "value2"} - - $originHostName = "www.microsoft.com" - - $nameAvailability = Get-AzCdnEndpointNameAvailability -EndpointName $endpointName - Assert-True{$nameAvailability.NameAvailable} - - $createdEndpoint = New-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -OriginHostHeader $originHostHeader -OriginPath $originPath -ContentTypesToCompress $contentTypeToCompress -IsCompressionEnabled $isCompressionEnabled -IsHttpAllowed $isHttpAllowed -IsHttpsAllowed $isHttpsAllowed -OptimizationType $optimizationType -QueryStringCachingBehavior $queryStringCachingBehavior -OriginName $originName -OriginHostName $originHostName -HttpPort $httpPort -HttpsPort $httpsPort -Tag $tags - - Assert-AreEqual $endpointName $createdEndpoint.Name - Assert-AreEqual $profileName $createdEndpoint.ProfileName - Assert-AreEqual $resourceGroup.ResourceGroupName $createdEndpoint.ResourceGroupName - Assert-NotNull $createdEndpoint.HostName - Assert-AreEqual $originHostHeader $createdEndpoint.OriginHostHeader - Assert-AreEqual $originPath $createdEndpoint.OriginPath - Assert-CompressionTypes $contentTypeToCompress $createdEndpoint.ContentTypesToCompress - Assert-AreEqual $isCompressionEnabled $createdEndpoint.IsCompressionEnabled - Assert-AreEqual $isHttpAllowed $createdEndpoint.IsHttpAllowed - Assert-AreEqual $isHttpsAllowed $createdEndpoint.IsHttpsAllowed - Assert-AreEqual $optimizationType $createdEndpoint.OptimizationType - Assert-AreEqual $queryStringCachingBehavior $createdEndpoint.QueryStringCachingBehavior - Assert-Tags $tags $createdEndpoint.Tags - - Assert-AreEqual $httpPort $createdEndpoint.Origins[0].HttpPort - Assert-AreEqual $httpsPort $createdEndpoint.Origins[0].HttpsPort - Assert-AreEqual $originName $createdEndpoint.Origins[0].Name - Assert-AreEqual $originHostName $createdEndpoint.Origins[0].HostName - - $nameAvailability = Get-AzCdnEndpointNameAvailability -EndpointName $endpointName - Assert-False{$nameAvailability.NameAvailable} - - $stopped = Stop-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false -PassThru - $stoppedEndpoint = Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-True{$stopped} - Assert-AreEqual "Stopped" $stoppedEndpoint.ResourceState - - $started = Start-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -PassThru - $startedEndpoint = Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-True{$started} - Assert-AreEqual "Running" $startedEndpoint.ResourceState - - $purged = Unpublish-AzCdnEndpointContent -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -PurgeContent @("/pic1.jpg", "/pic2.jpg") -PassThru - Assert-True{$purged} - - $loaded = Publish-AzCdnEndpointContent -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -LoadContent @("/pic1.jpg", "/pic2.jpg") -PassThru - Assert-True{$loaded} - - $validateResult = Test-AzCdnCustomDomain -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -CustomDomainHostName "unverifiedcustomdomain.com" - Assert-False{$validateResult.CustomDomainValidated} - - $endpointRemoved = Remove-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Force -PassThru - Assert-True{$endpointRemoved} - - Assert-ThrowsContains { Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "NotFound" - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Endpoint cycle with all of the properties and piping -#> -function Test-EndpointCrudAndActionWithAllPropertiesWithPiping -{ - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Verizon" - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku - - $endpointName = getAssetName - $originName = getAssetName - $originHostHeader = "www.microsoft.com" - $originPath = "/videos" - $contentTypeToCompress = @("application/json", "text/html") - $isCompressionEnabled = $true - $isHttpAllowed = $true - $isHttpsAllowed = $true - $queryStringCachingBehavior = "BypassCaching" - $httpPort = 123 - $httpsPort = 456 - $tags = @{"tag1" = "value1"; "tag2" = "value2"} - - $originHostName = "www.microsoft.com" - - $nameAvailability = Get-AzCdnEndpointNameAvailability -EndpointName $endpointName - Assert-True{$nameAvailability.NameAvailable} - - $createdEndpoint = New-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -OriginHostHeader $originHostHeader -OriginPath $originPath -ContentTypesToCompress $contentTypeToCompress -IsCompressionEnabled $isCompressionEnabled -IsHttpAllowed $isHttpAllowed -IsHttpsAllowed $isHttpsAllowed -QueryStringCachingBehavior $queryStringCachingBehavior -OriginName $originName -OriginHostName $originHostName -HttpPort $httpPort -HttpsPort $httpsPort -Tag $tags - Assert-AreEqual $endpointName $createdEndpoint.Name - Assert-AreEqual $profileName $createdEndpoint.ProfileName - Assert-AreEqual $resourceGroup.ResourceGroupName $createdEndpoint.ResourceGroupName - Assert-NotNull $createdEndpoint.HostName - Assert-AreEqual $originHostHeader $createdEndpoint.OriginHostHeader - Assert-AreEqual $originPath $createdEndpoint.OriginPath - Assert-CompressionTypes $contentTypeToCompress $createdEndpoint.ContentTypesToCompress - Assert-AreEqual $isCompressionEnabled $createdEndpoint.IsCompressionEnabled - Assert-AreEqual $isHttpAllowed $createdEndpoint.IsHttpAllowed - Assert-AreEqual $isHttpsAllowed $createdEndpoint.IsHttpsAllowed - Assert-AreEqual $queryStringCachingBehavior $createdEndpoint.QueryStringCachingBehavior - Assert-Tags $tags $createdEndpoint.Tags - - Assert-AreEqual $httpPort $createdEndpoint.Origins[0].HttpPort - Assert-AreEqual $httpsPort $createdEndpoint.Origins[0].HttpsPort - Assert-AreEqual $originName $createdEndpoint.Origins[0].Name - Assert-AreEqual $originHostName $createdEndpoint.Origins[0].HostName - - $nameAvailability = Get-AzCdnEndpointNameAvailability -EndpointName $endpointName - Assert-False{$nameAvailability.NameAvailable} - - $stopped = Stop-AzCdnEndpoint -CdnEndpoint $createdEndpoint -Confirm:$false -PassThru - $stoppedEndpoint = Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-True{$stopped} - Assert-AreEqual "Stopped" $stoppedEndpoint.ResourceState - - $started = Start-AzCdnEndpoint -CdnEndpoint $createdEndpoint -PassThru - $startedEndpoint = Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-True{$started} - Assert-AreEqual "Running" $startedEndpoint.ResourceState - - $purged = Unpublish-AzCdnEndpointContent -CdnEndpoint $createdEndpoint -PurgeContent @("/pic1.jpg", "/pic2.jpg") -PassThru - Assert-True{$purged} - - $loaded = Publish-AzCdnEndpointContent -CdnEndpoint $createdEndpoint -LoadContent @("/pic1.jpg", "/pic2.jpg") -PassThru - Assert-True{$loaded} - - $startedEndpoint.OriginHostHeader = "www.microsoft.com" - $startedEndpoint.OriginPath = "/pictures" - $startedEndpoint.QueryStringCachingBehavior = "UseQueryString" - - $updatedEndpoint = Set-AzCdnEndpoint -CdnEndpoint $startedEndpoint - Assert-AreEqual $startedEndpoint.OriginHostHeader $updatedEndpoint.OriginHostHeader - Assert-AreEqual $startedEndpoint.OriginPath $updatedEndpoint.OriginPath - Assert-AreEqual $startedEndpoint.QueryStringCachingBehavior $updatedEndpoint.QueryStringCachingBehavior - - $endpointRemoved = Remove-AzCdnEndpoint -CdnEndpoint $createdEndpoint -Force -PassThru - Assert-True{$endpointRemoved} - - Assert-ThrowsContains { Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "NotFound" - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Endpoint cycle with stopped endpoint -#> -function Test-EndpointCrudAndActionWithStoppedEndpoint -{ - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Verizon" - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku - - $endpointName = getAssetName - $originName = getAssetName - $originHostName = "www.microsoft.com" - - $nameAvailability = Get-AzCdnEndpointNameAvailability -EndpointName $endpointName - Assert-True{$nameAvailability.NameAvailable} - - $createdEndpoint = New-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName - Assert-AreEqual $endpointName $createdEndpoint.Name - Assert-AreEqual $profileName $createdEndpoint.ProfileName - Assert-AreEqual $resourceGroup.ResourceGroupName $createdEndpoint.ResourceGroupName - Assert-AreEqual $originName $createdEndpoint.Origins[0].Name - Assert-AreEqual $originHostName $createdEndpoint.Origins[0].HostName - - $nameAvailability = Get-AzCdnEndpointNameAvailability -EndpointName $endpointName - Assert-False{$nameAvailability.NameAvailable} - - $stopped = Stop-AzCdnEndpoint -CdnEndpoint $createdEndpoint -Confirm:$false -PassThru - $stoppedEndpoint = Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-True{$stopped} - Assert-AreEqual "Stopped" $stoppedEndpoint.ResourceState - - $purged = Unpublish-AzCdnEndpointContent -CdnEndpoint $createdEndpoint -PurgeContent @("/pic1.jpg", "/pic2.jpg") -PassThru - Assert-True{$purged} - - $loaded = Publish-AzCdnEndpointContent -CdnEndpoint $createdEndpoint -LoadContent @("/pic1.jpg", "/pic2.jpg") -PassThru - Assert-True{$loaded} - - $validateResultbyPiping = Test-AzCdnCustomDomain -CdnEndpoint $endpoint -CustomDomainHostName "unverifiedcustomdomain.com" - Assert-False{$validateResultbyPiping.CustomDomainValidated} - - $startedEndpoint.OriginHostHeader = "www.microsoft.com" - $startedEndpoint.OriginPath = "/pictures" - $startedEndpoint.QueryStringCachingBehavior = "UseQueryString" - - $updatedEndpoint = Set-AzCdnEndpoint -CdnEndpoint $startedEndpoint - Assert-AreEqual $startedEndpoint.OriginHostHeader $updatedEndpoint.OriginHostHeader - Assert-AreEqual $startedEndpoint.OriginPath $updatedEndpoint.OriginPath - Assert-AreEqual $startedEndpoint.QueryStringCachingBehavior $updatedEndpoint.QueryStringCachingBehavior - - $endpointRemoved = Remove-AzCdnEndpoint -CdnEndpoint $createdEndpoint -Force -PassThru - Assert-True{$endpointRemoved} - - Assert-ThrowsContains { Get-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "NotFound" - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Endpoint pipeline exercise -#> -function Test-EndpointPipeline -{ - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Verizon" - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku - - $endpointName1 = getAssetName - $endpointName2 = getAssetName - $originName = getAssetName - $originHostName = "www.microsoft.com" - - - $createdProfile | New-AzCdnEndpoint -EndpointName $endpointName1 -OriginName $originName -OriginHostName $originHostName - $createdProfile | New-AzCdnEndpoint -EndpointName $endpointName2 -OriginName $originName -OriginHostName $originHostName - - $endpoints = Get-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName | Get-AzCdnEndpoint - - Assert-True {$endpoints.Count -eq 2} - - Get-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName | Get-AzCdnEndpoint | Remove-AzCdnEndpoint -Force - - $deletedEndpoints = Get-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName | Get-AzCdnEndpoint - - Assert-True {$deletedEndpoints.Count -eq 0} - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Endpoint geo filters exercise -#> -function Test-EndpointGeoFilters -{ - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Akamai" - $GeoFilter_1 = New-Object -TypeName Microsoft.Azure.Commands.Cdn.Models.Endpoint.PsGeoFilter -Prop(@{'RelativePath'="/mycar";'Action'="Block"}) - $GeoFilter_1.CountryCodes = @("GA", "AT") - - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku - - $endpointName1 = getAssetName - $originName = getAssetName - $originHostName = "www.microsoft.com" - - $createdProfile | New-AzCdnEndpoint -EndpointName $endpointName1 -OriginName $originName -OriginHostName $originHostName -GeoFilters @($GeoFilter_1) - - $endpoint = Get-AzCdnEndpoint -EndpointName $endpointName1 -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - - Assert-True {$endpoint.GeoFilters.Count -eq 1} - Assert-True {$endpoint.GeoFilters[0].Action -eq "Block"} - Assert-True {$endpoint.GeoFilters[0].CountryCodes.Count -eq 2} - - $GeoFilter_2 = New-Object -TypeName Microsoft.Azure.Commands.Cdn.Models.Endpoint.PsGeoFilter -Prop(@{'RelativePath'="/mypicture";'Action'="Block"}) - $GeoFilter_2.CountryCodes = @("GA", "AT") - - $endpoint.GeoFilters.Add($GeoFilter_2) - - $updatedEndpoint = Set-AzCdnEndpoint -CdnEndpoint $endpoint - - Assert-True {$updatedEndpoint.GeoFilters.Count -eq 2} - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Endpoint create with Dsa -#> -function Test-EndpointCreateWithDsa -{ - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Verizon" - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku - - $endpointName = getAssetName - $originName = getAssetName - $originHostHeader = "azurecdn-files.azureedge.net" - $originPath = "/dsa-test" - $contentTypeToCompress = @() - $isCompressionEnabled = $false - $isHttpAllowed = $true - $isHttpsAllowed = $true - $queryStringCachingBehavior = "NotSet" - $optimizationType = "DynamicSiteAcceleration" - $probePath = "/probe-v.txt" - - $originHostName = "www.microsoft.com" - - $nameAvailability = Get-AzCdnEndpointNameAvailability -EndpointName $endpointName - Assert-True{$nameAvailability.NameAvailable} - - $createdEndpoint = New-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -OriginHostHeader $originHostHeader -OriginPath $originPath -ContentTypesToCompress $contentTypeToCompress -IsCompressionEnabled $isCompressionEnabled -IsHttpAllowed $isHttpAllowed -IsHttpsAllowed $isHttpsAllowed -OptimizationType $optimizationType -ProbePath $probePath -QueryStringCachingBehavior $queryStringCachingBehavior -OriginName $originName -OriginHostName $originHostName - Assert-AreEqual $endpointName $createdEndpoint.Name - Assert-AreEqual $profileName $createdEndpoint.ProfileName - Assert-AreEqual $resourceGroup.ResourceGroupName $createdEndpoint.ResourceGroupName - Assert-NotNull $createdEndpoint.HostName - Assert-AreEqual $originHostHeader $createdEndpoint.OriginHostHeader - Assert-AreEqual $originPath $createdEndpoint.OriginPath - Assert-CompressionTypes $contentTypeToCompress $createdEndpoint.ContentTypesToCompress - Assert-AreEqual $isCompressionEnabled $createdEndpoint.IsCompressionEnabled - Assert-AreEqual $isHttpAllowed $createdEndpoint.IsHttpAllowed - Assert-AreEqual $isHttpsAllowed $createdEndpoint.IsHttpsAllowed - Assert-AreEqual $optimizationType $createdEndpoint.OptimizationType - Assert-AreEqual "IgnoreQueryString" $createdEndpoint.QueryStringCachingBehavior - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Endpoint resource usage exercise -#> -function Test-EndpointResourceUsage -{ - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Akamai" - - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku - - $endpointName1 = getAssetName - $originName = getAssetName - $originHostName = "www.microsoft.com" - - $createdProfile | New-AzCdnEndpoint -EndpointName $endpointName1 -OriginName $originName -OriginHostName $originHostName - - $endpointResourceUsage = Get-AzCdnEndpointResourceUsage -EndpointName $endpointName1 -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - - Assert-True {$endpointResourceUsage.Count -eq 3} - Assert-True {$endpointResourceUsage[0].CurrentValue -eq 0} - Assert-True {$endpointResourceUsage[1].CurrentValue -eq 0} - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Endpoint validate probe url exercise -#> -function Test-EndpointValidateProbeUrl -{ - $probeUrl = "https://azurecdn-files.azureedge.net/dsa-test/probe-v.txt" - $validateProbeUrlResult = Confirm-AzCdnEndpointProbeURL -ProbeUrl $probeUrl - - Assert-True {$validateProbeUrlResult.IsValid} - - $probeUrl = "https://www.notexist.com/notexist/notexist.txt" - $validateProbeUrlResult = Confirm-AzCdnEndpointProbeURL -ProbeUrl $probeUrl - - Assert-False {$validateProbeUrlResult.IsValid} -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/ScenarioTests/OriginGroupTests.cs b/src/Cdn/Cdn.Test/ScenarioTests/OriginGroupTests.cs deleted file mode 100644 index 4341e2ca93a1..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/OriginGroupTests.cs +++ /dev/null @@ -1,48 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; - -namespace Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest -{ - public class OriginGroupTests : CdnTestRunner - { - public OriginGroupTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) - { - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestCreateOriginGroup() - { - TestRunner.RunTestScript("Test-CreateOriginGroup"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestGetSetOriginGroup() - { - TestRunner.RunTestScript("Test-GetSetOriginGroup"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestRemoveOriginGroup() - { - TestRunner.RunTestScript("Test-RemoveOriginGroup"); - } - - } -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/OriginGroupTests.ps1 b/src/Cdn/Cdn.Test/ScenarioTests/OriginGroupTests.ps1 deleted file mode 100644 index 6a01c35cec54..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/OriginGroupTests.ps1 +++ /dev/null @@ -1,192 +0,0 @@ -# ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---------------------------------------------------------------------------------- - -<# -.SYNOPSIS -Creats an origin group and set the default origin group on a running endpoint -#> -function Test-CreateOriginGroup -{ - # Set up required fields - $subId = (Get-AzContext).Subscription.id - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $resourceLocation = "Global" - $profileSku = "Standard_Microsoft" - - # Create a Microsoft CDN Profile - $createdProfile = New-AzCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Location $resourceLocation -Sku $profileSku - - # Endpoint specific properties - $endpointName = getAssetName - $originGroupName = getAssetName - $originName = getAssetName - $originHostName = "www.microsoft.com" - $originGroupResourceId = "/subscriptions/$subId/resourcegroups/$resourceGroupName/providers/Microsoft.Cdn/profiles/$profileName/endpoints/$endpointName/origingroups/$originGroupName" - $defaultOriginGroup = $originGroupResourceId - - # 1st origin group properties - $probeInterval = 240 - $probePath = "/health.aspx" - $probeProtocol = "Https" - $probeRequestType = "GET" - $originId = "/subscriptions/$subId/resourcegroups/$resourceGroupName/providers/Microsoft.Cdn/profiles/$profileName/endpoints/$endpointName/origins/$originName" - - # Create CDN endpoint, 1st origin group, and establish the default origin group - $createdEndpoint = New-AzCdnEndpoint -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName -OriginGroupName $originGroupName -DefaultOriginGroup $defaultOriginGroup -OriginGroupProbeIntervalInSeconds $probeInterval -OriginGroupProbePath $probePath -OriginGroupProbeProtocol $probeProtocol -OriginGroupProbeRequestType $probeRequestType -OriginId $originId - - # 2nd origin group properties - $originGroupName2 = getAssetName - $probeInterval2 = 120 - $probePath2 = "/check-health.aspx" - $probeProtocol2 = "Http" - $probeRequestType2 = "HEAD" - - # create 2nd origin group - $createdOriginGroup = New-AzCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -OriginGroupName $originGroupName2 -OriginId $originId -ProbeIntervalInSeconds $probeInterval2 -ProbePath $probePath2 -ProbeProtocol $probeProtocol2 -ProbeRequestType $probeRequestType2 - - # Test the default origin group on the endpoint - Assert-AreEqual $defaultOriginGroup $createdEndpoint.DefaultOriginGroup.Id - - # Test the properties on the 2nd origin group - Assert-AreEqual $originGroupName2 $createdOriginGroup.Name - Assert-AreEqual $probeInterval2 $createdOriginGroup.ProbeIntervalInSeconds - Assert-AreEqual $probePath2 $createdOriginGroup.ProbePath - Assert-AreEqual $probeProtocol2 $createdOriginGroup.ProbeProtocol - Assert-AreEqual $probeRequestType2 $createdOriginGroup.ProbeRequestType - Assert-AreEqual $originId $createdOriginGroup.Origins[0].Id - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Gets and sets an origin group with a running endpoint -#> -function Test-GetSetOriginGroup -{ - # Set up required fields - $subId = (Get-AzContext).Subscription.id - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $resourceLocation = "Global" - $profileSku = "Standard_Microsoft" - - # Create a Microsoft CDN Profile - $createdProfile = New-AzCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Location $resourceLocation -Sku $profileSku - - # Endpoint specific properties - $endpointName = getAssetName - $originGroupName = getAssetName - $originName = getAssetName - $originHostName = "www.microsoft.com" - $originGroupResourceId = "/subscriptions/$subId/resourcegroups/$resourceGroupName/providers/Microsoft.Cdn/profiles/$profileName/endpoints/$endpointName/origingroups/$originGroupName" - $defaultOriginGroup = $originGroupResourceId - - # Origin id for the origin group - $originId = "/subscriptions/$subId/resourcegroups/$resourceGroupName/providers/Microsoft.Cdn/profiles/$profileName/endpoints/$endpointName/origins/$originName" - - # Create CDN endpoint, origin group, and establish the default origin group - $createdEndpoint = New-AzCdnEndpoint -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName -OriginGroupName $originGroupName -DefaultOriginGroup $defaultOriginGroup -OriginId $originId - - # Get the origin group - $originGroup = Get-AzCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -OriginGroupName $originGroupName - - # Test the unmodified origin group - Assert-AreEqual $originGroupResourceId $originGroup.Id - Assert-AreEqual 0 $originGroup.ProbeIntervalInSeconds - Assert-Null $originGroup.ProbePath - Assert-Null $originGroup.ProbeProtocol - Assert-Null $originGroup.ProbeRequestType - - # Set new values on the origin group - $probeInterval = 120 - $probePath = "/health-status.aspx" - $probeProtocol = "Https" - $probeRequestType = "GET" - - # Update properties on origin group - $updatedOriginGroup = Set-AzCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -OriginGroupName $originGroupName -OriginId $originId -ProbeIntervalInSeconds $probeInterval -ProbePath $probePath -ProbeProtocol $probeProtocol -ProbeRequestType $probeRequestType - - # Test modified origin group - Assert-AreEqual $probeInterval $updatedOriginGroup.ProbeIntervalInSeconds - Assert-AreEqual $probePath $updatedOriginGroup.ProbePath - Assert-AreEqual $probeProtocol $updatedOriginGroup.ProbeProtocol - Assert-AreEqual $probeRequestType $updatedOriginGroup.ProbeRequestType - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Creates and removes an origin group with a running endpoint -#> -function Test-RemoveOriginGroup -{ - # Set up required fields - $subId = (Get-AzContext).Subscription.id - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $resourceLocation = "Global" - $profileSku = "Standard_Microsoft" - - # Create a Microsoft CDN Profile - $createdProfile = New-AzCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Location $resourceLocation -Sku $profileSku - - # Endpoint specific properties - $endpointName = getAssetName - $originGroupName = getAssetName - $originName = getAssetName - $originHostName = "www.microsoft.com" - $originGroupResourceId = "/subscriptions/$subId/resourcegroups/$resourceGroupName/providers/Microsoft.Cdn/profiles/$profileName/endpoints/$endpointName/origingroups/$originGroupName" - $defaultOriginGroup = $originGroupResourceId - - # Origin id for the origin group - $originId = "/subscriptions/$subId/resourcegroups/$resourceGroupName/providers/Microsoft.Cdn/profiles/$profileName/endpoints/$endpointName/origins/$originName" - - # Create CDN endpoint, origin group, and establish the default origin group - $createdEndpoint = New-AzCdnEndpoint -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName -OriginGroupName $originGroupName -DefaultOriginGroup $defaultOriginGroup -OriginId $originId - - # 2nd origin group properties - $originGroupName2 = getAssetName - $probeInterval2 = 120 - $probePath2 = "/check-health.aspx" - $probeProtocol2 = "Http" - $probeRequestType2 = "HEAD" - $originGroupResourceId2 = "/subscriptions/$subId/resourcegroups/$resourceGroupName/providers/Microsoft.Cdn/profiles/$profileName/endpoints/$endpointName/origingroups/$originGroupName2" - - # create 2nd origin group - $createdOriginGroup = New-AzCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -OriginGroupName $originGroupName2 -OriginId $originId -ProbeIntervalInSeconds $probeInterval2 -ProbePath $probePath2 -ProbeProtocol $probeProtocol2 -ProbeRequestType $probeRequestType2 - - # Remove the 2nd origin group - Remove-AzCdnOriginGroup -ResourceId $originGroupResourceId2 - - # Update a property on the already deleted origin group - $probeIntervalUpdate = 60 - - # Test origin group was removed correctly - Assert-ThrowsContains { Get-AzCdnOriginGroup -ResourceId $originGroupResourceId2 } "NotFound" - Assert-ThrowsContains { Set-AzCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -OriginGroupName $originGroupName2 -OriginId $originId -ProbeIntervalInSeconds $probeIntervalUpdate } "NotFound" - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/OriginTests.cs b/src/Cdn/Cdn.Test/ScenarioTests/OriginTests.cs deleted file mode 100644 index cb6158a78206..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/OriginTests.cs +++ /dev/null @@ -1,54 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; - -namespace Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest -{ - public class OriginTests : CdnTestRunner - { - public OriginTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) - { - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestOriginGetSetWithRunningEndpoint() - { - TestRunner.RunTestScript("Test-OriginGetSetWithRunningEndpoint"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestOriginGetSetWithStoppedEndpoint() - { - TestRunner.RunTestScript("Test-OriginGetSetWithStoppedEndpoint"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestOriginGetSetWhenEndpointDoesnotExist() - { - TestRunner.RunTestScript("Test-OriginGetSetWhenEndpointDoesnotExist"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestSetOriginProperties() - { - TestRunner.RunTestScript("Test-SetOriginProperties"); - } - } -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/OriginTests.ps1 b/src/Cdn/Cdn.Test/ScenarioTests/OriginTests.ps1 deleted file mode 100644 index aae0ef614a17..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/OriginTests.ps1 +++ /dev/null @@ -1,167 +0,0 @@ -# ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---------------------------------------------------------------------------------- - -<# -.SYNOPSIS -Gets or sets origin with the running endpoint -#> -function Test-OriginGetSetWithRunningEndpoint -{ - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Verizon" - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku - - $endpointName = getAssetName - $originName = getAssetName - $originHostName = "www.microsoft.com" - $httpPort = 80 - - $createdEndpoint = New-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName -HttpPort $httpPort - - $createdOrigin = $createdEndpoint | Get-AzCdnOrigin -OriginName $originName - Assert-AreEqual $originName $createdOrigin.Name - Assert-AreEqual $originHostName $createdOrigin.HostName - Assert-AreEqual $httpPort $createdOrigin.HttpPort - Assert-Null $createdOrigin.HttpsPort - - $createdOrigin.HttpPort = 789 - $createdOrigin.HttpsPort = 456 - $createdOrigin.HostName = "www.azure.com" - - $updatedOrigin = $createdOrigin | Set-AzCdnOrigin - - Assert-AreEqual $originName $updatedOrigin.Name - Assert-AreEqual "www.azure.com" $updatedOrigin.HostName - Assert-AreEqual 456 $updatedOrigin.HttpsPort - Assert-AreEqual 789 $updatedOrigin.HttpPort - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Gets or sets origin with stopped endpoint -#> -function Test-OriginGetSetWithStoppedEndpoint -{ - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Verizon" - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku - - $endpointName = getAssetName - $originName = getAssetName - $originHostName = "www.microsoft.com" - $httpPort = 80 - - $createdEndpoint = New-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName -HttpPort $httpPort - Stop-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Confirm:$false - - $createdOrigin = Get-AzCdnOrigin -OriginName $originName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-AreEqual $originName $createdOrigin.Name - Assert-AreEqual $originHostName $createdOrigin.HostName - Assert-AreEqual $httpPort $createdOrigin.HttpPort - Assert-Null $createdOrigin.HttpsPort - - $createdOrigin.HttpPort = 789 - $createdOrigin.HttpsPort = 456 - $createdOrigin.HostName = "www.azure.com" - - $updatedOrigin = Set-AzCdnOrigin -CdnOrigin $createdOrigin - - Assert-AreEqual $originName $updatedOrigin.Name - Assert-AreEqual "www.azure.com" $updatedOrigin.HostName - Assert-AreEqual 456 $updatedOrigin.HttpsPort - Assert-AreEqual 789 $updatedOrigin.HttpPort - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Gets or sets the origin that does not exist. -#> -function Test-OriginGetSetWhenEndpointDoesnotExist -{ - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $resourceLocation = "EastUS" - $profileSku = "Standard_Verizon" - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -Sku $profileSku - - $endpointName = getAssetName - $originName = getAssetName - $originHostName = "www.microsoft.com" - $httpPort = 80 - - $createdEndpoint = New-AzCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName -HttpPort $httpPort - - $createdOrigin = Get-AzCdnOrigin -OriginName $originName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - $createdOrigin.Id = "/subscriptions/d33030b5-85cf-4f96-be7d-b99b5dd0325d/resourcegroups/notarg/providers/Microsoft.Cdn/profiles/notaprofile/endpoints/notanendpoint/origins/notanorigin" - - Assert-ThrowsContains { Get-AzCdnOrigin -OriginName "thisisnotanoriginname" -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "NotFound" - Assert-ThrowsContains { Set-AzCdnOrigin -CdnOrigin $createdOrigin } "NotFound" - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -function Test-SetOriginProperties -{ - # Set up required fields - $subId = (Get-AzContext).Subscription.id - $resourceGroup = TestSetup-CreateResourceGroup - $resourceGroupName = $resourceGroup.ResourceGroupName - $profileName = getAssetName - - # Profile specific properties - $resourceLocation = "Global" - $profileSku = "Standard_Microsoft" - - # Create a Microsoft CDN Profile - $createdProfile = New-AzCdnProfile -ResourceGroupName $resourceGroupName -ProfileName $profileName -Location $resourceLocation -Sku $profileSku - - # Endpoint specific properties - $endpointName = getAssetName - $originName = getAssetName - $originHostName = "www.microsoft.com" - - # Create CDN endpoint - $createdEndpoint = New-AzCdnEndpoint -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -Location $resourceLocation -OriginName $originName -OriginHostName $originHostName - - # Generate the origin resource id - $originResourceId = "/subscriptions/$subId/resourcegroups/$resourceGroupName/providers/Microsoft.Cdn/profiles/$profileName/endpoints/$endpointName/origins/$originName" - - # Origin specific properties - $origin = Get-AzCdnOrigin -ResourceId $originResourceId - $origin.Priority = 5 - $origin.Weight = 500 - $origin.HttpPort = 80 - $origin.HttpsPort = 443 - $origin.HostName = "contoso.com" - - # Set the origin - $updatedOrigin = Set-AzCdnOrigin -CdnOrigin $origin - - # Test origin properties were set correctly - Assert-AreEqual 5 $updatedOrigin.Priority - Assert-AreEqual 500 $updatedOrigin.Weight - Assert-AreEqual 80 $updatedOrigin.HttpPort - Assert-AreEqual 443 $updatedOrigin.HttpsPort - Assert-AreEqual "contoso.com" $updatedOrigin.HostName - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/ScenarioTests/ProfileTests.cs b/src/Cdn/Cdn.Test/ScenarioTests/ProfileTests.cs deleted file mode 100644 index 188f2f1852c0..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/ProfileTests.cs +++ /dev/null @@ -1,75 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; - -namespace Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest -{ - public class ProfileTests : CdnTestRunner - { - public ProfileTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) - { - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestProfileCrud() - { - TestRunner.RunTestScript("Test-ProfileCrud"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestSkuCreate() - { - TestRunner.RunTestScript("Test-SkuCreate"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestProfileCrudWithPiping() - { - TestRunner.RunTestScript("Test-ProfileDeleteAndSsoWithPiping"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestProfilePipeline() - { - TestRunner.RunTestScript("Test-ProfilePipeline"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestProfileDeleteWithEndpoints() - { - TestRunner.RunTestScript("Test-ProfileDeleteWithEndpoints"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestProfileGetResourceUsage() - { - TestRunner.RunTestScript("Test-ProfileGetResourceUsages"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void ProfileGetSupportedOptimizationType() - { - TestRunner.RunTestScript("Test-ProfileGetSupportedOptimizationType"); - } - } -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/ProfileTests.ps1 b/src/Cdn/Cdn.Test/ScenarioTests/ProfileTests.ps1 deleted file mode 100644 index a8931282cb97..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/ProfileTests.ps1 +++ /dev/null @@ -1,217 +0,0 @@ -# ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---------------------------------------------------------------------------------- - -<# -.SYNOPSIS -Create Profile with different Sku -#> -function Test-SkuCreate -{ - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $profileLocation = "EastUS" - $profileSku = "Standard_Microsoft" - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku - - Assert-NotNull $createdProfile - Assert-AreEqual $profileName $createdProfile.Name - Assert-AreEqual $resourceGroup.ResourceGroupName $createdProfile.ResourceGroupName - Assert-AreEqual $profileSku $createdProfile.Sku.Name - - $profileSku = "Standard_Verizon" - $profileName = getAssetName - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku - Assert-NotNull $createdProfile - Assert-AreEqual $profileName $createdProfile.Name - Assert-AreEqual $resourceGroup.ResourceGroupName $createdProfile.ResourceGroupName - Assert-AreEqual $profileSku $createdProfile.Sku.Name - - $profileSku = "Premium_Verizon" - $profileName = getAssetName - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku - Assert-NotNull $createdProfile - Assert-AreEqual $profileName $createdProfile.Name - Assert-AreEqual $resourceGroup.ResourceGroupName $createdProfile.ResourceGroupName - Assert-AreEqual $profileSku $createdProfile.Sku.Name - - $profileSku = "Standard_Akamai" - $profileName = getAssetName - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku - Assert-NotNull $createdProfile - Assert-AreEqual $profileName $createdProfile.Name - Assert-AreEqual $resourceGroup.ResourceGroupName $createdProfile.ResourceGroupName - Assert-AreEqual $profileSku $createdProfile.Sku.Name - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} -<# -.SYNOPSIS -Full Profile CRUD cycle -#> -function Test-ProfileCrud -{ - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $profileLocation = "EastUS" - $profileSku = "Standard_Verizon" - $tags = @{"tag1" = "value1"; "tag2" = "value2"} - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku -Tag $tags - - Assert-NotNull $createdProfile - Assert-AreEqual $profileName $createdProfile.Name - Assert-AreEqual $resourceGroup.ResourceGroupName $createdProfile.ResourceGroupName - Assert-AreEqual $profileSku $createdProfile.Sku.Name - Assert-Tags $tags $createdProfile.Tags - - $retrievedProfile = Get-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - - Assert-NotNull $retrievedProfile - Assert-AreEqual $profileName $retrievedProfile.Name - Assert-AreEqual $resourceGroup.ResourceGroupName $retrievedProfile.ResourceGroupName - Assert-Tags $tags $createdProfile.Tags - - $newTags = @{"tag1" = "value3"; "tag2" = "value4"} - $retrievedProfile.Tags = $newTags - - $updatedProfile = Set-AzCdnProfile -CdnProfile $retrievedProfile - - Assert-NotNull $updatedProfile - Assert-AreEqual $profileName $updatedProfile.Name - Assert-AreEqual $resourceGroup.ResourceGroupName $updatedProfile.ResourceGroupName - Assert-Tags $newTags $updatedProfile.Tags - - $sso = Get-AzCdnProfileSsoUrl -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - Assert-NotNull $sso.SsoUriValue - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force - - Assert-ThrowsContains { Get-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "does not exist" -} - -<# -.SYNOPSIS -Full Profile CRUD cycle -#> -function Test-ProfileDeleteWithEndpoints -{ - $profileName = getAssetName - $endpointName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $profileLocation = "EastUS" - $profileSku = "Standard_Akamai" - - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku - - New-AzCdnEndpoint -CdnProfile $createdProfile -OriginName "contoso" -OriginHostName "www.contoso.com" -EndpointName $endpointName - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force - Assert-ThrowsContains { Get-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "does not exist" -} - -<# -.SYNOPSIS -Profile cycle with piping -#> -function Test-ProfileDeleteAndSsoWithPiping -{ - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $profileLocation = "EastUS" - $profileSku = "Standard_Verizon" - $tags = @{"tag1" = "value1"; "tag2" = "value2"} - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku -Tag $tags - - Assert-NotNull $createdProfile - - $sso = Get-AzCdnProfileSsoUrl -CdnProfile $createdProfile - Assert-NotNull $sso.SsoUriValue - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force - Assert-ThrowsContains { Get-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName } "does not exist" -} - -<# -.SYNOPSIS -Profile cycle with piping multiple profiles down the pipeline -#> -function Test-ProfilePipeline -{ - $profileName1 = getAssetName - $profileName2 = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $profileLocation = "EastUS" - $profileSku = "Standard_Verizon" - $tags = @{"tag1" = "value1"; "tag2" = "value2"} - $createdProfile1 = New-AzCdnProfile -ProfileName $profileName1 -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku -Tag $tags - - Assert-NotNull $createdProfile1 - - $createdProfile2 = New-AzCdnProfile -ProfileName $profileName2 -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku -Tag $tags - - Assert-NotNull $createdProfile2 - - $profiles = Get-AzCdnProfile -ResourceGroupName $resourceGroup.ResourceGroupName | where {($_.Name -eq $profileName1) -or ($_.Name -eq $profileName2)} - - Assert-True { $profiles.Count -eq 2 } - - Get-AzCdnProfile -ResourceGroupName $resourceGroup.ResourceGroupName | where {($_.Name -eq $profileName1) -or ($_.Name -eq $profileName2)} | Remove-AzCdnProfile -Force - - $deletedProfiles = Get-AzCdnProfile -ResourceGroupName $resourceGroup.ResourceGroupName | where {($_.Name -eq $profileName1) -or ($_.Name -eq $profileName2)} - - Assert-True { $deletedProfiles.Count -eq 0 } - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Full Profile ge resource usage excercis -#> -function Test-ProfileGetResourceUsages -{ - $profileName = getAssetName - $endpointName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $profileLocation = "EastUS" - $profileSku = "Standard_Akamai" - - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku - - $profileResourceUsage = Get-AzCdnProfileResourceUsage -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - - Assert-True {$profileResourceUsage.Count -eq 1} - Assert-True {$profileResourceUsage[0].CurrentValue -eq 0} - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} - -<# -.SYNOPSIS -Get supported optimization types exercise -#> -function Test-ProfileGetSupportedOptimizationType -{ - $profileName = getAssetName - $resourceGroup = TestSetup-CreateResourceGroup - $profileLocation = "EastUS" - $profileSku = "Standard_Akamai" - - $createdProfile = New-AzCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName -Location $profileLocation -Sku $profileSku - - $supportedOptimizationTypes = Get-AzCdnProfileSupportedOptimizationType -ProfileName $profileName -ResourceGroupName $resourceGroup.ResourceGroupName - - Assert-NotNull $supportedOptimizationTypes - - Remove-AzResourceGroup -Name $resourceGroup.ResourceGroupName -Force -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/ScenarioTests/SubscriptionTests.cs b/src/Cdn/Cdn.Test/ScenarioTests/SubscriptionTests.cs deleted file mode 100644 index d2e421705eac..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/SubscriptionTests.cs +++ /dev/null @@ -1,40 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.WindowsAzure.Commands.ScenarioTest; -using Xunit; - -namespace Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest -{ - public class SubscriptionTests : CdnTestRunner - { - public SubscriptionTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) - { - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestSubscriptionGetResourceUsage() - { - TestRunner.RunTestScript("Test-SubscriptionGetResourceUsage"); - } - - [Fact] - [Trait(Category.AcceptanceType, Category.CheckIn)] - public void TestSubscriptionEdgeNode() - { - TestRunner.RunTestScript("Test-SubscriptionEdgeNode"); - } - } -} diff --git a/src/Cdn/Cdn.Test/ScenarioTests/SubscriptionTests.ps1 b/src/Cdn/Cdn.Test/ScenarioTests/SubscriptionTests.ps1 deleted file mode 100644 index 5f746a6dbf11..000000000000 --- a/src/Cdn/Cdn.Test/ScenarioTests/SubscriptionTests.ps1 +++ /dev/null @@ -1,36 +0,0 @@ -# ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---------------------------------------------------------------------------------- - -<# -.SYNOPSIS -Subscription resource usage -#> -function Test-SubscriptionGetResourceUsage -{ - $subscriptionResourceUsage = Get-AzCdnSubscriptionResourceUsage - - Assert-True {$subscriptionResourceUsage.Count -eq 1} - Assert-True {$subscriptionResourceUsage[0].CurrentValue -eq 96} -} - -<# -.SYNOPSIS -Edge node -#> -function Test-SubscriptionEdgeNode -{ - $edgeNodes = Get-AzCdnEdgeNodes - - Assert-False {$edgeNodes -eq $null} -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdCustomDomainTests/TestCreateAfdCustomDomain.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdCustomDomainTests/TestCreateAfdCustomDomain.json deleted file mode 100644 index 094bffcb25bc..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdCustomDomainTests/TestCreateAfdCustomDomain.json +++ /dev/null @@ -1,347 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9232?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTIzMj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e097654a-ac32-4102-b97b-3e25e9aa692d" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "d0535164-a456-4459-9478-9a238152be58" - ], - "x-ms-correlation-request-id": [ - "d0535164-a456-4459-9478-9a238152be58" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T182949Z:d0535164-a456-4459-9478-9a238152be58" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 18:29:48 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9232\",\r\n \"name\": \"ps9232\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9232/providers/Microsoft.Cdn/profiles/ps9418?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTIzMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk0MTg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "04a1812d-8e4d-4ddd-8561-22b047b9e698" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a921d29e-fad2-4581-91e7-c3496c1285a9" - ], - "x-ms-client-request-id": [ - "04a1812d-8e4d-4ddd-8561-22b047b9e698" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9232/providers/Microsoft.Cdn/operationresults/aea15d7b-0829-4f99-88d9-f7c76693e723?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "2b3a2681-1b34-4585-94d3-4bf9a788fdda" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T182953Z:2b3a2681-1b34-4585-94d3-4bf9a788fdda" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 18:29:53 GMT" - ], - "Content-Length": [ - "386" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9232/providers/Microsoft.Cdn/profiles/ps9418\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps9418\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"9888866e-ffae-4596-a591-1808ba7ae36a\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9232/providers/Microsoft.Cdn/operationresults/aea15d7b-0829-4f99-88d9-f7c76693e723?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTIzMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2FlYTE1ZDdiLTA4MjktNGY5OS04OGQ5LWY3Yzc2NjkzZTcyMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "04a1812d-8e4d-4ddd-8561-22b047b9e698" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "41be8028-8842-453f-a2f3-061ca93f1f96" - ], - "x-ms-client-request-id": [ - "04a1812d-8e4d-4ddd-8561-22b047b9e698" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "d8a8d960-6fa8-4edf-984b-cbf495a58902" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T183003Z:d8a8d960-6fa8-4edf-984b-cbf495a58902" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 18:30:03 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9232/providers/Microsoft.Cdn/operationresults/aea15d7b-0829-4f99-88d9-f7c76693e723?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTIzMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2FlYTE1ZDdiLTA4MjktNGY5OS04OGQ5LWY3Yzc2NjkzZTcyMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "04a1812d-8e4d-4ddd-8561-22b047b9e698" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "858183f1-c168-4db0-a9cc-a8a31b02a477" - ], - "x-ms-client-request-id": [ - "04a1812d-8e4d-4ddd-8561-22b047b9e698" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "abb3e87d-7cb0-463e-b42b-0e2f72798a1c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T183013Z:abb3e87d-7cb0-463e-b42b-0e2f72798a1c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 18:30:13 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9232/providers/Microsoft.Cdn/profiles/ps9418?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTIzMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk0MTg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "04a1812d-8e4d-4ddd-8561-22b047b9e698" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "770aa410-9290-48d2-bd1f-12577196c61f" - ], - "x-ms-client-request-id": [ - "04a1812d-8e4d-4ddd-8561-22b047b9e698" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "22937c13-bc3b-4868-83ff-2f161fcc9d64" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T183014Z:22937c13-bc3b-4868-83ff-2f161fcc9d64" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 18:30:13 GMT" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9232/providers/Microsoft.Cdn/profiles/ps9418\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps9418\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"9888866e-ffae-4596-a591-1808ba7ae36a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - } - ], - "Names": { - "Test-CreateAfdCustomDomain": [ - "ps9232", - "ps9418", - "ps4598" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdEndpointTests/TestCreateAfdEndpoint.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdEndpointTests/TestCreateAfdEndpoint.json deleted file mode 100644 index 59b8edb1e28f..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdEndpointTests/TestCreateAfdEndpoint.json +++ /dev/null @@ -1,1184 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2853?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjg1Mz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8a413acb-9d78-4637-9f50-084b34452d86" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "e2708ee5-a6ff-4d8c-8743-d3ba29de5946" - ], - "x-ms-correlation-request-id": [ - "e2708ee5-a6ff-4d8c-8743-d3ba29de5946" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195552Z:e2708ee5-a6ff-4d8c-8743-d3ba29de5946" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:55:52 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2853\",\r\n \"name\": \"ps2853\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2853/providers/Microsoft.Cdn/profiles/ps3308?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjg1My9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMzMDg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "aa6e6da9-e11a-4600-a7f2-f5c9a27b1b94" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d38a0094-77b7-4ccf-a07e-a23fd2c4f766" - ], - "x-ms-client-request-id": [ - "aa6e6da9-e11a-4600-a7f2-f5c9a27b1b94" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2853/providers/Microsoft.Cdn/operationresults/1aaf27a3-3167-4ece-ba3e-49d1dc37763b?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "15bc0e51-7bd4-4c47-840e-09154f2e286c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195554Z:15bc0e51-7bd4-4c47-840e-09154f2e286c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:55:54 GMT" - ], - "Content-Length": [ - "386" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2853/providers/Microsoft.Cdn/profiles/ps3308\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps3308\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed0b16fa-fedd-4030-a680-24eb85749314\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2853/providers/Microsoft.Cdn/operationresults/1aaf27a3-3167-4ece-ba3e-49d1dc37763b?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjg1My9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzFhYWYyN2EzLTMxNjctNGVjZS1iYTNlLTQ5ZDFkYzM3NzYzYj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "aa6e6da9-e11a-4600-a7f2-f5c9a27b1b94" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "767e36e3-d7e4-4376-b81e-693c896f8a06" - ], - "x-ms-client-request-id": [ - "aa6e6da9-e11a-4600-a7f2-f5c9a27b1b94" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "bea0d4ab-70b1-45b5-8bc9-7f0320974b73" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195605Z:bea0d4ab-70b1-45b5-8bc9-7f0320974b73" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:56:04 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2853/providers/Microsoft.Cdn/operationresults/1aaf27a3-3167-4ece-ba3e-49d1dc37763b?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjg1My9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzFhYWYyN2EzLTMxNjctNGVjZS1iYTNlLTQ5ZDFkYzM3NzYzYj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "aa6e6da9-e11a-4600-a7f2-f5c9a27b1b94" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e3198264-afe6-431b-a3ca-dfd67c4a4b54" - ], - "x-ms-client-request-id": [ - "aa6e6da9-e11a-4600-a7f2-f5c9a27b1b94" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "dd202a90-47e9-4086-a92d-3903681acd86" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195615Z:dd202a90-47e9-4086-a92d-3903681acd86" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:56:14 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2853/providers/Microsoft.Cdn/profiles/ps3308?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjg1My9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMzMDg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "aa6e6da9-e11a-4600-a7f2-f5c9a27b1b94" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c89bed8b-acd6-45dd-a043-15abdcc2bc3f" - ], - "x-ms-client-request-id": [ - "aa6e6da9-e11a-4600-a7f2-f5c9a27b1b94" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "37d7d77f-e7d5-4ffe-8cd9-241dd5126d07" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195615Z:37d7d77f-e7d5-4ffe-8cd9-241dd5126d07" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:56:14 GMT" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2853/providers/Microsoft.Cdn/profiles/ps3308\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps3308\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed0b16fa-fedd-4030-a680-24eb85749314\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2853/providers/Microsoft.Cdn/profiles/ps3308/afdEndpoints/ps4323?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjg1My9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMzMDgvYWZkRW5kcG9pbnRzL3BzNDMyMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "684347c4-bb47-48bc-ae91-118d0c306962" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "28" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "61724a1e-fb4b-4096-8d45-66f5f86cdc23" - ], - "x-ms-client-request-id": [ - "684347c4-bb47-48bc-ae91-118d0c306962" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2853/providers/Microsoft.Cdn/operationresults/cda2bb3b-844b-4e9e-a2d7-695a7de6e399?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "237ac90c-a914-4942-92fa-1d3bd4483b09" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195617Z:237ac90c-a914-4942-92fa-1d3bd4483b09" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:56:16 GMT" - ], - "Content-Length": [ - "406" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2853/providers/Microsoft.Cdn/profiles/ps3308/afdEndpoints/ps4323\",\r\n \"type\": \"Microsoft.Cdn/profiles/afdendpoints\",\r\n \"name\": \"ps4323\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps4323.z01.azurefd.net\",\r\n \"originResponseTimeoutSeconds\": 30,\r\n \"enabledState\": \"Enabled\",\r\n \"provisioningState\": \"Creating\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2853/providers/Microsoft.Cdn/operationresults/cda2bb3b-844b-4e9e-a2d7-695a7de6e399?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjg1My9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2NkYTJiYjNiLTg0NGItNGU5ZS1hMmQ3LTY5NWE3ZGU2ZTM5OT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "684347c4-bb47-48bc-ae91-118d0c306962" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0c4c8fb4-d474-4e5a-904b-108d260c9cd0" - ], - "x-ms-client-request-id": [ - "684347c4-bb47-48bc-ae91-118d0c306962" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "0b0b061d-6ed6-4622-abc2-c5d8a6f4c5a9" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195627Z:0b0b061d-6ed6-4622-abc2-c5d8a6f4c5a9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:56:26 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2853/providers/Microsoft.Cdn/operationresults/cda2bb3b-844b-4e9e-a2d7-695a7de6e399?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjg1My9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2NkYTJiYjNiLTg0NGItNGU5ZS1hMmQ3LTY5NWE3ZGU2ZTM5OT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "684347c4-bb47-48bc-ae91-118d0c306962" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "56e90f44-b585-4a67-8f9d-7bda214be458" - ], - "x-ms-client-request-id": [ - "684347c4-bb47-48bc-ae91-118d0c306962" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "eaf54716-68f3-4153-9c7a-833b00d380d6" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195637Z:eaf54716-68f3-4153-9c7a-833b00d380d6" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:56:36 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2853/providers/Microsoft.Cdn/operationresults/cda2bb3b-844b-4e9e-a2d7-695a7de6e399?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjg1My9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2NkYTJiYjNiLTg0NGItNGU5ZS1hMmQ3LTY5NWE3ZGU2ZTM5OT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "684347c4-bb47-48bc-ae91-118d0c306962" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5ddec8eb-4e87-4346-9275-c27927e3c32a" - ], - "x-ms-client-request-id": [ - "684347c4-bb47-48bc-ae91-118d0c306962" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "e176a543-958a-48cd-a932-a596819488c3" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195647Z:e176a543-958a-48cd-a932-a596819488c3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:56:46 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2853/providers/Microsoft.Cdn/profiles/ps3308/afdEndpoints/ps4323?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjg1My9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMzMDgvYWZkRW5kcG9pbnRzL3BzNDMyMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "684347c4-bb47-48bc-ae91-118d0c306962" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "946a39d3-7ffa-4567-bf54-29eb134b29d7" - ], - "x-ms-client-request-id": [ - "684347c4-bb47-48bc-ae91-118d0c306962" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "16f51d57-40ee-43b7-8dc7-227922cca0e7" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195648Z:16f51d57-40ee-43b7-8dc7-227922cca0e7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:56:47 GMT" - ], - "Content-Length": [ - "407" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2853/providers/Microsoft.Cdn/profiles/ps3308/afdEndpoints/ps4323\",\r\n \"type\": \"Microsoft.Cdn/profiles/afdendpoints\",\r\n \"name\": \"ps4323\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps4323.z01.azurefd.net\",\r\n \"originResponseTimeoutSeconds\": 30,\r\n \"enabledState\": \"Enabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2853?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjg1Mz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0092952d-7b32-4cf0-a4b5-7636a257f4f1" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI4NTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "8870904d-54ee-4a43-8190-2693dac5414a" - ], - "x-ms-correlation-request-id": [ - "8870904d-54ee-4a43-8190-2693dac5414a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195648Z:8870904d-54ee-4a43-8190-2693dac5414a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:56:47 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI4NTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJNE5UTXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI4NTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "a32d485f-ad8a-4135-b338-1767fe2bebff" - ], - "x-ms-correlation-request-id": [ - "a32d485f-ad8a-4135-b338-1767fe2bebff" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195703Z:a32d485f-ad8a-4135-b338-1767fe2bebff" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:57:02 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI4NTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJNE5UTXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI4NTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "096b29dd-341a-49e1-829c-2fcec663dde6" - ], - "x-ms-correlation-request-id": [ - "096b29dd-341a-49e1-829c-2fcec663dde6" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195718Z:096b29dd-341a-49e1-829c-2fcec663dde6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:57:18 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI4NTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJNE5UTXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI4NTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "a572d27e-9693-40ed-a231-4d223eb978cd" - ], - "x-ms-correlation-request-id": [ - "a572d27e-9693-40ed-a231-4d223eb978cd" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195733Z:a572d27e-9693-40ed-a231-4d223eb978cd" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:57:33 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI4NTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJNE5UTXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI4NTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "3001bc98-2a72-41cb-b0ba-c2a363732a9e" - ], - "x-ms-correlation-request-id": [ - "3001bc98-2a72-41cb-b0ba-c2a363732a9e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195748Z:3001bc98-2a72-41cb-b0ba-c2a363732a9e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:57:48 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI4NTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJNE5UTXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI4NTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "abcb7ded-7156-495b-906d-badcb3f55a8e" - ], - "x-ms-correlation-request-id": [ - "abcb7ded-7156-495b-906d-badcb3f55a8e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195803Z:abcb7ded-7156-495b-906d-badcb3f55a8e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:58:03 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI4NTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJNE5UTXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI4NTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "f3bd22f4-ff71-41b8-88c0-0ea1bb8a0cf4" - ], - "x-ms-correlation-request-id": [ - "f3bd22f4-ff71-41b8-88c0-0ea1bb8a0cf4" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195818Z:f3bd22f4-ff71-41b8-88c0-0ea1bb8a0cf4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:58:17 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI4NTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJNE5UTXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "96f28ecc-41e4-4fad-a294-5f73ecb58b9b" - ], - "x-ms-correlation-request-id": [ - "96f28ecc-41e4-4fad-a294-5f73ecb58b9b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195833Z:96f28ecc-41e4-4fad-a294-5f73ecb58b9b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:58:32 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI4NTMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJNE5UTXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "7257c444-9784-47eb-858d-f2807207f8f1" - ], - "x-ms-correlation-request-id": [ - "7257c444-9784-47eb-858d-f2807207f8f1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195833Z:7257c444-9784-47eb-858d-f2807207f8f1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:58:32 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-CreateAfdEndpoint": [ - "ps2853", - "ps3308", - "ps4323" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdEndpointTests/TestGetAfdEndpoint.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdEndpointTests/TestGetAfdEndpoint.json deleted file mode 100644 index 49daeb50a0a7..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdEndpointTests/TestGetAfdEndpoint.json +++ /dev/null @@ -1,1478 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4281?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNDI4MT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "733324df-9597-4611-9f8f-517097b80904" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "1fe5e15c-1f7e-4c8c-acab-59d7154fcefb" - ], - "x-ms-correlation-request-id": [ - "1fe5e15c-1f7e-4c8c-acab-59d7154fcefb" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T194822Z:1fe5e15c-1f7e-4c8c-acab-59d7154fcefb" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:48:22 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps4281\",\r\n \"name\": \"ps4281\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps4281/providers/Microsoft.Cdn/profiles/ps8291?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNDI4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczgyOTE/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "feea2735-7fa6-48cf-a189-dbd46caff975" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "fbe8dc14-337a-4cdb-a954-3d1c1e3e006c" - ], - "x-ms-client-request-id": [ - "feea2735-7fa6-48cf-a189-dbd46caff975" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4281/providers/Microsoft.Cdn/operationresults/907c3e3a-1f32-4eb7-b566-2ad72335c332?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "51a0c3a3-e408-4b94-92c4-5770aa42c167" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T194824Z:51a0c3a3-e408-4b94-92c4-5770aa42c167" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:48:24 GMT" - ], - "Content-Length": [ - "386" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4281/providers/Microsoft.Cdn/profiles/ps8291\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps8291\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"686416af-1e28-4d73-b406-787ebf9cff9f\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4281/providers/Microsoft.Cdn/operationresults/907c3e3a-1f32-4eb7-b566-2ad72335c332?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNDI4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzkwN2MzZTNhLTFmMzItNGViNy1iNTY2LTJhZDcyMzM1YzMzMj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "feea2735-7fa6-48cf-a189-dbd46caff975" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2bd4912a-6de9-4103-868d-73812f3f7642" - ], - "x-ms-client-request-id": [ - "feea2735-7fa6-48cf-a189-dbd46caff975" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "3a770ab2-2f2f-4b2a-a410-fdf3ee940d78" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T194835Z:3a770ab2-2f2f-4b2a-a410-fdf3ee940d78" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:48:34 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4281/providers/Microsoft.Cdn/operationresults/907c3e3a-1f32-4eb7-b566-2ad72335c332?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNDI4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzkwN2MzZTNhLTFmMzItNGViNy1iNTY2LTJhZDcyMzM1YzMzMj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "feea2735-7fa6-48cf-a189-dbd46caff975" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "98d3bd7e-4a4c-41a8-9e9e-b0af546a3e79" - ], - "x-ms-client-request-id": [ - "feea2735-7fa6-48cf-a189-dbd46caff975" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "d6bfe462-1efe-44a2-878c-c2ed59bb3073" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T194845Z:d6bfe462-1efe-44a2-878c-c2ed59bb3073" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:48:44 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps4281/providers/Microsoft.Cdn/profiles/ps8291?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNDI4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczgyOTE/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "feea2735-7fa6-48cf-a189-dbd46caff975" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "731c1e5f-61fb-4814-8d84-2597147e3418" - ], - "x-ms-client-request-id": [ - "feea2735-7fa6-48cf-a189-dbd46caff975" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "fbf351e6-bb0c-425d-91e7-f8a48aed9ea9" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T194845Z:fbf351e6-bb0c-425d-91e7-f8a48aed9ea9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:48:44 GMT" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4281/providers/Microsoft.Cdn/profiles/ps8291\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps8291\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"686416af-1e28-4d73-b406-787ebf9cff9f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps4281/providers/Microsoft.Cdn/profiles/ps8291/afdEndpoints/ps1652?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNDI4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczgyOTEvYWZkRW5kcG9pbnRzL3BzMTY1Mj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3e02e823-6b67-483e-89fa-68c1a43514a5" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "28" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d35dd129-390e-4cfc-a557-459d6a24b7e2" - ], - "x-ms-client-request-id": [ - "3e02e823-6b67-483e-89fa-68c1a43514a5" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4281/providers/Microsoft.Cdn/operationresults/46a04eab-9973-4bfe-b135-222771460ef7?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "898b7f0a-a276-40aa-a3fe-d8100f9266d9" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T194847Z:898b7f0a-a276-40aa-a3fe-d8100f9266d9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:48:47 GMT" - ], - "Content-Length": [ - "406" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4281/providers/Microsoft.Cdn/profiles/ps8291/afdEndpoints/ps1652\",\r\n \"type\": \"Microsoft.Cdn/profiles/afdendpoints\",\r\n \"name\": \"ps1652\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps1652.z01.azurefd.net\",\r\n \"originResponseTimeoutSeconds\": 30,\r\n \"enabledState\": \"Enabled\",\r\n \"provisioningState\": \"Creating\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4281/providers/Microsoft.Cdn/operationresults/46a04eab-9973-4bfe-b135-222771460ef7?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNDI4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzQ2YTA0ZWFiLTk5NzMtNGJmZS1iMTM1LTIyMjc3MTQ2MGVmNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3e02e823-6b67-483e-89fa-68c1a43514a5" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "96b78b90-1f4f-4663-90ce-22ae1fce6a4a" - ], - "x-ms-client-request-id": [ - "3e02e823-6b67-483e-89fa-68c1a43514a5" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "7600e6ec-3fe0-4c03-a21b-f8bffe2ff689" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T194857Z:7600e6ec-3fe0-4c03-a21b-f8bffe2ff689" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:48:57 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4281/providers/Microsoft.Cdn/operationresults/46a04eab-9973-4bfe-b135-222771460ef7?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNDI4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzQ2YTA0ZWFiLTk5NzMtNGJmZS1iMTM1LTIyMjc3MTQ2MGVmNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3e02e823-6b67-483e-89fa-68c1a43514a5" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b8c77804-bc00-45e0-85c5-4463b3c2bff4" - ], - "x-ms-client-request-id": [ - "3e02e823-6b67-483e-89fa-68c1a43514a5" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "514f3288-b405-4c31-ab28-823ca1127305" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T194907Z:514f3288-b405-4c31-ab28-823ca1127305" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:49:07 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4281/providers/Microsoft.Cdn/operationresults/46a04eab-9973-4bfe-b135-222771460ef7?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNDI4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzQ2YTA0ZWFiLTk5NzMtNGJmZS1iMTM1LTIyMjc3MTQ2MGVmNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3e02e823-6b67-483e-89fa-68c1a43514a5" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4d047325-863a-4548-ba0a-e41a92fa97e1" - ], - "x-ms-client-request-id": [ - "3e02e823-6b67-483e-89fa-68c1a43514a5" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "5b396aef-02a4-45a7-ab31-6ab7e4a7b858" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T194918Z:5b396aef-02a4-45a7-ab31-6ab7e4a7b858" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:49:17 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps4281/providers/Microsoft.Cdn/profiles/ps8291/afdEndpoints/ps1652?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNDI4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczgyOTEvYWZkRW5kcG9pbnRzL3BzMTY1Mj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3e02e823-6b67-483e-89fa-68c1a43514a5" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "077bd2c8-e7f1-45ea-86c0-50bc6f612d32" - ], - "x-ms-client-request-id": [ - "3e02e823-6b67-483e-89fa-68c1a43514a5" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "5a1b5ba4-ec1c-4d1e-8686-eaddc7cf36da" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T194918Z:5a1b5ba4-ec1c-4d1e-8686-eaddc7cf36da" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:49:17 GMT" - ], - "Content-Length": [ - "407" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4281/providers/Microsoft.Cdn/profiles/ps8291/afdEndpoints/ps1652\",\r\n \"type\": \"Microsoft.Cdn/profiles/afdendpoints\",\r\n \"name\": \"ps1652\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps1652.z01.azurefd.net\",\r\n \"originResponseTimeoutSeconds\": 30,\r\n \"enabledState\": \"Enabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps4281/providers/Microsoft.Cdn/profiles/ps8291/afdEndpoints/ps1652?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNDI4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczgyOTEvYWZkRW5kcG9pbnRzL3BzMTY1Mj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8a588ca2-2f3c-4b2c-b52d-b62ac3c19cc6" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f4d94821-1ccb-4728-b3c1-73228ed2dbbf" - ], - "x-ms-client-request-id": [ - "8a588ca2-2f3c-4b2c-b52d-b62ac3c19cc6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "584bf358-d6ca-4a7c-b5f8-d15cb4f3ba2a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T194918Z:584bf358-d6ca-4a7c-b5f8-d15cb4f3ba2a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:49:17 GMT" - ], - "Content-Length": [ - "407" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4281/providers/Microsoft.Cdn/profiles/ps8291/afdEndpoints/ps1652\",\r\n \"type\": \"Microsoft.Cdn/profiles/afdendpoints\",\r\n \"name\": \"ps1652\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps1652.z01.azurefd.net\",\r\n \"originResponseTimeoutSeconds\": 30,\r\n \"enabledState\": \"Enabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4281?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNDI4MT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1b865a30-af06-4ee8-b7b9-13c8cf2d0ac7" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "dc49ab57-98a2-4513-8585-1a78e311e16c" - ], - "x-ms-correlation-request-id": [ - "dc49ab57-98a2-4513-8585-1a78e311e16c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T194918Z:dc49ab57-98a2-4513-8585-1a78e311e16c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:49:18 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpReU9ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "71808736-936d-4c57-9c0d-157ebd635903" - ], - "x-ms-correlation-request-id": [ - "71808736-936d-4c57-9c0d-157ebd635903" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T194933Z:71808736-936d-4c57-9c0d-157ebd635903" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:49:33 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpReU9ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "983073bc-cf7f-4589-b8c1-df38735c9ef4" - ], - "x-ms-correlation-request-id": [ - "983073bc-cf7f-4589-b8c1-df38735c9ef4" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T194948Z:983073bc-cf7f-4589-b8c1-df38735c9ef4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:49:48 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpReU9ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "b5f63f3f-2507-403b-b639-23577bf69006" - ], - "x-ms-correlation-request-id": [ - "b5f63f3f-2507-403b-b639-23577bf69006" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195003Z:b5f63f3f-2507-403b-b639-23577bf69006" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:50:03 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpReU9ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "0dc3e148-7b95-4f5b-85ae-fa887af1630c" - ], - "x-ms-correlation-request-id": [ - "0dc3e148-7b95-4f5b-85ae-fa887af1630c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195018Z:0dc3e148-7b95-4f5b-85ae-fa887af1630c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:50:18 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpReU9ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "32b7749c-edad-4922-a07e-9ae07835d2fd" - ], - "x-ms-correlation-request-id": [ - "32b7749c-edad-4922-a07e-9ae07835d2fd" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195034Z:32b7749c-edad-4922-a07e-9ae07835d2fd" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:50:33 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpReU9ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "3bf7128f-4b54-46c3-9a7b-98abc12de1da" - ], - "x-ms-correlation-request-id": [ - "3bf7128f-4b54-46c3-9a7b-98abc12de1da" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195049Z:3bf7128f-4b54-46c3-9a7b-98abc12de1da" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:50:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpReU9ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "fa1c98a9-438d-40c7-b346-51b34f7ce42a" - ], - "x-ms-correlation-request-id": [ - "fa1c98a9-438d-40c7-b346-51b34f7ce42a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195104Z:fa1c98a9-438d-40c7-b346-51b34f7ce42a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:51:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpReU9ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "dd706099-8585-4c55-be13-4632956a0ce3" - ], - "x-ms-correlation-request-id": [ - "dd706099-8585-4c55-be13-4632956a0ce3" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195119Z:dd706099-8585-4c55-be13-4632956a0ce3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:51:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpReU9ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "9c0bca05-53b1-463c-9f49-910a93a900c0" - ], - "x-ms-correlation-request-id": [ - "9c0bca05-53b1-463c-9f49-910a93a900c0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195134Z:9c0bca05-53b1-463c-9f49-910a93a900c0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:51:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpReU9ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "b20e023e-c24e-42cd-b701-5dc00fe5b690" - ], - "x-ms-correlation-request-id": [ - "b20e023e-c24e-42cd-b701-5dc00fe5b690" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195149Z:b20e023e-c24e-42cd-b701-5dc00fe5b690" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:51:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpReU9ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "1309e6db-a8df-4284-82f3-d731611af6c3" - ], - "x-ms-correlation-request-id": [ - "1309e6db-a8df-4284-82f3-d731611af6c3" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195204Z:1309e6db-a8df-4284-82f3-d731611af6c3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:52:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQyODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpReU9ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "9813c7e1-d1ae-4189-a34a-883d85e038c5" - ], - "x-ms-correlation-request-id": [ - "9813c7e1-d1ae-4189-a34a-883d85e038c5" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195204Z:9813c7e1-d1ae-4189-a34a-883d85e038c5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:52:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-GetAfdEndpoint": [ - "ps4281", - "ps8291", - "ps1652" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdEndpointTests/TestRemoveAfdEndpoint.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdEndpointTests/TestRemoveAfdEndpoint.json deleted file mode 100644 index f70c8fb941b2..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdEndpointTests/TestRemoveAfdEndpoint.json +++ /dev/null @@ -1,1610 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps640?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjQwP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "46ae8f81-de1f-4c0e-8d96-5f6abaae55f6" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "6001545c-5513-4f75-a708-7fabb7fb419f" - ], - "x-ms-correlation-request-id": [ - "6001545c-5513-4f75-a708-7fabb7fb419f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194422Z:6001545c-5513-4f75-a708-7fabb7fb419f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:44:21 GMT" - ], - "Content-Length": [ - "163" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps640\",\r\n \"name\": \"ps640\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps640/providers/Microsoft.Cdn/profiles/ps6358?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNjM1OD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "28a0cd30-b467-42e7-8964-08935e2de4f4" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "170f87a2-5f5b-4a31-afce-01bcc3dcf659" - ], - "x-ms-client-request-id": [ - "28a0cd30-b467-42e7-8964-08935e2de4f4" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps640/providers/Microsoft.Cdn/operationresults/85fdec95-2966-49a8-9fb1-f00c91c3bf59?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "b7d74923-c0fc-4c0e-bdb0-da9be20bd2ac" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194426Z:b7d74923-c0fc-4c0e-bdb0-da9be20bd2ac" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:44:26 GMT" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps640/providers/Microsoft.Cdn/profiles/ps6358\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6358\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"614b2753-e2a9-499f-9020-f57842a0d6b7\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps640/providers/Microsoft.Cdn/operationresults/85fdec95-2966-49a8-9fb1-f00c91c3bf59?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvODVmZGVjOTUtMjk2Ni00OWE4LTlmYjEtZjAwYzkxYzNiZjU5P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "28a0cd30-b467-42e7-8964-08935e2de4f4" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "893e7cf7-da02-4b31-939c-0f0f98b9788c" - ], - "x-ms-client-request-id": [ - "28a0cd30-b467-42e7-8964-08935e2de4f4" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "3a616ae4-dc38-4300-bbcc-48d467d57a3d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194437Z:3a616ae4-dc38-4300-bbcc-48d467d57a3d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:44:36 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps640/providers/Microsoft.Cdn/operationresults/85fdec95-2966-49a8-9fb1-f00c91c3bf59?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvODVmZGVjOTUtMjk2Ni00OWE4LTlmYjEtZjAwYzkxYzNiZjU5P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "28a0cd30-b467-42e7-8964-08935e2de4f4" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e081fe15-c356-468a-a08e-6f11c58dce71" - ], - "x-ms-client-request-id": [ - "28a0cd30-b467-42e7-8964-08935e2de4f4" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "e0c7e5f2-fd6d-4567-8ebf-325e24aa517b" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194447Z:e0c7e5f2-fd6d-4567-8ebf-325e24aa517b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:44:46 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps640/providers/Microsoft.Cdn/profiles/ps6358?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNjM1OD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "28a0cd30-b467-42e7-8964-08935e2de4f4" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "225eb096-89f7-41f6-9e85-8becfb9d00a1" - ], - "x-ms-client-request-id": [ - "28a0cd30-b467-42e7-8964-08935e2de4f4" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "71c1167b-a4b7-44e5-938b-7d813a3c7a2b" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194447Z:71c1167b-a4b7-44e5-938b-7d813a3c7a2b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:44:47 GMT" - ], - "Content-Length": [ - "384" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps640/providers/Microsoft.Cdn/profiles/ps6358\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6358\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"614b2753-e2a9-499f-9020-f57842a0d6b7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps640/providers/Microsoft.Cdn/profiles/ps6358/afdEndpoints/ps6179?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNjM1OC9hZmRFbmRwb2ludHMvcHM2MTc5P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1d3ca4c8-2859-4801-a1ac-03c6fc717de3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "28" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ab5accad-1454-4181-898e-fe8b992530e0" - ], - "x-ms-client-request-id": [ - "1d3ca4c8-2859-4801-a1ac-03c6fc717de3" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps640/providers/Microsoft.Cdn/operationresults/86f8c544-0fd7-4e21-b3cd-9f15f7721f02?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "7868d6c5-554b-4cba-a8cc-23621f9f4e55" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194449Z:7868d6c5-554b-4cba-a8cc-23621f9f4e55" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:44:49 GMT" - ], - "Content-Length": [ - "405" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps640/providers/Microsoft.Cdn/profiles/ps6358/afdEndpoints/ps6179\",\r\n \"type\": \"Microsoft.Cdn/profiles/afdendpoints\",\r\n \"name\": \"ps6179\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps6179.z01.azurefd.net\",\r\n \"originResponseTimeoutSeconds\": 30,\r\n \"enabledState\": \"Enabled\",\r\n \"provisioningState\": \"Creating\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps640/providers/Microsoft.Cdn/operationresults/86f8c544-0fd7-4e21-b3cd-9f15f7721f02?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvODZmOGM1NDQtMGZkNy00ZTIxLWIzY2QtOWYxNWY3NzIxZjAyP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1d3ca4c8-2859-4801-a1ac-03c6fc717de3" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "11d02465-cb68-4eeb-9aa6-1aec5560ba05" - ], - "x-ms-client-request-id": [ - "1d3ca4c8-2859-4801-a1ac-03c6fc717de3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "bd70b297-9250-46ae-aa86-b92c7301d688" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194500Z:bd70b297-9250-46ae-aa86-b92c7301d688" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:44:59 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps640/providers/Microsoft.Cdn/operationresults/86f8c544-0fd7-4e21-b3cd-9f15f7721f02?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvODZmOGM1NDQtMGZkNy00ZTIxLWIzY2QtOWYxNWY3NzIxZjAyP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1d3ca4c8-2859-4801-a1ac-03c6fc717de3" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d5d339d8-4103-4c3c-af56-022e8a99217d" - ], - "x-ms-client-request-id": [ - "1d3ca4c8-2859-4801-a1ac-03c6fc717de3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "aa71b372-2352-47db-b3d8-9dca33b49ae7" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194510Z:aa71b372-2352-47db-b3d8-9dca33b49ae7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:45:09 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps640/providers/Microsoft.Cdn/operationresults/86f8c544-0fd7-4e21-b3cd-9f15f7721f02?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvODZmOGM1NDQtMGZkNy00ZTIxLWIzY2QtOWYxNWY3NzIxZjAyP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1d3ca4c8-2859-4801-a1ac-03c6fc717de3" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b7e0c2f2-4110-48c9-8864-e58afa411534" - ], - "x-ms-client-request-id": [ - "1d3ca4c8-2859-4801-a1ac-03c6fc717de3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "a384ab9d-afd4-4077-bc1f-265e584038b7" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194520Z:a384ab9d-afd4-4077-bc1f-265e584038b7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:45:19 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps640/providers/Microsoft.Cdn/profiles/ps6358/afdEndpoints/ps6179?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNjM1OC9hZmRFbmRwb2ludHMvcHM2MTc5P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1d3ca4c8-2859-4801-a1ac-03c6fc717de3" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f3785654-1cf5-4818-b42b-1d710954dd45" - ], - "x-ms-client-request-id": [ - "1d3ca4c8-2859-4801-a1ac-03c6fc717de3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "53fe4974-60cc-4887-b356-bd84556743d0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194520Z:53fe4974-60cc-4887-b356-bd84556743d0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:45:19 GMT" - ], - "Content-Length": [ - "406" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps640/providers/Microsoft.Cdn/profiles/ps6358/afdEndpoints/ps6179\",\r\n \"type\": \"Microsoft.Cdn/profiles/afdendpoints\",\r\n \"name\": \"ps6179\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps6179.z01.azurefd.net\",\r\n \"originResponseTimeoutSeconds\": 30,\r\n \"enabledState\": \"Enabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps640/providers/Microsoft.Cdn/profiles/ps6358/afdEndpoints/ps6179?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNjM1OC9hZmRFbmRwb2ludHMvcHM2MTc5P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "21217f23-40e0-4eb3-b697-b93178a9e336" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps640/providers/Microsoft.Cdn/operationresults/88ab2511-78a4-4009-84db-9e947bf063b5/profileresults/ps6358/afdendpointresults/ps6179?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7738f85b-9376-47d1-9c3b-37f7e2ce5371" - ], - "x-ms-client-request-id": [ - "21217f23-40e0-4eb3-b697-b93178a9e336" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps640/providers/Microsoft.Cdn/operationresults/88ab2511-78a4-4009-84db-9e947bf063b5?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-correlation-request-id": [ - "ac7fad31-5c20-4f37-bdf7-37e12b2f4588" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194521Z:ac7fad31-5c20-4f37-bdf7-37e12b2f4588" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:45:21 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps640/providers/Microsoft.Cdn/operationresults/88ab2511-78a4-4009-84db-9e947bf063b5?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvODhhYjI1MTEtNzhhNC00MDA5LTg0ZGItOWU5NDdiZjA2M2I1P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "21217f23-40e0-4eb3-b697-b93178a9e336" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7d4f353b-f568-4ffb-a936-0eac16cc3382" - ], - "x-ms-client-request-id": [ - "21217f23-40e0-4eb3-b697-b93178a9e336" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "25b3dfde-2542-4c77-becc-1f347366ff18" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194531Z:25b3dfde-2542-4c77-becc-1f347366ff18" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:45:31 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps640/providers/Microsoft.Cdn/operationresults/88ab2511-78a4-4009-84db-9e947bf063b5/profileresults/ps6358/afdendpointresults/ps6179?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvODhhYjI1MTEtNzhhNC00MDA5LTg0ZGItOWU5NDdiZjA2M2I1L3Byb2ZpbGVyZXN1bHRzL3BzNjM1OC9hZmRlbmRwb2ludHJlc3VsdHMvcHM2MTc5P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "21217f23-40e0-4eb3-b697-b93178a9e336" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b0172ddb-9e3c-4e40-98d9-c9ace57bcbda" - ], - "x-ms-client-request-id": [ - "21217f23-40e0-4eb3-b697-b93178a9e336" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "fbcd1a63-1094-4d96-a187-944b074d91fe" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194532Z:fbcd1a63-1094-4d96-a187-944b074d91fe" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:45:31 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps640?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjQwP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "db512094-e835-4fc4-b5d8-fc637125999a" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "0d3c200f-2694-405f-855a-fc2ef98604d7" - ], - "x-ms-correlation-request-id": [ - "0d3c200f-2694-405f-855a-fc2ef98604d7" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194533Z:0d3c200f-2694-405f-855a-fc2ef98604d7" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:45:32 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "87a8c5d0-2038-4d08-bca0-25e61affb876" - ], - "x-ms-correlation-request-id": [ - "87a8c5d0-2038-4d08-bca0-25e61affb876" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194548Z:87a8c5d0-2038-4d08-bca0-25e61affb876" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:45:47 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "982a0269-5bb3-4402-8ff0-bba9999dd6ea" - ], - "x-ms-correlation-request-id": [ - "982a0269-5bb3-4402-8ff0-bba9999dd6ea" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194603Z:982a0269-5bb3-4402-8ff0-bba9999dd6ea" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:46:02 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "70e6f098-256f-4bd2-b4ef-452267dcf87a" - ], - "x-ms-correlation-request-id": [ - "70e6f098-256f-4bd2-b4ef-452267dcf87a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194618Z:70e6f098-256f-4bd2-b4ef-452267dcf87a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:46:18 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "61bc1dce-20c1-4345-b614-ecc98e20dc2b" - ], - "x-ms-correlation-request-id": [ - "61bc1dce-20c1-4345-b614-ecc98e20dc2b" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194633Z:61bc1dce-20c1-4345-b614-ecc98e20dc2b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:46:33 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "6cb7d285-93b9-45d9-83ba-0e8d4f8faf33" - ], - "x-ms-correlation-request-id": [ - "6cb7d285-93b9-45d9-83ba-0e8d4f8faf33" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194648Z:6cb7d285-93b9-45d9-83ba-0e8d4f8faf33" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:46:48 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "22bb2213-521d-4b51-b4d9-acf52fecd228" - ], - "x-ms-correlation-request-id": [ - "22bb2213-521d-4b51-b4d9-acf52fecd228" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194703Z:22bb2213-521d-4b51-b4d9-acf52fecd228" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:47:03 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "a8933273-9b00-4b5f-be9b-21202cdf2737" - ], - "x-ms-correlation-request-id": [ - "a8933273-9b00-4b5f-be9b-21202cdf2737" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194719Z:a8933273-9b00-4b5f-be9b-21202cdf2737" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:47:18 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "5fb7a2b4-9a4f-4d49-bf30-dd28d202001c" - ], - "x-ms-correlation-request-id": [ - "5fb7a2b4-9a4f-4d49-bf30-dd28d202001c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194734Z:5fb7a2b4-9a4f-4d49-bf30-dd28d202001c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:47:33 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "dc95f3f4-ea54-4ea0-a860-3eb19668ba72" - ], - "x-ms-correlation-request-id": [ - "dc95f3f4-ea54-4ea0-a860-3eb19668ba72" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194749Z:dc95f3f4-ea54-4ea0-a860-3eb19668ba72" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:47:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "10090726-c766-4dd8-81c6-635406fd8f88" - ], - "x-ms-correlation-request-id": [ - "10090726-c766-4dd8-81c6-635406fd8f88" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194804Z:10090726-c766-4dd8-81c6-635406fd8f88" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:48:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "c6ba6b11-d308-45a8-9308-91efe80534fa" - ], - "x-ms-correlation-request-id": [ - "c6ba6b11-d308-45a8-9308-91efe80534fa" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194819Z:c6ba6b11-d308-45a8-9308-91efe80534fa" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:48:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "cc7cba55-ebe1-4f20-bf8f-7c9490fe09e3" - ], - "x-ms-correlation-request-id": [ - "cc7cba55-ebe1-4f20-bf8f-7c9490fe09e3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T194819Z:cc7cba55-ebe1-4f20-bf8f-7c9490fe09e3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:48:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-RemoveAfdEndpoint": [ - "ps640", - "ps6358", - "ps6179" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdEndpointTests/TestSetAfdEndpoint.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdEndpointTests/TestSetAfdEndpoint.json deleted file mode 100644 index 80786a34faf0..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdEndpointTests/TestSetAfdEndpoint.json +++ /dev/null @@ -1,1550 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps520?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTIwP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c89f3017-562a-4bfc-b0ae-b39e09a3ad92" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "2610e33c-4064-4078-b302-b337e38689f5" - ], - "x-ms-correlation-request-id": [ - "2610e33c-4064-4078-b302-b337e38689f5" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195206Z:2610e33c-4064-4078-b302-b337e38689f5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:52:06 GMT" - ], - "Content-Length": [ - "163" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps520\",\r\n \"name\": \"ps520\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps520/providers/Microsoft.Cdn/profiles/ps7429?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTIwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNzQyOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b3407e88-5877-4709-8607-b0e8ec7a7105" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "abd145be-fc2c-414c-834d-c353d2f92c23" - ], - "x-ms-client-request-id": [ - "b3407e88-5877-4709-8607-b0e8ec7a7105" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps520/providers/Microsoft.Cdn/operationresults/b6d0c863-2589-4a9e-8be5-f51f756051af?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "154968bc-2832-4131-a7c4-becb2eb1255e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195209Z:154968bc-2832-4131-a7c4-becb2eb1255e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:52:08 GMT" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps520/providers/Microsoft.Cdn/profiles/ps7429\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps7429\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f10fa59c-fff5-4f59-950f-fa571a7cae29\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps520/providers/Microsoft.Cdn/operationresults/b6d0c863-2589-4a9e-8be5-f51f756051af?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTIwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvYjZkMGM4NjMtMjU4OS00YTllLThiZTUtZjUxZjc1NjA1MWFmP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b3407e88-5877-4709-8607-b0e8ec7a7105" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "55816fde-e8de-4d66-b901-35ec0d21e26b" - ], - "x-ms-client-request-id": [ - "b3407e88-5877-4709-8607-b0e8ec7a7105" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "11c40cbd-f017-4fa9-9362-6b796bfab54b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195219Z:11c40cbd-f017-4fa9-9362-6b796bfab54b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:52:19 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps520/providers/Microsoft.Cdn/operationresults/b6d0c863-2589-4a9e-8be5-f51f756051af?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTIwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvYjZkMGM4NjMtMjU4OS00YTllLThiZTUtZjUxZjc1NjA1MWFmP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b3407e88-5877-4709-8607-b0e8ec7a7105" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5feb9c10-bea7-4d2f-ac60-3eb365c32462" - ], - "x-ms-client-request-id": [ - "b3407e88-5877-4709-8607-b0e8ec7a7105" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "083cc45c-1f0d-49d7-bf25-8dc8e6f53ea4" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195229Z:083cc45c-1f0d-49d7-bf25-8dc8e6f53ea4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:52:29 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps520/providers/Microsoft.Cdn/profiles/ps7429?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTIwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNzQyOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b3407e88-5877-4709-8607-b0e8ec7a7105" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "92bf6689-9315-41c8-8856-0eba44963688" - ], - "x-ms-client-request-id": [ - "b3407e88-5877-4709-8607-b0e8ec7a7105" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "63015065-ecc5-4cd7-a144-1f12b7fe6957" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195229Z:63015065-ecc5-4cd7-a144-1f12b7fe6957" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:52:29 GMT" - ], - "Content-Length": [ - "384" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps520/providers/Microsoft.Cdn/profiles/ps7429\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps7429\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f10fa59c-fff5-4f59-950f-fa571a7cae29\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps520/providers/Microsoft.Cdn/profiles/ps7429/afdEndpoints/ps1028?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTIwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNzQyOS9hZmRFbmRwb2ludHMvcHMxMDI4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8806f1a6-2e28-4f40-a9c8-cbba15f3ceb9" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "28" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "51e3148a-d86f-4074-bb53-d295fab7b023" - ], - "x-ms-client-request-id": [ - "8806f1a6-2e28-4f40-a9c8-cbba15f3ceb9" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps520/providers/Microsoft.Cdn/operationresults/65025e4e-9843-42eb-b890-8c35c695dddb?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "770c4154-d0f4-42d7-9851-bb344e8463a1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195231Z:770c4154-d0f4-42d7-9851-bb344e8463a1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:52:31 GMT" - ], - "Content-Length": [ - "405" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps520/providers/Microsoft.Cdn/profiles/ps7429/afdEndpoints/ps1028\",\r\n \"type\": \"Microsoft.Cdn/profiles/afdendpoints\",\r\n \"name\": \"ps1028\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps1028.z01.azurefd.net\",\r\n \"originResponseTimeoutSeconds\": 30,\r\n \"enabledState\": \"Enabled\",\r\n \"provisioningState\": \"Creating\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps520/providers/Microsoft.Cdn/operationresults/65025e4e-9843-42eb-b890-8c35c695dddb?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTIwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvNjUwMjVlNGUtOTg0My00MmViLWI4OTAtOGMzNWM2OTVkZGRiP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8806f1a6-2e28-4f40-a9c8-cbba15f3ceb9" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a2540ed7-b321-4819-bb3e-5fb3ce7f6014" - ], - "x-ms-client-request-id": [ - "8806f1a6-2e28-4f40-a9c8-cbba15f3ceb9" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "855ae6ca-0491-4576-b22c-07ef06d70c1e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195241Z:855ae6ca-0491-4576-b22c-07ef06d70c1e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:52:41 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps520/providers/Microsoft.Cdn/operationresults/65025e4e-9843-42eb-b890-8c35c695dddb?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTIwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvNjUwMjVlNGUtOTg0My00MmViLWI4OTAtOGMzNWM2OTVkZGRiP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8806f1a6-2e28-4f40-a9c8-cbba15f3ceb9" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "cf8fbe42-1637-4efa-858b-f8e00107f4fe" - ], - "x-ms-client-request-id": [ - "8806f1a6-2e28-4f40-a9c8-cbba15f3ceb9" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "5d8abf35-86aa-43c2-9951-3b10723118f6" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195252Z:5d8abf35-86aa-43c2-9951-3b10723118f6" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:52:51 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps520/providers/Microsoft.Cdn/operationresults/65025e4e-9843-42eb-b890-8c35c695dddb?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTIwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvNjUwMjVlNGUtOTg0My00MmViLWI4OTAtOGMzNWM2OTVkZGRiP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8806f1a6-2e28-4f40-a9c8-cbba15f3ceb9" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3b67d1e0-c31b-4ac8-985e-5d6532bfd565" - ], - "x-ms-client-request-id": [ - "8806f1a6-2e28-4f40-a9c8-cbba15f3ceb9" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "b1b9bda9-7b54-41ca-b1b1-60a0b21ccb6d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195302Z:b1b9bda9-7b54-41ca-b1b1-60a0b21ccb6d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:53:01 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps520/providers/Microsoft.Cdn/profiles/ps7429/afdEndpoints/ps1028?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTIwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNzQyOS9hZmRFbmRwb2ludHMvcHMxMDI4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8806f1a6-2e28-4f40-a9c8-cbba15f3ceb9" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e567cd35-d685-4536-b77a-378efa50c168" - ], - "x-ms-client-request-id": [ - "8806f1a6-2e28-4f40-a9c8-cbba15f3ceb9" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "0981f322-f857-44d8-b382-e3bbdf022b01" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195302Z:0981f322-f857-44d8-b382-e3bbdf022b01" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:53:02 GMT" - ], - "Content-Length": [ - "406" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps520/providers/Microsoft.Cdn/profiles/ps7429/afdEndpoints/ps1028\",\r\n \"type\": \"Microsoft.Cdn/profiles/afdendpoints\",\r\n \"name\": \"ps1028\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps1028.z01.azurefd.net\",\r\n \"originResponseTimeoutSeconds\": 30,\r\n \"enabledState\": \"Enabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps520/providers/Microsoft.Cdn/profiles/ps7429/afdEndpoints/ps1028?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTIwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNzQyOS9hZmRFbmRwb2ludHMvcHMxMDI4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0d34944c-20d3-427c-85d6-cd4f6bf0f326" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "04737e63-53fa-4b6a-bdcf-58d163696e95" - ], - "x-ms-client-request-id": [ - "0d34944c-20d3-427c-85d6-cd4f6bf0f326" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "3a32b48a-cab3-449c-a781-fa40281f357a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195302Z:3a32b48a-cab3-449c-a781-fa40281f357a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:53:02 GMT" - ], - "Content-Length": [ - "406" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps520/providers/Microsoft.Cdn/profiles/ps7429/afdEndpoints/ps1028\",\r\n \"type\": \"Microsoft.Cdn/profiles/afdendpoints\",\r\n \"name\": \"ps1028\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps1028.z01.azurefd.net\",\r\n \"originResponseTimeoutSeconds\": 30,\r\n \"enabledState\": \"Enabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps520/providers/Microsoft.Cdn/profiles/ps7429/afdEndpoints/ps1028?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTIwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNzQyOS9hZmRFbmRwb2ludHMvcHMxMDI4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"tags\": {\r\n \"endpoint\": \"afd-standard\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "be0439ae-2f81-4426-a105-d629ff1c5e9f" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "54" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1af8c5b0-0b6a-46df-8379-3f7c44d14342" - ], - "x-ms-client-request-id": [ - "be0439ae-2f81-4426-a105-d629ff1c5e9f" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "98" - ], - "x-ms-correlation-request-id": [ - "947990e8-1e12-4149-b6a1-f0db0c0da039" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195304Z:947990e8-1e12-4149-b6a1-f0db0c0da039" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:53:04 GMT" - ], - "Content-Length": [ - "431" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps520/providers/Microsoft.Cdn/profiles/ps7429/afdEndpoints/ps1028\",\r\n \"type\": \"Microsoft.Cdn/profiles/afdendpoints\",\r\n \"name\": \"ps1028\",\r\n \"location\": \"Global\",\r\n \"tags\": {\r\n \"endpoint\": \"afd-standard\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps1028.z01.azurefd.net\",\r\n \"originResponseTimeoutSeconds\": 30,\r\n \"enabledState\": \"Enabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps520?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTIwP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "850a6042-5107-47eb-88fd-0a3235cf23d9" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "58b2a581-c002-46f9-a9fc-67211b0bac5d" - ], - "x-ms-correlation-request-id": [ - "58b2a581-c002-46f9-a9fc-67211b0bac5d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195304Z:58b2a581-c002-46f9-a9fc-67211b0bac5d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:53:03 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeU1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "41319efb-7d61-4e4c-8b88-3bd6c7c0d708" - ], - "x-ms-correlation-request-id": [ - "41319efb-7d61-4e4c-8b88-3bd6c7c0d708" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195319Z:41319efb-7d61-4e4c-8b88-3bd6c7c0d708" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:53:18 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeU1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "0d2e72fc-82ad-49d3-b88b-113d2d7b7370" - ], - "x-ms-correlation-request-id": [ - "0d2e72fc-82ad-49d3-b88b-113d2d7b7370" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195334Z:0d2e72fc-82ad-49d3-b88b-113d2d7b7370" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:53:33 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeU1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "203eca43-546b-4a41-bbfd-4146003cd44b" - ], - "x-ms-correlation-request-id": [ - "203eca43-546b-4a41-bbfd-4146003cd44b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195349Z:203eca43-546b-4a41-bbfd-4146003cd44b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:53:48 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeU1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "3a31c3e1-b439-436e-90c7-85f064ac961a" - ], - "x-ms-correlation-request-id": [ - "3a31c3e1-b439-436e-90c7-85f064ac961a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195404Z:3a31c3e1-b439-436e-90c7-85f064ac961a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:54:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeU1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "1e951c32-b76e-472d-a893-2798260e88a5" - ], - "x-ms-correlation-request-id": [ - "1e951c32-b76e-472d-a893-2798260e88a5" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195419Z:1e951c32-b76e-472d-a893-2798260e88a5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:54:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeU1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "a10458d6-e86e-4bcd-86bb-6a08fc65f4df" - ], - "x-ms-correlation-request-id": [ - "a10458d6-e86e-4bcd-86bb-6a08fc65f4df" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195434Z:a10458d6-e86e-4bcd-86bb-6a08fc65f4df" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:54:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeU1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "8287146f-12cb-49f2-a75f-099d7d2ecc24" - ], - "x-ms-correlation-request-id": [ - "8287146f-12cb-49f2-a75f-099d7d2ecc24" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195449Z:8287146f-12cb-49f2-a75f-099d7d2ecc24" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:54:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeU1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "e3c0ecf2-7d4c-43d8-9254-d7a899be381c" - ], - "x-ms-correlation-request-id": [ - "e3c0ecf2-7d4c-43d8-9254-d7a899be381c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195504Z:e3c0ecf2-7d4c-43d8-9254-d7a899be381c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:55:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeU1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "5074ebec-fcd4-42ed-bc08-a9b5567c1da1" - ], - "x-ms-correlation-request-id": [ - "5074ebec-fcd4-42ed-bc08-a9b5567c1da1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195519Z:5074ebec-fcd4-42ed-bc08-a9b5567c1da1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:55:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeU1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "69dd96e0-a4c6-46ef-80c5-08a62612df9c" - ], - "x-ms-correlation-request-id": [ - "69dd96e0-a4c6-46ef-80c5-08a62612df9c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195535Z:69dd96e0-a4c6-46ef-80c5-08a62612df9c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:55:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeU1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "d2c6cc42-4b50-4786-8fc8-ebf69fa8e9af" - ], - "x-ms-correlation-request-id": [ - "d2c6cc42-4b50-4786-8fc8-ebf69fa8e9af" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195550Z:d2c6cc42-4b50-4786-8fc8-ebf69fa8e9af" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:55:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUyMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeU1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "1614e61b-9b2a-4ade-b45b-87cf757ba757" - ], - "x-ms-correlation-request-id": [ - "1614e61b-9b2a-4ade-b45b-87cf757ba757" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T195550Z:1614e61b-9b2a-4ade-b45b-87cf757ba757" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 19:55:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-SetAfdEndpoint": [ - "ps520", - "ps7429", - "ps1028" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginGroupTests/TestCreateAfdOriginGroup.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginGroupTests/TestCreateAfdOriginGroup.json deleted file mode 100644 index 1d179f69a74c..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginGroupTests/TestCreateAfdOriginGroup.json +++ /dev/null @@ -1,1091 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6911?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjkxMT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5eebd773-96ea-403d-b3ea-c5b2c0b287fd" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "6c3b231c-a2d7-45d1-90e3-244dd04e8411" - ], - "x-ms-correlation-request-id": [ - "6c3b231c-a2d7-45d1-90e3-244dd04e8411" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T204525Z:6c3b231c-a2d7-45d1-90e3-244dd04e8411" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:45:25 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6911\",\r\n \"name\": \"ps6911\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6911/providers/Microsoft.Cdn/profiles/ps5?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjkxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6d33134d-7fa5-48f1-ba56-d6dfb7b971b5" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "915827aa-7b70-4774-bd96-4f8c6d51c420" - ], - "x-ms-client-request-id": [ - "6d33134d-7fa5-48f1-ba56-d6dfb7b971b5" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6911/providers/Microsoft.Cdn/operationresults/517d8a7a-d50e-411d-9f3e-40eed7fae504?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "a4fbcd0f-e3ea-4df5-a7fa-49927b71ddd3" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T204529Z:a4fbcd0f-e3ea-4df5-a7fa-49927b71ddd3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:45:29 GMT" - ], - "Content-Length": [ - "380" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6911/providers/Microsoft.Cdn/profiles/ps5\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps5\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"0ddd98da-fee5-48f1-9e74-fbacadbbd47b\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6911/providers/Microsoft.Cdn/operationresults/517d8a7a-d50e-411d-9f3e-40eed7fae504?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjkxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzUxN2Q4YTdhLWQ1MGUtNDExZC05ZjNlLTQwZWVkN2ZhZTUwND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6d33134d-7fa5-48f1-ba56-d6dfb7b971b5" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a64b867c-58c8-4117-9444-07e50ed39584" - ], - "x-ms-client-request-id": [ - "6d33134d-7fa5-48f1-ba56-d6dfb7b971b5" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "7aadfd70-6c90-4dc2-88c1-0806d48fcb86" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T204539Z:7aadfd70-6c90-4dc2-88c1-0806d48fcb86" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:45:39 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6911/providers/Microsoft.Cdn/profiles/ps5?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjkxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6d33134d-7fa5-48f1-ba56-d6dfb7b971b5" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e42260c9-af0a-480f-a0e0-cae39fbd2b07" - ], - "x-ms-client-request-id": [ - "6d33134d-7fa5-48f1-ba56-d6dfb7b971b5" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "330b74f8-433c-4f41-9348-ee942d19d728" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T204540Z:330b74f8-433c-4f41-9348-ee942d19d728" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:45:39 GMT" - ], - "Content-Length": [ - "379" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6911/providers/Microsoft.Cdn/profiles/ps5\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps5\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"0ddd98da-fee5-48f1-9e74-fbacadbbd47b\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6911/providers/Microsoft.Cdn/profiles/ps5/originGroups/ps3386?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjkxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczUvb3JpZ2luR3JvdXBzL3BzMzM4Nj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"loadBalancingSettings\": {\r\n \"sampleSize\": 2,\r\n \"successfulSamplesRequired\": 2,\r\n \"additionalLatencyInMilliseconds\": 0\r\n },\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a4d1e0f7-1faf-43e6-8585-f116fe95b4e1" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "240" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "df988ad8-afcb-4f2a-9ecb-013ba1d30e5d" - ], - "x-ms-client-request-id": [ - "a4d1e0f7-1faf-43e6-8585-f116fe95b4e1" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "d7ea69c0-8f30-4db8-bfc5-cd6eca34c7cf" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T204541Z:d7ea69c0-8f30-4db8-bfc5-cd6eca34c7cf" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:45:40 GMT" - ], - "Content-Length": [ - "558" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6911/providers/Microsoft.Cdn/profiles/ps5/originGroups/ps3386\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups\",\r\n \"name\": \"ps3386\",\r\n \"properties\": {\r\n \"loadBalancingSettings\": {\r\n \"sampleSize\": 2,\r\n \"successfulSamplesRequired\": 2,\r\n \"additionalLatencyInMilliseconds\": 0\r\n },\r\n \"healthProbeSettings\": null,\r\n \"responseBasedAFDOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10,\r\n \"sessionAffinityState\": \"Disabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6911?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjkxMT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ee2e61df-804d-44f8-9905-0af4ca7ee46f" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "a799a97f-73a0-4221-ba34-bbb94a604889" - ], - "x-ms-correlation-request-id": [ - "a799a97f-73a0-4221-ba34-bbb94a604889" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T204541Z:a799a97f-73a0-4221-ba34-bbb94a604889" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:45:40 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "4a1c1a5d-0ae8-4900-88dc-3b4fd31f4cd1" - ], - "x-ms-correlation-request-id": [ - "4a1c1a5d-0ae8-4900-88dc-3b4fd31f4cd1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T204556Z:4a1c1a5d-0ae8-4900-88dc-3b4fd31f4cd1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:45:55 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "3eeae763-6bbd-4fef-958d-38d1d9f37775" - ], - "x-ms-correlation-request-id": [ - "3eeae763-6bbd-4fef-958d-38d1d9f37775" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T204611Z:3eeae763-6bbd-4fef-958d-38d1d9f37775" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:46:10 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "6baa8d56-cf64-4a24-a498-8d8cbbdbb2b4" - ], - "x-ms-correlation-request-id": [ - "6baa8d56-cf64-4a24-a498-8d8cbbdbb2b4" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T204626Z:6baa8d56-cf64-4a24-a498-8d8cbbdbb2b4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:46:25 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "81e04542-d062-4b0a-b11d-6bccd5e5febe" - ], - "x-ms-correlation-request-id": [ - "81e04542-d062-4b0a-b11d-6bccd5e5febe" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T204641Z:81e04542-d062-4b0a-b11d-6bccd5e5febe" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:46:40 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "8e1c71a4-7c2b-4678-a41f-1a3d3fd6e975" - ], - "x-ms-correlation-request-id": [ - "8e1c71a4-7c2b-4678-a41f-1a3d3fd6e975" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T204656Z:8e1c71a4-7c2b-4678-a41f-1a3d3fd6e975" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:46:56 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "559e2ef6-73d5-41ba-b6fc-ea207e6b96a6" - ], - "x-ms-correlation-request-id": [ - "559e2ef6-73d5-41ba-b6fc-ea207e6b96a6" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T204711Z:559e2ef6-73d5-41ba-b6fc-ea207e6b96a6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:47:11 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "948e59b8-2bf1-40d0-96df-d5b94f47a6db" - ], - "x-ms-correlation-request-id": [ - "948e59b8-2bf1-40d0-96df-d5b94f47a6db" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T204726Z:948e59b8-2bf1-40d0-96df-d5b94f47a6db" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:47:26 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "e90203e1-3a06-457c-8233-b9aa51b75c30" - ], - "x-ms-correlation-request-id": [ - "e90203e1-3a06-457c-8233-b9aa51b75c30" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T204741Z:e90203e1-3a06-457c-8233-b9aa51b75c30" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:47:41 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "484dd1ed-2575-4cab-bbb7-f1588c4c1944" - ], - "x-ms-correlation-request-id": [ - "484dd1ed-2575-4cab-bbb7-f1588c4c1944" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T204756Z:484dd1ed-2575-4cab-bbb7-f1588c4c1944" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:47:56 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "edb11284-e6c3-4976-b59d-84bcdf6823eb" - ], - "x-ms-correlation-request-id": [ - "edb11284-e6c3-4976-b59d-84bcdf6823eb" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T204811Z:edb11284-e6c3-4976-b59d-84bcdf6823eb" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:48:11 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "28f6877e-100f-4253-9dae-d723d8d5fe78" - ], - "x-ms-correlation-request-id": [ - "28f6877e-100f-4253-9dae-d723d8d5fe78" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T204826Z:28f6877e-100f-4253-9dae-d723d8d5fe78" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:48:26 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "7eb64395-ce56-4ef6-8216-4b3fe0fc1b1d" - ], - "x-ms-correlation-request-id": [ - "7eb64395-ce56-4ef6-8216-4b3fe0fc1b1d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210421T204827Z:7eb64395-ce56-4ef6-8216-4b3fe0fc1b1d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:48:26 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-CreateAfdOriginGroup": [ - "ps6911", - "ps5", - "ps3386" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginGroupTests/TestGetAfdOriginGroup.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginGroupTests/TestGetAfdOriginGroup.json deleted file mode 100644 index e02bb6f5dc34..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginGroupTests/TestGetAfdOriginGroup.json +++ /dev/null @@ -1,1346 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8775?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc3NT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ed04d8f6-6671-4e0d-b51c-28481c2830f7" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "5286e69b-51ca-4335-8b9d-24c8ea58ad7d" - ], - "x-ms-correlation-request-id": [ - "5286e69b-51ca-4335-8b9d-24c8ea58ad7d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T204839Z:5286e69b-51ca-4335-8b9d-24c8ea58ad7d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:48:38 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8775\",\r\n \"name\": \"ps8775\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8775/providers/Microsoft.Cdn/profiles/ps539?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODc3NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczUzOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "14b1137a-9120-4a9c-b4e1-2a8f0469dfac" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6a6ca3bc-79af-47a1-960d-65cd231f2654" - ], - "x-ms-client-request-id": [ - "14b1137a-9120-4a9c-b4e1-2a8f0469dfac" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8775/providers/Microsoft.Cdn/operationresults/dbf4524d-7f52-4fa8-b979-594115fa382e?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "6af4c786-1286-4d32-a829-e5c0d782d645" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T204843Z:6af4c786-1286-4d32-a829-e5c0d782d645" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:48:43 GMT" - ], - "Content-Length": [ - "384" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8775/providers/Microsoft.Cdn/profiles/ps539\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps539\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"922ac1d6-7e16-4e86-8948-b66374cbfc07\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8775/providers/Microsoft.Cdn/operationresults/dbf4524d-7f52-4fa8-b979-594115fa382e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc3NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2RiZjQ1MjRkLTdmNTItNGZhOC1iOTc5LTU5NDExNWZhMzgyZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "14b1137a-9120-4a9c-b4e1-2a8f0469dfac" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "82350d83-185a-4458-a933-fdd9ac70ab4d" - ], - "x-ms-client-request-id": [ - "14b1137a-9120-4a9c-b4e1-2a8f0469dfac" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "53ba9c2b-8ce3-42dd-af8a-e22d77080027" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T204854Z:53ba9c2b-8ce3-42dd-af8a-e22d77080027" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:48:53 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8775/providers/Microsoft.Cdn/operationresults/dbf4524d-7f52-4fa8-b979-594115fa382e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc3NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2RiZjQ1MjRkLTdmNTItNGZhOC1iOTc5LTU5NDExNWZhMzgyZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "14b1137a-9120-4a9c-b4e1-2a8f0469dfac" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "54f8aedf-c390-4b6c-97c9-0b903d7e90ba" - ], - "x-ms-client-request-id": [ - "14b1137a-9120-4a9c-b4e1-2a8f0469dfac" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "1678e54f-8869-4c5c-ace3-630c61edd9db" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T204904Z:1678e54f-8869-4c5c-ace3-630c61edd9db" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:49:03 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8775/providers/Microsoft.Cdn/operationresults/dbf4524d-7f52-4fa8-b979-594115fa382e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc3NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2RiZjQ1MjRkLTdmNTItNGZhOC1iOTc5LTU5NDExNWZhMzgyZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "14b1137a-9120-4a9c-b4e1-2a8f0469dfac" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5f3ee8f6-2366-423e-a4f5-0ff8e94bc68a" - ], - "x-ms-client-request-id": [ - "14b1137a-9120-4a9c-b4e1-2a8f0469dfac" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "9b27dd9b-0dc1-466b-959c-3a683cd4ab65" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T204914Z:9b27dd9b-0dc1-466b-959c-3a683cd4ab65" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:49:13 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8775/providers/Microsoft.Cdn/operationresults/dbf4524d-7f52-4fa8-b979-594115fa382e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc3NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2RiZjQ1MjRkLTdmNTItNGZhOC1iOTc5LTU5NDExNWZhMzgyZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "14b1137a-9120-4a9c-b4e1-2a8f0469dfac" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3fe50818-98ef-4a5b-b58e-bf91744f86e1" - ], - "x-ms-client-request-id": [ - "14b1137a-9120-4a9c-b4e1-2a8f0469dfac" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "73cac60e-5f1a-4b97-86ff-5aa5742b3685" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T204924Z:73cac60e-5f1a-4b97-86ff-5aa5742b3685" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:49:23 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8775/providers/Microsoft.Cdn/profiles/ps539?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODc3NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczUzOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "14b1137a-9120-4a9c-b4e1-2a8f0469dfac" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "45a0a5aa-2b19-4caa-90f9-241f7a7ec578" - ], - "x-ms-client-request-id": [ - "14b1137a-9120-4a9c-b4e1-2a8f0469dfac" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "75dbb23d-795a-491c-97a2-cb3675d566d8" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T204924Z:75dbb23d-795a-491c-97a2-cb3675d566d8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:49:23 GMT" - ], - "Content-Length": [ - "383" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8775/providers/Microsoft.Cdn/profiles/ps539\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps539\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"922ac1d6-7e16-4e86-8948-b66374cbfc07\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8775/providers/Microsoft.Cdn/profiles/ps539/originGroups/ps3155?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODc3NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczUzOS9vcmlnaW5Hcm91cHMvcHMzMTU1P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"loadBalancingSettings\": {\r\n \"sampleSize\": 4,\r\n \"successfulSamplesRequired\": 1,\r\n \"additionalLatencyInMilliseconds\": 0\r\n },\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "25a0cdbc-c5fd-45b3-b277-f625c4d70f30" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "240" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "60011367-244c-484a-a145-4464e71399e8" - ], - "x-ms-client-request-id": [ - "25a0cdbc-c5fd-45b3-b277-f625c4d70f30" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "0da775e5-1377-4982-a02a-bb76d41c9318" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T204925Z:0da775e5-1377-4982-a02a-bb76d41c9318" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:49:25 GMT" - ], - "Content-Length": [ - "560" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8775/providers/Microsoft.Cdn/profiles/ps539/originGroups/ps3155\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups\",\r\n \"name\": \"ps3155\",\r\n \"properties\": {\r\n \"loadBalancingSettings\": {\r\n \"sampleSize\": 4,\r\n \"successfulSamplesRequired\": 1,\r\n \"additionalLatencyInMilliseconds\": 0\r\n },\r\n \"healthProbeSettings\": null,\r\n \"responseBasedAFDOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10,\r\n \"sessionAffinityState\": \"Disabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8775/providers/Microsoft.Cdn/profiles/ps539/originGroups/ps3155?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODc3NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczUzOS9vcmlnaW5Hcm91cHMvcHMzMTU1P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "87557d87-6dd3-4270-aa6b-ba351fc58698" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "154aeb24-d338-4bc3-b4f7-97b51c601a1a" - ], - "x-ms-client-request-id": [ - "87557d87-6dd3-4270-aa6b-ba351fc58698" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "e9fd2fb0-aa76-4784-9c04-405831a4ec90" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T204926Z:e9fd2fb0-aa76-4784-9c04-405831a4ec90" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:49:25 GMT" - ], - "Content-Length": [ - "560" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8775/providers/Microsoft.Cdn/profiles/ps539/originGroups/ps3155\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups\",\r\n \"name\": \"ps3155\",\r\n \"properties\": {\r\n \"loadBalancingSettings\": {\r\n \"sampleSize\": 4,\r\n \"successfulSamplesRequired\": 1,\r\n \"additionalLatencyInMilliseconds\": 0\r\n },\r\n \"healthProbeSettings\": null,\r\n \"responseBasedAFDOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10,\r\n \"sessionAffinityState\": \"Disabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8775?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc3NT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "50ca3494-5699-4493-8f1e-a404482e777f" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "241b4233-b57d-44c6-87b6-f38beedc96a9" - ], - "x-ms-correlation-request-id": [ - "241b4233-b57d-44c6-87b6-f38beedc96a9" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T204927Z:241b4233-b57d-44c6-87b6-f38beedc96a9" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:49:26 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM056VXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "bd519892-be06-4768-bcea-f907a129137f" - ], - "x-ms-correlation-request-id": [ - "bd519892-be06-4768-bcea-f907a129137f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T204942Z:bd519892-be06-4768-bcea-f907a129137f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:49:41 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM056VXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "bc8bf7f8-91be-4800-abc3-f87ecee57ed1" - ], - "x-ms-correlation-request-id": [ - "bc8bf7f8-91be-4800-abc3-f87ecee57ed1" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T204957Z:bc8bf7f8-91be-4800-abc3-f87ecee57ed1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:49:56 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM056VXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "684210f4-4f8d-49ab-b9fd-f8ee579255b4" - ], - "x-ms-correlation-request-id": [ - "684210f4-4f8d-49ab-b9fd-f8ee579255b4" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T205012Z:684210f4-4f8d-49ab-b9fd-f8ee579255b4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:50:11 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM056VXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "cf879744-2e71-493d-afde-35bcf4b6a27a" - ], - "x-ms-correlation-request-id": [ - "cf879744-2e71-493d-afde-35bcf4b6a27a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T205027Z:cf879744-2e71-493d-afde-35bcf4b6a27a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:50:27 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM056VXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "ff98a70e-0803-4718-bc08-b4fb076ada47" - ], - "x-ms-correlation-request-id": [ - "ff98a70e-0803-4718-bc08-b4fb076ada47" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T205042Z:ff98a70e-0803-4718-bc08-b4fb076ada47" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:50:42 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM056VXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "fbbc1fcc-7dbe-40bb-9b53-902c4ccc6190" - ], - "x-ms-correlation-request-id": [ - "fbbc1fcc-7dbe-40bb-9b53-902c4ccc6190" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T205057Z:fbbc1fcc-7dbe-40bb-9b53-902c4ccc6190" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:50:57 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM056VXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "28510daf-2580-4529-b5bc-2fc14bb86385" - ], - "x-ms-correlation-request-id": [ - "28510daf-2580-4529-b5bc-2fc14bb86385" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T205112Z:28510daf-2580-4529-b5bc-2fc14bb86385" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:51:12 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM056VXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "f8333e71-c998-497c-9f0c-8e92d1814227" - ], - "x-ms-correlation-request-id": [ - "f8333e71-c998-497c-9f0c-8e92d1814227" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T205128Z:f8333e71-c998-497c-9f0c-8e92d1814227" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:51:27 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM056VXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "4cfb0c2e-a85b-44ba-87c3-1081ad321d8c" - ], - "x-ms-correlation-request-id": [ - "4cfb0c2e-a85b-44ba-87c3-1081ad321d8c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T205143Z:4cfb0c2e-a85b-44ba-87c3-1081ad321d8c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:51:42 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM056VXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "735d39f3-567c-47f5-a4bc-6fb889df8fa5" - ], - "x-ms-correlation-request-id": [ - "735d39f3-567c-47f5-a4bc-6fb889df8fa5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T205158Z:735d39f3-567c-47f5-a4bc-6fb889df8fa5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:51:57 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM056VXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "99d6cd45-c2f6-4ad6-ac95-26087ec80465" - ], - "x-ms-correlation-request-id": [ - "99d6cd45-c2f6-4ad6-ac95-26087ec80465" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T205213Z:99d6cd45-c2f6-4ad6-ac95-26087ec80465" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:52:12 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NzUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM056VXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29916.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "da57c31d-b884-4323-897b-70d98b14aa54" - ], - "x-ms-correlation-request-id": [ - "da57c31d-b884-4323-897b-70d98b14aa54" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210421T205213Z:da57c31d-b884-4323-897b-70d98b14aa54" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 21 Apr 2021 20:52:12 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-GetAfdOriginGroup": [ - "ps8775", - "ps539", - "ps3155" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginGroupTests/TestRemoveAfdOriginGroup.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginGroupTests/TestRemoveAfdOriginGroup.json deleted file mode 100644 index 43ded37b8e05..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginGroupTests/TestRemoveAfdOriginGroup.json +++ /dev/null @@ -1,1418 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5629?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTYyOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d88598f4-31d8-4081-abba-b82028b9bd63" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "ec190986-335d-4a26-ace8-fdf63ecf7823" - ], - "x-ms-correlation-request-id": [ - "ec190986-335d-4a26-ace8-fdf63ecf7823" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000653Z:ec190986-335d-4a26-ace8-fdf63ecf7823" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:06:53 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5629\",\r\n \"name\": \"ps5629\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5629/providers/Microsoft.Cdn/profiles/ps7556?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTYyOS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc1NTY/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f4914315-11c6-49c2-8ef5-b2889e0a151a" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5a0ea1a6-5f96-4a54-ac3a-acb3d57bd5d9" - ], - "x-ms-client-request-id": [ - "f4914315-11c6-49c2-8ef5-b2889e0a151a" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5629/providers/Microsoft.Cdn/operationresults/71786b8d-c812-424e-84b9-bb6cad0e0b5c?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "bc4bcfe5-4209-4856-af72-2d376ba210e1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000657Z:bc4bcfe5-4209-4856-af72-2d376ba210e1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:06:56 GMT" - ], - "Content-Length": [ - "386" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5629/providers/Microsoft.Cdn/profiles/ps7556\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps7556\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ca81ffe3-74ba-4620-b1bc-57e73ec8192b\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5629/providers/Microsoft.Cdn/operationresults/71786b8d-c812-424e-84b9-bb6cad0e0b5c?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTYyOS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzcxNzg2YjhkLWM4MTItNDI0ZS04NGI5LWJiNmNhZDBlMGI1Yz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f4914315-11c6-49c2-8ef5-b2889e0a151a" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d2621a7c-a4dd-4af7-88c4-03f915107011" - ], - "x-ms-client-request-id": [ - "f4914315-11c6-49c2-8ef5-b2889e0a151a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "13470d92-bfdc-4c9d-bb9d-7dd9b386d654" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000707Z:13470d92-bfdc-4c9d-bb9d-7dd9b386d654" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:07:07 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5629/providers/Microsoft.Cdn/operationresults/71786b8d-c812-424e-84b9-bb6cad0e0b5c?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTYyOS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzcxNzg2YjhkLWM4MTItNDI0ZS04NGI5LWJiNmNhZDBlMGI1Yz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f4914315-11c6-49c2-8ef5-b2889e0a151a" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "cdb890f6-e1fb-4a77-894e-bb22e71af2c8" - ], - "x-ms-client-request-id": [ - "f4914315-11c6-49c2-8ef5-b2889e0a151a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "3aa5a127-8f79-4f62-ba04-9e2a82bc8b26" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000717Z:3aa5a127-8f79-4f62-ba04-9e2a82bc8b26" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:07:17 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5629/providers/Microsoft.Cdn/profiles/ps7556?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTYyOS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc1NTY/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f4914315-11c6-49c2-8ef5-b2889e0a151a" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "283a4e4d-37a6-4cf4-9b48-70f7822f7984" - ], - "x-ms-client-request-id": [ - "f4914315-11c6-49c2-8ef5-b2889e0a151a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "6ff6b8eb-29d5-4be2-9516-c5de89b9f4f4" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000717Z:6ff6b8eb-29d5-4be2-9516-c5de89b9f4f4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:07:17 GMT" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5629/providers/Microsoft.Cdn/profiles/ps7556\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps7556\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ca81ffe3-74ba-4620-b1bc-57e73ec8192b\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5629/providers/Microsoft.Cdn/profiles/ps7556/originGroups/ps4239?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTYyOS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc1NTYvb3JpZ2luR3JvdXBzL3BzNDIzOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "114e228b-9184-4164-86e7-3d23f57e1468" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "93" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2b73030b-592d-4fdc-9638-8b14bd15bcee" - ], - "x-ms-client-request-id": [ - "114e228b-9184-4164-86e7-3d23f57e1468" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "f080bdf8-25df-48fa-9666-18064487df1b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000719Z:f080bdf8-25df-48fa-9666-18064487df1b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:07:18 GMT" - ], - "Content-Length": [ - "561" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5629/providers/Microsoft.Cdn/profiles/ps7556/originGroups/ps4239\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups\",\r\n \"name\": \"ps4239\",\r\n \"properties\": {\r\n \"loadBalancingSettings\": {\r\n \"sampleSize\": 4,\r\n \"successfulSamplesRequired\": 2,\r\n \"additionalLatencyInMilliseconds\": 0\r\n },\r\n \"healthProbeSettings\": null,\r\n \"responseBasedAFDOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10,\r\n \"sessionAffinityState\": \"Disabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5629/providers/Microsoft.Cdn/profiles/ps7556/originGroups/ps4239?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTYyOS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc1NTYvb3JpZ2luR3JvdXBzL3BzNDIzOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "73f5b043-fa68-439e-bf0a-ca17717827fd" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5629/providers/Microsoft.Cdn/operationresults/329bb725-815e-4a3f-b150-54e168aada8a/profileresults/ps7556/origingroupresults/ps4239?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c016cc68-3002-4560-a485-03d6700127f6" - ], - "x-ms-client-request-id": [ - "73f5b043-fa68-439e-bf0a-ca17717827fd" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5629/providers/Microsoft.Cdn/operationresults/329bb725-815e-4a3f-b150-54e168aada8a?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-correlation-request-id": [ - "9e7baa2c-ce0f-4ca0-b56c-2e852f977f60" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000720Z:9e7baa2c-ce0f-4ca0-b56c-2e852f977f60" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:07:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5629/providers/Microsoft.Cdn/operationresults/329bb725-815e-4a3f-b150-54e168aada8a?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTYyOS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzMyOWJiNzI1LTgxNWUtNGEzZi1iMTUwLTU0ZTE2OGFhZGE4YT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "73f5b043-fa68-439e-bf0a-ca17717827fd" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "72d61d04-82df-4ead-b6cc-0f1099658543" - ], - "x-ms-client-request-id": [ - "73f5b043-fa68-439e-bf0a-ca17717827fd" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "22193814-a4e2-4f04-a2d8-6e901bea457d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000730Z:22193814-a4e2-4f04-a2d8-6e901bea457d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:07:29 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5629/providers/Microsoft.Cdn/operationresults/329bb725-815e-4a3f-b150-54e168aada8a/profileresults/ps7556/origingroupresults/ps4239?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTYyOS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzMyOWJiNzI1LTgxNWUtNGEzZi1iMTUwLTU0ZTE2OGFhZGE4YS9wcm9maWxlcmVzdWx0cy9wczc1NTYvb3JpZ2luZ3JvdXByZXN1bHRzL3BzNDIzOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "73f5b043-fa68-439e-bf0a-ca17717827fd" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2a1e8ce6-7b6e-47d6-b7fe-7542f0331c41" - ], - "x-ms-client-request-id": [ - "73f5b043-fa68-439e-bf0a-ca17717827fd" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "52eec896-65d5-4313-a144-6c96fdf086c0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000730Z:52eec896-65d5-4313-a144-6c96fdf086c0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:07:30 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5629/providers/Microsoft.Cdn/profiles/ps7556/originGroups/ps4239?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTYyOS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc1NTYvb3JpZ2luR3JvdXBzL3BzNDIzOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "628ced2b-b735-4691-be60-09058540629f" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4edcf4bc-9d76-401e-918f-7230447290b7" - ], - "x-ms-client-request-id": [ - "628ced2b-b735-4691-be60-09058540629f" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "bde7daab-6688-43b7-a7a4-ed6230e530bb" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000731Z:bde7daab-6688-43b7-a7a4-ed6230e530bb" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:07:30 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5629?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTYyOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "79986870-05d4-4951-af2a-d790bde0d0eb" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "b233bda0-092c-4dff-a0f4-d31f1c1e276d" - ], - "x-ms-correlation-request-id": [ - "b233bda0-092c-4dff-a0f4-d31f1c1e276d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000731Z:b233bda0-092c-4dff-a0f4-d31f1c1e276d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:07:30 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMk1qa3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "1aba9c2d-f67e-435f-944e-1cf997f86a3a" - ], - "x-ms-correlation-request-id": [ - "1aba9c2d-f67e-435f-944e-1cf997f86a3a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000746Z:1aba9c2d-f67e-435f-944e-1cf997f86a3a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:07:45 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMk1qa3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "65d66df2-8020-4aa1-92c9-68661ee96166" - ], - "x-ms-correlation-request-id": [ - "65d66df2-8020-4aa1-92c9-68661ee96166" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000801Z:65d66df2-8020-4aa1-92c9-68661ee96166" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:08:00 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMk1qa3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "d7d368ff-893d-48a4-8ef4-e2781898227b" - ], - "x-ms-correlation-request-id": [ - "d7d368ff-893d-48a4-8ef4-e2781898227b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000816Z:d7d368ff-893d-48a4-8ef4-e2781898227b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:08:15 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMk1qa3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "503946cb-e430-4280-9f20-994cb656d995" - ], - "x-ms-correlation-request-id": [ - "503946cb-e430-4280-9f20-994cb656d995" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000831Z:503946cb-e430-4280-9f20-994cb656d995" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:08:31 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMk1qa3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "0866b6d1-74db-4952-893e-a6be20141ca1" - ], - "x-ms-correlation-request-id": [ - "0866b6d1-74db-4952-893e-a6be20141ca1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000846Z:0866b6d1-74db-4952-893e-a6be20141ca1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:08:46 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMk1qa3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "18d821ee-bbb1-45b2-a602-b0909686d504" - ], - "x-ms-correlation-request-id": [ - "18d821ee-bbb1-45b2-a602-b0909686d504" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000901Z:18d821ee-bbb1-45b2-a602-b0909686d504" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:09:01 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMk1qa3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "c93d3162-f1ef-4b9e-a40f-fe4c0463e8ca" - ], - "x-ms-correlation-request-id": [ - "c93d3162-f1ef-4b9e-a40f-fe4c0463e8ca" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000916Z:c93d3162-f1ef-4b9e-a40f-fe4c0463e8ca" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:09:16 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMk1qa3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "128df8dc-4cd5-430f-af77-7dac9db6587a" - ], - "x-ms-correlation-request-id": [ - "128df8dc-4cd5-430f-af77-7dac9db6587a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000931Z:128df8dc-4cd5-430f-af77-7dac9db6587a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:09:31 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMk1qa3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "65e039c9-fc5e-4770-a577-a3e947a4cc5a" - ], - "x-ms-correlation-request-id": [ - "65e039c9-fc5e-4770-a577-a3e947a4cc5a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T000946Z:65e039c9-fc5e-4770-a577-a3e947a4cc5a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:09:46 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMk1qa3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "5f24e6ca-d913-4e44-b148-bee2526cd386" - ], - "x-ms-correlation-request-id": [ - "5f24e6ca-d913-4e44-b148-bee2526cd386" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001001Z:5f24e6ca-d913-4e44-b148-bee2526cd386" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:10:01 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMk1qa3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "16c0a1ea-fb45-4b5c-903e-2e42f6f935fe" - ], - "x-ms-correlation-request-id": [ - "16c0a1ea-fb45-4b5c-903e-2e42f6f935fe" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001017Z:16c0a1ea-fb45-4b5c-903e-2e42f6f935fe" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:10:16 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU2MjktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMk1qa3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "ad305d71-2c12-4087-a79d-0c3e9f9a6ab7" - ], - "x-ms-correlation-request-id": [ - "ad305d71-2c12-4087-a79d-0c3e9f9a6ab7" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001017Z:ad305d71-2c12-4087-a79d-0c3e9f9a6ab7" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:10:16 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-RemoveAfdOriginGroup": [ - "ps5629", - "ps7556", - "ps4239" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginGroupTests/TestSetAfdOriginGroup.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginGroupTests/TestSetAfdOriginGroup.json deleted file mode 100644 index b1c2f6e1c830..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginGroupTests/TestSetAfdOriginGroup.json +++ /dev/null @@ -1,1202 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9540?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTU0MD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8ae873d8-3de5-40f1-b70e-19bd0f87c668" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "f63f3c4e-b922-4577-8b84-e80fd7d5e326" - ], - "x-ms-correlation-request-id": [ - "f63f3c4e-b922-4577-8b84-e80fd7d5e326" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001540Z:f63f3c4e-b922-4577-8b84-e80fd7d5e326" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:15:39 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9540\",\r\n \"name\": \"ps9540\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9540/providers/Microsoft.Cdn/profiles/ps7595?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTU0MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc1OTU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "07230f83-f704-4962-8529-f914eab98608" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8f8990d4-d0a9-42ae-92a6-c95bd8c2b8d7" - ], - "x-ms-client-request-id": [ - "07230f83-f704-4962-8529-f914eab98608" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9540/providers/Microsoft.Cdn/operationresults/55201ef2-aa8c-4e10-b1c0-44db371b4980?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "da5c2b1a-c0d3-47c1-9a98-5c865d8538b9" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001543Z:da5c2b1a-c0d3-47c1-9a98-5c865d8538b9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:15:42 GMT" - ], - "Content-Length": [ - "386" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9540/providers/Microsoft.Cdn/profiles/ps7595\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps7595\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"11d5787a-2193-40d7-a95b-3fd6242d2473\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9540/providers/Microsoft.Cdn/operationresults/55201ef2-aa8c-4e10-b1c0-44db371b4980?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTU0MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzU1MjAxZWYyLWFhOGMtNGUxMC1iMWMwLTQ0ZGIzNzFiNDk4MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "07230f83-f704-4962-8529-f914eab98608" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5ed8deb3-0676-419f-8943-efdcb807f1e0" - ], - "x-ms-client-request-id": [ - "07230f83-f704-4962-8529-f914eab98608" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "bdf76edd-3283-43f3-9b09-aeb265a0d318" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001553Z:bdf76edd-3283-43f3-9b09-aeb265a0d318" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:15:52 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9540/providers/Microsoft.Cdn/profiles/ps7595?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTU0MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc1OTU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "07230f83-f704-4962-8529-f914eab98608" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "eb1fc13d-6303-4f3a-8198-d94b2a470433" - ], - "x-ms-client-request-id": [ - "07230f83-f704-4962-8529-f914eab98608" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "b195d201-8e78-4c7f-a0db-4f92e2d4feca" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001553Z:b195d201-8e78-4c7f-a0db-4f92e2d4feca" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:15:52 GMT" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9540/providers/Microsoft.Cdn/profiles/ps7595\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps7595\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"11d5787a-2193-40d7-a95b-3fd6242d2473\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9540/providers/Microsoft.Cdn/profiles/ps7595/originGroups/ps1939?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTU0MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc1OTUvb3JpZ2luR3JvdXBzL3BzMTkzOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ea4d4547-c4ce-444b-bb1a-cc0dc4afc338" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "93" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b134f7bb-fa38-40ae-b1f6-2c330ea27eea" - ], - "x-ms-client-request-id": [ - "ea4d4547-c4ce-444b-bb1a-cc0dc4afc338" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "ab71ff86-26b2-4c19-998b-0b5670afb22d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001554Z:ab71ff86-26b2-4c19-998b-0b5670afb22d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:15:53 GMT" - ], - "Content-Length": [ - "561" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9540/providers/Microsoft.Cdn/profiles/ps7595/originGroups/ps1939\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups\",\r\n \"name\": \"ps1939\",\r\n \"properties\": {\r\n \"loadBalancingSettings\": {\r\n \"sampleSize\": 4,\r\n \"successfulSamplesRequired\": 2,\r\n \"additionalLatencyInMilliseconds\": 0\r\n },\r\n \"healthProbeSettings\": null,\r\n \"responseBasedAFDOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10,\r\n \"sessionAffinityState\": \"Disabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9540/providers/Microsoft.Cdn/profiles/ps7595/originGroups/ps1939?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTU0MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc1OTUvb3JpZ2luR3JvdXBzL3BzMTkzOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "20138801-5172-4ab2-b4ff-43b68960d8b3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "492d2617-8a88-48ba-a9d3-e0b4ca5d2963" - ], - "x-ms-client-request-id": [ - "20138801-5172-4ab2-b4ff-43b68960d8b3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "7a6958a8-d6e8-41eb-86ac-389f5162a422" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001554Z:7a6958a8-d6e8-41eb-86ac-389f5162a422" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:15:54 GMT" - ], - "Content-Length": [ - "561" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9540/providers/Microsoft.Cdn/profiles/ps7595/originGroups/ps1939\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups\",\r\n \"name\": \"ps1939\",\r\n \"properties\": {\r\n \"loadBalancingSettings\": {\r\n \"sampleSize\": 4,\r\n \"successfulSamplesRequired\": 2,\r\n \"additionalLatencyInMilliseconds\": 0\r\n },\r\n \"healthProbeSettings\": null,\r\n \"responseBasedAFDOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10,\r\n \"sessionAffinityState\": \"Disabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9540/providers/Microsoft.Cdn/profiles/ps7595/originGroups/ps1939?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTU0MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc1OTUvb3JpZ2luR3JvdXBzL3BzMTkzOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "20138801-5172-4ab2-b4ff-43b68960d8b3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "09038b87-b543-4731-babf-4160a2bdc1d1" - ], - "x-ms-client-request-id": [ - "20138801-5172-4ab2-b4ff-43b68960d8b3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "868b0286-cbb1-49a6-a599-bd261361284a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001606Z:868b0286-cbb1-49a6-a599-bd261361284a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:16:05 GMT" - ], - "Content-Length": [ - "561" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9540/providers/Microsoft.Cdn/profiles/ps7595/originGroups/ps1939\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups\",\r\n \"name\": \"ps1939\",\r\n \"properties\": {\r\n \"loadBalancingSettings\": {\r\n \"sampleSize\": 6,\r\n \"successfulSamplesRequired\": 3,\r\n \"additionalLatencyInMilliseconds\": 0\r\n },\r\n \"healthProbeSettings\": null,\r\n \"responseBasedAFDOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10,\r\n \"sessionAffinityState\": \"Disabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9540/providers/Microsoft.Cdn/profiles/ps7595/originGroups/ps1939?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTU0MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc1OTUvb3JpZ2luR3JvdXBzL3BzMTkzOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1166adb7-356d-4fbc-8ef7-ea6c26c428a5" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e3933ed6-f2ee-4760-be1e-24eee8950ac1" - ], - "x-ms-client-request-id": [ - "1166adb7-356d-4fbc-8ef7-ea6c26c428a5" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "8381f32b-7479-4711-bb52-676df33ffad8" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001606Z:8381f32b-7479-4711-bb52-676df33ffad8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:16:06 GMT" - ], - "Content-Length": [ - "561" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9540/providers/Microsoft.Cdn/profiles/ps7595/originGroups/ps1939\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups\",\r\n \"name\": \"ps1939\",\r\n \"properties\": {\r\n \"loadBalancingSettings\": {\r\n \"sampleSize\": 6,\r\n \"successfulSamplesRequired\": 3,\r\n \"additionalLatencyInMilliseconds\": 0\r\n },\r\n \"healthProbeSettings\": null,\r\n \"responseBasedAFDOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10,\r\n \"sessionAffinityState\": \"Disabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9540/providers/Microsoft.Cdn/profiles/ps7595/originGroups/ps1939?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTU0MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc1OTUvb3JpZ2luR3JvdXBzL3BzMTkzOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"properties\": {\r\n \"loadBalancingSettings\": {\r\n \"sampleSize\": 6,\r\n \"successfulSamplesRequired\": 3,\r\n \"additionalLatencyInMilliseconds\": 0\r\n }\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "20138801-5172-4ab2-b4ff-43b68960d8b3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "174" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9540/providers/Microsoft.Cdn/operationresults/8f7ed21d-ee85-4967-aa3a-efc7f214425d/profileresults/ps7595/origingroupresults/ps1939?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2a03754c-c3b3-4f52-9c98-1ea842416e61" - ], - "x-ms-client-request-id": [ - "20138801-5172-4ab2-b4ff-43b68960d8b3" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9540/providers/Microsoft.Cdn/operationresults/8f7ed21d-ee85-4967-aa3a-efc7f214425d?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "98" - ], - "x-ms-correlation-request-id": [ - "54484dfc-5668-42b2-8998-174ea2f3c6bd" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001556Z:54484dfc-5668-42b2-8998-174ea2f3c6bd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:15:55 GMT" - ], - "Content-Length": [ - "560" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9540/providers/Microsoft.Cdn/profiles/ps7595/originGroups/ps1939\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups\",\r\n \"name\": \"ps1939\",\r\n \"properties\": {\r\n \"loadBalancingSettings\": {\r\n \"sampleSize\": 6,\r\n \"successfulSamplesRequired\": 3,\r\n \"additionalLatencyInMilliseconds\": 0\r\n },\r\n \"healthProbeSettings\": null,\r\n \"responseBasedAFDOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10,\r\n \"sessionAffinityState\": \"Disabled\",\r\n \"provisioningState\": \"Updating\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9540/providers/Microsoft.Cdn/operationresults/8f7ed21d-ee85-4967-aa3a-efc7f214425d?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTU0MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzhmN2VkMjFkLWVlODUtNDk2Ny1hYTNhLWVmYzdmMjE0NDI1ZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "20138801-5172-4ab2-b4ff-43b68960d8b3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "99f0a4dc-6b6c-480f-946f-0fe56e1eeee0" - ], - "x-ms-client-request-id": [ - "20138801-5172-4ab2-b4ff-43b68960d8b3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "8c3bb262-1b42-4988-a586-d35aecb6a647" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001606Z:8c3bb262-1b42-4988-a586-d35aecb6a647" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:16:05 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9540?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTU0MD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9815de1e-d703-44d7-ae70-ec6748afb206" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk1NDAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "2140b791-6e2f-4427-b6d2-f9c506771bb6" - ], - "x-ms-correlation-request-id": [ - "2140b791-6e2f-4427-b6d2-f9c506771bb6" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001606Z:2140b791-6e2f-4427-b6d2-f9c506771bb6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:16:06 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk1NDAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprMU5EQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk1NDAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "7735354b-f789-4f9f-91d1-d43032ca0f54" - ], - "x-ms-correlation-request-id": [ - "7735354b-f789-4f9f-91d1-d43032ca0f54" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001621Z:7735354b-f789-4f9f-91d1-d43032ca0f54" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:16:21 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk1NDAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprMU5EQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk1NDAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "9cfff429-d7c2-4771-9dc6-398604edb75c" - ], - "x-ms-correlation-request-id": [ - "9cfff429-d7c2-4771-9dc6-398604edb75c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001637Z:9cfff429-d7c2-4771-9dc6-398604edb75c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:16:36 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk1NDAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprMU5EQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk1NDAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "0ee7c873-6029-4038-a163-1a3351ce4059" - ], - "x-ms-correlation-request-id": [ - "0ee7c873-6029-4038-a163-1a3351ce4059" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001652Z:0ee7c873-6029-4038-a163-1a3351ce4059" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:16:52 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk1NDAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprMU5EQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk1NDAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "36901028-dbab-401a-934d-f9668f7a1590" - ], - "x-ms-correlation-request-id": [ - "36901028-dbab-401a-934d-f9668f7a1590" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001707Z:36901028-dbab-401a-934d-f9668f7a1590" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:17:07 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk1NDAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprMU5EQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk1NDAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "4a51a2ab-5e33-4173-8acb-3101a7c7dfd4" - ], - "x-ms-correlation-request-id": [ - "4a51a2ab-5e33-4173-8acb-3101a7c7dfd4" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001722Z:4a51a2ab-5e33-4173-8acb-3101a7c7dfd4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:17:21 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk1NDAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprMU5EQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk1NDAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "717ae29e-2764-4dcf-b236-70e2d649f58f" - ], - "x-ms-correlation-request-id": [ - "717ae29e-2764-4dcf-b236-70e2d649f58f" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001737Z:717ae29e-2764-4dcf-b236-70e2d649f58f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:17:36 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk1NDAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprMU5EQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "eefa1900-4aad-4fb6-ab4f-5618f88203ed" - ], - "x-ms-correlation-request-id": [ - "eefa1900-4aad-4fb6-ab4f-5618f88203ed" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001752Z:eefa1900-4aad-4fb6-ab4f-5618f88203ed" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:17:51 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk1NDAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprMU5EQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "83956d16-e643-47f4-b9bd-fac6b048804a" - ], - "x-ms-correlation-request-id": [ - "83956d16-e643-47f4-b9bd-fac6b048804a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T001752Z:83956d16-e643-47f4-b9bd-fac6b048804a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:17:51 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-SetAfdOriginGroup": [ - "ps9540", - "ps7595", - "ps1939" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginTests/TestCreateAfdOrigin.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginTests/TestCreateAfdOrigin.json deleted file mode 100644 index 19222df8802b..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginTests/TestCreateAfdOrigin.json +++ /dev/null @@ -1,1422 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6411?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjQxMT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bb719af1-137c-4680-a1ff-a0c47d9352d8" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "d937f0d2-21c4-4596-b96c-b3f8ab559e09" - ], - "x-ms-correlation-request-id": [ - "d937f0d2-21c4-4596-b96c-b3f8ab559e09" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204549Z:d937f0d2-21c4-4596-b96c-b3f8ab559e09" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:45:49 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6411\",\r\n \"name\": \"ps6411\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6411/providers/Microsoft.Cdn/profiles/ps9215?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjQxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkyMTU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a77a97f6-7af9-4119-aa32-db7c3a04f004" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6c9c905e-110e-43bf-8494-c19155ece3ae" - ], - "x-ms-client-request-id": [ - "a77a97f6-7af9-4119-aa32-db7c3a04f004" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6411/providers/Microsoft.Cdn/operationresults/84d3513b-e731-4e92-8407-cdaa9d6d0a26?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "2a5f6389-e3de-4ce1-8ff7-70e99b33cc25" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204553Z:2a5f6389-e3de-4ce1-8ff7-70e99b33cc25" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:45:52 GMT" - ], - "Content-Length": [ - "386" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6411/providers/Microsoft.Cdn/profiles/ps9215\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps9215\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f581c6fa-4d57-43ea-94c3-ebab50eaab4e\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6411/providers/Microsoft.Cdn/operationresults/84d3513b-e731-4e92-8407-cdaa9d6d0a26?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjQxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzg0ZDM1MTNiLWU3MzEtNGU5Mi04NDA3LWNkYWE5ZDZkMGEyNj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a77a97f6-7af9-4119-aa32-db7c3a04f004" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b499ed81-bb7f-4fdf-85e1-a197d4c4446d" - ], - "x-ms-client-request-id": [ - "a77a97f6-7af9-4119-aa32-db7c3a04f004" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "d0bbffff-d837-456d-a70c-f7f6f59070d0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204604Z:d0bbffff-d837-456d-a70c-f7f6f59070d0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:46:03 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6411/providers/Microsoft.Cdn/operationresults/84d3513b-e731-4e92-8407-cdaa9d6d0a26?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjQxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzg0ZDM1MTNiLWU3MzEtNGU5Mi04NDA3LWNkYWE5ZDZkMGEyNj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a77a97f6-7af9-4119-aa32-db7c3a04f004" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2000c87d-b827-45f6-ae43-e12a79beece5" - ], - "x-ms-client-request-id": [ - "a77a97f6-7af9-4119-aa32-db7c3a04f004" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "410529e9-b3f9-4ed5-a993-fb4bfbb78b50" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204614Z:410529e9-b3f9-4ed5-a993-fb4bfbb78b50" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:46:13 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6411/providers/Microsoft.Cdn/profiles/ps9215?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjQxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkyMTU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a77a97f6-7af9-4119-aa32-db7c3a04f004" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3b09ac35-a19c-489b-9493-c68f09a05c18" - ], - "x-ms-client-request-id": [ - "a77a97f6-7af9-4119-aa32-db7c3a04f004" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "7b1fd542-911a-4807-9e78-54ab7fec106f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204614Z:7b1fd542-911a-4807-9e78-54ab7fec106f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:46:14 GMT" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6411/providers/Microsoft.Cdn/profiles/ps9215\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps9215\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f581c6fa-4d57-43ea-94c3-ebab50eaab4e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6411/providers/Microsoft.Cdn/profiles/ps9215/originGroups/ps1672?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjQxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkyMTUvb3JpZ2luR3JvdXBzL3BzMTY3Mj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "013ed7c9-7bfb-46e5-ba07-142a9bbca917" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "93" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "736cf6b0-e6a0-41d0-9d8a-133fac4516cf" - ], - "x-ms-client-request-id": [ - "013ed7c9-7bfb-46e5-ba07-142a9bbca917" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "7c17195c-49d8-4491-b999-54903296922c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204615Z:7c17195c-49d8-4491-b999-54903296922c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:46:15 GMT" - ], - "Content-Length": [ - "561" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6411/providers/Microsoft.Cdn/profiles/ps9215/originGroups/ps1672\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups\",\r\n \"name\": \"ps1672\",\r\n \"properties\": {\r\n \"loadBalancingSettings\": {\r\n \"sampleSize\": 4,\r\n \"successfulSamplesRequired\": 2,\r\n \"additionalLatencyInMilliseconds\": 0\r\n },\r\n \"healthProbeSettings\": null,\r\n \"responseBasedAFDOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10,\r\n \"sessionAffinityState\": \"Disabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6411/providers/Microsoft.Cdn/profiles/ps9215/originGroups/ps1672/origins/ps3217?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjQxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkyMTUvb3JpZ2luR3JvdXBzL3BzMTY3Mi9vcmlnaW5zL3BzMzIxNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"hostName\": \"contoso.com\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a7dd0444-8169-422e-a1b0-4683e684b436" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "59" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5535f0ef-a90c-4350-b857-c9a1fc5f07b0" - ], - "x-ms-client-request-id": [ - "a7dd0444-8169-422e-a1b0-4683e684b436" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6411/providers/Microsoft.Cdn/operationresults/1c0ad0fa-6f51-4f13-bec4-3468ebaf98ec?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "c9e7647f-2996-4a4a-886b-b2870379211c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204616Z:c9e7647f-2996-4a4a-886b-b2870379211c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:46:16 GMT" - ], - "Content-Length": [ - "498" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6411/providers/Microsoft.Cdn/profiles/ps9215/originGroups/ps1672/origins/ps3217\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups/origins\",\r\n \"name\": \"ps3217\",\r\n \"properties\": {\r\n \"originGroupName\": \"ps1672\",\r\n \"hostName\": \"contoso.com\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": 443,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabledState\": \"Enabled\",\r\n \"sharedPrivateLinkResource\": null,\r\n \"provisioningState\": \"Creating\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6411/providers/Microsoft.Cdn/operationresults/1c0ad0fa-6f51-4f13-bec4-3468ebaf98ec?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjQxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzFjMGFkMGZhLTZmNTEtNGYxMy1iZWM0LTM0NjhlYmFmOThlYz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a7dd0444-8169-422e-a1b0-4683e684b436" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "196cf740-943c-416f-9b9b-0683ca638953" - ], - "x-ms-client-request-id": [ - "a7dd0444-8169-422e-a1b0-4683e684b436" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "6c4ed16c-c033-4e7f-a7dc-0bafebcae4df" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204627Z:6c4ed16c-c033-4e7f-a7dc-0bafebcae4df" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:46:26 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6411/providers/Microsoft.Cdn/operationresults/1c0ad0fa-6f51-4f13-bec4-3468ebaf98ec?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjQxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzFjMGFkMGZhLTZmNTEtNGYxMy1iZWM0LTM0NjhlYmFmOThlYz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a7dd0444-8169-422e-a1b0-4683e684b436" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "18035135-b2be-4c06-8a05-eb8baede636f" - ], - "x-ms-client-request-id": [ - "a7dd0444-8169-422e-a1b0-4683e684b436" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "e5d02898-e7a9-4553-8c40-f9ae1b464360" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204637Z:e5d02898-e7a9-4553-8c40-f9ae1b464360" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:46:36 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6411/providers/Microsoft.Cdn/profiles/ps9215/originGroups/ps1672/origins/ps3217?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjQxMS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkyMTUvb3JpZ2luR3JvdXBzL3BzMTY3Mi9vcmlnaW5zL3BzMzIxNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a7dd0444-8169-422e-a1b0-4683e684b436" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a474fe1d-4caa-42b0-b54b-6f3dbd929cdb" - ], - "x-ms-client-request-id": [ - "a7dd0444-8169-422e-a1b0-4683e684b436" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "46b14b37-a927-425c-a19d-28fcdd8d031c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204637Z:46b14b37-a927-425c-a19d-28fcdd8d031c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:46:37 GMT" - ], - "Content-Length": [ - "499" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6411/providers/Microsoft.Cdn/profiles/ps9215/originGroups/ps1672/origins/ps3217\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups/origins\",\r\n \"name\": \"ps3217\",\r\n \"properties\": {\r\n \"originGroupName\": \"ps1672\",\r\n \"hostName\": \"contoso.com\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": 443,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabledState\": \"Enabled\",\r\n \"sharedPrivateLinkResource\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6411?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjQxMT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e714beaa-b021-40cc-89cb-d4c11666d366" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "3f2b0a9d-fbef-4f0f-9f38-af69281d33b3" - ], - "x-ms-correlation-request-id": [ - "3f2b0a9d-fbef-4f0f-9f38-af69281d33b3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204638Z:3f2b0a9d-fbef-4f0f-9f38-af69281d33b3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:46:37 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "de8843f6-9c17-4ad6-abe2-acf0d42790e8" - ], - "x-ms-correlation-request-id": [ - "de8843f6-9c17-4ad6-abe2-acf0d42790e8" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204653Z:de8843f6-9c17-4ad6-abe2-acf0d42790e8" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:46:53 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "5a1157cd-2723-411a-8449-fac36983db6d" - ], - "x-ms-correlation-request-id": [ - "5a1157cd-2723-411a-8449-fac36983db6d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204708Z:5a1157cd-2723-411a-8449-fac36983db6d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:47:08 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "07e17dcc-93f4-445a-a8b6-62ce95f51cbf" - ], - "x-ms-correlation-request-id": [ - "07e17dcc-93f4-445a-a8b6-62ce95f51cbf" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204723Z:07e17dcc-93f4-445a-a8b6-62ce95f51cbf" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:47:23 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "4efee152-c3e0-4df1-be3e-d5319327a999" - ], - "x-ms-correlation-request-id": [ - "4efee152-c3e0-4df1-be3e-d5319327a999" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204738Z:4efee152-c3e0-4df1-be3e-d5319327a999" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:47:38 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "0e7f53ad-0c3b-4d1b-8c6c-71c349767257" - ], - "x-ms-correlation-request-id": [ - "0e7f53ad-0c3b-4d1b-8c6c-71c349767257" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204753Z:0e7f53ad-0c3b-4d1b-8c6c-71c349767257" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:47:53 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "4bb54317-c82a-4163-bcf2-7f1eae1a023c" - ], - "x-ms-correlation-request-id": [ - "4bb54317-c82a-4163-bcf2-7f1eae1a023c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204808Z:4bb54317-c82a-4163-bcf2-7f1eae1a023c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:48:08 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "c55bb59c-040b-4d9f-a5e8-94eeb85f68b0" - ], - "x-ms-correlation-request-id": [ - "c55bb59c-040b-4d9f-a5e8-94eeb85f68b0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204823Z:c55bb59c-040b-4d9f-a5e8-94eeb85f68b0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:48:23 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "b3240725-0a5a-4402-b838-827b7befbb32" - ], - "x-ms-correlation-request-id": [ - "b3240725-0a5a-4402-b838-827b7befbb32" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204839Z:b3240725-0a5a-4402-b838-827b7befbb32" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:48:38 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "29cd3ba5-af87-47d9-a723-cf76313598ef" - ], - "x-ms-correlation-request-id": [ - "29cd3ba5-af87-47d9-a723-cf76313598ef" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204854Z:29cd3ba5-af87-47d9-a723-cf76313598ef" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:48:54 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "a34832c8-c45e-47c2-a47d-9758a4140ccf" - ], - "x-ms-correlation-request-id": [ - "a34832c8-c45e-47c2-a47d-9758a4140ccf" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204909Z:a34832c8-c45e-47c2-a47d-9758a4140ccf" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:49:09 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "17217c7b-cffd-49d8-909b-a7ee5c0cbb47" - ], - "x-ms-correlation-request-id": [ - "17217c7b-cffd-49d8-909b-a7ee5c0cbb47" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204924Z:17217c7b-cffd-49d8-909b-a7ee5c0cbb47" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:49:24 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY0MTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZME1URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "4f9491e2-5fb3-4944-9497-fd8b6065d7ca" - ], - "x-ms-correlation-request-id": [ - "4f9491e2-5fb3-4944-9497-fd8b6065d7ca" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T204924Z:4f9491e2-5fb3-4944-9497-fd8b6065d7ca" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:49:24 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-CreateAfdOrigin": [ - "ps6411", - "ps9215", - "ps1672", - "ps3217" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginTests/TestGetAfdOrigin.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginTests/TestGetAfdOrigin.json deleted file mode 100644 index 26c1c66ff768..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginTests/TestGetAfdOrigin.json +++ /dev/null @@ -1,1425 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2081?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA4MT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "76244200-4c23-4c74-bb6e-538b65d90945" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "ceb05396-0562-4d7b-ad22-2e66a2864552" - ], - "x-ms-correlation-request-id": [ - "ceb05396-0562-4d7b-ad22-2e66a2864552" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204223Z:ceb05396-0562-4d7b-ad22-2e66a2864552" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:42:23 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2081\",\r\n \"name\": \"ps2081\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2081/providers/Microsoft.Cdn/profiles/ps5935?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjA4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU5MzU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0650e4ad-1d5b-4d36-84f8-03425d0885d4" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a33c92b1-8ff4-475b-8187-d155fe4c8d9e" - ], - "x-ms-client-request-id": [ - "0650e4ad-1d5b-4d36-84f8-03425d0885d4" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2081/providers/Microsoft.Cdn/operationresults/a9c5b6bb-ce9c-4a8d-b3b6-48dae9f8bab7?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "baeb028b-673b-4a1b-9847-2e0d1906685b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204226Z:baeb028b-673b-4a1b-9847-2e0d1906685b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:42:26 GMT" - ], - "Content-Length": [ - "386" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2081/providers/Microsoft.Cdn/profiles/ps5935\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps5935\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"581a442b-44e9-465d-abd5-957fd435ca47\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2081/providers/Microsoft.Cdn/operationresults/a9c5b6bb-ce9c-4a8d-b3b6-48dae9f8bab7?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2E5YzViNmJiLWNlOWMtNGE4ZC1iM2I2LTQ4ZGFlOWY4YmFiNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0650e4ad-1d5b-4d36-84f8-03425d0885d4" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a035020e-00aa-4cf7-ac82-a8a0613ac141" - ], - "x-ms-client-request-id": [ - "0650e4ad-1d5b-4d36-84f8-03425d0885d4" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "e7fbb54f-e432-419c-956a-5b7de3fadaa7" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204236Z:e7fbb54f-e432-419c-956a-5b7de3fadaa7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:42:36 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2081/providers/Microsoft.Cdn/profiles/ps5935?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjA4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU5MzU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0650e4ad-1d5b-4d36-84f8-03425d0885d4" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4bab7d9c-78ef-4ff6-8f0e-477b29e9e1c6" - ], - "x-ms-client-request-id": [ - "0650e4ad-1d5b-4d36-84f8-03425d0885d4" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "c625001a-af3c-4788-8a3f-14faa80ee480" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204237Z:c625001a-af3c-4788-8a3f-14faa80ee480" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:42:36 GMT" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2081/providers/Microsoft.Cdn/profiles/ps5935\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps5935\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"581a442b-44e9-465d-abd5-957fd435ca47\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2081/providers/Microsoft.Cdn/profiles/ps5935/originGroups/ps6133?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjA4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU5MzUvb3JpZ2luR3JvdXBzL3BzNjEzMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "27a68e83-cad8-49c1-8df7-c9cd712fd5f4" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "93" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "621a9b90-1474-4a01-a8a3-beabf39de6db" - ], - "x-ms-client-request-id": [ - "27a68e83-cad8-49c1-8df7-c9cd712fd5f4" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "03289c2a-5de5-4b99-8f6b-8467f93f122e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204238Z:03289c2a-5de5-4b99-8f6b-8467f93f122e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:42:37 GMT" - ], - "Content-Length": [ - "561" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2081/providers/Microsoft.Cdn/profiles/ps5935/originGroups/ps6133\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups\",\r\n \"name\": \"ps6133\",\r\n \"properties\": {\r\n \"loadBalancingSettings\": {\r\n \"sampleSize\": 4,\r\n \"successfulSamplesRequired\": 2,\r\n \"additionalLatencyInMilliseconds\": 0\r\n },\r\n \"healthProbeSettings\": null,\r\n \"responseBasedAFDOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10,\r\n \"sessionAffinityState\": \"Disabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2081/providers/Microsoft.Cdn/profiles/ps5935/originGroups/ps6133/origins/ps1693?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjA4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU5MzUvb3JpZ2luR3JvdXBzL3BzNjEzMy9vcmlnaW5zL3BzMTY5Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"hostName\": \"example.org\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f7d7c08f-d07b-44c4-bf97-5f55159a6965" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "59" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a606e07f-4c54-4c2e-bb26-691d7fa48691" - ], - "x-ms-client-request-id": [ - "f7d7c08f-d07b-44c4-bf97-5f55159a6965" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2081/providers/Microsoft.Cdn/operationresults/0bf83c2f-507e-4d9b-a23c-c7880a8055ec?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "f9d14424-5a92-43f2-83f0-040fc8021b39" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204239Z:f9d14424-5a92-43f2-83f0-040fc8021b39" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:42:39 GMT" - ], - "Content-Length": [ - "498" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2081/providers/Microsoft.Cdn/profiles/ps5935/originGroups/ps6133/origins/ps1693\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups/origins\",\r\n \"name\": \"ps1693\",\r\n \"properties\": {\r\n \"originGroupName\": \"ps6133\",\r\n \"hostName\": \"example.org\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": 443,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabledState\": \"Enabled\",\r\n \"sharedPrivateLinkResource\": null,\r\n \"provisioningState\": \"Creating\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2081/providers/Microsoft.Cdn/operationresults/0bf83c2f-507e-4d9b-a23c-c7880a8055ec?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzBiZjgzYzJmLTUwN2UtNGQ5Yi1hMjNjLWM3ODgwYTgwNTVlYz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f7d7c08f-d07b-44c4-bf97-5f55159a6965" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ce1c7dc7-d829-4824-bd2f-75613a31b7ea" - ], - "x-ms-client-request-id": [ - "f7d7c08f-d07b-44c4-bf97-5f55159a6965" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "e1922004-c79a-4633-aca7-6afe85b4f90b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204249Z:e1922004-c79a-4633-aca7-6afe85b4f90b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:42:49 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2081/providers/Microsoft.Cdn/operationresults/0bf83c2f-507e-4d9b-a23c-c7880a8055ec?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzBiZjgzYzJmLTUwN2UtNGQ5Yi1hMjNjLWM3ODgwYTgwNTVlYz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f7d7c08f-d07b-44c4-bf97-5f55159a6965" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "02840415-b228-4685-91b4-6f6fe9d633be" - ], - "x-ms-client-request-id": [ - "f7d7c08f-d07b-44c4-bf97-5f55159a6965" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "9f0ce0a5-3d48-4224-a791-5d91b97c4a33" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204300Z:9f0ce0a5-3d48-4224-a791-5d91b97c4a33" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:42:59 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2081/providers/Microsoft.Cdn/profiles/ps5935/originGroups/ps6133/origins/ps1693?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjA4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU5MzUvb3JpZ2luR3JvdXBzL3BzNjEzMy9vcmlnaW5zL3BzMTY5Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f7d7c08f-d07b-44c4-bf97-5f55159a6965" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "eb09e1ba-e51a-4a80-8b77-161b0ec4f37e" - ], - "x-ms-client-request-id": [ - "f7d7c08f-d07b-44c4-bf97-5f55159a6965" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "518cc0db-b13b-4d0f-b467-dadf05d8c7c7" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204300Z:518cc0db-b13b-4d0f-b467-dadf05d8c7c7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:42:59 GMT" - ], - "Content-Length": [ - "499" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2081/providers/Microsoft.Cdn/profiles/ps5935/originGroups/ps6133/origins/ps1693\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups/origins\",\r\n \"name\": \"ps1693\",\r\n \"properties\": {\r\n \"originGroupName\": \"ps6133\",\r\n \"hostName\": \"example.org\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": 443,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabledState\": \"Enabled\",\r\n \"sharedPrivateLinkResource\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2081/providers/Microsoft.Cdn/profiles/ps5935/originGroups/ps6133/origins/ps1693?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjA4MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU5MzUvb3JpZ2luR3JvdXBzL3BzNjEzMy9vcmlnaW5zL3BzMTY5Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f6c9b12f-dafd-4b8f-a56d-b9b8506f08af" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "22df07ac-d939-4408-9ad9-4e455cf17ffd" - ], - "x-ms-client-request-id": [ - "f6c9b12f-dafd-4b8f-a56d-b9b8506f08af" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "3ad42727-da54-4c9c-907a-b97758a3587a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204300Z:3ad42727-da54-4c9c-907a-b97758a3587a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:42:59 GMT" - ], - "Content-Length": [ - "499" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2081/providers/Microsoft.Cdn/profiles/ps5935/originGroups/ps6133/origins/ps1693\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups/origins\",\r\n \"name\": \"ps1693\",\r\n \"properties\": {\r\n \"originGroupName\": \"ps6133\",\r\n \"hostName\": \"example.org\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": 443,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabledState\": \"Enabled\",\r\n \"sharedPrivateLinkResource\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2081?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA4MT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "af2dba20-8a05-4cf6-9177-7870989c8000" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "fc8fd8c0-218c-46ae-8e91-2893d2b82931" - ], - "x-ms-correlation-request-id": [ - "fc8fd8c0-218c-46ae-8e91-2893d2b82931" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204300Z:fc8fd8c0-218c-46ae-8e91-2893d2b82931" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:43:00 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd09ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "b62dd299-b950-4c00-a467-a2ba96d57312" - ], - "x-ms-correlation-request-id": [ - "b62dd299-b950-4c00-a467-a2ba96d57312" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204315Z:b62dd299-b950-4c00-a467-a2ba96d57312" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:43:15 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd09ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "0c8031f0-e044-493a-8b14-f4fffc611340" - ], - "x-ms-correlation-request-id": [ - "0c8031f0-e044-493a-8b14-f4fffc611340" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204330Z:0c8031f0-e044-493a-8b14-f4fffc611340" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:43:30 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd09ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "ce1f6db2-15fc-4a06-8695-ae7a81cc0c78" - ], - "x-ms-correlation-request-id": [ - "ce1f6db2-15fc-4a06-8695-ae7a81cc0c78" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204345Z:ce1f6db2-15fc-4a06-8695-ae7a81cc0c78" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:43:45 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd09ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "c4a4a278-4c22-4844-90ad-2ad2c27d834f" - ], - "x-ms-correlation-request-id": [ - "c4a4a278-4c22-4844-90ad-2ad2c27d834f" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204400Z:c4a4a278-4c22-4844-90ad-2ad2c27d834f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:44:00 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd09ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "8e08c3ef-02e4-4da3-a502-d761dd0fe680" - ], - "x-ms-correlation-request-id": [ - "8e08c3ef-02e4-4da3-a502-d761dd0fe680" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204416Z:8e08c3ef-02e4-4da3-a502-d761dd0fe680" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:44:15 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd09ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "9a50a190-9e81-49db-b3c5-80ce2fa48cd5" - ], - "x-ms-correlation-request-id": [ - "9a50a190-9e81-49db-b3c5-80ce2fa48cd5" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204431Z:9a50a190-9e81-49db-b3c5-80ce2fa48cd5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:44:30 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd09ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "f1345beb-3174-49c0-9875-0c209bd99fb1" - ], - "x-ms-correlation-request-id": [ - "f1345beb-3174-49c0-9875-0c209bd99fb1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204446Z:f1345beb-3174-49c0-9875-0c209bd99fb1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:44:45 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd09ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "35701491-e77d-4b2a-8e7a-e65c39b033f2" - ], - "x-ms-correlation-request-id": [ - "35701491-e77d-4b2a-8e7a-e65c39b033f2" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204501Z:35701491-e77d-4b2a-8e7a-e65c39b033f2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:45:00 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd09ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "f8dec386-7aef-408c-a4ba-4009e698bb37" - ], - "x-ms-correlation-request-id": [ - "f8dec386-7aef-408c-a4ba-4009e698bb37" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204516Z:f8dec386-7aef-408c-a4ba-4009e698bb37" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:45:15 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd09ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "5b97c678-fd94-490b-86c0-4370f0872ca1" - ], - "x-ms-correlation-request-id": [ - "5b97c678-fd94-490b-86c0-4370f0872ca1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204531Z:5b97c678-fd94-490b-86c0-4370f0872ca1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:45:30 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd09ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "ee1a9a72-c3ac-43d8-9910-736667010d3e" - ], - "x-ms-correlation-request-id": [ - "ee1a9a72-c3ac-43d8-9910-736667010d3e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204546Z:ee1a9a72-c3ac-43d8-9910-736667010d3e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:45:45 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwODEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd09ERXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "28606a3a-659c-49b7-9819-7acb285404df" - ], - "x-ms-correlation-request-id": [ - "28606a3a-659c-49b7-9819-7acb285404df" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204546Z:28606a3a-659c-49b7-9819-7acb285404df" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:45:45 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-GetAfdOrigin": [ - "ps2081", - "ps5935", - "ps6133", - "ps1693" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginTests/TestGetAfdOriginGroup.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginTests/TestGetAfdOriginGroup.json deleted file mode 100644 index 31c34af07ecc..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginTests/TestGetAfdOriginGroup.json +++ /dev/null @@ -1,561 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5656?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTY1Nj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "38e8cc60-410f-47c6-bdeb-f45306999716" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "2f726350-0ac2-432c-85f0-9b01dc199164" - ], - "x-ms-correlation-request-id": [ - "2f726350-0ac2-432c-85f0-9b01dc199164" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T052018Z:2f726350-0ac2-432c-85f0-9b01dc199164" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 05:20:18 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5656\",\r\n \"name\": \"ps5656\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5656/providers/Microsoft.Cdn/profiles/ps3566?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTY1Ni9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczM1NjY/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "94c3afed-1a63-49ed-98f7-1cb1af251340" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9aea51c4-d57a-4180-9640-c83416d4822a" - ], - "x-ms-client-request-id": [ - "94c3afed-1a63-49ed-98f7-1cb1af251340" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5656/providers/Microsoft.Cdn/operationresults/c6a6ff98-74fa-4dc6-918f-36813e70aa00?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "c03e10fc-1860-40b8-98b0-cab80daab285" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T052023Z:c03e10fc-1860-40b8-98b0-cab80daab285" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 05:20:22 GMT" - ], - "Content-Length": [ - "386" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5656/providers/Microsoft.Cdn/profiles/ps3566\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps3566\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d30fbfa6-bb47-44b0-8856-d62cd5661f33\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5656/providers/Microsoft.Cdn/operationresults/c6a6ff98-74fa-4dc6-918f-36813e70aa00?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTY1Ni9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2M2YTZmZjk4LTc0ZmEtNGRjNi05MThmLTM2ODEzZTcwYWEwMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "94c3afed-1a63-49ed-98f7-1cb1af251340" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c4f3a324-946e-4343-b28b-c37720892778" - ], - "x-ms-client-request-id": [ - "94c3afed-1a63-49ed-98f7-1cb1af251340" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "2f9af58c-a80b-440e-a7a5-851da94da886" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T052033Z:2f9af58c-a80b-440e-a7a5-851da94da886" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 05:20:32 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5656/providers/Microsoft.Cdn/profiles/ps3566?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTY1Ni9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczM1NjY/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "94c3afed-1a63-49ed-98f7-1cb1af251340" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e77c3961-18a6-49ed-8b40-23e14f968561" - ], - "x-ms-client-request-id": [ - "94c3afed-1a63-49ed-98f7-1cb1af251340" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "3cceaa5b-1f5f-4daf-874f-77182e147e75" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T052033Z:3cceaa5b-1f5f-4daf-874f-77182e147e75" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 05:20:32 GMT" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5656/providers/Microsoft.Cdn/profiles/ps3566\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps3566\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d30fbfa6-bb47-44b0-8856-d62cd5661f33\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5656/providers/Microsoft.Cdn/profiles/ps3566/originGroups/ps9805?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTY1Ni9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczM1NjYvb3JpZ2luR3JvdXBzL3BzOTgwNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d0ae3903-7c7e-42d2-98e0-1449a08a76ee" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "93" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b8e78039-61e6-4b31-932e-b9a83f5e2bcd" - ], - "x-ms-client-request-id": [ - "d0ae3903-7c7e-42d2-98e0-1449a08a76ee" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "d02dfab0-3129-4817-8895-274410bd6e33" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T052034Z:d02dfab0-3129-4817-8895-274410bd6e33" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 05:20:33 GMT" - ], - "Content-Length": [ - "561" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5656/providers/Microsoft.Cdn/profiles/ps3566/originGroups/ps9805\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups\",\r\n \"name\": \"ps9805\",\r\n \"properties\": {\r\n \"loadBalancingSettings\": {\r\n \"sampleSize\": 4,\r\n \"successfulSamplesRequired\": 2,\r\n \"additionalLatencyInMilliseconds\": 0\r\n },\r\n \"healthProbeSettings\": null,\r\n \"responseBasedAFDOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10,\r\n \"sessionAffinityState\": \"Disabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5656/providers/Microsoft.Cdn/profiles/ps3566/originGroups/ps9805/origins/ps8498?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTY1Ni9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczM1NjYvb3JpZ2luR3JvdXBzL3BzOTgwNS9vcmlnaW5zL3BzODQ5OD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"hostName\": \"example.org\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "52101e63-fea6-4eee-97f9-22c38ba2a0a2" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "59" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "42615686-e3cd-489d-9a5c-17dac8ac424d" - ], - "x-ms-client-request-id": [ - "52101e63-fea6-4eee-97f9-22c38ba2a0a2" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5656/providers/Microsoft.Cdn/operationresults/ce8eec20-6956-445a-8301-63ead3d7f483?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "a84f88cb-a316-4c47-a66b-ed2ba9998c60" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T052036Z:a84f88cb-a316-4c47-a66b-ed2ba9998c60" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 05:20:36 GMT" - ], - "Content-Length": [ - "498" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5656/providers/Microsoft.Cdn/profiles/ps3566/originGroups/ps9805/origins/ps8498\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups/origins\",\r\n \"name\": \"ps8498\",\r\n \"properties\": {\r\n \"originGroupName\": \"ps9805\",\r\n \"hostName\": \"example.org\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": 443,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabledState\": \"Enabled\",\r\n \"sharedPrivateLinkResource\": null,\r\n \"provisioningState\": \"Creating\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5656/providers/Microsoft.Cdn/operationresults/ce8eec20-6956-445a-8301-63ead3d7f483?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTY1Ni9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2NlOGVlYzIwLTY5NTYtNDQ1YS04MzAxLTYzZWFkM2Q3ZjQ4Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "52101e63-fea6-4eee-97f9-22c38ba2a0a2" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "293adf87-8c0f-4435-aaa0-3392c75a5f2c" - ], - "x-ms-client-request-id": [ - "52101e63-fea6-4eee-97f9-22c38ba2a0a2" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "dbece3c5-457c-458d-940f-4db8ec9aa119" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T052046Z:dbece3c5-457c-458d-940f-4db8ec9aa119" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 05:20:46 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5656/providers/Microsoft.Cdn/profiles/ps3566/originGroups/ps9805/origins/ps8498?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTY1Ni9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczM1NjYvb3JpZ2luR3JvdXBzL3BzOTgwNS9vcmlnaW5zL3BzODQ5OD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "52101e63-fea6-4eee-97f9-22c38ba2a0a2" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "fb724819-f4ca-4697-a4b1-3d5795ca1969" - ], - "x-ms-client-request-id": [ - "52101e63-fea6-4eee-97f9-22c38ba2a0a2" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "068eddba-53ed-4f8b-9314-ac4c4b4e40bc" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T052046Z:068eddba-53ed-4f8b-9314-ac4c4b4e40bc" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 05:20:46 GMT" - ], - "Content-Length": [ - "499" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5656/providers/Microsoft.Cdn/profiles/ps3566/originGroups/ps9805/origins/ps8498\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups/origins\",\r\n \"name\": \"ps8498\",\r\n \"properties\": {\r\n \"originGroupName\": \"ps9805\",\r\n \"hostName\": \"example.org\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": 443,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabledState\": \"Enabled\",\r\n \"sharedPrivateLinkResource\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - } - ], - "Names": { - "Test-GetAfdOrigin": [ - "ps5656", - "ps3566", - "ps9805", - "ps8498" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginTests/TestSetAfdOrigin.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginTests/TestSetAfdOrigin.json deleted file mode 100644 index 26ceee7cb056..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdOriginTests/TestSetAfdOrigin.json +++ /dev/null @@ -1,1698 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNDczMz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "58f6efcb-f3c4-4421-8cf9-50d0a17a19f8" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "c4a1ed5c-31ff-476e-ba9e-2a954b89fb20" - ], - "x-ms-correlation-request-id": [ - "c4a1ed5c-31ff-476e-ba9e-2a954b89fb20" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T203840Z:c4a1ed5c-31ff-476e-ba9e-2a954b89fb20" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:38:40 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps4733\",\r\n \"name\": \"ps4733\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps4733/providers/Microsoft.Cdn/profiles/ps1816?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNDczMy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE4MTY/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "288c1c51-fd57-4fa3-9aa8-52b8d52066ef" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c46c75a7-6876-49c8-acaa-d5b0026f4d0a" - ], - "x-ms-client-request-id": [ - "288c1c51-fd57-4fa3-9aa8-52b8d52066ef" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733/providers/Microsoft.Cdn/operationresults/f863b382-5a69-4ad9-9774-e342a85abe39?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "073a597b-e885-4eed-acf1-5abf56414642" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T203846Z:073a597b-e885-4eed-acf1-5abf56414642" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:38:46 GMT" - ], - "Content-Length": [ - "386" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733/providers/Microsoft.Cdn/profiles/ps1816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps1816\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"6f294e5d-8a32-4039-94fb-094bdbca8635\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733/providers/Microsoft.Cdn/operationresults/f863b382-5a69-4ad9-9774-e342a85abe39?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNDczMy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Y4NjNiMzgyLTVhNjktNGFkOS05Nzc0LWUzNDJhODVhYmUzOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "288c1c51-fd57-4fa3-9aa8-52b8d52066ef" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3fd08eb1-be22-469a-89db-1caeb3f5b6b5" - ], - "x-ms-client-request-id": [ - "288c1c51-fd57-4fa3-9aa8-52b8d52066ef" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "bc683784-987a-4dfc-b7f3-14711ebefe92" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T203857Z:bc683784-987a-4dfc-b7f3-14711ebefe92" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:38:56 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733/providers/Microsoft.Cdn/operationresults/f863b382-5a69-4ad9-9774-e342a85abe39?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNDczMy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Y4NjNiMzgyLTVhNjktNGFkOS05Nzc0LWUzNDJhODVhYmUzOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "288c1c51-fd57-4fa3-9aa8-52b8d52066ef" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6d45ba79-c864-4d78-a39d-7136934705e0" - ], - "x-ms-client-request-id": [ - "288c1c51-fd57-4fa3-9aa8-52b8d52066ef" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "eb7bad62-5a3f-4ea4-a277-bcbe4714825a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T203907Z:eb7bad62-5a3f-4ea4-a277-bcbe4714825a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:39:06 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps4733/providers/Microsoft.Cdn/profiles/ps1816?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNDczMy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE4MTY/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "288c1c51-fd57-4fa3-9aa8-52b8d52066ef" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "736a53b5-9e31-4993-a9b1-79adf36cd36e" - ], - "x-ms-client-request-id": [ - "288c1c51-fd57-4fa3-9aa8-52b8d52066ef" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "4df19d99-5e2b-4206-b0c1-f2f20adee212" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T203907Z:4df19d99-5e2b-4206-b0c1-f2f20adee212" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:39:06 GMT" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733/providers/Microsoft.Cdn/profiles/ps1816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps1816\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"6f294e5d-8a32-4039-94fb-094bdbca8635\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps4733/providers/Microsoft.Cdn/profiles/ps1816/originGroups/ps336?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNDczMy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE4MTYvb3JpZ2luR3JvdXBzL3BzMzM2P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "50bfef9d-43d4-45e0-8a90-7cd4669f4aeb" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "93" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "02c9fc72-24f5-4ab2-a71b-d258a7172d74" - ], - "x-ms-client-request-id": [ - "50bfef9d-43d4-45e0-8a90-7cd4669f4aeb" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "920f4d82-e9ed-4bc7-a7f4-b56d8d391baf" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T203908Z:920f4d82-e9ed-4bc7-a7f4-b56d8d391baf" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:39:08 GMT" - ], - "Content-Length": [ - "559" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733/providers/Microsoft.Cdn/profiles/ps1816/originGroups/ps336\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups\",\r\n \"name\": \"ps336\",\r\n \"properties\": {\r\n \"loadBalancingSettings\": {\r\n \"sampleSize\": 4,\r\n \"successfulSamplesRequired\": 2,\r\n \"additionalLatencyInMilliseconds\": 0\r\n },\r\n \"healthProbeSettings\": null,\r\n \"responseBasedAFDOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": 10,\r\n \"sessionAffinityState\": \"Disabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps4733/providers/Microsoft.Cdn/profiles/ps1816/originGroups/ps336/origins/ps8872?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNDczMy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE4MTYvb3JpZ2luR3JvdXBzL3BzMzM2L29yaWdpbnMvcHM4ODcyP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"hostName\": \"example.org\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6eff3f2b-9926-4a17-a297-df9047ac9f7a" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "59" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "581b0f0d-4f37-43c0-85c1-6d8f921d35cd" - ], - "x-ms-client-request-id": [ - "6eff3f2b-9926-4a17-a297-df9047ac9f7a" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733/providers/Microsoft.Cdn/operationresults/e76e54d5-ddb2-4b7d-a0d2-215e699489eb?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "5c58dace-a399-4890-8869-0b95e7f983a1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T203910Z:5c58dace-a399-4890-8869-0b95e7f983a1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:39:09 GMT" - ], - "Content-Length": [ - "496" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733/providers/Microsoft.Cdn/profiles/ps1816/originGroups/ps336/origins/ps8872\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups/origins\",\r\n \"name\": \"ps8872\",\r\n \"properties\": {\r\n \"originGroupName\": \"ps336\",\r\n \"hostName\": \"example.org\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": 443,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabledState\": \"Enabled\",\r\n \"sharedPrivateLinkResource\": null,\r\n \"provisioningState\": \"Creating\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733/providers/Microsoft.Cdn/operationresults/e76e54d5-ddb2-4b7d-a0d2-215e699489eb?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNDczMy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2U3NmU1NGQ1LWRkYjItNGI3ZC1hMGQyLTIxNWU2OTk0ODllYj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6eff3f2b-9926-4a17-a297-df9047ac9f7a" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "59812403-f59c-4fff-ac76-6b5072817a76" - ], - "x-ms-client-request-id": [ - "6eff3f2b-9926-4a17-a297-df9047ac9f7a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "e2842f68-bf45-445d-acf6-c384f842c9ae" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T203920Z:e2842f68-bf45-445d-acf6-c384f842c9ae" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:39:19 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps4733/providers/Microsoft.Cdn/profiles/ps1816/originGroups/ps336/origins/ps8872?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNDczMy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE4MTYvb3JpZ2luR3JvdXBzL3BzMzM2L29yaWdpbnMvcHM4ODcyP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6eff3f2b-9926-4a17-a297-df9047ac9f7a" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "713e57db-f3b2-4a49-be2d-5a98af7f6fac" - ], - "x-ms-client-request-id": [ - "6eff3f2b-9926-4a17-a297-df9047ac9f7a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "ec4fde18-5aa5-446c-8f5a-371851d606d0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T203920Z:ec4fde18-5aa5-446c-8f5a-371851d606d0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:39:19 GMT" - ], - "Content-Length": [ - "497" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733/providers/Microsoft.Cdn/profiles/ps1816/originGroups/ps336/origins/ps8872\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups/origins\",\r\n \"name\": \"ps8872\",\r\n \"properties\": {\r\n \"originGroupName\": \"ps336\",\r\n \"hostName\": \"example.org\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": 443,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabledState\": \"Enabled\",\r\n \"sharedPrivateLinkResource\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps4733/providers/Microsoft.Cdn/profiles/ps1816/originGroups/ps336/origins/ps8872?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNDczMy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE4MTYvb3JpZ2luR3JvdXBzL3BzMzM2L29yaWdpbnMvcHM4ODcyP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3b430ef6-c24f-47cf-a807-a0c7caa213c3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "bbecdae7-80c6-43af-b44e-96c004ac55a0" - ], - "x-ms-client-request-id": [ - "3b430ef6-c24f-47cf-a807-a0c7caa213c3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "95d8e6a2-acfd-47bb-ae5a-0d2752e923d7" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T203920Z:95d8e6a2-acfd-47bb-ae5a-0d2752e923d7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:39:20 GMT" - ], - "Content-Length": [ - "497" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733/providers/Microsoft.Cdn/profiles/ps1816/originGroups/ps336/origins/ps8872\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups/origins\",\r\n \"name\": \"ps8872\",\r\n \"properties\": {\r\n \"originGroupName\": \"ps336\",\r\n \"hostName\": \"example.org\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": 443,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabledState\": \"Enabled\",\r\n \"sharedPrivateLinkResource\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps4733/providers/Microsoft.Cdn/profiles/ps1816/originGroups/ps336/origins/ps8872?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNDczMy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE4MTYvb3JpZ2luR3JvdXBzL3BzMzM2L29yaWdpbnMvcHM4ODcyP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3b430ef6-c24f-47cf-a807-a0c7caa213c3" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "35986f31-a533-4564-bd52-56aebafb6ded" - ], - "x-ms-client-request-id": [ - "3b430ef6-c24f-47cf-a807-a0c7caa213c3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "7cbfbe81-bfc5-4452-a405-dd08ef9a9dee" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T203932Z:7cbfbe81-bfc5-4452-a405-dd08ef9a9dee" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:39:32 GMT" - ], - "Content-Length": [ - "492" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733/providers/Microsoft.Cdn/profiles/ps1816/originGroups/ps336/origins/ps8872\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups/origins\",\r\n \"name\": \"ps8872\",\r\n \"properties\": {\r\n \"originGroupName\": \"ps336\",\r\n \"hostName\": \"example.org\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": 443,\r\n \"originHostHeader\": null,\r\n \"priority\": 5,\r\n \"weight\": 10,\r\n \"enabledState\": \"Enabled\",\r\n \"sharedPrivateLinkResource\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps4733/providers/Microsoft.Cdn/profiles/ps1816/originGroups/ps336/origins/ps8872?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNDczMy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE4MTYvb3JpZ2luR3JvdXBzL3BzMzM2L29yaWdpbnMvcHM4ODcyP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "255fe043-64d0-4e2e-b5a1-58b3729fc78f" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "71077cc4-3dd3-4e1d-bfe8-dfedee3651bc" - ], - "x-ms-client-request-id": [ - "255fe043-64d0-4e2e-b5a1-58b3729fc78f" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "730fc229-2a5a-440d-891d-9e760cd766fa" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T203933Z:730fc229-2a5a-440d-891d-9e760cd766fa" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:39:32 GMT" - ], - "Content-Length": [ - "492" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733/providers/Microsoft.Cdn/profiles/ps1816/originGroups/ps336/origins/ps8872\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups/origins\",\r\n \"name\": \"ps8872\",\r\n \"properties\": {\r\n \"originGroupName\": \"ps336\",\r\n \"hostName\": \"example.org\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": 443,\r\n \"originHostHeader\": null,\r\n \"priority\": 5,\r\n \"weight\": 10,\r\n \"enabledState\": \"Enabled\",\r\n \"sharedPrivateLinkResource\": null,\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps4733/providers/Microsoft.Cdn/profiles/ps1816/originGroups/ps336/origins/ps8872?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNDczMy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE4MTYvb3JpZ2luR3JvdXBzL3BzMzM2L29yaWdpbnMvcHM4ODcyP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"properties\": {\r\n \"hostName\": \"example.org\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": 443,\r\n \"priority\": 5,\r\n \"weight\": 10\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3b430ef6-c24f-47cf-a807-a0c7caa213c3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "142" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733/providers/Microsoft.Cdn/operationresults/1dddb9ac-6780-474d-ba7f-24652bc8076e/profileresults/ps1816/origingroupresults/ps336/originresults/ps8872?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b59177e4-3e21-4043-a8d7-55128e88c8e4" - ], - "x-ms-client-request-id": [ - "3b430ef6-c24f-47cf-a807-a0c7caa213c3" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733/providers/Microsoft.Cdn/operationresults/1dddb9ac-6780-474d-ba7f-24652bc8076e?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "98" - ], - "x-ms-correlation-request-id": [ - "8b1f4746-cfda-4aba-97e3-19d6dadcca4c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T203922Z:8b1f4746-cfda-4aba-97e3-19d6dadcca4c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:39:21 GMT" - ], - "Content-Length": [ - "491" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733/providers/Microsoft.Cdn/profiles/ps1816/originGroups/ps336/origins/ps8872\",\r\n \"type\": \"Microsoft.Cdn/profiles/originGroups/origins\",\r\n \"name\": \"ps8872\",\r\n \"properties\": {\r\n \"originGroupName\": \"ps336\",\r\n \"hostName\": \"example.org\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": 443,\r\n \"originHostHeader\": null,\r\n \"priority\": 5,\r\n \"weight\": 10,\r\n \"enabledState\": \"Enabled\",\r\n \"sharedPrivateLinkResource\": null,\r\n \"provisioningState\": \"Updating\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733/providers/Microsoft.Cdn/operationresults/1dddb9ac-6780-474d-ba7f-24652bc8076e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNDczMy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzFkZGRiOWFjLTY3ODAtNDc0ZC1iYTdmLTI0NjUyYmM4MDc2ZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3b430ef6-c24f-47cf-a807-a0c7caa213c3" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "85b76237-d17f-4f39-970a-a0568773bd7b" - ], - "x-ms-client-request-id": [ - "3b430ef6-c24f-47cf-a807-a0c7caa213c3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "9601f83a-bea5-4a27-944b-ba2a7ad5582a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T203932Z:9601f83a-bea5-4a27-944b-ba2a7ad5582a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:39:31 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps4733?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNDczMz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b192a91e-ddc1-4764-a2f7-ae0447da4586" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "0a4f6df9-d409-452c-88f7-e785b46a4d45" - ], - "x-ms-correlation-request-id": [ - "0a4f6df9-d409-452c-88f7-e785b46a4d45" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T203933Z:0a4f6df9-d409-452c-88f7-e785b46a4d45" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:39:32 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpRM016TXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "434e6a74-57e4-48dd-9fb3-a02e8324d3ee" - ], - "x-ms-correlation-request-id": [ - "434e6a74-57e4-48dd-9fb3-a02e8324d3ee" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T203948Z:434e6a74-57e4-48dd-9fb3-a02e8324d3ee" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:39:47 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpRM016TXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "5054922c-412a-4366-806f-be8c6f93da02" - ], - "x-ms-correlation-request-id": [ - "5054922c-412a-4366-806f-be8c6f93da02" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204003Z:5054922c-412a-4366-806f-be8c6f93da02" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:40:03 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpRM016TXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "3f338e93-c598-41ea-b2ef-acba1bc8cb1b" - ], - "x-ms-correlation-request-id": [ - "3f338e93-c598-41ea-b2ef-acba1bc8cb1b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204018Z:3f338e93-c598-41ea-b2ef-acba1bc8cb1b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:40:18 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpRM016TXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "db85bd66-1b37-453f-9454-e932edfe749d" - ], - "x-ms-correlation-request-id": [ - "db85bd66-1b37-453f-9454-e932edfe749d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204033Z:db85bd66-1b37-453f-9454-e932edfe749d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:40:33 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpRM016TXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "d66ffe10-10d8-4db2-be41-ff74ea1f1b45" - ], - "x-ms-correlation-request-id": [ - "d66ffe10-10d8-4db2-be41-ff74ea1f1b45" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204048Z:d66ffe10-10d8-4db2-be41-ff74ea1f1b45" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:40:48 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpRM016TXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "f5edc5e8-1250-48b9-a11e-e05f1cc4586d" - ], - "x-ms-correlation-request-id": [ - "f5edc5e8-1250-48b9-a11e-e05f1cc4586d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204103Z:f5edc5e8-1250-48b9-a11e-e05f1cc4586d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:41:03 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpRM016TXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "5d48cb1e-84a5-46ca-92f6-4f9aad7d3b04" - ], - "x-ms-correlation-request-id": [ - "5d48cb1e-84a5-46ca-92f6-4f9aad7d3b04" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204118Z:5d48cb1e-84a5-46ca-92f6-4f9aad7d3b04" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:41:18 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpRM016TXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "dc732cdd-20da-414f-a4ed-05b98d722917" - ], - "x-ms-correlation-request-id": [ - "dc732cdd-20da-414f-a4ed-05b98d722917" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204133Z:dc732cdd-20da-414f-a4ed-05b98d722917" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:41:33 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpRM016TXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "af370bbd-02f9-406b-87ff-802ea483a8bb" - ], - "x-ms-correlation-request-id": [ - "af370bbd-02f9-406b-87ff-802ea483a8bb" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204148Z:af370bbd-02f9-406b-87ff-802ea483a8bb" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:41:48 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpRM016TXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "4aaa7928-ea02-4be1-9c09-57f5afcc7ad0" - ], - "x-ms-correlation-request-id": [ - "4aaa7928-ea02-4be1-9c09-57f5afcc7ad0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204203Z:4aaa7928-ea02-4be1-9c09-57f5afcc7ad0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:42:03 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpRM016TXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "39935427-4ded-467b-a97b-06ee6993358b" - ], - "x-ms-correlation-request-id": [ - "39935427-4ded-467b-a97b-06ee6993358b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204219Z:39935427-4ded-467b-a97b-06ee6993358b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:42:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzQ3MzMtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpRM016TXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "3bc05c05-967b-4d53-afb5-a905307e4012" - ], - "x-ms-correlation-request-id": [ - "3bc05c05-967b-4d53-afb5-a905307e4012" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T204219Z:3bc05c05-967b-4d53-afb5-a905307e4012" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:42:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-SetAfdOrigin": [ - "ps4733", - "ps1816", - "ps336", - "ps8872" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdProfileTests/TestCreatePremiumAfdProfile.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdProfileTests/TestCreatePremiumAfdProfile.json deleted file mode 100644 index e55ddeb7fe64..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdProfileTests/TestCreatePremiumAfdProfile.json +++ /dev/null @@ -1,790 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7268?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzI2OD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "64607dd1-f6e1-45cf-9af0-2c2ef56127dd" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "46f7e582-e432-4022-9d4a-59a050853fe1" - ], - "x-ms-correlation-request-id": [ - "46f7e582-e432-4022-9d4a-59a050853fe1" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T205755Z:46f7e582-e432-4022-9d4a-59a050853fe1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:57:55 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7268\",\r\n \"name\": \"ps7268\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7268/providers/Microsoft.Cdn/profiles/ps6861?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzI2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY4NjE/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\",\r\n \"tags\": {\r\n \"ps-test-tag-name\": \"ps-test-tag-value\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "beb96c9b-b9a1-4156-abdc-fa231f723285" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "148" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "944da856-536e-4f87-98b2-1a99375637bf" - ], - "x-ms-client-request-id": [ - "beb96c9b-b9a1-4156-abdc-fa231f723285" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7268/providers/Microsoft.Cdn/operationresults/0ed2f7cd-f56c-4c58-aa75-d5c3f1ff113b?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "1c6b12e5-f744-46de-8168-b02a5249e852" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T205759Z:1c6b12e5-f744-46de-8168-b02a5249e852" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:57:59 GMT" - ], - "Content-Length": [ - "423" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7268/providers/Microsoft.Cdn/profiles/ps6861\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6861\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"ps-test-tag-name\": \"ps-test-tag-value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"4e8e085b-e9e8-494f-8811-03e3d9467e9f\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7268/providers/Microsoft.Cdn/operationresults/0ed2f7cd-f56c-4c58-aa75-d5c3f1ff113b?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzI2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzBlZDJmN2NkLWY1NmMtNGM1OC1hYTc1LWQ1YzNmMWZmMTEzYj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "beb96c9b-b9a1-4156-abdc-fa231f723285" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "72fb2553-89ad-4fd8-a1bb-3a849f479d59" - ], - "x-ms-client-request-id": [ - "beb96c9b-b9a1-4156-abdc-fa231f723285" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "511476eb-7eb8-4380-af2f-c95e5c68f153" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T205809Z:511476eb-7eb8-4380-af2f-c95e5c68f153" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:58:09 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7268/providers/Microsoft.Cdn/profiles/ps6861?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzI2OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY4NjE/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "beb96c9b-b9a1-4156-abdc-fa231f723285" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "71b841ac-8a7f-44a1-9693-34a65580f567" - ], - "x-ms-client-request-id": [ - "beb96c9b-b9a1-4156-abdc-fa231f723285" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "e5b4ef8e-1b67-4f97-abd5-4b5c3c34213d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T205809Z:e5b4ef8e-1b67-4f97-abd5-4b5c3c34213d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:58:09 GMT" - ], - "Content-Length": [ - "422" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7268/providers/Microsoft.Cdn/profiles/ps6861\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6861\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"ps-test-tag-name\": \"ps-test-tag-value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"4e8e085b-e9e8-494f-8811-03e3d9467e9f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7268?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzI2OD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9f2dd10e-035e-4400-86c7-6dd3e71549c7" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcyNjgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "1590d8ca-e836-4c1f-aebb-35138cdca84b" - ], - "x-ms-correlation-request-id": [ - "1590d8ca-e836-4c1f-aebb-35138cdca84b" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T205810Z:1590d8ca-e836-4c1f-aebb-35138cdca84b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:58:10 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcyNjgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeU5qZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcyNjgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "f7c6173f-dd95-4040-9bea-95634538c831" - ], - "x-ms-correlation-request-id": [ - "f7c6173f-dd95-4040-9bea-95634538c831" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T205825Z:f7c6173f-dd95-4040-9bea-95634538c831" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:58:25 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcyNjgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeU5qZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcyNjgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "98688a2c-0eca-49c2-a316-5677b0de7d40" - ], - "x-ms-correlation-request-id": [ - "98688a2c-0eca-49c2-a316-5677b0de7d40" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T205840Z:98688a2c-0eca-49c2-a316-5677b0de7d40" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:58:40 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcyNjgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeU5qZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcyNjgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "267d2297-d436-4d14-ac13-3b867fadee7e" - ], - "x-ms-correlation-request-id": [ - "267d2297-d436-4d14-ac13-3b867fadee7e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T205856Z:267d2297-d436-4d14-ac13-3b867fadee7e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:58:55 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcyNjgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeU5qZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcyNjgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "b4e0595a-82b8-4b51-965c-75287eb22bb7" - ], - "x-ms-correlation-request-id": [ - "b4e0595a-82b8-4b51-965c-75287eb22bb7" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T205911Z:b4e0595a-82b8-4b51-965c-75287eb22bb7" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:59:10 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcyNjgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeU5qZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcyNjgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "bbd4f4d5-b752-4c2a-991c-02053e23db52" - ], - "x-ms-correlation-request-id": [ - "bbd4f4d5-b752-4c2a-991c-02053e23db52" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T205926Z:bbd4f4d5-b752-4c2a-991c-02053e23db52" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:59:25 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcyNjgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeU5qZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcyNjgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "f01a8031-f88b-4aea-a6b1-0d1e8defd72c" - ], - "x-ms-correlation-request-id": [ - "f01a8031-f88b-4aea-a6b1-0d1e8defd72c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T205941Z:f01a8031-f88b-4aea-a6b1-0d1e8defd72c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:59:40 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcyNjgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeU5qZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "c332a431-1089-436b-a429-125706cecce8" - ], - "x-ms-correlation-request-id": [ - "c332a431-1089-436b-a429-125706cecce8" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T205956Z:c332a431-1089-436b-a429-125706cecce8" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:59:55 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcyNjgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeU5qZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "032e4428-914f-4aef-8382-1a97b5f65328" - ], - "x-ms-correlation-request-id": [ - "032e4428-914f-4aef-8382-1a97b5f65328" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T205956Z:032e4428-914f-4aef-8382-1a97b5f65328" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:59:55 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-CreatePremiumAfdProfile": [ - "ps7268", - "ps6861" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdProfileTests/TestCreateStandardAfdProfile.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdProfileTests/TestCreateStandardAfdProfile.json deleted file mode 100644 index 12c7dcaba021..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdProfileTests/TestCreateStandardAfdProfile.json +++ /dev/null @@ -1,1018 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6216?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjIxNj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "83b9d391-984c-4b78-8470-9845aed87e95" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "06ab63f1-056e-47c4-8b37-f20ec766eb92" - ], - "x-ms-correlation-request-id": [ - "06ab63f1-056e-47c4-8b37-f20ec766eb92" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210121Z:06ab63f1-056e-47c4-8b37-f20ec766eb92" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:01:21 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6216\",\r\n \"name\": \"ps6216\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6216/providers/Microsoft.Cdn/profiles/ps1702?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjIxNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE3MDI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "52ff362d-6c97-4142-be2d-dab4e7929ae8" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a0e20b7e-4ad7-4b2c-84b0-79fa26774d4c" - ], - "x-ms-client-request-id": [ - "52ff362d-6c97-4142-be2d-dab4e7929ae8" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6216/providers/Microsoft.Cdn/operationresults/09307540-da15-4d75-b347-fce1cda11724?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "e3bd4fa0-1a34-4a81-b64a-a979cd69642b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210123Z:e3bd4fa0-1a34-4a81-b64a-a979cd69642b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:01:23 GMT" - ], - "Content-Length": [ - "386" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6216/providers/Microsoft.Cdn/profiles/ps1702\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps1702\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"25f6a810-7ef0-48c5-9d9e-e1e407fe4c99\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6216/providers/Microsoft.Cdn/operationresults/09307540-da15-4d75-b347-fce1cda11724?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjIxNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzA5MzA3NTQwLWRhMTUtNGQ3NS1iMzQ3LWZjZTFjZGExMTcyND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "52ff362d-6c97-4142-be2d-dab4e7929ae8" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f901d399-0ac5-4d79-96df-d131e7584aea" - ], - "x-ms-client-request-id": [ - "52ff362d-6c97-4142-be2d-dab4e7929ae8" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "95e28b6e-8451-4b3f-915b-b1a3d2144023" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210134Z:95e28b6e-8451-4b3f-915b-b1a3d2144023" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:01:33 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6216/providers/Microsoft.Cdn/profiles/ps1702?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjIxNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE3MDI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "52ff362d-6c97-4142-be2d-dab4e7929ae8" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4cff9d1f-c82d-4b5f-9852-51296dfe1087" - ], - "x-ms-client-request-id": [ - "52ff362d-6c97-4142-be2d-dab4e7929ae8" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "d2d17882-6ad5-4e1b-809d-8e423ee93001" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210134Z:d2d17882-6ad5-4e1b-809d-8e423ee93001" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:01:33 GMT" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6216/providers/Microsoft.Cdn/profiles/ps1702\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps1702\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"25f6a810-7ef0-48c5-9d9e-e1e407fe4c99\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6216?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjIxNj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ef9308f1-be61-4335-bf05-af77b552a873" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "85dd6cfc-8dda-4525-901f-bf83028f53e6" - ], - "x-ms-correlation-request-id": [ - "85dd6cfc-8dda-4525-901f-bf83028f53e6" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210134Z:85dd6cfc-8dda-4525-901f-bf83028f53e6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:01:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU1UWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "b49e8a2d-bad7-4b08-a80b-847eeaccbe08" - ], - "x-ms-correlation-request-id": [ - "b49e8a2d-bad7-4b08-a80b-847eeaccbe08" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210149Z:b49e8a2d-bad7-4b08-a80b-847eeaccbe08" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:01:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU1UWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "9b7d0060-224a-439f-b504-112308c4f04e" - ], - "x-ms-correlation-request-id": [ - "9b7d0060-224a-439f-b504-112308c4f04e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210204Z:9b7d0060-224a-439f-b504-112308c4f04e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:02:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU1UWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "2ffafc6b-f0da-4ed3-b67b-6d2d8e35b93a" - ], - "x-ms-correlation-request-id": [ - "2ffafc6b-f0da-4ed3-b67b-6d2d8e35b93a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210219Z:2ffafc6b-f0da-4ed3-b67b-6d2d8e35b93a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:02:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU1UWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "05a4559b-7537-4bea-8c95-1d717a502488" - ], - "x-ms-correlation-request-id": [ - "05a4559b-7537-4bea-8c95-1d717a502488" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210234Z:05a4559b-7537-4bea-8c95-1d717a502488" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:02:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU1UWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "a7e4a37f-a184-4459-bd00-e420df87965e" - ], - "x-ms-correlation-request-id": [ - "a7e4a37f-a184-4459-bd00-e420df87965e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210249Z:a7e4a37f-a184-4459-bd00-e420df87965e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:02:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU1UWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "636a4bd9-66d3-405d-9529-79b3a58e6622" - ], - "x-ms-correlation-request-id": [ - "636a4bd9-66d3-405d-9529-79b3a58e6622" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210304Z:636a4bd9-66d3-405d-9529-79b3a58e6622" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:03:03 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU1UWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "e023d7d1-ffca-4a49-bd6c-1827fcb97b41" - ], - "x-ms-correlation-request-id": [ - "e023d7d1-ffca-4a49-bd6c-1827fcb97b41" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210319Z:e023d7d1-ffca-4a49-bd6c-1827fcb97b41" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:03:18 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU1UWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "93fcd800-ce26-4986-a390-de55c7519256" - ], - "x-ms-correlation-request-id": [ - "93fcd800-ce26-4986-a390-de55c7519256" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210334Z:93fcd800-ce26-4986-a390-de55c7519256" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:03:33 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU1UWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "b2ce3f76-3846-41c6-826c-2d33a333ea36" - ], - "x-ms-correlation-request-id": [ - "b2ce3f76-3846-41c6-826c-2d33a333ea36" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210349Z:b2ce3f76-3846-41c6-826c-2d33a333ea36" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:03:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU1UWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "07a19fbf-f189-4d50-84f7-0eb05d916e2b" - ], - "x-ms-correlation-request-id": [ - "07a19fbf-f189-4d50-84f7-0eb05d916e2b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210405Z:07a19fbf-f189-4d50-84f7-0eb05d916e2b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:04:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU1UWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "58aa6df2-6bd8-46dd-a3d7-d18c4403cdd2" - ], - "x-ms-correlation-request-id": [ - "58aa6df2-6bd8-46dd-a3d7-d18c4403cdd2" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210420Z:58aa6df2-6bd8-46dd-a3d7-d18c4403cdd2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:04:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyMTYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU1UWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "755647ea-6145-4905-9896-0af36017a690" - ], - "x-ms-correlation-request-id": [ - "755647ea-6145-4905-9896-0af36017a690" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210420Z:755647ea-6145-4905-9896-0af36017a690" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:04:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-CreateStandardAfdProfile": [ - "ps6216", - "ps1702" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdProfileTests/TestGetStandardAfdProfile.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdProfileTests/TestGetStandardAfdProfile.json deleted file mode 100644 index ba3610c6e8b3..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdProfileTests/TestGetStandardAfdProfile.json +++ /dev/null @@ -1,1147 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps710?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzEwP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5b0d8463-79bb-4eaa-b36c-c17c048289a7" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "459b98a6-2ce2-4d73-be89-2f053ad1a20b" - ], - "x-ms-correlation-request-id": [ - "459b98a6-2ce2-4d73-be89-2f053ad1a20b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205440Z:459b98a6-2ce2-4d73-be89-2f053ad1a20b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:54:39 GMT" - ], - "Content-Length": [ - "163" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps710\",\r\n \"name\": \"ps710\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps710/providers/Microsoft.Cdn/profiles/ps714?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzEwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNzE0P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9a61bb62-4af4-4aa7-a404-ceccdca015bd" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d2d7ef4f-96aa-4304-948d-1cd3b294a609" - ], - "x-ms-client-request-id": [ - "9a61bb62-4af4-4aa7-a404-ceccdca015bd" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps710/providers/Microsoft.Cdn/operationresults/1edc14fc-1b91-4729-8b92-233519cada38?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "79a1e777-428b-4bb3-b0dc-3af3089167c0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205443Z:79a1e777-428b-4bb3-b0dc-3af3089167c0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:54:42 GMT" - ], - "Content-Length": [ - "383" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps710/providers/Microsoft.Cdn/profiles/ps714\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps714\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f80bccc3-7437-4bb9-ae13-80908de30c33\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps710/providers/Microsoft.Cdn/operationresults/1edc14fc-1b91-4729-8b92-233519cada38?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzEwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvMWVkYzE0ZmMtMWI5MS00NzI5LThiOTItMjMzNTE5Y2FkYTM4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9a61bb62-4af4-4aa7-a404-ceccdca015bd" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8ab191e6-4642-4794-afeb-46d29ba2b47a" - ], - "x-ms-client-request-id": [ - "9a61bb62-4af4-4aa7-a404-ceccdca015bd" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "609f0e93-3362-48be-82f4-54dc378fb526" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205453Z:609f0e93-3362-48be-82f4-54dc378fb526" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:54:53 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps710/providers/Microsoft.Cdn/operationresults/1edc14fc-1b91-4729-8b92-233519cada38?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzEwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvMWVkYzE0ZmMtMWI5MS00NzI5LThiOTItMjMzNTE5Y2FkYTM4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9a61bb62-4af4-4aa7-a404-ceccdca015bd" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6144cc52-7a62-40a7-8a9d-989942133759" - ], - "x-ms-client-request-id": [ - "9a61bb62-4af4-4aa7-a404-ceccdca015bd" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "4bdf2d10-d44e-4ac7-a1ad-ddef05848abe" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205503Z:4bdf2d10-d44e-4ac7-a1ad-ddef05848abe" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:55:03 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps710/providers/Microsoft.Cdn/profiles/ps714?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzEwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNzE0P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9a61bb62-4af4-4aa7-a404-ceccdca015bd" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f4a90ac0-d8b1-4ced-a95c-bafa90cb3379" - ], - "x-ms-client-request-id": [ - "9a61bb62-4af4-4aa7-a404-ceccdca015bd" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "b1015e72-8f88-44eb-9764-7bcdce1e8803" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205503Z:b1015e72-8f88-44eb-9764-7bcdce1e8803" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:55:03 GMT" - ], - "Content-Length": [ - "382" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps710/providers/Microsoft.Cdn/profiles/ps714\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps714\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f80bccc3-7437-4bb9-ae13-80908de30c33\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps710/providers/Microsoft.Cdn/profiles/ps714?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzEwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNzE0P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "609b20d5-848d-4807-b449-e3cb5b9ae428" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d835be7d-5a77-4f81-a2a6-377b7e06157f" - ], - "x-ms-client-request-id": [ - "609b20d5-848d-4807-b449-e3cb5b9ae428" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "c1161b9b-39c5-48b2-b1c6-a0b1537e9bcd" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205504Z:c1161b9b-39c5-48b2-b1c6-a0b1537e9bcd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:55:04 GMT" - ], - "Content-Length": [ - "382" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps710/providers/Microsoft.Cdn/profiles/ps714\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps714\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f80bccc3-7437-4bb9-ae13-80908de30c33\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps710?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzEwP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9b9015a6-999a-49ee-a54c-66e042632386" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "16295a49-a920-47a0-9106-b0da40b2039c" - ], - "x-ms-correlation-request-id": [ - "16295a49-a920-47a0-9106-b0da40b2039c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205504Z:16295a49-a920-47a0-9106-b0da40b2039c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:55:03 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeE1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "bf691069-8da5-4e52-85f5-18762c7e40a8" - ], - "x-ms-correlation-request-id": [ - "bf691069-8da5-4e52-85f5-18762c7e40a8" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205519Z:bf691069-8da5-4e52-85f5-18762c7e40a8" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:55:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeE1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "99f14e04-70e5-4766-a140-fba96a3ba618" - ], - "x-ms-correlation-request-id": [ - "99f14e04-70e5-4766-a140-fba96a3ba618" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205534Z:99f14e04-70e5-4766-a140-fba96a3ba618" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:55:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeE1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "669fdd70-adce-49f8-9d40-037c32fc42ae" - ], - "x-ms-correlation-request-id": [ - "669fdd70-adce-49f8-9d40-037c32fc42ae" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205549Z:669fdd70-adce-49f8-9d40-037c32fc42ae" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:55:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeE1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "68e4e643-9341-420b-84ba-a3d4be7b1ae2" - ], - "x-ms-correlation-request-id": [ - "68e4e643-9341-420b-84ba-a3d4be7b1ae2" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205604Z:68e4e643-9341-420b-84ba-a3d4be7b1ae2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:56:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeE1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "0368b912-75da-4ca7-ae66-1f575831f3b6" - ], - "x-ms-correlation-request-id": [ - "0368b912-75da-4ca7-ae66-1f575831f3b6" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205619Z:0368b912-75da-4ca7-ae66-1f575831f3b6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:56:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeE1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "764435b4-f7d9-45f3-b55c-878893a60a58" - ], - "x-ms-correlation-request-id": [ - "764435b4-f7d9-45f3-b55c-878893a60a58" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205634Z:764435b4-f7d9-45f3-b55c-878893a60a58" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:56:33 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeE1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "f85285b3-f02e-46a6-aa0c-06a2416da24e" - ], - "x-ms-correlation-request-id": [ - "f85285b3-f02e-46a6-aa0c-06a2416da24e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205649Z:f85285b3-f02e-46a6-aa0c-06a2416da24e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:56:48 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeE1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "64618c80-0094-4b0d-9500-0d6d86153fe1" - ], - "x-ms-correlation-request-id": [ - "64618c80-0094-4b0d-9500-0d6d86153fe1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205704Z:64618c80-0094-4b0d-9500-0d6d86153fe1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:57:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeE1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "7f5d1258-a1ac-4cb6-9d5c-1ae61e0e5f0e" - ], - "x-ms-correlation-request-id": [ - "7f5d1258-a1ac-4cb6-9d5c-1ae61e0e5f0e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205719Z:7f5d1258-a1ac-4cb6-9d5c-1ae61e0e5f0e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:57:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeE1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "ade95c3b-dc23-4029-b1f6-248bf5c3b258" - ], - "x-ms-correlation-request-id": [ - "ade95c3b-dc23-4029-b1f6-248bf5c3b258" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205734Z:ade95c3b-dc23-4029-b1f6-248bf5c3b258" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:57:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeE1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "44261cf7-655a-4674-af55-d7408beaa0a4" - ], - "x-ms-correlation-request-id": [ - "44261cf7-655a-4674-af55-d7408beaa0a4" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205749Z:44261cf7-655a-4674-af55-d7408beaa0a4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:57:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzcxMC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjeE1DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "18b3c247-58e7-4ce2-b30e-93436cce42dc" - ], - "x-ms-correlation-request-id": [ - "18b3c247-58e7-4ce2-b30e-93436cce42dc" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205749Z:18b3c247-58e7-4ce2-b30e-93436cce42dc" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:57:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-GetStandardAfdProfile": [ - "ps710", - "ps714" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdProfileTests/TestRemovePremiumAfdProfile.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdProfileTests/TestRemovePremiumAfdProfile.json deleted file mode 100644 index 56bae37e7188..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdProfileTests/TestRemovePremiumAfdProfile.json +++ /dev/null @@ -1,889 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8767?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc2Nz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a345bf17-3024-48be-9476-3ebb24f1551b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "89d27a55-e6d6-413c-a6ca-8d7d3c0cd95d" - ], - "x-ms-correlation-request-id": [ - "89d27a55-e6d6-413c-a6ca-8d7d3c0cd95d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T205959Z:89d27a55-e6d6-413c-a6ca-8d7d3c0cd95d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:59:58 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8767\",\r\n \"name\": \"ps8767\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8767/providers/Microsoft.Cdn/profiles/ps9078?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODc2Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNzg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a78df34f-de96-4b57-b7fb-f832b58cbc1d" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "84" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5b9cda8b-8031-4857-9c17-f81edf8e168d" - ], - "x-ms-client-request-id": [ - "a78df34f-de96-4b57-b7fb-f832b58cbc1d" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8767/providers/Microsoft.Cdn/operationresults/60530bfd-e24c-42e7-81f5-cbc380d60285?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "53928a01-af35-41d9-b044-7a638c534d70" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210002Z:53928a01-af35-41d9-b044-7a638c534d70" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:00:01 GMT" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8767/providers/Microsoft.Cdn/profiles/ps9078\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps9078\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"00fae082-1ffe-4bdf-9b1a-1a9671215ad2\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8767/providers/Microsoft.Cdn/operationresults/60530bfd-e24c-42e7-81f5-cbc380d60285?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc2Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzYwNTMwYmZkLWUyNGMtNDJlNy04MWY1LWNiYzM4MGQ2MDI4NT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a78df34f-de96-4b57-b7fb-f832b58cbc1d" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b7c90b52-5d6f-4fae-a271-0ff12ec2d467" - ], - "x-ms-client-request-id": [ - "a78df34f-de96-4b57-b7fb-f832b58cbc1d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "fbd9ff86-e9ae-46c4-9933-173aa280b76b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210012Z:fbd9ff86-e9ae-46c4-9933-173aa280b76b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:00:11 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8767/providers/Microsoft.Cdn/operationresults/60530bfd-e24c-42e7-81f5-cbc380d60285?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc2Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzYwNTMwYmZkLWUyNGMtNDJlNy04MWY1LWNiYzM4MGQ2MDI4NT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a78df34f-de96-4b57-b7fb-f832b58cbc1d" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "65c12f8f-b18b-40a8-a37e-e1c147a7051c" - ], - "x-ms-client-request-id": [ - "a78df34f-de96-4b57-b7fb-f832b58cbc1d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "f3e4d06e-0c7b-4df9-8415-dd8729806696" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210022Z:f3e4d06e-0c7b-4df9-8415-dd8729806696" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:00:21 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8767/providers/Microsoft.Cdn/profiles/ps9078?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODc2Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNzg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a78df34f-de96-4b57-b7fb-f832b58cbc1d" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "66d782a7-d2e9-456c-983b-7fdcdf535cf8" - ], - "x-ms-client-request-id": [ - "a78df34f-de96-4b57-b7fb-f832b58cbc1d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "3829375e-bc00-4edf-ae88-b005caf262eb" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210022Z:3829375e-bc00-4edf-ae88-b005caf262eb" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:00:21 GMT" - ], - "Content-Length": [ - "384" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8767/providers/Microsoft.Cdn/profiles/ps9078\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps9078\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"00fae082-1ffe-4bdf-9b1a-1a9671215ad2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8767/providers/Microsoft.Cdn/profiles/ps9078?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODc2Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNzg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3ee98d14-edb9-44ae-b73b-b18cf65385dd" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e602150e-1f10-4c8d-b6b3-bd480a17757a" - ], - "x-ms-client-request-id": [ - "3ee98d14-edb9-44ae-b73b-b18cf65385dd" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "88b0c8ea-581c-489a-be49-8c8b341a18cc" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210022Z:88b0c8ea-581c-489a-be49-8c8b341a18cc" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:00:22 GMT" - ], - "Content-Length": [ - "384" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8767/providers/Microsoft.Cdn/profiles/ps9078\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps9078\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"00fae082-1ffe-4bdf-9b1a-1a9671215ad2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8767/providers/Microsoft.Cdn/profiles/ps9078?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODc2Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNzg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3ee98d14-edb9-44ae-b73b-b18cf65385dd" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8767/providers/Microsoft.Cdn/operationresults/b27ca882-a7cb-44b4-bf7f-1992a6f64e90/profileresults/ps9078?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "aaef3a1f-8da0-4036-815c-346287f29756" - ], - "x-ms-client-request-id": [ - "3ee98d14-edb9-44ae-b73b-b18cf65385dd" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8767/providers/Microsoft.Cdn/operationresults/b27ca882-a7cb-44b4-bf7f-1992a6f64e90?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-correlation-request-id": [ - "ff6012ff-6a26-4b56-a1c3-1f85a2f2a2be" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210023Z:ff6012ff-6a26-4b56-a1c3-1f85a2f2a2be" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:00:22 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8767/providers/Microsoft.Cdn/operationresults/b27ca882-a7cb-44b4-bf7f-1992a6f64e90?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc2Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2IyN2NhODgyLWE3Y2ItNDRiNC1iZjdmLTE5OTJhNmY2NGU5MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3ee98d14-edb9-44ae-b73b-b18cf65385dd" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8c008d5a-d78e-4f08-a9c9-6530eec843bb" - ], - "x-ms-client-request-id": [ - "3ee98d14-edb9-44ae-b73b-b18cf65385dd" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "17236156-ebe1-4aec-954d-45297bcde77c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210033Z:17236156-ebe1-4aec-954d-45297bcde77c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:00:33 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8767/providers/Microsoft.Cdn/operationresults/b27ca882-a7cb-44b4-bf7f-1992a6f64e90/profileresults/ps9078?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc2Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2IyN2NhODgyLWE3Y2ItNDRiNC1iZjdmLTE5OTJhNmY2NGU5MC9wcm9maWxlcmVzdWx0cy9wczkwNzg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3ee98d14-edb9-44ae-b73b-b18cf65385dd" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7bf2b677-7f2e-48a0-af93-9c1b62decefb" - ], - "x-ms-client-request-id": [ - "3ee98d14-edb9-44ae-b73b-b18cf65385dd" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "0c5e1ffe-f50d-42ce-bfeb-0a18d2051d98" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210034Z:0c5e1ffe-f50d-42ce-bfeb-0a18d2051d98" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:00:33 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8767?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc2Nz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a409d4d5-2512-4f8f-a4c7-e7b192b6457b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NjctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "54ea5363-c7fe-43e9-9439-ffdc26f799ec" - ], - "x-ms-correlation-request-id": [ - "54ea5363-c7fe-43e9-9439-ffdc26f799ec" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210034Z:54ea5363-c7fe-43e9-9439-ffdc26f799ec" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:00:33 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NjctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM05qY3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NjctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "7582b209-3c5a-47f5-ba23-9d515d556546" - ], - "x-ms-correlation-request-id": [ - "7582b209-3c5a-47f5-ba23-9d515d556546" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210049Z:7582b209-3c5a-47f5-ba23-9d515d556546" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:00:48 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NjctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM05qY3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NjctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "369d9cb3-6183-4cf7-b14b-36d7aa7abd14" - ], - "x-ms-correlation-request-id": [ - "369d9cb3-6183-4cf7-b14b-36d7aa7abd14" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210104Z:369d9cb3-6183-4cf7-b14b-36d7aa7abd14" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:01:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NjctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM05qY3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "f220c63f-d2d7-4d65-a0b0-4050a89e9370" - ], - "x-ms-correlation-request-id": [ - "f220c63f-d2d7-4d65-a0b0-4050a89e9370" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210119Z:f220c63f-d2d7-4d65-a0b0-4050a89e9370" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:01:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NjctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM05qY3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "f7e2e5a2-b8cb-4e16-b197-2b427a4a8473" - ], - "x-ms-correlation-request-id": [ - "f7e2e5a2-b8cb-4e16-b197-2b427a4a8473" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T210119Z:f7e2e5a2-b8cb-4e16-b197-2b427a4a8473" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:01:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-RemovePremiumAfdProfile": [ - "ps8767", - "ps9078" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdRouteTests/TestGetAfdRoute.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdRouteTests/TestGetAfdRoute.json deleted file mode 100644 index faf752482e63..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdRouteTests/TestGetAfdRoute.json +++ /dev/null @@ -1,1125 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5550?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTU1MD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4f9ef29a-02f3-4ed5-83c4-d06eb2de7e48" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "b674b8ae-83b6-4c7e-80e1-f341f68b19c6" - ], - "x-ms-correlation-request-id": [ - "b674b8ae-83b6-4c7e-80e1-f341f68b19c6" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T203419Z:b674b8ae-83b6-4c7e-80e1-f341f68b19c6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:34:18 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5550\",\r\n \"name\": \"ps5550\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5550/providers/Microsoft.Cdn/profiles/ps6167?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTU1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczYxNjc/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e7d55bb8-35b3-4d15-b5d8-d805158e5fad" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8d7f9ba0-242a-4389-86fa-cda7fd9d0026" - ], - "x-ms-client-request-id": [ - "e7d55bb8-35b3-4d15-b5d8-d805158e5fad" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5550/providers/Microsoft.Cdn/operationresults/8175b850-5d69-43b0-92f1-d064ed1021a0?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "4fae0707-efc1-4021-a0c2-75b806eefbd9" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T203424Z:4fae0707-efc1-4021-a0c2-75b806eefbd9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:34:24 GMT" - ], - "Content-Length": [ - "386" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5550/providers/Microsoft.Cdn/profiles/ps6167\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6167\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe18b2da-3f60-445c-945a-1a6cbbfd6ccf\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5550/providers/Microsoft.Cdn/operationresults/8175b850-5d69-43b0-92f1-d064ed1021a0?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTU1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzgxNzViODUwLTVkNjktNDNiMC05MmYxLWQwNjRlZDEwMjFhMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e7d55bb8-35b3-4d15-b5d8-d805158e5fad" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2ad9c012-94a8-42e0-8bbc-3c4437a1c3ef" - ], - "x-ms-client-request-id": [ - "e7d55bb8-35b3-4d15-b5d8-d805158e5fad" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "563d95d4-0aca-4735-835e-39ee67f1430d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T203434Z:563d95d4-0aca-4735-835e-39ee67f1430d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:34:34 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5550/providers/Microsoft.Cdn/operationresults/8175b850-5d69-43b0-92f1-d064ed1021a0?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTU1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzgxNzViODUwLTVkNjktNDNiMC05MmYxLWQwNjRlZDEwMjFhMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e7d55bb8-35b3-4d15-b5d8-d805158e5fad" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ecdd52bc-f265-45ab-b4a9-09c1f745f2ba" - ], - "x-ms-client-request-id": [ - "e7d55bb8-35b3-4d15-b5d8-d805158e5fad" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "534d8c27-3432-4209-a237-e605ba8268da" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T203444Z:534d8c27-3432-4209-a237-e605ba8268da" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:34:44 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5550/providers/Microsoft.Cdn/profiles/ps6167?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTU1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczYxNjc/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e7d55bb8-35b3-4d15-b5d8-d805158e5fad" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0b432630-b6c0-487b-adb8-902455b0e5a9" - ], - "x-ms-client-request-id": [ - "e7d55bb8-35b3-4d15-b5d8-d805158e5fad" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "a6a3d467-fbf2-4267-a6ff-a821e48ed08c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T203444Z:a6a3d467-fbf2-4267-a6ff-a821e48ed08c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:34:44 GMT" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5550/providers/Microsoft.Cdn/profiles/ps6167\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6167\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe18b2da-3f60-445c-945a-1a6cbbfd6ccf\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5550/providers/Microsoft.Cdn/profiles/ps6167/afdEndpoints/ps3032?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTU1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczYxNjcvYWZkRW5kcG9pbnRzL3BzMzAzMj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"originResponseTimeoutSeconds\": 60\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d7c735e9-6d8c-4b12-aa29-0a795c528d26" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "93" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f02161d6-78ed-49ef-b2f5-47d5de8ab374" - ], - "x-ms-client-request-id": [ - "d7c735e9-6d8c-4b12-aa29-0a795c528d26" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5550/providers/Microsoft.Cdn/operationresults/044c5a63-6521-431d-8232-9749b2316cf0?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "b49c1c66-f5b3-4930-9d32-2f977c0a409f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T203447Z:b49c1c66-f5b3-4930-9d32-2f977c0a409f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:34:47 GMT" - ], - "Content-Length": [ - "406" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5550/providers/Microsoft.Cdn/profiles/ps6167/afdEndpoints/ps3032\",\r\n \"type\": \"Microsoft.Cdn/profiles/afdendpoints\",\r\n \"name\": \"ps3032\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps3032.z01.azurefd.net\",\r\n \"originResponseTimeoutSeconds\": 60,\r\n \"enabledState\": \"Enabled\",\r\n \"provisioningState\": \"Creating\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5550/providers/Microsoft.Cdn/operationresults/044c5a63-6521-431d-8232-9749b2316cf0?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTU1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzA0NGM1YTYzLTY1MjEtNDMxZC04MjMyLTk3NDliMjMxNmNmMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d7c735e9-6d8c-4b12-aa29-0a795c528d26" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c908b210-a674-4cd7-ba6d-408d3365f8bc" - ], - "x-ms-client-request-id": [ - "d7c735e9-6d8c-4b12-aa29-0a795c528d26" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "f6f26dc8-434e-4723-98b1-fa1d25aaa640" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T203457Z:f6f26dc8-434e-4723-98b1-fa1d25aaa640" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:34:57 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5550/providers/Microsoft.Cdn/profiles/ps6167/afdEndpoints/ps3032?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTU1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczYxNjcvYWZkRW5kcG9pbnRzL3BzMzAzMj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d7c735e9-6d8c-4b12-aa29-0a795c528d26" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "13741171-ae52-4e0e-bf79-bde4757f77cf" - ], - "x-ms-client-request-id": [ - "d7c735e9-6d8c-4b12-aa29-0a795c528d26" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "0cd71f7d-cc7e-41cb-b21f-64c1495c8761" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T203458Z:0cd71f7d-cc7e-41cb-b21f-64c1495c8761" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:34:57 GMT" - ], - "Content-Length": [ - "407" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5550/providers/Microsoft.Cdn/profiles/ps6167/afdEndpoints/ps3032\",\r\n \"type\": \"Microsoft.Cdn/profiles/afdendpoints\",\r\n \"name\": \"ps3032\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps3032.z01.azurefd.net\",\r\n \"originResponseTimeoutSeconds\": 60,\r\n \"enabledState\": \"Enabled\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5550/providers/Microsoft.Cdn/profiles/ps6167/afdEndpoints/ps3032/routes/ps8916?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTU1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczYxNjcvYWZkRW5kcG9pbnRzL3BzMzAzMi9yb3V0ZXMvcHM4OTE2P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7b9c6aba-a4a0-43d5-8097-b697b12bc799" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "fcddae5c-5618-48ad-b429-eb457764ac0f" - ], - "x-ms-client-request-id": [ - "7b9c6aba-a4a0-43d5-8097-b697b12bc799" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "138e0284-266c-4c14-a747-8e8c187b4e4f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T203458Z:138e0284-266c-4c14-a747-8e8c187b4e4f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:34:58 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5550?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTU1MD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "601d422c-6c6f-4fc9-a68c-1481ee80da29" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU1NTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "dbd91428-ecca-4534-a3d2-111b7956d3f5" - ], - "x-ms-correlation-request-id": [ - "dbd91428-ecca-4534-a3d2-111b7956d3f5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T203459Z:dbd91428-ecca-4534-a3d2-111b7956d3f5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:34:58 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU1NTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMU5UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU1NTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "049e6207-7caf-401c-865e-307d348a0d13" - ], - "x-ms-correlation-request-id": [ - "049e6207-7caf-401c-865e-307d348a0d13" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T203514Z:049e6207-7caf-401c-865e-307d348a0d13" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:35:14 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU1NTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMU5UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU1NTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "1a960c07-1c6e-46ce-a70c-1940697a51e3" - ], - "x-ms-correlation-request-id": [ - "1a960c07-1c6e-46ce-a70c-1940697a51e3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T203529Z:1a960c07-1c6e-46ce-a70c-1940697a51e3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:35:29 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU1NTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMU5UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU1NTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "4187b751-ed1a-43e7-a0c9-7c99df0c57e0" - ], - "x-ms-correlation-request-id": [ - "4187b751-ed1a-43e7-a0c9-7c99df0c57e0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T203544Z:4187b751-ed1a-43e7-a0c9-7c99df0c57e0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:35:44 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU1NTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMU5UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU1NTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "99c32e0c-2acc-4db6-953d-f644b7dc6ca4" - ], - "x-ms-correlation-request-id": [ - "99c32e0c-2acc-4db6-953d-f644b7dc6ca4" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T203559Z:99c32e0c-2acc-4db6-953d-f644b7dc6ca4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:35:59 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU1NTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMU5UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU1NTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "3342b621-d805-463e-b285-5e5a03cb3833" - ], - "x-ms-correlation-request-id": [ - "3342b621-d805-463e-b285-5e5a03cb3833" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T203614Z:3342b621-d805-463e-b285-5e5a03cb3833" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:36:14 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU1NTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMU5UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU1NTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "aac788f1-8da4-4bdb-b68e-bafc1d7f6338" - ], - "x-ms-correlation-request-id": [ - "aac788f1-8da4-4bdb-b68e-bafc1d7f6338" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T203630Z:aac788f1-8da4-4bdb-b68e-bafc1d7f6338" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:36:29 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU1NTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMU5UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "ec93f00c-408b-4806-993a-fbbe67ecb8a7" - ], - "x-ms-correlation-request-id": [ - "ec93f00c-408b-4806-993a-fbbe67ecb8a7" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T203645Z:ec93f00c-408b-4806-993a-fbbe67ecb8a7" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:36:44 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU1NTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVMU5UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "416b5471-daf5-4e91-8815-c3d28714c9b6" - ], - "x-ms-correlation-request-id": [ - "416b5471-daf5-4e91-8815-c3d28714c9b6" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T203645Z:416b5471-daf5-4e91-8815-c3d28714c9b6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:36:44 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-GetAfdRoute": [ - "ps5550", - "ps6167", - "ps3032", - "ps8916" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdRuleSetTests/TestCreateAfdRuleSet.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdRuleSetTests/TestCreateAfdRuleSet.json deleted file mode 100644 index 9e0b7b607cf0..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdRuleSetTests/TestCreateAfdRuleSet.json +++ /dev/null @@ -1,857 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3452?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzQ1Mj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "259d2eec-b6b5-4029-9a36-15846abfef52" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "343de00d-516a-4818-9fa0-eb6deddb1604" - ], - "x-ms-correlation-request-id": [ - "343de00d-516a-4818-9fa0-eb6deddb1604" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T193946Z:343de00d-516a-4818-9fa0-eb6deddb1604" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:39:45 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3452\",\r\n \"name\": \"ps3452\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3452/providers/Microsoft.Cdn/profiles/ps9976?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzQ1Mi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk5NzY/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2ac4eb5d-2ebb-4793-9aa7-6b84064aeac9" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c3f04449-3f0b-4962-a755-051a88cdf3c2" - ], - "x-ms-client-request-id": [ - "2ac4eb5d-2ebb-4793-9aa7-6b84064aeac9" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3452/providers/Microsoft.Cdn/operationresults/194ee1a9-7a6e-48b1-b884-574630eae563?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "dd56ee39-41c0-465a-9602-643a90638176" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T193950Z:dd56ee39-41c0-465a-9602-643a90638176" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:39:50 GMT" - ], - "Content-Length": [ - "386" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3452/providers/Microsoft.Cdn/profiles/ps9976\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps9976\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8a458900-60f3-4726-94a5-e5218004ca4f\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3452/providers/Microsoft.Cdn/operationresults/194ee1a9-7a6e-48b1-b884-574630eae563?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzQ1Mi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzE5NGVlMWE5LTdhNmUtNDhiMS1iODg0LTU3NDYzMGVhZTU2Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2ac4eb5d-2ebb-4793-9aa7-6b84064aeac9" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "253030da-5526-427b-b53c-fc024c6e3244" - ], - "x-ms-client-request-id": [ - "2ac4eb5d-2ebb-4793-9aa7-6b84064aeac9" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "93bfd262-28c8-46c4-9c5c-1bd2d6be02ea" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194000Z:93bfd262-28c8-46c4-9c5c-1bd2d6be02ea" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:40:00 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3452/providers/Microsoft.Cdn/profiles/ps9976?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzQ1Mi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk5NzY/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2ac4eb5d-2ebb-4793-9aa7-6b84064aeac9" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f2b649dd-6e35-4a9b-bb44-5d42d45023b1" - ], - "x-ms-client-request-id": [ - "2ac4eb5d-2ebb-4793-9aa7-6b84064aeac9" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "288c515c-6d6e-4bf6-88ab-961cd84313e5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194001Z:288c515c-6d6e-4bf6-88ab-961cd84313e5" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:40:00 GMT" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3452/providers/Microsoft.Cdn/profiles/ps9976\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps9976\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8a458900-60f3-4726-94a5-e5218004ca4f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3452/providers/Microsoft.Cdn/profiles/ps9976/ruleSets/ps6107?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzQ1Mi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk5NzYvcnVsZVNldHMvcHM2MTA3P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f8fdb7bc-989a-43af-8098-a30817c1bbe2" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f2558bea-db49-48ce-bdeb-698ce6e13812" - ], - "x-ms-client-request-id": [ - "f8fdb7bc-989a-43af-8098-a30817c1bbe2" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "6017a111-1f8b-498c-bbcf-3f6b199e0c2a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194002Z:6017a111-1f8b-498c-bbcf-3f6b199e0c2a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:40:01 GMT" - ], - "Content-Length": [ - "274" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3452/providers/Microsoft.Cdn/profiles/ps9976/rulesets/ps6107\",\r\n \"type\": \"Microsoft.Cdn/profiles/rulesets\",\r\n \"name\": \"ps6107\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3452?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzQ1Mj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7841db00-1f3b-4fda-8db1-0ee6888bb771" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM0NTItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "330520f4-c914-4eb9-9c58-e8567c05886c" - ], - "x-ms-correlation-request-id": [ - "330520f4-c914-4eb9-9c58-e8567c05886c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194002Z:330520f4-c914-4eb9-9c58-e8567c05886c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:40:01 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM0NTItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNME5USXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM0NTItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "aaa43f4b-e33c-4679-871e-82f3c8f474c9" - ], - "x-ms-correlation-request-id": [ - "aaa43f4b-e33c-4679-871e-82f3c8f474c9" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194018Z:aaa43f4b-e33c-4679-871e-82f3c8f474c9" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:40:17 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM0NTItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNME5USXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM0NTItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "0692c51a-0603-49ea-a9f7-6303e5a405ad" - ], - "x-ms-correlation-request-id": [ - "0692c51a-0603-49ea-a9f7-6303e5a405ad" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194033Z:0692c51a-0603-49ea-a9f7-6303e5a405ad" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:40:32 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM0NTItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNME5USXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM0NTItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "64451788-011b-40c4-aaa0-3dc0d5fccb3c" - ], - "x-ms-correlation-request-id": [ - "64451788-011b-40c4-aaa0-3dc0d5fccb3c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194048Z:64451788-011b-40c4-aaa0-3dc0d5fccb3c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:40:47 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM0NTItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNME5USXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM0NTItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "f4fe6733-0ade-4231-acd1-f5d68c2559ee" - ], - "x-ms-correlation-request-id": [ - "f4fe6733-0ade-4231-acd1-f5d68c2559ee" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194103Z:f4fe6733-0ade-4231-acd1-f5d68c2559ee" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:41:02 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM0NTItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNME5USXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM0NTItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "f82a8663-38d7-495d-aaec-91f00fbd9200" - ], - "x-ms-correlation-request-id": [ - "f82a8663-38d7-495d-aaec-91f00fbd9200" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194118Z:f82a8663-38d7-495d-aaec-91f00fbd9200" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:41:17 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM0NTItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNME5USXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM0NTItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "6bc14da5-796d-45e9-87e4-ac07b9e4c269" - ], - "x-ms-correlation-request-id": [ - "6bc14da5-796d-45e9-87e4-ac07b9e4c269" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194133Z:6bc14da5-796d-45e9-87e4-ac07b9e4c269" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:41:32 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM0NTItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNME5USXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "7837abb5-0d85-4af0-bf75-1eb5acfd7c7d" - ], - "x-ms-correlation-request-id": [ - "7837abb5-0d85-4af0-bf75-1eb5acfd7c7d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194148Z:7837abb5-0d85-4af0-bf75-1eb5acfd7c7d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:41:47 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM0NTItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNME5USXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "ccdb6eef-b100-4fc6-92d3-b7394c5d3fa2" - ], - "x-ms-correlation-request-id": [ - "ccdb6eef-b100-4fc6-92d3-b7394c5d3fa2" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194148Z:ccdb6eef-b100-4fc6-92d3-b7394c5d3fa2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:41:48 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-CreateAfdRuleSet": [ - "ps3452", - "ps9976", - "ps6107" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdRuleSetTests/TestRemoveAfdRuleSet.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdRuleSetTests/TestRemoveAfdRuleSet.json deleted file mode 100644 index e6aed1dd0414..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdRuleSetTests/TestRemoveAfdRuleSet.json +++ /dev/null @@ -1,1115 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps105?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTA1P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f26f963e-7ecc-4e60-98fe-528ec3d6a19a" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "218ab7f6-3c3d-40e8-b4f9-619fe09d60a4" - ], - "x-ms-correlation-request-id": [ - "218ab7f6-3c3d-40e8-b4f9-619fe09d60a4" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194224Z:218ab7f6-3c3d-40e8-b4f9-619fe09d60a4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:42:23 GMT" - ], - "Content-Length": [ - "163" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps105\",\r\n \"name\": \"ps105\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps105/providers/Microsoft.Cdn/profiles/ps6720?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTA1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNjcyMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "46ef6eca-05a9-4ffd-9206-a34a4a5ce868" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5e0ab40b-b932-4e6e-b89f-543b5c6185e0" - ], - "x-ms-client-request-id": [ - "46ef6eca-05a9-4ffd-9206-a34a4a5ce868" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps105/providers/Microsoft.Cdn/operationresults/b2be9c74-81b8-4e7b-863f-75ed8341f8be?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "63bc22b4-2747-498a-82a8-b07ce7315306" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194228Z:63bc22b4-2747-498a-82a8-b07ce7315306" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:42:27 GMT" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps105/providers/Microsoft.Cdn/profiles/ps6720\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6720\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f45bcfc0-dfaa-4f7e-8c31-d57aa8847714\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps105/providers/Microsoft.Cdn/operationresults/b2be9c74-81b8-4e7b-863f-75ed8341f8be?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTA1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvYjJiZTljNzQtODFiOC00ZTdiLTg2M2YtNzVlZDgzNDFmOGJlP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "46ef6eca-05a9-4ffd-9206-a34a4a5ce868" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9d58e770-1a09-4bb8-aa61-11d90b8096cd" - ], - "x-ms-client-request-id": [ - "46ef6eca-05a9-4ffd-9206-a34a4a5ce868" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "8e10a21d-ca03-4fbb-9e1f-94b6ba517572" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194238Z:8e10a21d-ca03-4fbb-9e1f-94b6ba517572" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:42:38 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps105/providers/Microsoft.Cdn/operationresults/b2be9c74-81b8-4e7b-863f-75ed8341f8be?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTA1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvYjJiZTljNzQtODFiOC00ZTdiLTg2M2YtNzVlZDgzNDFmOGJlP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "46ef6eca-05a9-4ffd-9206-a34a4a5ce868" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2f40cebe-35ec-4aa8-86b5-007e287992c2" - ], - "x-ms-client-request-id": [ - "46ef6eca-05a9-4ffd-9206-a34a4a5ce868" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "c52a9d9c-a8de-46da-aa90-c80029370f25" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194249Z:c52a9d9c-a8de-46da-aa90-c80029370f25" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:42:48 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps105/providers/Microsoft.Cdn/profiles/ps6720?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTA1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNjcyMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "46ef6eca-05a9-4ffd-9206-a34a4a5ce868" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "fc687f8a-2e87-4489-9dce-64d00ec32424" - ], - "x-ms-client-request-id": [ - "46ef6eca-05a9-4ffd-9206-a34a4a5ce868" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "e3b7cbef-9862-48a0-a13f-32545fb956bc" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194249Z:e3b7cbef-9862-48a0-a13f-32545fb956bc" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:42:48 GMT" - ], - "Content-Length": [ - "384" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps105/providers/Microsoft.Cdn/profiles/ps6720\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6720\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f45bcfc0-dfaa-4f7e-8c31-d57aa8847714\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps105/providers/Microsoft.Cdn/profiles/ps6720/ruleSets/ps4702?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTA1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNjcyMC9ydWxlU2V0cy9wczQ3MDI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "83e63ca5-028a-42fd-af1a-74c71cbc251e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1d843a03-dbde-4ffb-8a85-4fe297b00a3e" - ], - "x-ms-client-request-id": [ - "83e63ca5-028a-42fd-af1a-74c71cbc251e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "8cb5bcc0-b14e-47c8-8137-3aead510c7b0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194250Z:8cb5bcc0-b14e-47c8-8137-3aead510c7b0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:42:49 GMT" - ], - "Content-Length": [ - "273" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps105/providers/Microsoft.Cdn/profiles/ps6720/rulesets/ps4702\",\r\n \"type\": \"Microsoft.Cdn/profiles/rulesets\",\r\n \"name\": \"ps4702\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps105/providers/Microsoft.Cdn/profiles/ps6720/ruleSets/ps4702?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTA1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNjcyMC9ydWxlU2V0cy9wczQ3MDI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a125a1d9-b473-46c1-ad5e-325e3429a6c7" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "bdd7ec0c-99bf-44c7-9d8d-3fb927072a87" - ], - "x-ms-client-request-id": [ - "a125a1d9-b473-46c1-ad5e-325e3429a6c7" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "0972d63a-8afe-45d1-bb4f-1ee7c68a2f09" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194250Z:0972d63a-8afe-45d1-bb4f-1ee7c68a2f09" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:42:50 GMT" - ], - "Content-Length": [ - "273" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps105/providers/Microsoft.Cdn/profiles/ps6720/rulesets/ps4702\",\r\n \"type\": \"Microsoft.Cdn/profiles/rulesets\",\r\n \"name\": \"ps4702\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps105/providers/Microsoft.Cdn/profiles/ps6720/ruleSets/ps4702?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTA1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNjcyMC9ydWxlU2V0cy9wczQ3MDI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1809ecd3-9b02-4d43-87df-5ee60fa36010" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0a954493-707d-4eda-a70d-0c77d6c5a9ca" - ], - "x-ms-client-request-id": [ - "1809ecd3-9b02-4d43-87df-5ee60fa36010" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "6eaece4d-7788-4c44-8a02-7e61ebb9d201" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194252Z:6eaece4d-7788-4c44-8a02-7e61ebb9d201" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:42:51 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps105/providers/Microsoft.Cdn/profiles/ps6720/ruleSets/ps4702?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTA1L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNjcyMC9ydWxlU2V0cy9wczQ3MDI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a125a1d9-b473-46c1-ad5e-325e3429a6c7" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "33202f7b-34fa-4357-bbc4-94c882c922d5" - ], - "x-ms-client-request-id": [ - "a125a1d9-b473-46c1-ad5e-325e3429a6c7" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-correlation-request-id": [ - "afb2e8e6-1e57-4ad8-8a6c-d1596e35a22e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194251Z:afb2e8e6-1e57-4ad8-8a6c-d1596e35a22e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:42:51 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps105?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTA1P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "22d68325-c0ee-438e-b1f5-9241e41d9716" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEwNS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "cdcab9f2-978a-4beb-a8d0-1fe649ac428a" - ], - "x-ms-correlation-request-id": [ - "cdcab9f2-978a-4beb-a8d0-1fe649ac428a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194253Z:cdcab9f2-978a-4beb-a8d0-1fe649ac428a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:42:52 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEwNS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFd05TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEwNS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "fec11378-1cbc-450d-98c3-5e547e75b49c" - ], - "x-ms-correlation-request-id": [ - "fec11378-1cbc-450d-98c3-5e547e75b49c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194308Z:fec11378-1cbc-450d-98c3-5e547e75b49c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:43:08 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEwNS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFd05TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEwNS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "696d8527-9b36-4b8f-82c5-c7c75040f726" - ], - "x-ms-correlation-request-id": [ - "696d8527-9b36-4b8f-82c5-c7c75040f726" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194323Z:696d8527-9b36-4b8f-82c5-c7c75040f726" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:43:23 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEwNS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFd05TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEwNS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "413201e8-b7b0-40c0-a4fe-ea75d0b396c1" - ], - "x-ms-correlation-request-id": [ - "413201e8-b7b0-40c0-a4fe-ea75d0b396c1" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194338Z:413201e8-b7b0-40c0-a4fe-ea75d0b396c1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:43:38 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEwNS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFd05TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEwNS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "5cebd522-8ee0-4027-9545-de7cec1bb5e2" - ], - "x-ms-correlation-request-id": [ - "5cebd522-8ee0-4027-9545-de7cec1bb5e2" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194353Z:5cebd522-8ee0-4027-9545-de7cec1bb5e2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:43:53 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEwNS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFd05TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEwNS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "12c66fec-7c6d-4f99-9b3b-a1993d8b54ce" - ], - "x-ms-correlation-request-id": [ - "12c66fec-7c6d-4f99-9b3b-a1993d8b54ce" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194409Z:12c66fec-7c6d-4f99-9b3b-a1993d8b54ce" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:44:09 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEwNS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFd05TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEwNS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "fa009db3-7e1f-49c8-be31-ca5b4e8a3481" - ], - "x-ms-correlation-request-id": [ - "fa009db3-7e1f-49c8-be31-ca5b4e8a3481" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194424Z:fa009db3-7e1f-49c8-be31-ca5b4e8a3481" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:44:24 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEwNS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFd05TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "0d258719-b3f9-49d9-bbc5-74e624dceaf3" - ], - "x-ms-correlation-request-id": [ - "0d258719-b3f9-49d9-bbc5-74e624dceaf3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194439Z:0d258719-b3f9-49d9-bbc5-74e624dceaf3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:44:39 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEwNS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFd05TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "cd8b8dc0-6e7f-4c30-b8a2-3d2bf8cc7816" - ], - "x-ms-correlation-request-id": [ - "cd8b8dc0-6e7f-4c30-b8a2-3d2bf8cc7816" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T194439Z:cd8b8dc0-6e7f-4c30-b8a2-3d2bf8cc7816" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:44:39 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-RemoveAfdRuleSet": [ - "ps105", - "ps6720", - "ps4702" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdRuleTests/TestCreateAfdRule.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdRuleTests/TestCreateAfdRule.json deleted file mode 100644 index 7c359e31849f..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdRuleTests/TestCreateAfdRule.json +++ /dev/null @@ -1,816 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1231?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTIzMT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2019ab2d-e4ee-44c6-a9de-9c16e368538d" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30411.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.45" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "4fbcf972-b1ba-4890-89be-fa804b4b7592" - ], - "x-ms-correlation-request-id": [ - "4fbcf972-b1ba-4890-89be-fa804b4b7592" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210907T235920Z:4fbcf972-b1ba-4890-89be-fa804b4b7592" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 07 Sep 2021 23:59:20 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps1231\",\r\n \"name\": \"ps1231\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps1231/providers/Microsoft.Cdn/profiles/ps2759?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTIzMS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczI3NTk/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c6d59bad-8a86-4f0e-b255-cefee8c517ca" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30411.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e6c27b66-472f-4896-ab5b-679b76f86601" - ], - "x-ms-client-request-id": [ - "c6d59bad-8a86-4f0e-b255-cefee8c517ca" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1231/providers/Microsoft.Cdn/operationresults/cb4986bd-24bf-40a7-96f3-d8f22f8a538f?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "8d3b4156-acba-44c8-afab-ca5aff674da8" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210907T235939Z:8d3b4156-acba-44c8-afab-ca5aff674da8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 07 Sep 2021 23:59:39 GMT" - ], - "Content-Length": [ - "386" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1231/providers/Microsoft.Cdn/profiles/ps2759\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps2759\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"1f9e16bc-3d65-4417-b875-74b771b759df\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1231/providers/Microsoft.Cdn/operationresults/cb4986bd-24bf-40a7-96f3-d8f22f8a538f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTIzMS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2NiNDk4NmJkLTI0YmYtNDBhNy05NmYzLWQ4ZjIyZjhhNTM4Zj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c6d59bad-8a86-4f0e-b255-cefee8c517ca" - ], - "User-Agent": [ - "FxVersion/4.6.30411.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "229d0d2c-39bd-4820-ad52-dc85fa43cceb" - ], - "x-ms-client-request-id": [ - "c6d59bad-8a86-4f0e-b255-cefee8c517ca" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "1d7c370f-a7f5-4070-be6d-9b2ae3533ecf" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210907T235950Z:1d7c370f-a7f5-4070-be6d-9b2ae3533ecf" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 07 Sep 2021 23:59:50 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps1231/providers/Microsoft.Cdn/profiles/ps2759?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTIzMS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczI3NTk/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c6d59bad-8a86-4f0e-b255-cefee8c517ca" - ], - "User-Agent": [ - "FxVersion/4.6.30411.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a125e23c-c70b-4997-a6b8-838b955cf7de" - ], - "x-ms-client-request-id": [ - "c6d59bad-8a86-4f0e-b255-cefee8c517ca" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "84415205-04bf-4d81-a471-76db229db05a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210907T235950Z:84415205-04bf-4d81-a471-76db229db05a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 07 Sep 2021 23:59:50 GMT" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1231/providers/Microsoft.Cdn/profiles/ps2759\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps2759\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"1f9e16bc-3d65-4417-b875-74b771b759df\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps1231/providers/Microsoft.Cdn/profiles/ps2759/ruleSets/ps8511?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTIzMS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczI3NTkvcnVsZVNldHMvcHM4NTExP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "426694e8-8157-4094-b9b5-fd5fbf2e2686" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30411.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "74e3b95a-c9da-4215-b903-05631dc530b9" - ], - "x-ms-client-request-id": [ - "426694e8-8157-4094-b9b5-fd5fbf2e2686" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "60663b07-6c6f-4207-88a6-135d556a7a01" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210907T235951Z:60663b07-6c6f-4207-88a6-135d556a7a01" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 07 Sep 2021 23:59:51 GMT" - ], - "Content-Length": [ - "274" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1231/providers/Microsoft.Cdn/profiles/ps2759/rulesets/ps8511\",\r\n \"type\": \"Microsoft.Cdn/profiles/rulesets\",\r\n \"name\": \"ps8511\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps1231/providers/Microsoft.Cdn/profiles/ps2759/ruleSets/ps8511/rules/ps2240?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTIzMS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczI3NTkvcnVsZVNldHMvcHM4NTExL3J1bGVzL3BzMjI0MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"order\": 2,\r\n \"conditions\": [],\r\n \"actions\": [\r\n {\r\n \"name\": \"ModifyRequestHeader\",\r\n \"parameters\": {\r\n \"headerAction\": \"Overwrite\",\r\n \"headerName\": \"x-header-name\",\r\n \"value\": \"header-value\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "179f97a3-6b14-4936-97b2-06f705b88843" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30411.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "396" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "95a46dfd-0e2b-4b52-8848-72364b875016" - ], - "x-ms-client-request-id": [ - "179f97a3-6b14-4936-97b2-06f705b88843" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "de5aa86f-15a3-4cea-86f4-975fc948aad3" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210907T235952Z:de5aa86f-15a3-4cea-86f4-975fc948aad3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 07 Sep 2021 23:59:52 GMT" - ], - "Content-Length": [ - "572" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1231/providers/Microsoft.Cdn/profiles/ps2759/rulesets/ps8511/rules/ps2240\",\r\n \"type\": \"Microsoft.Cdn/profiles/rulesets/rules\",\r\n \"name\": \"ps2240\",\r\n \"properties\": {\r\n \"order\": 2,\r\n \"conditions\": [],\r\n \"actions\": [\r\n {\r\n \"name\": \"ModifyRequestHeader\",\r\n \"parameters\": {\r\n \"headerAction\": \"Overwrite\",\r\n \"headerName\": \"x-header-name\",\r\n \"value\": \"header-value\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters\"\r\n }\r\n }\r\n ],\r\n \"matchProcessingBehavior\": \"Continue\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"deploymentStatus\": \"NotStarted\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1231?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTIzMT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ec1f19de-4a9d-450a-9784-802fcb907d4f" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30411.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.45" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "3f3b42b7-7259-43b4-98fe-5e9f509e6b0c" - ], - "x-ms-correlation-request-id": [ - "3f3b42b7-7259-43b4-98fe-5e9f509e6b0c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210907T235952Z:3f3b42b7-7259-43b4-98fe-5e9f509e6b0c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 07 Sep 2021 23:59:52 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeU16RXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30411.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.45" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "33f2f5b0-a5b5-49cc-a16b-3a9be2407022" - ], - "x-ms-correlation-request-id": [ - "33f2f5b0-a5b5-49cc-a16b-3a9be2407022" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210908T000007Z:33f2f5b0-a5b5-49cc-a16b-3a9be2407022" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 08 Sep 2021 00:00:07 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeU16RXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30411.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.45" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "2cc7c6df-e7e1-4760-9332-9d99cf16290f" - ], - "x-ms-correlation-request-id": [ - "2cc7c6df-e7e1-4760-9332-9d99cf16290f" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210908T000023Z:2cc7c6df-e7e1-4760-9332-9d99cf16290f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 08 Sep 2021 00:00:22 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeU16RXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30411.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.45" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "f9d8d930-c72d-471d-965f-0164ea83fc80" - ], - "x-ms-correlation-request-id": [ - "f9d8d930-c72d-471d-965f-0164ea83fc80" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210908T000038Z:f9d8d930-c72d-471d-965f-0164ea83fc80" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 08 Sep 2021 00:00:37 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeU16RXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30411.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.45" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "7cdae2e6-1e4e-456a-a2e0-b999d3822aef" - ], - "x-ms-correlation-request-id": [ - "7cdae2e6-1e4e-456a-a2e0-b999d3822aef" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210908T000053Z:7cdae2e6-1e4e-456a-a2e0-b999d3822aef" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 08 Sep 2021 00:00:52 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeU16RXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30411.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.45" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "34336b0c-c30a-479c-aed6-43b49ac027ad" - ], - "x-ms-correlation-request-id": [ - "34336b0c-c30a-479c-aed6-43b49ac027ad" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210908T000108Z:34336b0c-c30a-479c-aed6-43b49ac027ad" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 08 Sep 2021 00:01:07 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzEyMzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeU16RXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30411.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.45" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "e965a498-c5ae-4c1c-bff1-dcbc61677fe7" - ], - "x-ms-correlation-request-id": [ - "e965a498-c5ae-4c1c-bff1-dcbc61677fe7" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210908T000108Z:e965a498-c5ae-4c1c-bff1-dcbc61677fe7" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 08 Sep 2021 00:01:07 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-CreateAfdRule": [ - "ps1231", - "ps2759", - "ps8511", - "ps2240" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdSecurityPolicyTests/TestGetAfdSecurityPolicy.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdSecurityPolicyTests/TestGetAfdSecurityPolicy.json deleted file mode 100644 index 84388c6a4400..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.AfdSecurityPolicyTests/TestGetAfdSecurityPolicy.json +++ /dev/null @@ -1,920 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6245?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjI0NT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "22759afe-4a51-4063-8560-ba46f2ce29c5" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "c4115e15-fe4d-48e8-85f9-3d11d4fd05f4" - ], - "x-ms-correlation-request-id": [ - "c4115e15-fe4d-48e8-85f9-3d11d4fd05f4" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T202636Z:c4115e15-fe4d-48e8-85f9-3d11d4fd05f4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:26:36 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6245\",\r\n \"name\": \"ps6245\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6245/providers/Microsoft.Cdn/profiles/ps7419?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc0MTk/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c154ad79-1978-4840-8382-4f33633437c3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "85" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3df4cde7-489b-4ce4-bcf0-0b62468570d3" - ], - "x-ms-client-request-id": [ - "c154ad79-1978-4840-8382-4f33633437c3" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6245/providers/Microsoft.Cdn/operationresults/bb323d62-64ab-4b44-bef7-93cefbbb98bc?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "c43ae50b-389a-4138-8681-47a3ca77e341" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T202639Z:c43ae50b-389a-4138-8681-47a3ca77e341" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:26:39 GMT" - ], - "Content-Length": [ - "386" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6245/providers/Microsoft.Cdn/profiles/ps7419\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps7419\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"dba2e8e4-aa83-442e-90ee-d70208686f53\",\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6245/providers/Microsoft.Cdn/operationresults/bb323d62-64ab-4b44-bef7-93cefbbb98bc?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JiMzIzZDYyLTY0YWItNGI0NC1iZWY3LTkzY2VmYmJiOThiYz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c154ad79-1978-4840-8382-4f33633437c3" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "23f1c1f0-7725-4293-bd51-4984c7b7da27" - ], - "x-ms-client-request-id": [ - "c154ad79-1978-4840-8382-4f33633437c3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "06c33458-33e9-4cbd-84c6-3a0f95c9ee6f" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T202650Z:06c33458-33e9-4cbd-84c6-3a0f95c9ee6f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:26:49 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6245/providers/Microsoft.Cdn/operationresults/bb323d62-64ab-4b44-bef7-93cefbbb98bc?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JiMzIzZDYyLTY0YWItNGI0NC1iZWY3LTkzY2VmYmJiOThiYz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c154ad79-1978-4840-8382-4f33633437c3" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4684ccd6-e729-4b02-8a52-bc031cf6ca45" - ], - "x-ms-client-request-id": [ - "c154ad79-1978-4840-8382-4f33633437c3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "e6f15c2d-cdbf-4e4c-a9ea-34293c1b78fd" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T202700Z:e6f15c2d-cdbf-4e4c-a9ea-34293c1b78fd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:26:59 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6245/providers/Microsoft.Cdn/profiles/ps7419?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc0MTk/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c154ad79-1978-4840-8382-4f33633437c3" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9dc5e47e-c471-4ef9-85e7-25a282f30e10" - ], - "x-ms-client-request-id": [ - "c154ad79-1978-4840-8382-4f33633437c3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "a7d2a658-ae4f-4222-a760-bb34699df201" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T202700Z:a7d2a658-ae4f-4222-a760-bb34699df201" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:27:00 GMT" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6245/providers/Microsoft.Cdn/profiles/ps7419\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps7419\",\r\n \"location\": \"Global\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"dba2e8e4-aa83-442e-90ee-d70208686f53\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6245/providers/Microsoft.Cdn/profiles/ps7419/securityPolicies/ps3897?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc0MTkvc2VjdXJpdHlQb2xpY2llcy9wczM4OTc/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "310d0cb2-37a1-4b55-8916-19fe9d10178b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3377a0c1-f3d9-4748-bfcd-32fd1cedf907" - ], - "x-ms-client-request-id": [ - "310d0cb2-37a1-4b55-8916-19fe9d10178b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "949377de-bcba-4f26-a652-1126b901d831" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T202700Z:949377de-bcba-4f26-a652-1126b901d831" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:27:00 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6245?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjI0NT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b5ac304f-bd64-4cfc-8f4b-8f95c44168a5" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "7687b2c1-405e-4585-b371-99ca7b774bab" - ], - "x-ms-correlation-request-id": [ - "7687b2c1-405e-4585-b371-99ca7b774bab" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T202701Z:7687b2c1-405e-4585-b371-99ca7b774bab" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:27:00 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "0e919d95-fdbf-4831-87b1-932c5742c17e" - ], - "x-ms-correlation-request-id": [ - "0e919d95-fdbf-4831-87b1-932c5742c17e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T202716Z:0e919d95-fdbf-4831-87b1-932c5742c17e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:27:15 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "067c4b3c-576d-4e3d-915d-6ec745115142" - ], - "x-ms-correlation-request-id": [ - "067c4b3c-576d-4e3d-915d-6ec745115142" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T202731Z:067c4b3c-576d-4e3d-915d-6ec745115142" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:27:30 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "a5542123-271d-409f-9078-68d9926cf7a9" - ], - "x-ms-correlation-request-id": [ - "a5542123-271d-409f-9078-68d9926cf7a9" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T202746Z:a5542123-271d-409f-9078-68d9926cf7a9" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:27:45 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "8b28ebb2-3e2c-49d1-bbe8-9d4b6f61e2f9" - ], - "x-ms-correlation-request-id": [ - "8b28ebb2-3e2c-49d1-bbe8-9d4b6f61e2f9" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T202801Z:8b28ebb2-3e2c-49d1-bbe8-9d4b6f61e2f9" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:28:00 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "ce090a89-02a6-4cfb-9a48-e6a49d461397" - ], - "x-ms-correlation-request-id": [ - "ce090a89-02a6-4cfb-9a48-e6a49d461397" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T202816Z:ce090a89-02a6-4cfb-9a48-e6a49d461397" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:28:15 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "4eee5582-f4e1-43ef-8c9d-05f35604dbdf" - ], - "x-ms-correlation-request-id": [ - "4eee5582-f4e1-43ef-8c9d-05f35604dbdf" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T202831Z:4eee5582-f4e1-43ef-8c9d-05f35604dbdf" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:28:30 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "8ba0990d-9d7f-422b-a3e6-429c8f1962ed" - ], - "x-ms-correlation-request-id": [ - "8ba0990d-9d7f-422b-a3e6-429c8f1962ed" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T202846Z:8ba0990d-9d7f-422b-a3e6-429c8f1962ed" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:28:46 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZeU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "71df54ac-361d-45c6-9ab4-a2e27ffb3615" - ], - "x-ms-correlation-request-id": [ - "71df54ac-361d-45c6-9ab4-a2e27ffb3615" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T202846Z:71df54ac-361d-45c6-9ab4-a2e27ffb3615" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:28:46 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-GetAfdSecurityPolicy": [ - "ps6245", - "ps7419", - "ps3897" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ChinaCdnProfileTests/TestProfileList.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ChinaCdnProfileTests/TestProfileList.json deleted file mode 100644 index 06239301db4f..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ChinaCdnProfileTests/TestProfileList.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/b7f584b1-4c44-4a5c-a3c9-9f85d925d727/resourceGroups/cdnbillingskus/providers/Microsoft.Cdn/profiles/cdn-billing-standard-bandwidth-avg?api-version=2019-04-15", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYjdmNTg0YjEtNGM0NC00YTVjLWEzYzktOWY4NWQ5MjVkNzI3L3Jlc291cmNlR3JvdXBzL2NkbmJpbGxpbmdza3VzL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL2Nkbi1iaWxsaW5nLXN0YW5kYXJkLWJhbmR3aWR0aC1hdmc/YXBpLXZlcnNpb249MjAxOS0wNC0xNQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d68775c5-2b20-4c60-ac0d-05e92da230f5" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.28207.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/4.2.4.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14999" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "367b9dc8-a107-48f9-b70e-210c0e7fac25" - ], - "x-ms-client-request-id": [ - "d68775c5-2b20-4c60-ac0d-05e92da230f5" - ], - "OData-Version": [ - "4.0" - ], - "Server": [ - "Kestrel" - ], - "x-ms-correlation-request-id": [ - "a6b5b77b-ff2a-4329-afe9-f630b11199df" - ], - "x-ms-routing-request-id": [ - "CHINAEAST:20200407T085414Z:a6b5b77b-ff2a-4329-afe9-f630b11199df" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 07 Apr 2020 08:54:13 GMT" - ], - "Content-Length": [ - "388" - ], - "Content-Type": [ - "application/json; odata.metadata=minimal; odata.streaming=true" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"name\": \"cdn-billing-standard-bandwidth-avg\",\r\n \"id\": \"/subscriptions/b7f584b1-4c44-4a5c-a3c9-9f85d925d727/resourcegroups/cdnbillingskus/providers/Microsoft.Cdn/profiles/cdn-billing-standard-bandwidth-avg\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"location\": \"ChinaNorth\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AvgBandWidth_ChinaCdn\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceState\": \"Active\"\r\n }\r\n}", - "StatusCode": 200 - } - ], - "Names": {}, - "Variables": { - "SubscriptionId": "b7f584b1-4c44-4a5c-a3c9-9f85d925d727" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestAkamaiCustomDomainHttpsWithRunningEndpoint.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestAkamaiCustomDomainHttpsWithRunningEndpoint.json deleted file mode 100644 index 22733f539f76..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestAkamaiCustomDomainHttpsWithRunningEndpoint.json +++ /dev/null @@ -1,2052 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODA1OT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "058f2c06-6754-4f6b-ba70-6abc0c45ed08" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "f75604c9-b646-44c2-97e7-f682a8bb84da" - ], - "x-ms-correlation-request-id": [ - "f75604c9-b646-44c2-97e7-f682a8bb84da" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004610Z:f75604c9-b646-44c2-97e7-f682a8bb84da" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:46:10 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8059\",\r\n \"name\": \"ps8059\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "807c196b-4af0-4ec4-8382-0134bc0a6872" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "70832431-381c-404d-a2d9-1389fdc9b029" - ], - "x-ms-client-request-id": [ - "807c196b-4af0-4ec4-8382-0134bc0a6872" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "ba575e25-f829-433b-9cec-63cf010eba5e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004611Z:ba575e25-f829-433b-9cec-63cf010eba5e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:46:11 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODA1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg2NDg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"location\": \"EastUS\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "807c196b-4af0-4ec4-8382-0134bc0a6872" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "141" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "36f3fe2f-1031-4e19-9ca7-5ecb30abd8b0" - ], - "x-ms-client-request-id": [ - "807c196b-4af0-4ec4-8382-0134bc0a6872" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/operationresults/6df0db8b-4282-4086-9572-2bbd2b27cc3e?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "bb5af440-eb3f-4287-b412-ba04b1a75d6c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004615Z:bb5af440-eb3f-4287-b412-ba04b1a75d6c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:46:14 GMT" - ], - "Content-Length": [ - "350" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps8648\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/operationresults/6df0db8b-4282-4086-9572-2bbd2b27cc3e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODA1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzZkZjBkYjhiLTQyODItNDA4Ni05NTcyLTJiYmQyYjI3Y2MzZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "807c196b-4af0-4ec4-8382-0134bc0a6872" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "dd2cb01c-71ef-48e3-ba8d-f8032c9966fc" - ], - "x-ms-client-request-id": [ - "807c196b-4af0-4ec4-8382-0134bc0a6872" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "d80c7854-55a0-4e6e-8230-7039866d592a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004625Z:d80c7854-55a0-4e6e-8230-7039866d592a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:46:24 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODA1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg2NDg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "807c196b-4af0-4ec4-8382-0134bc0a6872" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4dc44690-3ce2-4bf8-9687-8f8a29ce00e6" - ], - "x-ms-client-request-id": [ - "807c196b-4af0-4ec4-8382-0134bc0a6872" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "8beae75d-011a-4fe9-97a2-c99d953607a9" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004625Z:8beae75d-011a-4fe9-97a2-c99d953607a9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:46:24 GMT" - ], - "Content-Length": [ - "349" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps8648\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODA1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg2NDg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bcc3ac6d-bf4d-4067-9b93-00043d93f7ee" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a9a30f71-46a4-4a42-a405-364ea9c92114" - ], - "x-ms-client-request-id": [ - "bcc3ac6d-bf4d-4067-9b93-00043d93f7ee" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "47" - ], - "x-ms-correlation-request-id": [ - "a6abc9f8-9f5c-480a-b552-b422b9df67ea" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004715Z:a6abc9f8-9f5c-480a-b552-b422b9df67ea" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:47:15 GMT" - ], - "Content-Length": [ - "349" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps8648\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"testAkamaiEP\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4c0de356-056a-4cce-8b23-6ffc30fe4dbe" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "77" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "43c3da04-5fda-4454-9bcf-f1c12c8649bb" - ], - "x-ms-client-request-id": [ - "4c0de356-056a-4cce-8b23-6ffc30fe4dbe" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "835470f0-e6f5-4df1-b073-cc70235ec856" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004626Z:835470f0-e6f5-4df1-b073-cc70235ec856" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:46:25 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648/endpoints/testAkamaiEP?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODA1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg2NDgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"origins\": [\r\n {\r\n \"name\": \"ps8039\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\"\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4c0de356-056a-4cce-8b23-6ffc30fe4dbe" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "202" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8e43fd13-dabc-4a2a-824b-9a41a5bf36fc" - ], - "x-ms-client-request-id": [ - "4c0de356-056a-4cce-8b23-6ffc30fe4dbe" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/operationresults/03061aca-7290-44f3-8218-39e57bf7a5a2?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "bbd1246b-644d-4d4f-b0e1-c4e409a3ff98" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004630Z:bbd1246b-644d-4d4f-b0e1-c4e409a3ff98" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:46:29 GMT" - ], - "Content-Length": [ - "1068" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648/endpoints/testAkamaiEP\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"testAkamaiEP\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"testAkamaiEP.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps8039\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/operationresults/03061aca-7290-44f3-8218-39e57bf7a5a2?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODA1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzAzMDYxYWNhLTcyOTAtNDRmMy04MjE4LTM5ZTU3YmY3YTVhMj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4c0de356-056a-4cce-8b23-6ffc30fe4dbe" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "96953f00-556f-48f8-85ed-424e2e8b9539" - ], - "x-ms-client-request-id": [ - "4c0de356-056a-4cce-8b23-6ffc30fe4dbe" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "07af57be-6d10-4272-a9b2-f9f946f679ce" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004640Z:07af57be-6d10-4272-a9b2-f9f946f679ce" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:46:40 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/operationresults/03061aca-7290-44f3-8218-39e57bf7a5a2?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODA1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzAzMDYxYWNhLTcyOTAtNDRmMy04MjE4LTM5ZTU3YmY3YTVhMj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4c0de356-056a-4cce-8b23-6ffc30fe4dbe" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c0159efa-5c6d-40cc-ad18-9c9401c331b2" - ], - "x-ms-client-request-id": [ - "4c0de356-056a-4cce-8b23-6ffc30fe4dbe" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "cbce1a72-beff-4e3d-b614-427b6e8a22ac" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004651Z:cbce1a72-beff-4e3d-b614-427b6e8a22ac" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:46:51 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648/endpoints/testAkamaiEP?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODA1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg2NDgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4c0de356-056a-4cce-8b23-6ffc30fe4dbe" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4b9b6ec4-3c92-4764-84f1-66bb271150b0" - ], - "x-ms-client-request-id": [ - "4c0de356-056a-4cce-8b23-6ffc30fe4dbe" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "b79a44c7-7d68-4e99-bd46-df40caaa02f3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004651Z:b79a44c7-7d68-4e99-bd46-df40caaa02f3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:46:51 GMT" - ], - "Content-Length": [ - "1066" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648/endpoints/testAkamaiEP\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"testAkamaiEP\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"testAkamaiEP.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps8039\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648/endpoints/testAkamaiEP/validateCustomDomain?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODA1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg2NDgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC92YWxpZGF0ZUN1c3RvbURvbWFpbj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"hostName\": \"testAkamai.dustydog.us\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "dd1876d0-d0fa-4de1-8bd0-a1e0c5003c05" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "44" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f3c0cd39-02cc-4a0b-9708-cd525b7110aa" - ], - "x-ms-client-request-id": [ - "dd1876d0-d0fa-4de1-8bd0-a1e0c5003c05" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "482e9c21-95b5-497d-86a2-603ca9a8005d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004651Z:482e9c21-95b5-497d-86a2-603ca9a8005d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:46:51 GMT" - ], - "Content-Length": [ - "59" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"customDomainValidated\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648/endpoints/testAkamaiEP/customDomains?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODA1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg2NDgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f9d9d43e-20ec-44d0-b3d7-ded3ac4b0973" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "155e756e-ce4b-4a2b-98da-5aaf71ecd7ec" - ], - "x-ms-client-request-id": [ - "f9d9d43e-20ec-44d0-b3d7-ded3ac4b0973" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "47a15550-9b0e-4a17-ba40-fe26387757fd" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004652Z:47a15550-9b0e-4a17-ba40-fe26387757fd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:46:52 GMT" - ], - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648/endpoints/testAkamaiEP/customDomains?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODA1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg2NDgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bcc3ac6d-bf4d-4067-9b93-00043d93f7ee" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3319c081-fca7-48b6-8014-08e2e69cd205" - ], - "x-ms-client-request-id": [ - "bcc3ac6d-bf4d-4067-9b93-00043d93f7ee" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "42d27ee2-c636-45a6-b7cf-ced247cddc43" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004715Z:42d27ee2-c636-45a6-b7cf-ced247cddc43" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:47:15 GMT" - ], - "Content-Length": [ - "492" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648/endpoints/testAkamaiEP/customdomains/ps9135\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps9135\",\r\n \"properties\": {\r\n \"hostName\": \"testakamai.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648/endpoints/testAkamaiEP/customDomains/ps9135?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODA1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg2NDgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zL3BzOTEzNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"hostName\": \"testAkamai.dustydog.us\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f9d9d43e-20ec-44d0-b3d7-ded3ac4b0973" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "70" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c34ecc58-1664-4c98-980b-418822197157" - ], - "x-ms-client-request-id": [ - "f9d9d43e-20ec-44d0-b3d7-ded3ac4b0973" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/operationresults/91896e5d-0067-4c76-840d-9606372dd5b7?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "c9e76e90-8045-44d4-aa87-ae372c4fbfcb" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004654Z:c9e76e90-8045-44d4-aa87-ae372c4fbfcb" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:46:54 GMT" - ], - "Content-Length": [ - "481" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648/endpoints/testAkamaiEP/customdomains/ps9135\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps9135\",\r\n \"properties\": {\r\n \"hostName\": \"testakamai.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Creating\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/operationresults/91896e5d-0067-4c76-840d-9606372dd5b7?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODA1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzkxODk2ZTVkLTAwNjctNGM3Ni04NDBkLTk2MDYzNzJkZDViNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f9d9d43e-20ec-44d0-b3d7-ded3ac4b0973" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "936c8bf9-e765-42c4-a310-af7454110cf8" - ], - "x-ms-client-request-id": [ - "f9d9d43e-20ec-44d0-b3d7-ded3ac4b0973" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "b6562b90-88ad-45e3-8f7d-ec22c74c3816" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004704Z:b6562b90-88ad-45e3-8f7d-ec22c74c3816" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:47:04 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/operationresults/91896e5d-0067-4c76-840d-9606372dd5b7?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODA1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzkxODk2ZTVkLTAwNjctNGM3Ni04NDBkLTk2MDYzNzJkZDViNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f9d9d43e-20ec-44d0-b3d7-ded3ac4b0973" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d798a847-6f88-42e7-97c3-46a508a356a2" - ], - "x-ms-client-request-id": [ - "f9d9d43e-20ec-44d0-b3d7-ded3ac4b0973" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "463aa076-16a3-47a2-803f-887c92deae54" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004714Z:463aa076-16a3-47a2-803f-887c92deae54" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:47:14 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648/endpoints/testAkamaiEP/customDomains/ps9135?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODA1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg2NDgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zL3BzOTEzNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f9d9d43e-20ec-44d0-b3d7-ded3ac4b0973" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7e611e2d-1f98-4336-b750-2d15ba761735" - ], - "x-ms-client-request-id": [ - "f9d9d43e-20ec-44d0-b3d7-ded3ac4b0973" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "a4845171-87e4-4b20-bc6b-5662026d4869" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004715Z:a4845171-87e4-4b20-bc6b-5662026d4869" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:47:14 GMT" - ], - "Content-Length": [ - "480" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648/endpoints/testAkamaiEP/customdomains/ps9135\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps9135\",\r\n \"properties\": {\r\n \"hostName\": \"testakamai.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648/endpoints/testAkamaiEP/customDomains/ps9135?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODA1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg2NDgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zL3BzOTEzNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c1daf41b-bd9f-4edc-b48d-56d1a938d1d6" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ea5ebb92-e689-4eea-ae73-9fca4906b06c" - ], - "x-ms-client-request-id": [ - "c1daf41b-bd9f-4edc-b48d-56d1a938d1d6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-correlation-request-id": [ - "a2105ec2-d66a-4f4c-89bb-4472ac1ce336" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004719Z:a2105ec2-d66a-4f4c-89bb-4472ac1ce336" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:47:19 GMT" - ], - "Content-Length": [ - "738" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648/endpoints/testAkamaiEP/customdomains/ps9135\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps9135\",\r\n \"properties\": {\r\n \"hostName\": \"testakamai.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Enabling\",\r\n \"customHttpsProvisioningSubstate\": \"SubmittingDomainControlValidationRequest\",\r\n \"customHttpsParameters\": {\r\n \"certificateSource\": \"Cdn\",\r\n \"certificateSourceParameters\": {\r\n \"certificateType\": \"Shared\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.CdnCertificateSourceParameters\"\r\n },\r\n \"protocolType\": \"ServerNameIndication\",\r\n \"minimumTlsVersion\": \"None\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648/endpoints/testAkamaiEP/customDomains/ps9135/enableCustomHttps?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODA1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg2NDgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zL3BzOTEzNS9lbmFibGVDdXN0b21IdHRwcz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"certificateSource\": \"Cdn\",\r\n \"certificateSourceParameters\": {\r\n \"certificateType\": \"Shared\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.CdnCertificateSourceParameters\"\r\n },\r\n \"protocolType\": \"ServerNameIndication\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bcc3ac6d-bf4d-4067-9b93-00043d93f7ee" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "234" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/operationresults/886eba0d-fc8c-4b03-bdae-a86594cca7f7/profileresults/ps8648/endpointresults/testAkamaiEP/customdomainresults/ps9135?api-version=2020-09-01" - ], - "Retry-After": [ - "120" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "88442988-07a9-4a6d-ab1f-825fa8102f79" - ], - "x-ms-client-request-id": [ - "bcc3ac6d-bf4d-4067-9b93-00043d93f7ee" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/operationresults/886eba0d-fc8c-4b03-bdae-a86594cca7f7?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "d79c71b7-2350-4e06-b713-9e6d74a1338f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004718Z:d79c71b7-2350-4e06-b713-9e6d74a1338f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:47:18 GMT" - ], - "Content-Length": [ - "738" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059/providers/Microsoft.Cdn/profiles/ps8648/endpoints/testAkamaiEP/customdomains/ps9135\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps9135\",\r\n \"properties\": {\r\n \"hostName\": \"testakamai.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Enabling\",\r\n \"customHttpsProvisioningSubstate\": \"SubmittingDomainControlValidationRequest\",\r\n \"customHttpsParameters\": {\r\n \"certificateSource\": \"Cdn\",\r\n \"certificateSourceParameters\": {\r\n \"certificateType\": \"Shared\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.CdnCertificateSourceParameters\"\r\n },\r\n \"protocolType\": \"ServerNameIndication\",\r\n \"minimumTlsVersion\": \"None\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8059?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODA1OT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f91d05a4-e904-4ed4-b918-794e60ea2343" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" - ], - "x-ms-request-id": [ - "324cd4ec-c68f-43e9-a2de-dd0e9fa4079d" - ], - "x-ms-correlation-request-id": [ - "324cd4ec-c68f-43e9-a2de-dd0e9fa4079d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004720Z:324cd4ec-c68f-43e9-a2de-dd0e9fa4079d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:47:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnd05Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "4f0f6c00-5212-4ea8-8a76-c95a5067aa5c" - ], - "x-ms-correlation-request-id": [ - "4f0f6c00-5212-4ea8-8a76-c95a5067aa5c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004735Z:4f0f6c00-5212-4ea8-8a76-c95a5067aa5c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:47:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnd05Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "56b66132-4eef-442c-808d-01035ef63149" - ], - "x-ms-correlation-request-id": [ - "56b66132-4eef-442c-808d-01035ef63149" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004750Z:56b66132-4eef-442c-808d-01035ef63149" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:47:50 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnd05Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "5e9993fd-2b43-462e-8a22-932ba5acfba3" - ], - "x-ms-correlation-request-id": [ - "5e9993fd-2b43-462e-8a22-932ba5acfba3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004805Z:5e9993fd-2b43-462e-8a22-932ba5acfba3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:48:05 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnd05Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "be642cc8-08d2-4fed-b7de-35d9a1441d7b" - ], - "x-ms-correlation-request-id": [ - "be642cc8-08d2-4fed-b7de-35d9a1441d7b" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004821Z:be642cc8-08d2-4fed-b7de-35d9a1441d7b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:48:21 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnd05Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "16ca38a2-a83b-4217-a899-29387a53cebe" - ], - "x-ms-correlation-request-id": [ - "16ca38a2-a83b-4217-a899-29387a53cebe" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004836Z:16ca38a2-a83b-4217-a899-29387a53cebe" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:48:35 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnd05Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "c3b03957-cd60-413b-8315-b71a939bf069" - ], - "x-ms-correlation-request-id": [ - "c3b03957-cd60-413b-8315-b71a939bf069" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004851Z:c3b03957-cd60-413b-8315-b71a939bf069" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:48:50 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnd05Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "6971ad33-eaa5-474b-853e-a33d7177156a" - ], - "x-ms-correlation-request-id": [ - "6971ad33-eaa5-474b-853e-a33d7177156a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004906Z:6971ad33-eaa5-474b-853e-a33d7177156a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:49:05 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnd05Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "a29e5026-f248-4618-ab8e-43c2ae9f2fe7" - ], - "x-ms-correlation-request-id": [ - "a29e5026-f248-4618-ab8e-43c2ae9f2fe7" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004921Z:a29e5026-f248-4618-ab8e-43c2ae9f2fe7" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:49:21 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnd05Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "36a81dcb-e132-4ef7-86a5-1fa7707a4b41" - ], - "x-ms-correlation-request-id": [ - "36a81dcb-e132-4ef7-86a5-1fa7707a4b41" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004936Z:36a81dcb-e132-4ef7-86a5-1fa7707a4b41" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:49:36 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnd05Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "8fea5c69-5047-413b-9a81-81cf03693ea6" - ], - "x-ms-correlation-request-id": [ - "8fea5c69-5047-413b-9a81-81cf03693ea6" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004951Z:8fea5c69-5047-413b-9a81-81cf03693ea6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:49:50 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgwNTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnd05Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "3f4b603d-d526-42de-907f-7f106983ceeb" - ], - "x-ms-correlation-request-id": [ - "3f4b603d-d526-42de-907f-7f106983ceeb" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T004951Z:3f4b603d-d526-42de-907f-7f106983ceeb" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:49:51 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-AkamaiCustomDomainEnableHttpsWithRunningEndpoint": [ - "ps9135", - "ps8648", - "ps8059", - "ps8039" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestCustomDomainEnableDisableWithRunningEndpoint.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestCustomDomainEnableDisableWithRunningEndpoint.json deleted file mode 100644 index 1adb867b1d90..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestCustomDomainEnableDisableWithRunningEndpoint.json +++ /dev/null @@ -1,2502 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTgyNj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c1e5a57b-72e7-4f58-b409-2f5ea9b2e97f" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "7d3b53c0-dba6-4d29-9a7e-9df93718ecde" - ], - "x-ms-correlation-request-id": [ - "7d3b53c0-dba6-4d29-9a7e-9df93718ecde" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013012Z:7d3b53c0-dba6-4d29-9a7e-9df93718ecde" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:30:12 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5826\",\r\n \"name\": \"ps5826\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "eb94b5e4-eb73-4e41-bc1a-5ad820e8efe8" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "13941d32-5855-4615-b410-4c174fc562de" - ], - "x-ms-client-request-id": [ - "eb94b5e4-eb73-4e41-bc1a-5ad820e8efe8" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "55a9a223-1ca4-42de-b162-91f3fbcab794" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013013Z:55a9a223-1ca4-42de-b162-91f3fbcab794" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:30:13 GMT" - ], - "Content-Length": [ - "35377" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczcyNDY/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"location\": \"EastUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "eb94b5e4-eb73-4e41-bc1a-5ad820e8efe8" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "144" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f99d8116-2dd9-4173-9ee2-7ea89f818867" - ], - "x-ms-client-request-id": [ - "eb94b5e4-eb73-4e41-bc1a-5ad820e8efe8" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/operationresults/0ba05c08-6c92-4a2a-bc0d-80a8ae927db9?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "9d34b291-24ba-425f-9d31-db3f301d4d2f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013016Z:9d34b291-24ba-425f-9d31-db3f301d4d2f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:30:16 GMT" - ], - "Content-Length": [ - "353" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps7246\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/operationresults/0ba05c08-6c92-4a2a-bc0d-80a8ae927db9?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzBiYTA1YzA4LTZjOTItNGEyYS1iYzBkLTgwYThhZTkyN2RiOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "eb94b5e4-eb73-4e41-bc1a-5ad820e8efe8" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "cc9ee697-5eec-40ec-a0b0-99c0152a9410" - ], - "x-ms-client-request-id": [ - "eb94b5e4-eb73-4e41-bc1a-5ad820e8efe8" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-correlation-request-id": [ - "6a1d70eb-bb63-4a54-bb87-68df711e06e7" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013027Z:6a1d70eb-bb63-4a54-bb87-68df711e06e7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:30:27 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczcyNDY/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "eb94b5e4-eb73-4e41-bc1a-5ad820e8efe8" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "35776210-006a-477a-b256-9e51d49894fc" - ], - "x-ms-client-request-id": [ - "eb94b5e4-eb73-4e41-bc1a-5ad820e8efe8" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "fc0e1646-e741-47e5-998d-79deb7901787" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013027Z:fc0e1646-e741-47e5-998d-79deb7901787" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:30:27 GMT" - ], - "Content-Length": [ - "352" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps7246\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczcyNDY/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "cfcc817c-19e2-40f2-b97c-bafce879a145" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a30d68c0-e696-46f8-b578-89a9f8be8e2f" - ], - "x-ms-client-request-id": [ - "cfcc817c-19e2-40f2-b97c-bafce879a145" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "47" - ], - "x-ms-correlation-request-id": [ - "b64261d8-759e-49a8-97d0-d2bd80a10e2e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013153Z:b64261d8-759e-49a8-97d0-d2bd80a10e2e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:31:52 GMT" - ], - "Content-Length": [ - "352" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps7246\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"cdn-ps-test-msft\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e0c637c8-d628-4c95-9c4b-66e9de28410c" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "81" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6a7e42bd-9f74-4cbe-b591-8603b5b4cbd5" - ], - "x-ms-client-request-id": [ - "e0c637c8-d628-4c95-9c4b-66e9de28410c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "f88b0d9d-b523-4242-8429-3468e3896255" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013028Z:f88b0d9d-b523-4242-8429-3468e3896255" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:30:28 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczcyNDYvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQ/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7594\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\"\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e0c637c8-d628-4c95-9c4b-66e9de28410c" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "202" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "bccf3ef9-057e-42b9-a037-a52f16eb03a5" - ], - "x-ms-client-request-id": [ - "e0c637c8-d628-4c95-9c4b-66e9de28410c" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/operationresults/619b66aa-b55b-4652-a63a-81b2996a54b5?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "34e7c133-7ac4-4f1e-a787-4cc55ae1c70a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013035Z:34e7c133-7ac4-4f1e-a787-4cc55ae1c70a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:30:35 GMT" - ], - "Content-Length": [ - "1077" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"cdn-ps-test-msft\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"cdn-ps-test-msft.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7594\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/operationresults/619b66aa-b55b-4652-a63a-81b2996a54b5?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzYxOWI2NmFhLWI1NWItNDY1Mi1hNjNhLTgxYjI5OTZhNTRiNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e0c637c8-d628-4c95-9c4b-66e9de28410c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "05a2623e-12b1-4b18-bfae-10c03375d425" - ], - "x-ms-client-request-id": [ - "e0c637c8-d628-4c95-9c4b-66e9de28410c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-correlation-request-id": [ - "fc4c0550-dbee-4446-aa36-5ee49140514f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013045Z:fc4c0550-dbee-4446-aa36-5ee49140514f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:30:45 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/operationresults/619b66aa-b55b-4652-a63a-81b2996a54b5?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzYxOWI2NmFhLWI1NWItNDY1Mi1hNjNhLTgxYjI5OTZhNTRiNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e0c637c8-d628-4c95-9c4b-66e9de28410c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f585585e-7c72-4e0b-bd5e-5d1f4d31cc5a" - ], - "x-ms-client-request-id": [ - "e0c637c8-d628-4c95-9c4b-66e9de28410c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-correlation-request-id": [ - "4b0df771-3765-40d3-82cc-41047cf3c92f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013055Z:4b0df771-3765-40d3-82cc-41047cf3c92f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:30:55 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/operationresults/619b66aa-b55b-4652-a63a-81b2996a54b5?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzYxOWI2NmFhLWI1NWItNDY1Mi1hNjNhLTgxYjI5OTZhNTRiNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e0c637c8-d628-4c95-9c4b-66e9de28410c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "adb01b7d-b6eb-4455-bca3-24e75d17112d" - ], - "x-ms-client-request-id": [ - "e0c637c8-d628-4c95-9c4b-66e9de28410c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11986" - ], - "x-ms-correlation-request-id": [ - "2d91c43d-3d1f-489e-9a58-5a63e545cc91" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013105Z:2d91c43d-3d1f-489e-9a58-5a63e545cc91" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:31:05 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/operationresults/619b66aa-b55b-4652-a63a-81b2996a54b5?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzYxOWI2NmFhLWI1NWItNDY1Mi1hNjNhLTgxYjI5OTZhNTRiNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e0c637c8-d628-4c95-9c4b-66e9de28410c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8f555fa3-76d6-41a0-a4d9-51d663c6e379" - ], - "x-ms-client-request-id": [ - "e0c637c8-d628-4c95-9c4b-66e9de28410c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11985" - ], - "x-ms-correlation-request-id": [ - "2f5ed1fb-f8b2-4598-bce5-4591bd032faf" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013116Z:2f5ed1fb-f8b2-4598-bce5-4591bd032faf" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:31:15 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczcyNDYvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQ/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e0c637c8-d628-4c95-9c4b-66e9de28410c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ebc7da1a-1ac1-4e6c-8e3e-4df23b14393e" - ], - "x-ms-client-request-id": [ - "e0c637c8-d628-4c95-9c4b-66e9de28410c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "90876aea-77c4-4d15-a497-b97478835ae8" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013116Z:90876aea-77c4-4d15-a497-b97478835ae8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:31:15 GMT" - ], - "Content-Length": [ - "1075" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"cdn-ps-test-msft\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"cdn-ps-test-msft.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7594\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczcyNDYvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQ/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4fec08ec-c393-4c2a-9fcd-ffc359f52788" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d47dff3b-eff8-49f0-812b-9aa1a43921cb" - ], - "x-ms-client-request-id": [ - "4fec08ec-c393-4c2a-9fcd-ffc359f52788" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "1aa8fa13-3ae4-4ba4-87cb-469ce3d1ff44" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013116Z:1aa8fa13-3ae4-4ba4-87cb-469ce3d1ff44" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:31:16 GMT" - ], - "Content-Length": [ - "1075" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"cdn-ps-test-msft\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"cdn-ps-test-msft.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7594\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft/validateCustomDomain?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczcyNDYvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQvdmFsaWRhdGVDdXN0b21Eb21haW4/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"hostName\": \"a.cdn-ps-test-msft.azfdtest.xyz\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d5496e0a-53f8-460c-a14a-cf4e2639b8ea" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "53" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c9014ac2-2aa9-4c33-8bda-19bb6197629d" - ], - "x-ms-client-request-id": [ - "d5496e0a-53f8-460c-a14a-cf4e2639b8ea" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "026d108e-b6ac-4aef-88df-8ba20cb17bbf" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013117Z:026d108e-b6ac-4aef-88df-8ba20cb17bbf" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:31:17 GMT" - ], - "Content-Length": [ - "59" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"customDomainValidated\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft/validateCustomDomain?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczcyNDYvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQvdmFsaWRhdGVDdXN0b21Eb21haW4/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"hostName\": \"a.cdn-ps-test-msft.azfdtest.xyz\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "928be47c-3fd8-4e42-8111-1444576904c4" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "53" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7809879d-1428-44a6-a8ba-58c795ac4820" - ], - "x-ms-client-request-id": [ - "928be47c-3fd8-4e42-8111-1444576904c4" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "6a7e50a4-49a2-4199-80e9-aa149f0dd185" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013118Z:6a7e50a4-49a2-4199-80e9-aa149f0dd185" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:31:17 GMT" - ], - "Content-Length": [ - "59" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"customDomainValidated\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft/customDomains?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczcyNDYvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQvY3VzdG9tRG9tYWlucz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "47b55d98-e604-4d3b-a60b-721e0839428d" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a0a54b05-0383-4164-bacf-f5e8f255ab44" - ], - "x-ms-client-request-id": [ - "47b55d98-e604-4d3b-a60b-721e0839428d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11984" - ], - "x-ms-correlation-request-id": [ - "d12cf6b8-8d3d-41ed-a219-c6d4820dedc1" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013118Z:d12cf6b8-8d3d-41ed-a219-c6d4820dedc1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:31:18 GMT" - ], - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft/customDomains?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczcyNDYvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQvY3VzdG9tRG9tYWlucz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "cfcc817c-19e2-40f2-b97c-bafce879a145" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "062e0c13-1bfe-435d-8a25-3853468821eb" - ], - "x-ms-client-request-id": [ - "cfcc817c-19e2-40f2-b97c-bafce879a145" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11978" - ], - "x-ms-correlation-request-id": [ - "26921d19-6e1c-4e41-bcb0-7fb33c4bffd3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013153Z:26921d19-6e1c-4e41-bcb0-7fb33c4bffd3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:31:52 GMT" - ], - "Content-Length": [ - "505" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft/customdomains/ps7065\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps7065\",\r\n \"properties\": {\r\n \"hostName\": \"a.cdn-ps-test-msft.azfdtest.xyz\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft/customDomains/ps7065?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczcyNDYvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQvY3VzdG9tRG9tYWlucy9wczcwNjU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"hostName\": \"a.cdn-ps-test-msft.azfdtest.xyz\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "47b55d98-e604-4d3b-a60b-721e0839428d" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "79" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6de7bacc-adcc-47a9-996d-70551e14a2dd" - ], - "x-ms-client-request-id": [ - "47b55d98-e604-4d3b-a60b-721e0839428d" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/operationresults/e0d50d5c-5ebe-491f-b9ba-e39f461a62e5?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "efa9468e-dcff-4772-9e5a-1bd767d1dfdb" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013120Z:efa9468e-dcff-4772-9e5a-1bd767d1dfdb" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:31:20 GMT" - ], - "Content-Length": [ - "494" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft/customdomains/ps7065\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps7065\",\r\n \"properties\": {\r\n \"hostName\": \"a.cdn-ps-test-msft.azfdtest.xyz\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Creating\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/operationresults/e0d50d5c-5ebe-491f-b9ba-e39f461a62e5?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2UwZDUwZDVjLTVlYmUtNDkxZi1iOWJhLWUzOWY0NjFhNjJlNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "47b55d98-e604-4d3b-a60b-721e0839428d" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1cf369d6-a132-4118-ac14-478850969416" - ], - "x-ms-client-request-id": [ - "47b55d98-e604-4d3b-a60b-721e0839428d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11983" - ], - "x-ms-correlation-request-id": [ - "d04099f6-aea6-4257-a787-46bef31d8e00" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013131Z:d04099f6-aea6-4257-a787-46bef31d8e00" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:31:30 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/operationresults/e0d50d5c-5ebe-491f-b9ba-e39f461a62e5?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2UwZDUwZDVjLTVlYmUtNDkxZi1iOWJhLWUzOWY0NjFhNjJlNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "47b55d98-e604-4d3b-a60b-721e0839428d" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "91c791a8-c438-4af4-84a6-9b6dfbb0786d" - ], - "x-ms-client-request-id": [ - "47b55d98-e604-4d3b-a60b-721e0839428d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11982" - ], - "x-ms-correlation-request-id": [ - "f660e780-5254-4753-854b-8558352a182c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013141Z:f660e780-5254-4753-854b-8558352a182c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:31:40 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/operationresults/e0d50d5c-5ebe-491f-b9ba-e39f461a62e5?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2UwZDUwZDVjLTVlYmUtNDkxZi1iOWJhLWUzOWY0NjFhNjJlNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "47b55d98-e604-4d3b-a60b-721e0839428d" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "154c50f3-6754-4327-8808-b2fb3f463db6" - ], - "x-ms-client-request-id": [ - "47b55d98-e604-4d3b-a60b-721e0839428d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11981" - ], - "x-ms-correlation-request-id": [ - "fcff5e76-1666-4068-a344-f0535584afc6" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013151Z:fcff5e76-1666-4068-a344-f0535584afc6" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:31:50 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft/customDomains/ps7065?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczcyNDYvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQvY3VzdG9tRG9tYWlucy9wczcwNjU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "47b55d98-e604-4d3b-a60b-721e0839428d" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "18ace894-6d60-4631-9de0-293999fd4c19" - ], - "x-ms-client-request-id": [ - "47b55d98-e604-4d3b-a60b-721e0839428d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11980" - ], - "x-ms-correlation-request-id": [ - "7c6a2daf-c639-4e23-8245-d2a547ec2620" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013152Z:7c6a2daf-c639-4e23-8245-d2a547ec2620" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:31:51 GMT" - ], - "Content-Length": [ - "493" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft/customdomains/ps7065\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps7065\",\r\n \"properties\": {\r\n \"hostName\": \"a.cdn-ps-test-msft.azfdtest.xyz\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft/customDomains/ps7065?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczcyNDYvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQvY3VzdG9tRG9tYWlucy9wczcwNjU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bd86a8ba-0b97-4992-ba8c-12c224a4b084" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e0cd3a67-3598-4605-b3c4-abde9274ebcf" - ], - "x-ms-client-request-id": [ - "bd86a8ba-0b97-4992-ba8c-12c224a4b084" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11979" - ], - "x-ms-correlation-request-id": [ - "d426ba5e-4b7c-4a3a-8c5d-7d4d9756e98e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013152Z:d426ba5e-4b7c-4a3a-8c5d-7d4d9756e98e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:31:51 GMT" - ], - "Content-Length": [ - "493" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft/customdomains/ps7065\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps7065\",\r\n \"properties\": {\r\n \"hostName\": \"a.cdn-ps-test-msft.azfdtest.xyz\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft/customDomains/ps7065?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczcyNDYvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQvY3VzdG9tRG9tYWlucy9wczcwNjU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "430d946e-26f6-4d10-ae1d-0bfd3873ebfa" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b09b030c-c74a-4010-ae55-0b65582b4b04" - ], - "x-ms-client-request-id": [ - "430d946e-26f6-4d10-ae1d-0bfd3873ebfa" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11977" - ], - "x-ms-correlation-request-id": [ - "e4beaf39-a7c1-4887-b9cb-76a178ef4915" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013157Z:e4beaf39-a7c1-4887-b9cb-76a178ef4915" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:31:56 GMT" - ], - "Content-Length": [ - "755" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft/customdomains/ps7065\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps7065\",\r\n \"properties\": {\r\n \"hostName\": \"a.cdn-ps-test-msft.azfdtest.xyz\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Enabling\",\r\n \"customHttpsProvisioningSubstate\": \"SubmittingDomainControlValidationRequest\",\r\n \"customHttpsParameters\": {\r\n \"certificateSource\": \"Cdn\",\r\n \"certificateSourceParameters\": {\r\n \"certificateType\": \"Dedicated\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.CdnCertificateSourceParameters\"\r\n },\r\n \"protocolType\": \"ServerNameIndication\",\r\n \"minimumTlsVersion\": \"TLS12\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft/customDomains/ps7065/enableCustomHttps?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTgyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczcyNDYvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQvY3VzdG9tRG9tYWlucy9wczcwNjUvZW5hYmxlQ3VzdG9tSHR0cHM/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"certificateSource\": \"Cdn\",\r\n \"certificateSourceParameters\": {\r\n \"certificateType\": \"Dedicated\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.CdnCertificateSourceParameters\"\r\n },\r\n \"protocolType\": \"ServerNameIndication\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "cfcc817c-19e2-40f2-b97c-bafce879a145" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "237" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/operationresults/c5761dd1-00ee-4b1c-a6c0-6343c81629da/profileresults/ps7246/endpointresults/cdn-ps-test-msft/customdomainresults/ps7065?api-version=2020-09-01" - ], - "Retry-After": [ - "120" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f88282f0-08fa-45b0-be9e-ea1d23812073" - ], - "x-ms-client-request-id": [ - "cfcc817c-19e2-40f2-b97c-bafce879a145" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/operationresults/c5761dd1-00ee-4b1c-a6c0-6343c81629da?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], - "x-ms-correlation-request-id": [ - "796b22e6-5b7b-4346-9702-748b08a223d5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013156Z:796b22e6-5b7b-4346-9702-748b08a223d5" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:31:55 GMT" - ], - "Content-Length": [ - "755" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826/providers/Microsoft.Cdn/profiles/ps7246/endpoints/cdn-ps-test-msft/customdomains/ps7065\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps7065\",\r\n \"properties\": {\r\n \"hostName\": \"a.cdn-ps-test-msft.azfdtest.xyz\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Enabling\",\r\n \"customHttpsProvisioningSubstate\": \"SubmittingDomainControlValidationRequest\",\r\n \"customHttpsParameters\": {\r\n \"certificateSource\": \"Cdn\",\r\n \"certificateSourceParameters\": {\r\n \"certificateType\": \"Dedicated\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.CdnCertificateSourceParameters\"\r\n },\r\n \"protocolType\": \"ServerNameIndication\",\r\n \"minimumTlsVersion\": \"TLS12\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps5826?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTgyNj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5221b579-bd0a-46a0-a1a3-ad529b967af1" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "a54c49f6-bb52-4e3d-8520-71cf5ff263a9" - ], - "x-ms-correlation-request-id": [ - "a54c49f6-bb52-4e3d-8520-71cf5ff263a9" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013158Z:a54c49f6-bb52-4e3d-8520-71cf5ff263a9" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:31:57 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVNE1qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "8ad26e5b-f34c-4a9d-990c-83885ea572da" - ], - "x-ms-correlation-request-id": [ - "8ad26e5b-f34c-4a9d-990c-83885ea572da" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013213Z:8ad26e5b-f34c-4a9d-990c-83885ea572da" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:32:12 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVNE1qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "29d8dc10-dcc5-41c5-be2b-0dec13013c44" - ], - "x-ms-correlation-request-id": [ - "29d8dc10-dcc5-41c5-be2b-0dec13013c44" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013228Z:29d8dc10-dcc5-41c5-be2b-0dec13013c44" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:32:27 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVNE1qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "32115108-767c-4d3c-93a1-d92ab528722d" - ], - "x-ms-correlation-request-id": [ - "32115108-767c-4d3c-93a1-d92ab528722d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013243Z:32115108-767c-4d3c-93a1-d92ab528722d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:32:42 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVNE1qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "57971563-0c22-4817-aa92-5ae678788661" - ], - "x-ms-correlation-request-id": [ - "57971563-0c22-4817-aa92-5ae678788661" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013258Z:57971563-0c22-4817-aa92-5ae678788661" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:32:58 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVNE1qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "7f787ca5-4401-4a07-9f3e-682d474ad9e6" - ], - "x-ms-correlation-request-id": [ - "7f787ca5-4401-4a07-9f3e-682d474ad9e6" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013313Z:7f787ca5-4401-4a07-9f3e-682d474ad9e6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:33:13 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVNE1qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "c2af1cd3-2cf6-40ef-88a7-e2cc0f28af80" - ], - "x-ms-correlation-request-id": [ - "c2af1cd3-2cf6-40ef-88a7-e2cc0f28af80" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013328Z:c2af1cd3-2cf6-40ef-88a7-e2cc0f28af80" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:33:28 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVNE1qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "f293e8dc-9955-48bc-b9be-4acb32b7fa85" - ], - "x-ms-correlation-request-id": [ - "f293e8dc-9955-48bc-b9be-4acb32b7fa85" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013343Z:f293e8dc-9955-48bc-b9be-4acb32b7fa85" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:33:43 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVNE1qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "9d78ad6d-f263-48b6-baa5-3b3f338f5c45" - ], - "x-ms-correlation-request-id": [ - "9d78ad6d-f263-48b6-baa5-3b3f338f5c45" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013359Z:9d78ad6d-f263-48b6-baa5-3b3f338f5c45" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:33:58 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVNE1qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "1643adff-29a9-4e21-af12-dbe0e2d8b202" - ], - "x-ms-correlation-request-id": [ - "1643adff-29a9-4e21-af12-dbe0e2d8b202" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013414Z:1643adff-29a9-4e21-af12-dbe0e2d8b202" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:34:13 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVNE1qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "39f23c61-a06f-4263-a507-d0667d783442" - ], - "x-ms-correlation-request-id": [ - "39f23c61-a06f-4263-a507-d0667d783442" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013429Z:39f23c61-a06f-4263-a507-d0667d783442" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:34:29 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVNE1qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "5544d153-af49-4d33-8c37-459eed0aea0a" - ], - "x-ms-correlation-request-id": [ - "5544d153-af49-4d33-8c37-459eed0aea0a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013444Z:5544d153-af49-4d33-8c37-459eed0aea0a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:34:44 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU4MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVNE1qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.31" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "f1046a16-1fae-4e86-a28a-88784e0dcf0b" - ], - "x-ms-correlation-request-id": [ - "f1046a16-1fae-4e86-a28a-88784e0dcf0b" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210311T013444Z:f1046a16-1fae-4e86-a28a-88784e0dcf0b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Thu, 11 Mar 2021 01:34:44 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-CustomDomainEnableDisableWithRunningEndpoint": [ - "ps7065", - "ps7246", - "ps5826", - "ps7594" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestCustomDomainGetRemoveWithRunningEndpoint.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestCustomDomainGetRemoveWithRunningEndpoint.json deleted file mode 100644 index 2b5d7316c406..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestCustomDomainGetRemoveWithRunningEndpoint.json +++ /dev/null @@ -1,2559 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE4ND9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "150a68db-ba73-4e47-b085-cf770c1b4cc7" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], - "x-ms-request-id": [ - "5a1fb317-c8d4-4e7a-9c36-1aa01e3ee7e8" - ], - "x-ms-correlation-request-id": [ - "5a1fb317-c8d4-4e7a-9c36-1aa01e3ee7e8" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002447Z:5a1fb317-c8d4-4e7a-9c36-1aa01e3ee7e8" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:24:46 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2184\",\r\n \"name\": \"ps2184\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7702c026-f47b-4df1-91a9-d7cb53836ee1" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2ba5018f-baaa-4278-84b0-960bc96d0e78" - ], - "x-ms-client-request-id": [ - "7702c026-f47b-4df1-91a9-d7cb53836ee1" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "f046a02b-9dcd-4f0d-8d0c-c8e3774ce92a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002448Z:f046a02b-9dcd-4f0d-8d0c-c8e3774ce92a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:24:48 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY2MzU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"location\": \"EastUS\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7702c026-f47b-4df1-91a9-d7cb53836ee1" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "141" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "014d3c62-2f8e-4fe7-b8ab-e4497d5e8761" - ], - "x-ms-client-request-id": [ - "7702c026-f47b-4df1-91a9-d7cb53836ee1" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/operationresults/dc9baf93-45de-4671-b3f6-2366f7866efe?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "1c69818b-3075-4a97-88fb-e622cf3823df" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002452Z:1c69818b-3075-4a97-88fb-e622cf3823df" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:24:51 GMT" - ], - "Content-Length": [ - "350" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6635\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/operationresults/dc9baf93-45de-4671-b3f6-2366f7866efe?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2RjOWJhZjkzLTQ1ZGUtNDY3MS1iM2Y2LTIzNjZmNzg2NmVmZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7702c026-f47b-4df1-91a9-d7cb53836ee1" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f52aeb5d-ac54-4b96-ae96-633fa55cfa1b" - ], - "x-ms-client-request-id": [ - "7702c026-f47b-4df1-91a9-d7cb53836ee1" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "e3d302c2-21d5-4523-a352-64d9a79bc75b" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002502Z:e3d302c2-21d5-4523-a352-64d9a79bc75b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:01 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY2MzU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7702c026-f47b-4df1-91a9-d7cb53836ee1" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9a5fa6b1-b979-4ee8-bb89-6f040c2724a2" - ], - "x-ms-client-request-id": [ - "7702c026-f47b-4df1-91a9-d7cb53836ee1" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "0c3f6267-dd6a-4288-93ad-bd7ace0c12d9" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002502Z:0c3f6267-dd6a-4288-93ad-bd7ace0c12d9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:01 GMT" - ], - "Content-Length": [ - "349" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6635\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"testAkamaiEP\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f4e52724-ce54-4a80-a14f-be47ee634823" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "77" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "083ac0d4-1033-49b2-a208-7e55da45920e" - ], - "x-ms-client-request-id": [ - "f4e52724-ce54-4a80-a14f-be47ee634823" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "0c78ebe9-4d9d-4536-8194-5e2e04468712" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002503Z:0c78ebe9-4d9d-4536-8194-5e2e04468712" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:02 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY2MzUvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"origins\": [\r\n {\r\n \"name\": \"ps135\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\"\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f4e52724-ce54-4a80-a14f-be47ee634823" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "201" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "085346a2-ac37-4763-aed3-32a06a03e829" - ], - "x-ms-client-request-id": [ - "f4e52724-ce54-4a80-a14f-be47ee634823" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/operationresults/675e046a-2011-4703-b24a-9b978b6eb5b3?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "02e19f3b-e169-4a05-bc59-25705022768a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002508Z:02e19f3b-e169-4a05-bc59-25705022768a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:07 GMT" - ], - "Content-Length": [ - "1067" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"testAkamaiEP\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"testAkamaiEP.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps135\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/operationresults/675e046a-2011-4703-b24a-9b978b6eb5b3?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzY3NWUwNDZhLTIwMTEtNDcwMy1iMjRhLTliOTc4YjZlYjViMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f4e52724-ce54-4a80-a14f-be47ee634823" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1ba7e2c7-c36b-45a7-a3fb-65dadcafa673" - ], - "x-ms-client-request-id": [ - "f4e52724-ce54-4a80-a14f-be47ee634823" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "41bd54e3-f5c9-4620-9615-273f4daa4ce2" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002518Z:41bd54e3-f5c9-4620-9615-273f4daa4ce2" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:17 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/operationresults/675e046a-2011-4703-b24a-9b978b6eb5b3?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzY3NWUwNDZhLTIwMTEtNDcwMy1iMjRhLTliOTc4YjZlYjViMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f4e52724-ce54-4a80-a14f-be47ee634823" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3fb2f2d5-7133-4f98-acfa-54e87a2b4712" - ], - "x-ms-client-request-id": [ - "f4e52724-ce54-4a80-a14f-be47ee634823" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "675bccdb-69ec-496a-a3a2-a7030792f571" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002529Z:675bccdb-69ec-496a-a3a2-a7030792f571" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:28 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY2MzUvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f4e52724-ce54-4a80-a14f-be47ee634823" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ab5b7cc1-5e45-4ec0-acce-a7fc6a624361" - ], - "x-ms-client-request-id": [ - "f4e52724-ce54-4a80-a14f-be47ee634823" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "6cf06733-7e3e-48e9-9d1b-0b0ba862dadd" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002529Z:6cf06733-7e3e-48e9-9d1b-0b0ba862dadd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:28 GMT" - ], - "Content-Length": [ - "1065" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"testAkamaiEP\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"testAkamaiEP.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps135\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY2MzUvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8a091a79-af3c-423b-aa56-4798b866776e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3536c489-cde2-4941-ae74-608966624a7c" - ], - "x-ms-client-request-id": [ - "8a091a79-af3c-423b-aa56-4798b866776e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "2ec767a8-e010-4748-82a7-48343240c320" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002529Z:2ec767a8-e010-4748-82a7-48343240c320" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:28 GMT" - ], - "Content-Length": [ - "1065" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"testAkamaiEP\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"testAkamaiEP.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps135\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP/validateCustomDomain?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY2MzUvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC92YWxpZGF0ZUN1c3RvbURvbWFpbj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"hostName\": \"testAkamai.dustydog.us\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "984fadaa-a395-4b05-8949-7a1d197c8237" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "44" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ac6a0936-88d7-4225-8c3a-4e0969e05aeb" - ], - "x-ms-client-request-id": [ - "984fadaa-a395-4b05-8949-7a1d197c8237" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "403d6ab8-99aa-4ab7-8c91-92dbd4f3b9f9" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002530Z:403d6ab8-99aa-4ab7-8c91-92dbd4f3b9f9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:29 GMT" - ], - "Content-Length": [ - "59" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"customDomainValidated\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP/validateCustomDomain?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY2MzUvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC92YWxpZGF0ZUN1c3RvbURvbWFpbj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"hostName\": \"testAkamai.dustydog.us\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "84ad0b78-ee9a-499a-ae9e-9bd02f7bde32" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "44" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "bea4d59c-2780-4e49-bdc2-fc6091107bf0" - ], - "x-ms-client-request-id": [ - "84ad0b78-ee9a-499a-ae9e-9bd02f7bde32" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "5e3d641a-6966-40af-8b64-81c9bce972fb" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002530Z:5e3d641a-6966-40af-8b64-81c9bce972fb" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:29 GMT" - ], - "Content-Length": [ - "59" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"customDomainValidated\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP/customDomains?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY2MzUvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1573f7c3-11fb-4d92-9871-2bf5edfc258f" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a219fcd9-1181-4b5c-a9ce-a6ecb2e82880" - ], - "x-ms-client-request-id": [ - "1573f7c3-11fb-4d92-9871-2bf5edfc258f" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "df52b30d-b21c-4b75-8d07-661de79f6db0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002531Z:df52b30d-b21c-4b75-8d07-661de79f6db0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:30 GMT" - ], - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP/customDomains?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY2MzUvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "62133ceb-d80b-4011-8c71-2f637a2edeb6" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "aefc4659-8224-46c0-8378-1ac52d4e801f" - ], - "x-ms-client-request-id": [ - "62133ceb-d80b-4011-8c71-2f637a2edeb6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-correlation-request-id": [ - "30da0cc6-a6ab-4ddb-be9c-6cd77e2a0a2d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002554Z:30da0cc6-a6ab-4ddb-be9c-6cd77e2a0a2d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:54 GMT" - ], - "Content-Length": [ - "492" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP/customdomains/ps1573\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps1573\",\r\n \"properties\": {\r\n \"hostName\": \"testakamai.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP/customDomains?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY2MzUvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "14e1fb9a-567a-4ca4-9eca-f5b6393b80cc" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1d946058-bd3f-4c3e-9fd1-ad91af29c822" - ], - "x-ms-client-request-id": [ - "14e1fb9a-567a-4ca4-9eca-f5b6393b80cc" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-correlation-request-id": [ - "69cfda46-91e6-4b50-9c99-68ec6f0e3ce5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002555Z:69cfda46-91e6-4b50-9c99-68ec6f0e3ce5" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:55 GMT" - ], - "Content-Length": [ - "492" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP/customdomains/ps1573\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps1573\",\r\n \"properties\": {\r\n \"hostName\": \"testakamai.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP/customDomains?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY2MzUvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7ab31453-72a4-40ee-97af-e12884ed9116" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5951b2e2-f2dc-4266-aa18-18b6894e79c4" - ], - "x-ms-client-request-id": [ - "7ab31453-72a4-40ee-97af-e12884ed9116" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11984" - ], - "x-ms-correlation-request-id": [ - "373d42a4-3f26-4602-b62f-887c7703fee6" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002618Z:373d42a4-3f26-4602-b62f-887c7703fee6" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:26:17 GMT" - ], - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP/customDomains/ps1573?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY2MzUvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zL3BzMTU3Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"hostName\": \"testAkamai.dustydog.us\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1573f7c3-11fb-4d92-9871-2bf5edfc258f" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "70" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6d2b2e1e-84d8-4a9e-8767-1c09140a38a9" - ], - "x-ms-client-request-id": [ - "1573f7c3-11fb-4d92-9871-2bf5edfc258f" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/operationresults/c665af35-b16e-4ed4-8d5b-dd05538ead3b?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "780384f9-f12e-4cf3-98d9-5effaad18d3c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002533Z:780384f9-f12e-4cf3-98d9-5effaad18d3c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:32 GMT" - ], - "Content-Length": [ - "481" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP/customdomains/ps1573\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps1573\",\r\n \"properties\": {\r\n \"hostName\": \"testakamai.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Creating\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/operationresults/c665af35-b16e-4ed4-8d5b-dd05538ead3b?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2M2NjVhZjM1LWIxNmUtNGVkNC04ZDViLWRkMDU1MzhlYWQzYj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1573f7c3-11fb-4d92-9871-2bf5edfc258f" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ebdb6dcc-e6b7-4d30-bbf5-deac5c722ed3" - ], - "x-ms-client-request-id": [ - "1573f7c3-11fb-4d92-9871-2bf5edfc258f" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "bb3f7454-47dc-4d60-bdf6-f505f1a415e7" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002543Z:bb3f7454-47dc-4d60-bdf6-f505f1a415e7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:43 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/operationresults/c665af35-b16e-4ed4-8d5b-dd05538ead3b?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2M2NjVhZjM1LWIxNmUtNGVkNC04ZDViLWRkMDU1MzhlYWQzYj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1573f7c3-11fb-4d92-9871-2bf5edfc258f" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "77b3d6fb-acce-4e6f-8ed5-84f41024afd6" - ], - "x-ms-client-request-id": [ - "1573f7c3-11fb-4d92-9871-2bf5edfc258f" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "247400db-e2df-40bc-87db-62e059e6dafa" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002553Z:247400db-e2df-40bc-87db-62e059e6dafa" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:53 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP/customDomains/ps1573?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY2MzUvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zL3BzMTU3Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1573f7c3-11fb-4d92-9871-2bf5edfc258f" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c48d4bdf-a392-4b15-a484-54e2e6923dd5" - ], - "x-ms-client-request-id": [ - "1573f7c3-11fb-4d92-9871-2bf5edfc258f" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-correlation-request-id": [ - "6b769618-6de9-4a77-8dfe-d4533556af57" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002553Z:6b769618-6de9-4a77-8dfe-d4533556af57" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:53 GMT" - ], - "Content-Length": [ - "480" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP/customdomains/ps1573\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps1573\",\r\n \"properties\": {\r\n \"hostName\": \"testakamai.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP/customDomains/ps1573?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY2MzUvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zL3BzMTU3Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "387b77ed-0162-4499-9ddf-59470c126105" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b882a6a2-1532-46b1-bba7-013d270c0835" - ], - "x-ms-client-request-id": [ - "387b77ed-0162-4499-9ddf-59470c126105" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-correlation-request-id": [ - "443ef80f-9f73-4d67-9106-3d0aa9ecc89e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002555Z:443ef80f-9f73-4d67-9106-3d0aa9ecc89e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:55 GMT" - ], - "Content-Length": [ - "480" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP/customdomains/ps1573\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps1573\",\r\n \"properties\": {\r\n \"hostName\": \"testakamai.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP/customDomains/ps1573?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY2MzUvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zL3BzMTU3Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c73f6252-1ab4-47f8-b66d-f4a625c3d79e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "22f3abb6-a967-4e00-877a-4260e6b8d723" - ], - "x-ms-client-request-id": [ - "c73f6252-1ab4-47f8-b66d-f4a625c3d79e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11983" - ], - "x-ms-correlation-request-id": [ - "dbf219a1-0bf5-4cbb-8e34-a60480739c35" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002618Z:dbf219a1-0bf5-4cbb-8e34-a60480739c35" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:26:18 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2184/providers/Microsoft.Cdn/profiles/ps6635/endpoints/testAkamaiEP/customDomains/ps1573?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY2MzUvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zL3BzMTU3Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "14e1fb9a-567a-4ca4-9eca-f5b6393b80cc" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/operationresults/d8050db4-2e74-44cf-b2d5-15c2479b8a0b/profileresults/ps6635/endpointresults/testAkamaiEP/customdomainresults/ps1573?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "22c86133-620c-447d-b322-80d47920dd96" - ], - "x-ms-client-request-id": [ - "14e1fb9a-567a-4ca4-9eca-f5b6393b80cc" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/operationresults/d8050db4-2e74-44cf-b2d5-15c2479b8a0b?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" - ], - "x-ms-correlation-request-id": [ - "4063ab2f-219d-40b7-bfd7-546f33b5a23a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002556Z:4063ab2f-219d-40b7-bfd7-546f33b5a23a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:25:56 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/operationresults/d8050db4-2e74-44cf-b2d5-15c2479b8a0b?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q4MDUwZGI0LTJlNzQtNDRjZi1iMmQ1LTE1YzI0NzliOGEwYj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "14e1fb9a-567a-4ca4-9eca-f5b6393b80cc" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9f6d1263-a46d-4b5b-bb09-bf2babb99155" - ], - "x-ms-client-request-id": [ - "14e1fb9a-567a-4ca4-9eca-f5b6393b80cc" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-correlation-request-id": [ - "edb706da-e0b8-4fa6-ac68-ec561ae9f6e7" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002607Z:edb706da-e0b8-4fa6-ac68-ec561ae9f6e7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:26:06 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/operationresults/d8050db4-2e74-44cf-b2d5-15c2479b8a0b?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q4MDUwZGI0LTJlNzQtNDRjZi1iMmQ1LTE1YzI0NzliOGEwYj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "14e1fb9a-567a-4ca4-9eca-f5b6393b80cc" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "38e55d6a-284a-4e78-b4f4-9034a0ed5320" - ], - "x-ms-client-request-id": [ - "14e1fb9a-567a-4ca4-9eca-f5b6393b80cc" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11986" - ], - "x-ms-correlation-request-id": [ - "857fddc7-3a45-498a-bdfb-d9f5f9e760ba" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002617Z:857fddc7-3a45-498a-bdfb-d9f5f9e760ba" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:26:17 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184/providers/Microsoft.Cdn/operationresults/d8050db4-2e74-44cf-b2d5-15c2479b8a0b/profileresults/ps6635/endpointresults/testAkamaiEP/customdomainresults/ps1573?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE4NC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q4MDUwZGI0LTJlNzQtNDRjZi1iMmQ1LTE1YzI0NzliOGEwYi9wcm9maWxlcmVzdWx0cy9wczY2MzUvZW5kcG9pbnRyZXN1bHRzL3Rlc3RBa2FtYWlFUC9jdXN0b21kb21haW5yZXN1bHRzL3BzMTU3Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "14e1fb9a-567a-4ca4-9eca-f5b6393b80cc" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8d80bce2-c237-4c62-9938-e981adcd063a" - ], - "x-ms-client-request-id": [ - "14e1fb9a-567a-4ca4-9eca-f5b6393b80cc" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11985" - ], - "x-ms-correlation-request-id": [ - "a27df7a3-702c-47e4-8682-c834d71dbe89" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002617Z:a27df7a3-702c-47e4-8682-c834d71dbe89" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:26:17 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2184?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE4ND9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2f32f5a4-bcad-473c-b20f-99cd614bf85d" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14996" - ], - "x-ms-request-id": [ - "4e5e436d-c114-4675-86e5-5f2de38985ec" - ], - "x-ms-correlation-request-id": [ - "4e5e436d-c114-4675-86e5-5f2de38985ec" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002619Z:4e5e436d-c114-4675-86e5-5f2de38985ec" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:26:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9EUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11972" - ], - "x-ms-request-id": [ - "9fea3e71-a2eb-45e9-9781-ed63fd47fdfd" - ], - "x-ms-correlation-request-id": [ - "9fea3e71-a2eb-45e9-9781-ed63fd47fdfd" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002634Z:9fea3e71-a2eb-45e9-9781-ed63fd47fdfd" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:26:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9EUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11971" - ], - "x-ms-request-id": [ - "3fa40d8f-71c8-4a41-ab6e-9290cf5d37b4" - ], - "x-ms-correlation-request-id": [ - "3fa40d8f-71c8-4a41-ab6e-9290cf5d37b4" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002649Z:3fa40d8f-71c8-4a41-ab6e-9290cf5d37b4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:26:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9EUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11970" - ], - "x-ms-request-id": [ - "e0cbfc30-b659-45a2-b515-c3f7d71a2e6b" - ], - "x-ms-correlation-request-id": [ - "e0cbfc30-b659-45a2-b515-c3f7d71a2e6b" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002704Z:e0cbfc30-b659-45a2-b515-c3f7d71a2e6b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:27:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9EUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11969" - ], - "x-ms-request-id": [ - "63c869e6-0a5c-4754-925a-4803e1363705" - ], - "x-ms-correlation-request-id": [ - "63c869e6-0a5c-4754-925a-4803e1363705" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002720Z:63c869e6-0a5c-4754-925a-4803e1363705" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:27:20 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9EUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11968" - ], - "x-ms-request-id": [ - "1bd8ea51-2a52-4daa-ab14-8dd5c457b5bb" - ], - "x-ms-correlation-request-id": [ - "1bd8ea51-2a52-4daa-ab14-8dd5c457b5bb" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002735Z:1bd8ea51-2a52-4daa-ab14-8dd5c457b5bb" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:27:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9EUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11967" - ], - "x-ms-request-id": [ - "6d0403d0-b579-4d6f-b61f-79dda1211f05" - ], - "x-ms-correlation-request-id": [ - "6d0403d0-b579-4d6f-b61f-79dda1211f05" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002750Z:6d0403d0-b579-4d6f-b61f-79dda1211f05" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:27:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9EUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11966" - ], - "x-ms-request-id": [ - "c8538af3-7e58-4fdd-8900-8a6793d679f6" - ], - "x-ms-correlation-request-id": [ - "c8538af3-7e58-4fdd-8900-8a6793d679f6" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002805Z:c8538af3-7e58-4fdd-8900-8a6793d679f6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:28:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9EUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11965" - ], - "x-ms-request-id": [ - "baed3f5a-3786-4357-8ce9-8358f833ab6c" - ], - "x-ms-correlation-request-id": [ - "baed3f5a-3786-4357-8ce9-8358f833ab6c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002820Z:baed3f5a-3786-4357-8ce9-8358f833ab6c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:28:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9EUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11964" - ], - "x-ms-request-id": [ - "15fb9cf3-2433-4cbb-9e38-e965f024afca" - ], - "x-ms-correlation-request-id": [ - "15fb9cf3-2433-4cbb-9e38-e965f024afca" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002835Z:15fb9cf3-2433-4cbb-9e38-e965f024afca" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:28:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9EUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11963" - ], - "x-ms-request-id": [ - "47a62a2b-1357-4bb0-8082-2a12d4dd151c" - ], - "x-ms-correlation-request-id": [ - "47a62a2b-1357-4bb0-8082-2a12d4dd151c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002850Z:47a62a2b-1357-4bb0-8082-2a12d4dd151c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:28:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9EUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11962" - ], - "x-ms-request-id": [ - "046e6e05-47e9-4789-a229-415c2462cc83" - ], - "x-ms-correlation-request-id": [ - "046e6e05-47e9-4789-a229-415c2462cc83" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002905Z:046e6e05-47e9-4789-a229-415c2462cc83" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:29:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxODQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9EUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11961" - ], - "x-ms-request-id": [ - "6f5ef4a3-ce94-44ad-a529-6ec86c996ea2" - ], - "x-ms-correlation-request-id": [ - "6f5ef4a3-ce94-44ad-a529-6ec86c996ea2" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002905Z:6f5ef4a3-ce94-44ad-a529-6ec86c996ea2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:29:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-CustomDomainGetRemoveWithRunningEndpoint": [ - "ps1573", - "ps6635", - "ps2184", - "ps135" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestCustomDomainGetRemoveWithStoppedEndpoint.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestCustomDomainGetRemoveWithStoppedEndpoint.json deleted file mode 100644 index e3b16ee61b78..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestCustomDomainGetRemoveWithStoppedEndpoint.json +++ /dev/null @@ -1,2823 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE5MD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "31fa58a4-8507-4192-b1ce-0d2e993ae97f" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "83e5b47f-a644-4114-bcdd-d591b56d0754" - ], - "x-ms-correlation-request-id": [ - "83e5b47f-a644-4114-bcdd-d591b56d0754" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005423Z:83e5b47f-a644-4114-bcdd-d591b56d0754" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:54:23 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2190\",\r\n \"name\": \"ps2190\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3a250bd2-30e4-4f8f-b9b8-8a709cbf6ca5" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "133d188f-1d60-4c5f-a2cf-21a369c0ce54" - ], - "x-ms-client-request-id": [ - "3a250bd2-30e4-4f8f-b9b8-8a709cbf6ca5" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "62c52a04-0a45-4bdb-a454-c1c3bca4ae3c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005424Z:62c52a04-0a45-4bdb-a454-c1c3bca4ae3c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:54:23 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk2Nzg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"location\": \"EastUS\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3a250bd2-30e4-4f8f-b9b8-8a709cbf6ca5" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "141" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a040d375-eafb-49d8-951e-9945bb7229f2" - ], - "x-ms-client-request-id": [ - "3a250bd2-30e4-4f8f-b9b8-8a709cbf6ca5" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/4c8dd6a0-b4fc-497d-9efb-85b94dc0389d?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "f301b384-14fb-4b2c-9f92-d57a8f4322bd" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005428Z:f301b384-14fb-4b2c-9f92-d57a8f4322bd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:54:27 GMT" - ], - "Content-Length": [ - "350" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps9678\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/4c8dd6a0-b4fc-497d-9efb-85b94dc0389d?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzRjOGRkNmEwLWI0ZmMtNDk3ZC05ZWZiLTg1Yjk0ZGMwMzg5ZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3a250bd2-30e4-4f8f-b9b8-8a709cbf6ca5" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "53ef0b28-059b-4e9b-acd1-e4f910ecc159" - ], - "x-ms-client-request-id": [ - "3a250bd2-30e4-4f8f-b9b8-8a709cbf6ca5" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "d2e57af5-2060-40bf-a6cd-42bcb3504cc8" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005438Z:d2e57af5-2060-40bf-a6cd-42bcb3504cc8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:54:37 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk2Nzg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3a250bd2-30e4-4f8f-b9b8-8a709cbf6ca5" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6956756e-f252-4947-a54d-b5863a980fd2" - ], - "x-ms-client-request-id": [ - "3a250bd2-30e4-4f8f-b9b8-8a709cbf6ca5" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "4bad36a7-becb-4403-95c3-fa9200b301cb" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005438Z:4bad36a7-becb-4403-95c3-fa9200b301cb" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:54:37 GMT" - ], - "Content-Length": [ - "349" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps9678\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"testAkamaiEP\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f8f1147a-1ba6-4530-afdb-0907d221b477" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "77" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4156ae2c-76e7-4b6b-a33d-d30176cbab9f" - ], - "x-ms-client-request-id": [ - "f8f1147a-1ba6-4530-afdb-0907d221b477" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "1c2c6554-6a49-41f3-805f-effd8edb8453" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005438Z:1c2c6554-6a49-41f3-805f-effd8edb8453" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:54:37 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk2NzgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"origins\": [\r\n {\r\n \"name\": \"ps9380\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\"\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f8f1147a-1ba6-4530-afdb-0907d221b477" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "202" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "afb5b4c7-ac39-4d74-bc22-ed56ecfa16fd" - ], - "x-ms-client-request-id": [ - "f8f1147a-1ba6-4530-afdb-0907d221b477" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/c4325f4f-cc0e-49e2-90d2-52d37facaea6?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "704790ed-2376-4709-a4cb-3f30a7322345" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005443Z:704790ed-2376-4709-a4cb-3f30a7322345" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:54:42 GMT" - ], - "Content-Length": [ - "1068" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"testAkamaiEP\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"testAkamaiEP.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps9380\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/c4325f4f-cc0e-49e2-90d2-52d37facaea6?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2M0MzI1ZjRmLWNjMGUtNDllMi05MGQyLTUyZDM3ZmFjYWVhNj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f8f1147a-1ba6-4530-afdb-0907d221b477" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d4a7a707-4f29-4687-8406-aa121e2abd01" - ], - "x-ms-client-request-id": [ - "f8f1147a-1ba6-4530-afdb-0907d221b477" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "3880cd8c-35ba-4d67-b5f0-db88594d609b" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005453Z:3880cd8c-35ba-4d67-b5f0-db88594d609b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:54:52 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/c4325f4f-cc0e-49e2-90d2-52d37facaea6?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2M0MzI1ZjRmLWNjMGUtNDllMi05MGQyLTUyZDM3ZmFjYWVhNj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f8f1147a-1ba6-4530-afdb-0907d221b477" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3e1532a5-9c5c-4bcb-8fae-5cb22c6848a9" - ], - "x-ms-client-request-id": [ - "f8f1147a-1ba6-4530-afdb-0907d221b477" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "0307e78a-7581-4ece-ae9e-5970ad6ca393" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005503Z:0307e78a-7581-4ece-ae9e-5970ad6ca393" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:55:03 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/c4325f4f-cc0e-49e2-90d2-52d37facaea6?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2M0MzI1ZjRmLWNjMGUtNDllMi05MGQyLTUyZDM3ZmFjYWVhNj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f8f1147a-1ba6-4530-afdb-0907d221b477" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ca5e7e70-6d39-4ea2-b467-616ee48ea977" - ], - "x-ms-client-request-id": [ - "f8f1147a-1ba6-4530-afdb-0907d221b477" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "68e57bcf-c97e-4bf8-9132-68239da6df77" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005513Z:68e57bcf-c97e-4bf8-9132-68239da6df77" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:55:13 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk2NzgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f8f1147a-1ba6-4530-afdb-0907d221b477" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "264bd51e-8a75-42dc-8f2a-f726cd5f3ad5" - ], - "x-ms-client-request-id": [ - "f8f1147a-1ba6-4530-afdb-0907d221b477" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "75216bed-871f-4826-bf37-b2a15fee24a4" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005514Z:75216bed-871f-4826-bf37-b2a15fee24a4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:55:13 GMT" - ], - "Content-Length": [ - "1066" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"testAkamaiEP\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"testAkamaiEP.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps9380\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk2NzgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8b597789-0476-4d1d-b63c-e664fe00ce6d" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9e1212ca-a279-49d2-8745-ab348c0628f8" - ], - "x-ms-client-request-id": [ - "8b597789-0476-4d1d-b63c-e664fe00ce6d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "f08e948a-7aa1-4af7-b144-a046ea28fd68" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005514Z:f08e948a-7aa1-4af7-b144-a046ea28fd68" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:55:14 GMT" - ], - "Content-Length": [ - "1066" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"testAkamaiEP\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"testAkamaiEP.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps9380\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP/validateCustomDomain?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk2NzgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC92YWxpZGF0ZUN1c3RvbURvbWFpbj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"hostName\": \"testAkamai.dustydog.us\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "56f6a2ed-00a2-4ab5-8ec1-7edcf7b3f18a" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "44" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7ac0565f-6518-4eb4-ac35-bcc77913e176" - ], - "x-ms-client-request-id": [ - "56f6a2ed-00a2-4ab5-8ec1-7edcf7b3f18a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "a3597abd-eb97-409a-bfbe-0203e537a88d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005514Z:a3597abd-eb97-409a-bfbe-0203e537a88d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:55:14 GMT" - ], - "Content-Length": [ - "59" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"customDomainValidated\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP/validateCustomDomain?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk2NzgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC92YWxpZGF0ZUN1c3RvbURvbWFpbj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"hostName\": \"testAkamai.dustydog.us\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0c4bf9ce-332f-4bf3-8e1f-ec19fddb7177" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "44" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "feb8848c-e09d-4ef9-90da-2e8a2199be87" - ], - "x-ms-client-request-id": [ - "0c4bf9ce-332f-4bf3-8e1f-ec19fddb7177" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "801922e1-2669-452b-922c-656a091cd31e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005515Z:801922e1-2669-452b-922c-656a091cd31e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:55:15 GMT" - ], - "Content-Length": [ - "59" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"customDomainValidated\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP/customDomains?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk2NzgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1c4d79c5-4edf-4d16-ba35-93e4e1c54fc7" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5744e74a-4ceb-493c-9b13-78714c3f8dc8" - ], - "x-ms-client-request-id": [ - "1c4d79c5-4edf-4d16-ba35-93e4e1c54fc7" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "c8cbb7c8-206e-435d-8a99-1f444f574bcd" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005515Z:c8cbb7c8-206e-435d-8a99-1f444f574bcd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:55:15 GMT" - ], - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP/customDomains?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk2NzgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f70cb623-1684-48a5-a91f-deed21f98acf" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c1858168-0db8-4793-be7f-b379f74efa21" - ], - "x-ms-client-request-id": [ - "f70cb623-1684-48a5-a91f-deed21f98acf" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "1362048c-89a7-46e1-9096-adf9142c9750" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005529Z:1362048c-89a7-46e1-9096-adf9142c9750" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:55:29 GMT" - ], - "Content-Length": [ - "492" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP/customdomains/ps2160\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps2160\",\r\n \"properties\": {\r\n \"hostName\": \"testakamai.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP/customDomains?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk2NzgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c21b09c1-678a-4a33-a7cc-cda0fa2b1a68" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b97c45a2-2bf8-4a9b-bd73-f27b97d22cb5" - ], - "x-ms-client-request-id": [ - "c21b09c1-678a-4a33-a7cc-cda0fa2b1a68" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11986" - ], - "x-ms-correlation-request-id": [ - "f08b6c80-5a00-462f-b486-d8ec816885dc" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005602Z:f08b6c80-5a00-462f-b486-d8ec816885dc" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:56:02 GMT" - ], - "Content-Length": [ - "492" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP/customdomains/ps2160\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps2160\",\r\n \"properties\": {\r\n \"hostName\": \"testakamai.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP/customDomains?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk2NzgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "284db24a-4309-44a3-9e82-f18209206dd9" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "79108ef4-d6d5-4d5d-958e-f976c0f622d8" - ], - "x-ms-client-request-id": [ - "284db24a-4309-44a3-9e82-f18209206dd9" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11983" - ], - "x-ms-correlation-request-id": [ - "9a6aa536-13d1-464b-9b51-a4edd5a98cbd" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005614Z:9a6aa536-13d1-464b-9b51-a4edd5a98cbd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:56:14 GMT" - ], - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP/customDomains/ps2160?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk2NzgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zL3BzMjE2MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"hostName\": \"testAkamai.dustydog.us\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1c4d79c5-4edf-4d16-ba35-93e4e1c54fc7" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "70" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e73f5e34-23f5-4056-9397-3b54a6d2baae" - ], - "x-ms-client-request-id": [ - "1c4d79c5-4edf-4d16-ba35-93e4e1c54fc7" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/0fe359fb-34db-4b45-869a-dfebb883a773?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "2dc3f909-aaf3-4161-b91e-cb0d37a40ac5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005517Z:2dc3f909-aaf3-4161-b91e-cb0d37a40ac5" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:55:17 GMT" - ], - "Content-Length": [ - "481" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP/customdomains/ps2160\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps2160\",\r\n \"properties\": {\r\n \"hostName\": \"testakamai.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Creating\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/0fe359fb-34db-4b45-869a-dfebb883a773?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzBmZTM1OWZiLTM0ZGItNGI0NS04NjlhLWRmZWJiODgzYTc3Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1c4d79c5-4edf-4d16-ba35-93e4e1c54fc7" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0b1c3831-4c26-4ad6-ae74-e5f1fe12e4ee" - ], - "x-ms-client-request-id": [ - "1c4d79c5-4edf-4d16-ba35-93e4e1c54fc7" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "5c1b0af7-373a-4d15-b842-76647ebc3165" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005528Z:5c1b0af7-373a-4d15-b842-76647ebc3165" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:55:28 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP/customDomains/ps2160?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk2NzgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zL3BzMjE2MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1c4d79c5-4edf-4d16-ba35-93e4e1c54fc7" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f0829297-1a87-4dae-a598-d275623dc441" - ], - "x-ms-client-request-id": [ - "1c4d79c5-4edf-4d16-ba35-93e4e1c54fc7" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "8546c4c4-258c-4fc2-80b9-6644d2a574da" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005528Z:8546c4c4-258c-4fc2-80b9-6644d2a574da" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:55:28 GMT" - ], - "Content-Length": [ - "480" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP/customdomains/ps2160\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps2160\",\r\n \"properties\": {\r\n \"hostName\": \"testakamai.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP/customDomains/ps2160?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk2NzgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zL3BzMjE2MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e7ef89c3-2bb6-4d79-b4cf-a2dab0b59cba" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c47b8642-e9cd-4a55-9897-3fd663b58ed5" - ], - "x-ms-client-request-id": [ - "e7ef89c3-2bb6-4d79-b4cf-a2dab0b59cba" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-correlation-request-id": [ - "467c3d72-854b-4819-b2e6-f294c42ff534" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005602Z:467c3d72-854b-4819-b2e6-f294c42ff534" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:56:01 GMT" - ], - "Content-Length": [ - "480" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP/customdomains/ps2160\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps2160\",\r\n \"properties\": {\r\n \"hostName\": \"testakamai.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP/customDomains/ps2160?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk2NzgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zL3BzMjE2MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "20451705-763c-4360-9b73-87d9a7d5f6b4" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9f1f6e14-b257-41cc-a021-18fb68e9245c" - ], - "x-ms-client-request-id": [ - "20451705-763c-4360-9b73-87d9a7d5f6b4" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11982" - ], - "x-ms-correlation-request-id": [ - "ae73cac9-4414-4b98-8ef4-d4bc7d9908c5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005615Z:ae73cac9-4414-4b98-8ef4-d4bc7d9908c5" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:56:14 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP/stop?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk2NzgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9zdG9wP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "14920935-2b38-4dfe-8b46-7c7e022ebada" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/e0f50b49-4e71-4828-b528-19dfbbfe000d/profileresults/ps9678/endpointresults/testAkamaiEP?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f46d8054-e7bd-4c2b-b25f-d1d83bd42f10" - ], - "x-ms-client-request-id": [ - "14920935-2b38-4dfe-8b46-7c7e022ebada" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/e0f50b49-4e71-4828-b528-19dfbbfe000d?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "bab6265d-af3f-4b9e-85a7-74628278797b" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005530Z:bab6265d-af3f-4b9e-85a7-74628278797b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:55:30 GMT" - ], - "Content-Length": [ - "1157" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"testAkamaiEP\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"testAkamaiEP.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps9380\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [\r\n {\r\n \"name\": \"ps2160\",\r\n \"properties\": {\r\n \"hostName\": \"testakamai.dustydog.us\",\r\n \"validationData\": null\r\n }\r\n }\r\n ],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Stopping\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/e0f50b49-4e71-4828-b528-19dfbbfe000d?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2UwZjUwYjQ5LTRlNzEtNDgyOC1iNTI4LTE5ZGZiYmZlMDAwZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "14920935-2b38-4dfe-8b46-7c7e022ebada" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "93379ee3-b92b-4cc5-8a83-775155af8091" - ], - "x-ms-client-request-id": [ - "14920935-2b38-4dfe-8b46-7c7e022ebada" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-correlation-request-id": [ - "7f2639e5-f798-415d-8b18-21960bff47ba" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005540Z:7f2639e5-f798-415d-8b18-21960bff47ba" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:55:40 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/e0f50b49-4e71-4828-b528-19dfbbfe000d?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2UwZjUwYjQ5LTRlNzEtNDgyOC1iNTI4LTE5ZGZiYmZlMDAwZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "14920935-2b38-4dfe-8b46-7c7e022ebada" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "66fac065-4e47-4803-8e75-5b73adae2bc4" - ], - "x-ms-client-request-id": [ - "14920935-2b38-4dfe-8b46-7c7e022ebada" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-correlation-request-id": [ - "f5165d6f-8bf7-4ec6-a873-0ef78d24fa15" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005550Z:f5165d6f-8bf7-4ec6-a873-0ef78d24fa15" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:55:50 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/e0f50b49-4e71-4828-b528-19dfbbfe000d?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2UwZjUwYjQ5LTRlNzEtNDgyOC1iNTI4LTE5ZGZiYmZlMDAwZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "14920935-2b38-4dfe-8b46-7c7e022ebada" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a24fae61-ac81-4c17-ae0d-39f090437bb3" - ], - "x-ms-client-request-id": [ - "14920935-2b38-4dfe-8b46-7c7e022ebada" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-correlation-request-id": [ - "e877c164-c8af-4202-bf64-aadc9e4a06bb" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005601Z:e877c164-c8af-4202-bf64-aadc9e4a06bb" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:56:00 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/e0f50b49-4e71-4828-b528-19dfbbfe000d/profileresults/ps9678/endpointresults/testAkamaiEP?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2UwZjUwYjQ5LTRlNzEtNDgyOC1iNTI4LTE5ZGZiYmZlMDAwZC9wcm9maWxlcmVzdWx0cy9wczk2NzgvZW5kcG9pbnRyZXN1bHRzL3Rlc3RBa2FtYWlFUD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "14920935-2b38-4dfe-8b46-7c7e022ebada" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d476a94e-6c17-4679-8832-1f32fbc9f37c" - ], - "x-ms-client-request-id": [ - "14920935-2b38-4dfe-8b46-7c7e022ebada" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-correlation-request-id": [ - "5a7d3f56-9317-4894-8d4c-0dfdd0c411a4" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005601Z:5a7d3f56-9317-4894-8d4c-0dfdd0c411a4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:56:01 GMT" - ], - "Content-Length": [ - "1251" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/e0f50b49-4e71-4828-b528-19dfbbfe000d/profileresults/ps9678/endpointresults/testAkamaiEP\",\r\n \"type\": \"Microsoft.Cdn/operationresults/profileresults/endpointresults\",\r\n \"name\": \"testAkamaiEP\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"testAkamaiEP.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps9380\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [\r\n {\r\n \"name\": \"ps2160\",\r\n \"properties\": {\r\n \"hostName\": \"testakamai.dustydog.us\",\r\n \"validationData\": null\r\n }\r\n }\r\n ],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Stopped\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2190/providers/Microsoft.Cdn/profiles/ps9678/endpoints/testAkamaiEP/customDomains/ps2160?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczk2NzgvZW5kcG9pbnRzL3Rlc3RBa2FtYWlFUC9jdXN0b21Eb21haW5zL3BzMjE2MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c21b09c1-678a-4a33-a7cc-cda0fa2b1a68" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/95f4a275-4998-4fc3-90dc-b05e6ce0892e/profileresults/ps9678/endpointresults/testAkamaiEP/customdomainresults/ps2160?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "053cc73d-6900-4801-9bd7-55e4c58b1445" - ], - "x-ms-client-request-id": [ - "c21b09c1-678a-4a33-a7cc-cda0fa2b1a68" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/95f4a275-4998-4fc3-90dc-b05e6ce0892e?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" - ], - "x-ms-correlation-request-id": [ - "4752def6-e290-4c2e-ba15-5b9c90c5be19" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005603Z:4752def6-e290-4c2e-ba15-5b9c90c5be19" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:56:03 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/95f4a275-4998-4fc3-90dc-b05e6ce0892e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzk1ZjRhMjc1LTQ5OTgtNGZjMy05MGRjLWIwNWU2Y2UwODkyZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c21b09c1-678a-4a33-a7cc-cda0fa2b1a68" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2db29e6e-08a1-41a6-a55d-3d18f4e61223" - ], - "x-ms-client-request-id": [ - "c21b09c1-678a-4a33-a7cc-cda0fa2b1a68" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11985" - ], - "x-ms-correlation-request-id": [ - "5de4e7be-7cd8-4cbb-b5d7-af4861817e05" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005613Z:5de4e7be-7cd8-4cbb-b5d7-af4861817e05" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:56:13 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190/providers/Microsoft.Cdn/operationresults/95f4a275-4998-4fc3-90dc-b05e6ce0892e/profileresults/ps9678/endpointresults/testAkamaiEP/customdomainresults/ps2160?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE5MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzk1ZjRhMjc1LTQ5OTgtNGZjMy05MGRjLWIwNWU2Y2UwODkyZS9wcm9maWxlcmVzdWx0cy9wczk2NzgvZW5kcG9pbnRyZXN1bHRzL3Rlc3RBa2FtYWlFUC9jdXN0b21kb21haW5yZXN1bHRzL3BzMjE2MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c21b09c1-678a-4a33-a7cc-cda0fa2b1a68" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f44312bf-3e35-4339-b358-e3b24f5e273a" - ], - "x-ms-client-request-id": [ - "c21b09c1-678a-4a33-a7cc-cda0fa2b1a68" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11984" - ], - "x-ms-correlation-request-id": [ - "e7d17c86-c3d4-4269-ab3b-2467a9217534" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005614Z:e7d17c86-c3d4-4269-ab3b-2467a9217534" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:56:13 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2190?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjE5MD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "da8ac00b-e0a4-46ac-b7e0-3a2efbbe0017" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "ed54ece5-c682-4fca-9941-fc4067951341" - ], - "x-ms-correlation-request-id": [ - "ed54ece5-c682-4fca-9941-fc4067951341" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005616Z:ed54ece5-c682-4fca-9941-fc4067951341" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:56:15 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "be200a5e-2da9-4f17-b9b3-e159ef74b645" - ], - "x-ms-correlation-request-id": [ - "be200a5e-2da9-4f17-b9b3-e159ef74b645" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005631Z:be200a5e-2da9-4f17-b9b3-e159ef74b645" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:56:30 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "0262d67e-f5e4-4fe7-b998-101d7ea81731" - ], - "x-ms-correlation-request-id": [ - "0262d67e-f5e4-4fe7-b998-101d7ea81731" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005646Z:0262d67e-f5e4-4fe7-b998-101d7ea81731" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:56:45 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "0500aa58-3d40-4272-a6d0-b10f2c103e11" - ], - "x-ms-correlation-request-id": [ - "0500aa58-3d40-4272-a6d0-b10f2c103e11" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005701Z:0500aa58-3d40-4272-a6d0-b10f2c103e11" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:57:00 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "455aeac5-ac03-4092-813e-c6815685bc06" - ], - "x-ms-correlation-request-id": [ - "455aeac5-ac03-4092-813e-c6815685bc06" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005716Z:455aeac5-ac03-4092-813e-c6815685bc06" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:57:15 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "802b111e-3fe5-4703-b77d-f8c4620d953c" - ], - "x-ms-correlation-request-id": [ - "802b111e-3fe5-4703-b77d-f8c4620d953c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005731Z:802b111e-3fe5-4703-b77d-f8c4620d953c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:57:30 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "e7ad0e53-abcd-4661-8774-67a107192b50" - ], - "x-ms-correlation-request-id": [ - "e7ad0e53-abcd-4661-8774-67a107192b50" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005746Z:e7ad0e53-abcd-4661-8774-67a107192b50" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:57:46 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "db8dbb18-80a6-4c91-abf4-eb336752cb97" - ], - "x-ms-correlation-request-id": [ - "db8dbb18-80a6-4c91-abf4-eb336752cb97" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005801Z:db8dbb18-80a6-4c91-abf4-eb336752cb97" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:58:01 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "463b0849-b2de-4124-b4da-6c8960113a87" - ], - "x-ms-correlation-request-id": [ - "463b0849-b2de-4124-b4da-6c8960113a87" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005816Z:463b0849-b2de-4124-b4da-6c8960113a87" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:58:16 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "1b7f36be-af83-422a-acb7-76e3712b9704" - ], - "x-ms-correlation-request-id": [ - "1b7f36be-af83-422a-acb7-76e3712b9704" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005831Z:1b7f36be-af83-422a-acb7-76e3712b9704" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:58:31 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "fe73d760-c8af-4a3d-9c98-69cdfb41e98f" - ], - "x-ms-correlation-request-id": [ - "fe73d760-c8af-4a3d-9c98-69cdfb41e98f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005847Z:fe73d760-c8af-4a3d-9c98-69cdfb41e98f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:58:46 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "24978a16-ad8e-43f1-bd6b-4e0db66895cc" - ], - "x-ms-correlation-request-id": [ - "24978a16-ad8e-43f1-bd6b-4e0db66895cc" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005902Z:24978a16-ad8e-43f1-bd6b-4e0db66895cc" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:59:01 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIxOTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJeE9UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "4f72ac3e-d136-42bc-8eb0-3d14bd6ceefc" - ], - "x-ms-correlation-request-id": [ - "4f72ac3e-d136-42bc-8eb0-3d14bd6ceefc" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T005902Z:4f72ac3e-d136-42bc-8eb0-3d14bd6ceefc" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:59:01 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-CustomDomainGetRemoveWithStoppedEndpoint": [ - "ps2160", - "ps9678", - "ps2190", - "ps9380" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestMicrosoftCustomDomainHttpsWithRunningEndpoint.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestMicrosoftCustomDomainHttpsWithRunningEndpoint.json deleted file mode 100644 index 433eb9c54cc3..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestMicrosoftCustomDomainHttpsWithRunningEndpoint.json +++ /dev/null @@ -1,2298 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTkwMj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "854cbd0c-9efc-42f5-9b00-fe99af72ba18" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "e37b4a56-4799-47e6-bc43-53053ddd2037" - ], - "x-ms-correlation-request-id": [ - "e37b4a56-4799-47e6-bc43-53053ddd2037" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T004954Z:e37b4a56-4799-47e6-bc43-53053ddd2037" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:49:53 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9902\",\r\n \"name\": \"ps9902\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e2029544-7737-4381-a529-fd993d00ee3b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ae2c649f-269b-4be8-aec5-891ff5d4ddd2" - ], - "x-ms-client-request-id": [ - "e2029544-7737-4381-a529-fd993d00ee3b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "3e6c2b82-1d9d-4755-84fa-ae35c51827ac" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T004955Z:3e6c2b82-1d9d-4755-84fa-ae35c51827ac" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:49:55 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NjU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"location\": \"EastUS\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e2029544-7737-4381-a529-fd993d00ee3b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "144" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3d8c2dd7-148e-403a-b83d-2a97daf0c1e7" - ], - "x-ms-client-request-id": [ - "e2029544-7737-4381-a529-fd993d00ee3b" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/operationresults/8ebb1cdc-e29f-4c62-826c-93c6b275332c?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "d5a92a99-a34b-4b9a-b21f-2eee98c2822f" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T004958Z:d5a92a99-a34b-4b9a-b21f-2eee98c2822f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:49:58 GMT" - ], - "Content-Length": [ - "353" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6465\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/operationresults/8ebb1cdc-e29f-4c62-826c-93c6b275332c?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzhlYmIxY2RjLWUyOWYtNGM2Mi04MjZjLTkzYzZiMjc1MzMyYz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e2029544-7737-4381-a529-fd993d00ee3b" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "769582b2-43f2-4451-b209-e85f88e1cde0" - ], - "x-ms-client-request-id": [ - "e2029544-7737-4381-a529-fd993d00ee3b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "0b814b6f-b10d-4c27-93e8-c9e276999481" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005008Z:0b814b6f-b10d-4c27-93e8-c9e276999481" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:50:08 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NjU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e2029544-7737-4381-a529-fd993d00ee3b" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3fbf75d0-259e-4121-843b-f901f5aeb01f" - ], - "x-ms-client-request-id": [ - "e2029544-7737-4381-a529-fd993d00ee3b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "49651627-9322-4f6b-91cf-5b6f23dc74cf" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005009Z:49651627-9322-4f6b-91cf-5b6f23dc74cf" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:50:08 GMT" - ], - "Content-Length": [ - "352" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6465\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NjU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c217c4ce-3d4e-4cf6-b4dd-ecac855e819b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5d9567da-4fd0-40ff-9672-8ecbae4f1a02" - ], - "x-ms-client-request-id": [ - "c217c4ce-3d4e-4cf6-b4dd-ecac855e819b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "47" - ], - "x-ms-correlation-request-id": [ - "1980a316-f222-4cb6-8663-90003af1a14d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005131Z:1980a316-f222-4cb6-8663-90003af1a14d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:51:31 GMT" - ], - "Content-Length": [ - "352" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6465\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"cdn-ps-test-msft\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a18a555f-7ada-4d95-b6a3-f087036a28f6" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "81" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ea1cd611-3291-4060-98f5-204c07bb6a2c" - ], - "x-ms-client-request-id": [ - "a18a555f-7ada-4d95-b6a3-f087036a28f6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "59a41d80-f0fe-4edd-bfde-7eee98064127" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005010Z:59a41d80-f0fe-4edd-bfde-7eee98064127" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:50:09 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465/endpoints/cdn-ps-test-msft?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NjUvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQ/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7300\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\"\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a18a555f-7ada-4d95-b6a3-f087036a28f6" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "202" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6106af6e-ac25-45df-9247-869164edba30" - ], - "x-ms-client-request-id": [ - "a18a555f-7ada-4d95-b6a3-f087036a28f6" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/operationresults/e2adbf0b-54e6-4513-9138-eac290c66783?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "55b5ce62-71ac-4b66-945a-50064661b6e7" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005015Z:55b5ce62-71ac-4b66-945a-50064661b6e7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:50:14 GMT" - ], - "Content-Length": [ - "1077" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465/endpoints/cdn-ps-test-msft\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"cdn-ps-test-msft\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"cdn-ps-test-msft.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7300\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/operationresults/e2adbf0b-54e6-4513-9138-eac290c66783?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2UyYWRiZjBiLTU0ZTYtNDUxMy05MTM4LWVhYzI5MGM2Njc4Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a18a555f-7ada-4d95-b6a3-f087036a28f6" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9364b065-acad-4a42-8304-6ba22d14b064" - ], - "x-ms-client-request-id": [ - "a18a555f-7ada-4d95-b6a3-f087036a28f6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "23dac1cf-169a-4bb6-ac52-9eb2e402b57a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005025Z:23dac1cf-169a-4bb6-ac52-9eb2e402b57a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:50:25 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/operationresults/e2adbf0b-54e6-4513-9138-eac290c66783?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2UyYWRiZjBiLTU0ZTYtNDUxMy05MTM4LWVhYzI5MGM2Njc4Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a18a555f-7ada-4d95-b6a3-f087036a28f6" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "807e2a24-abe2-47b7-a8f6-d0950f56c348" - ], - "x-ms-client-request-id": [ - "a18a555f-7ada-4d95-b6a3-f087036a28f6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "6cbc5e86-96c3-4ffa-be97-f320b89e7dbe" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005036Z:6cbc5e86-96c3-4ffa-be97-f320b89e7dbe" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:50:35 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/operationresults/e2adbf0b-54e6-4513-9138-eac290c66783?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2UyYWRiZjBiLTU0ZTYtNDUxMy05MTM4LWVhYzI5MGM2Njc4Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a18a555f-7ada-4d95-b6a3-f087036a28f6" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "92aade4c-8e91-4c19-8a68-d01ee6bb9f4c" - ], - "x-ms-client-request-id": [ - "a18a555f-7ada-4d95-b6a3-f087036a28f6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "d7764640-01ab-4c73-b72b-908f63e65615" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005046Z:d7764640-01ab-4c73-b72b-908f63e65615" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:50:46 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/operationresults/e2adbf0b-54e6-4513-9138-eac290c66783?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2UyYWRiZjBiLTU0ZTYtNDUxMy05MTM4LWVhYzI5MGM2Njc4Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a18a555f-7ada-4d95-b6a3-f087036a28f6" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "50734bf0-f16c-4343-a1f5-26b10f15dfd8" - ], - "x-ms-client-request-id": [ - "a18a555f-7ada-4d95-b6a3-f087036a28f6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "e688e903-8dc9-4598-a665-5b0fb1039ba8" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005056Z:e688e903-8dc9-4598-a665-5b0fb1039ba8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:50:56 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465/endpoints/cdn-ps-test-msft?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NjUvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQ/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a18a555f-7ada-4d95-b6a3-f087036a28f6" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9f8b624f-e1e4-4b07-8c96-b9ef4db1555d" - ], - "x-ms-client-request-id": [ - "a18a555f-7ada-4d95-b6a3-f087036a28f6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "1a9b2cd8-e591-495f-9fdd-3cacd3e32b8d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005056Z:1a9b2cd8-e591-495f-9fdd-3cacd3e32b8d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:50:56 GMT" - ], - "Content-Length": [ - "1075" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465/endpoints/cdn-ps-test-msft\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"cdn-ps-test-msft\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"cdn-ps-test-msft.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7300\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465/endpoints/cdn-ps-test-msft/validateCustomDomain?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NjUvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQvdmFsaWRhdGVDdXN0b21Eb21haW4/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"hostName\": \"a.cdn-ps-test-msft.azfdtest.xyz\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "49b2ace9-b8e8-43df-b136-7a954b4efa67" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "53" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "126c16a0-f8ae-44c0-9af8-f74f3a29a387" - ], - "x-ms-client-request-id": [ - "49b2ace9-b8e8-43df-b136-7a954b4efa67" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "311269c6-4f4d-4934-89c3-d999ddffbb7e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005057Z:311269c6-4f4d-4934-89c3-d999ddffbb7e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:50:57 GMT" - ], - "Content-Length": [ - "59" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"customDomainValidated\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465/endpoints/cdn-ps-test-msft/customDomains?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NjUvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQvY3VzdG9tRG9tYWlucz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f8b1fe09-296e-44bb-9992-456526796da3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "73201335-2f22-4309-bdc7-9412ada5b2c2" - ], - "x-ms-client-request-id": [ - "f8b1fe09-296e-44bb-9992-456526796da3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "494922b8-a02c-448e-8513-7bce95d64ed0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005057Z:494922b8-a02c-448e-8513-7bce95d64ed0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:50:57 GMT" - ], - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465/endpoints/cdn-ps-test-msft/customDomains?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NjUvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQvY3VzdG9tRG9tYWlucz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c217c4ce-3d4e-4cf6-b4dd-ecac855e819b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "08c186b1-a168-40c0-a960-564c09d4d292" - ], - "x-ms-client-request-id": [ - "c217c4ce-3d4e-4cf6-b4dd-ecac855e819b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-correlation-request-id": [ - "d8c569a0-6262-49b6-abe2-ef876ea9289d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005131Z:d8c569a0-6262-49b6-abe2-ef876ea9289d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:51:31 GMT" - ], - "Content-Length": [ - "505" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465/endpoints/cdn-ps-test-msft/customdomains/ps1873\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps1873\",\r\n \"properties\": {\r\n \"hostName\": \"a.cdn-ps-test-msft.azfdtest.xyz\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465/endpoints/cdn-ps-test-msft/customDomains/ps1873?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NjUvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQvY3VzdG9tRG9tYWlucy9wczE4NzM/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"hostName\": \"a.cdn-ps-test-msft.azfdtest.xyz\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f8b1fe09-296e-44bb-9992-456526796da3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "79" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "645dda2c-5c2b-4a7a-b6f0-ad8b256b60d2" - ], - "x-ms-client-request-id": [ - "f8b1fe09-296e-44bb-9992-456526796da3" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/operationresults/9f8097d8-4aab-49e3-b7a7-e923c40150f1?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "a195c57d-8d9a-4dcc-a9d5-84e2412432f1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005059Z:a195c57d-8d9a-4dcc-a9d5-84e2412432f1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:50:59 GMT" - ], - "Content-Length": [ - "494" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465/endpoints/cdn-ps-test-msft/customdomains/ps1873\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps1873\",\r\n \"properties\": {\r\n \"hostName\": \"a.cdn-ps-test-msft.azfdtest.xyz\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Creating\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/operationresults/9f8097d8-4aab-49e3-b7a7-e923c40150f1?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlmODA5N2Q4LTRhYWItNDllMy1iN2E3LWU5MjNjNDAxNTBmMT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f8b1fe09-296e-44bb-9992-456526796da3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "88c6aab1-f1c2-4ab9-8324-ec4455b8a8e4" - ], - "x-ms-client-request-id": [ - "f8b1fe09-296e-44bb-9992-456526796da3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "a4d91f8c-cca1-4666-a44c-ece9feb91f0b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005110Z:a4d91f8c-cca1-4666-a44c-ece9feb91f0b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:51:09 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/operationresults/9f8097d8-4aab-49e3-b7a7-e923c40150f1?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlmODA5N2Q4LTRhYWItNDllMy1iN2E3LWU5MjNjNDAxNTBmMT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f8b1fe09-296e-44bb-9992-456526796da3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1bf6e1f4-7112-4027-a1df-e9ad2d732f91" - ], - "x-ms-client-request-id": [ - "f8b1fe09-296e-44bb-9992-456526796da3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "c9f1ad91-28f9-4b7f-9dcd-8c589d4b7a21" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005120Z:c9f1ad91-28f9-4b7f-9dcd-8c589d4b7a21" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:51:19 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/operationresults/9f8097d8-4aab-49e3-b7a7-e923c40150f1?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlmODA5N2Q4LTRhYWItNDllMy1iN2E3LWU5MjNjNDAxNTBmMT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f8b1fe09-296e-44bb-9992-456526796da3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d3a19b33-51ff-4622-84f8-c07a5ac85b77" - ], - "x-ms-client-request-id": [ - "f8b1fe09-296e-44bb-9992-456526796da3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-correlation-request-id": [ - "216177f6-d00c-41ec-a592-c5df867ae0b9" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005130Z:216177f6-d00c-41ec-a592-c5df867ae0b9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:51:29 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465/endpoints/cdn-ps-test-msft/customDomains/ps1873?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NjUvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQvY3VzdG9tRG9tYWlucy9wczE4NzM/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f8b1fe09-296e-44bb-9992-456526796da3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "edcc2005-65cf-44a5-9bdf-dbf42ed9d55d" - ], - "x-ms-client-request-id": [ - "f8b1fe09-296e-44bb-9992-456526796da3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-correlation-request-id": [ - "a08005a0-4ae9-4d2b-a99e-27f20fae9e97" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005130Z:a08005a0-4ae9-4d2b-a99e-27f20fae9e97" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:51:30 GMT" - ], - "Content-Length": [ - "493" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465/endpoints/cdn-ps-test-msft/customdomains/ps1873\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps1873\",\r\n \"properties\": {\r\n \"hostName\": \"a.cdn-ps-test-msft.azfdtest.xyz\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465/endpoints/cdn-ps-test-msft/customDomains/ps1873?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NjUvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQvY3VzdG9tRG9tYWlucy9wczE4NzM/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0d1506d7-2356-4ee5-b466-1d6f961c0611" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8f84d811-aa4d-41e8-b46c-aa2bdb6a3951" - ], - "x-ms-client-request-id": [ - "0d1506d7-2356-4ee5-b466-1d6f961c0611" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-correlation-request-id": [ - "83360076-44f3-44e3-8583-0a10d9168974" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005134Z:83360076-44f3-44e3-8583-0a10d9168974" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:51:34 GMT" - ], - "Content-Length": [ - "755" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465/endpoints/cdn-ps-test-msft/customdomains/ps1873\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps1873\",\r\n \"properties\": {\r\n \"hostName\": \"a.cdn-ps-test-msft.azfdtest.xyz\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Enabling\",\r\n \"customHttpsProvisioningSubstate\": \"SubmittingDomainControlValidationRequest\",\r\n \"customHttpsParameters\": {\r\n \"certificateSource\": \"Cdn\",\r\n \"certificateSourceParameters\": {\r\n \"certificateType\": \"Dedicated\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.CdnCertificateSourceParameters\"\r\n },\r\n \"protocolType\": \"ServerNameIndication\",\r\n \"minimumTlsVersion\": \"TLS12\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465/endpoints/cdn-ps-test-msft/customDomains/ps1873/enableCustomHttps?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTkwMi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NjUvZW5kcG9pbnRzL2Nkbi1wcy10ZXN0LW1zZnQvY3VzdG9tRG9tYWlucy9wczE4NzMvZW5hYmxlQ3VzdG9tSHR0cHM/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"certificateSource\": \"Cdn\",\r\n \"certificateSourceParameters\": {\r\n \"certificateType\": \"Dedicated\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.CdnCertificateSourceParameters\"\r\n },\r\n \"protocolType\": \"ServerNameIndication\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c217c4ce-3d4e-4cf6-b4dd-ecac855e819b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "237" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/operationresults/c475ff85-abbe-42a6-bf74-bee88a848eb9/profileresults/ps6465/endpointresults/cdn-ps-test-msft/customdomainresults/ps1873?api-version=2020-09-01" - ], - "Retry-After": [ - "120" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e747dffc-29e5-4bd6-9309-3223c7ee58f6" - ], - "x-ms-client-request-id": [ - "c217c4ce-3d4e-4cf6-b4dd-ecac855e819b" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/operationresults/c475ff85-abbe-42a6-bf74-bee88a848eb9?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "9b37d6a0-61e1-4255-8c3f-c21c321fb0e2" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005133Z:9b37d6a0-61e1-4255-8c3f-c21c321fb0e2" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:51:33 GMT" - ], - "Content-Length": [ - "755" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902/providers/Microsoft.Cdn/profiles/ps6465/endpoints/cdn-ps-test-msft/customdomains/ps1873\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps1873\",\r\n \"properties\": {\r\n \"hostName\": \"a.cdn-ps-test-msft.azfdtest.xyz\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Enabling\",\r\n \"customHttpsProvisioningSubstate\": \"SubmittingDomainControlValidationRequest\",\r\n \"customHttpsParameters\": {\r\n \"certificateSource\": \"Cdn\",\r\n \"certificateSourceParameters\": {\r\n \"certificateType\": \"Dedicated\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.CdnCertificateSourceParameters\"\r\n },\r\n \"protocolType\": \"ServerNameIndication\",\r\n \"minimumTlsVersion\": \"TLS12\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9902?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTkwMj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c14137fa-a8d6-414f-87aa-4e578b31749a" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "dc4b2dbf-039c-4a65-bd6f-a44ec92c893b" - ], - "x-ms-correlation-request-id": [ - "dc4b2dbf-039c-4a65-bd6f-a44ec92c893b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005134Z:dc4b2dbf-039c-4a65-bd6f-a44ec92c893b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:51:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprNU1ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "5edfa113-49a4-4e54-a432-966885542f31" - ], - "x-ms-correlation-request-id": [ - "5edfa113-49a4-4e54-a432-966885542f31" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005149Z:5edfa113-49a4-4e54-a432-966885542f31" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:51:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprNU1ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "8ba9fdfe-c377-46a8-95c4-cf7067318602" - ], - "x-ms-correlation-request-id": [ - "8ba9fdfe-c377-46a8-95c4-cf7067318602" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005204Z:8ba9fdfe-c377-46a8-95c4-cf7067318602" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:52:03 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprNU1ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "63734a73-300f-4743-a2ab-106e05aad0d4" - ], - "x-ms-correlation-request-id": [ - "63734a73-300f-4743-a2ab-106e05aad0d4" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005219Z:63734a73-300f-4743-a2ab-106e05aad0d4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:52:18 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprNU1ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "5f102bae-1894-4b88-a0ac-54c2901a9cc9" - ], - "x-ms-correlation-request-id": [ - "5f102bae-1894-4b88-a0ac-54c2901a9cc9" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005234Z:5f102bae-1894-4b88-a0ac-54c2901a9cc9" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:52:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprNU1ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "4fc17bd5-0da7-4189-99ef-63f89dd57847" - ], - "x-ms-correlation-request-id": [ - "4fc17bd5-0da7-4189-99ef-63f89dd57847" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005249Z:4fc17bd5-0da7-4189-99ef-63f89dd57847" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:52:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprNU1ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "0a54e359-9c24-4b63-982c-83ce519c3727" - ], - "x-ms-correlation-request-id": [ - "0a54e359-9c24-4b63-982c-83ce519c3727" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005304Z:0a54e359-9c24-4b63-982c-83ce519c3727" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:53:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprNU1ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "68189def-c259-4bac-9122-29c9c88c7fb5" - ], - "x-ms-correlation-request-id": [ - "68189def-c259-4bac-9122-29c9c88c7fb5" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005320Z:68189def-c259-4bac-9122-29c9c88c7fb5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:53:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprNU1ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "23174aad-f89f-4bfd-ae7b-ce220c2a61cd" - ], - "x-ms-correlation-request-id": [ - "23174aad-f89f-4bfd-ae7b-ce220c2a61cd" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005335Z:23174aad-f89f-4bfd-ae7b-ce220c2a61cd" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:53:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprNU1ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "71467ca3-0478-4e6d-880a-33cc37b5cf8a" - ], - "x-ms-correlation-request-id": [ - "71467ca3-0478-4e6d-880a-33cc37b5cf8a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005350Z:71467ca3-0478-4e6d-880a-33cc37b5cf8a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:53:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprNU1ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "a4acc8d5-2e45-4e46-8e52-a4573df4f5c2" - ], - "x-ms-correlation-request-id": [ - "a4acc8d5-2e45-4e46-8e52-a4573df4f5c2" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005405Z:a4acc8d5-2e45-4e46-8e52-a4573df4f5c2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:54:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprNU1ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "2c2ed3db-5d95-4b3b-a3ba-63ae605cdbf3" - ], - "x-ms-correlation-request-id": [ - "2c2ed3db-5d95-4b3b-a3ba-63ae605cdbf3" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005420Z:2c2ed3db-5d95-4b3b-a3ba-63ae605cdbf3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:54:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzk5MDItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXprNU1ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "1ddfa3d1-926a-41e8-843a-f7378db25ee0" - ], - "x-ms-correlation-request-id": [ - "1ddfa3d1-926a-41e8-843a-f7378db25ee0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210310T005420Z:1ddfa3d1-926a-41e8-843a-f7378db25ee0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:54:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-MicrosoftCustomDomainEnableHttpsWithRunningEndpoint": [ - "ps1873", - "ps6465", - "ps9902", - "ps7300" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestVerizonCustomDomainHttpsWithRunningEndpoint.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestVerizonCustomDomainHttpsWithRunningEndpoint.json deleted file mode 100644 index 81f701739f2c..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.CustomDomainTests/TestVerizonCustomDomainHttpsWithRunningEndpoint.json +++ /dev/null @@ -1,2565 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTcwP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "33b92c7a-d7ae-4e65-8d42-59951214559f" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-request-id": [ - "321fadfa-c4b0-4ac6-9454-8587e9a8e531" - ], - "x-ms-correlation-request-id": [ - "321fadfa-c4b0-4ac6-9454-8587e9a8e531" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002006Z:321fadfa-c4b0-4ac6-9454-8587e9a8e531" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:20:06 GMT" - ], - "Content-Length": [ - "163" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps570\",\r\n \"name\": \"ps570\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0cb43b6a-eac4-4189-9657-af62d41870ef" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b8dc5beb-5697-49f0-b06d-5ed0ca129ed8" - ], - "x-ms-client-request-id": [ - "0cb43b6a-eac4-4189-9657-af62d41870ef" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "b34de4d8-1f43-449a-aeb3-ac2fdc742b1f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002007Z:b34de4d8-1f43-449a-aeb3-ac2fdc742b1f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:20:06 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps570/providers/Microsoft.Cdn/profiles/ps2407?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzMjQwNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"location\": \"EastUS\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0cb43b6a-eac4-4189-9657-af62d41870ef" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "142" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c22ff7f1-f20b-4919-a1ac-3dfd79eb8315" - ], - "x-ms-client-request-id": [ - "0cb43b6a-eac4-4189-9657-af62d41870ef" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/operationresults/2b95b951-ffc6-4206-948b-87492299a791?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "5619af2a-dd3a-4d94-a25d-7905f38401e2" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002010Z:5619af2a-dd3a-4d94-a25d-7905f38401e2" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:20:09 GMT" - ], - "Content-Length": [ - "350" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/profiles/ps2407\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps2407\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/operationresults/2b95b951-ffc6-4206-948b-87492299a791?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvMmI5NWI5NTEtZmZjNi00MjA2LTk0OGItODc0OTIyOTlhNzkxP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0cb43b6a-eac4-4189-9657-af62d41870ef" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0132b52c-5245-4638-a04c-16cd74727eab" - ], - "x-ms-client-request-id": [ - "0cb43b6a-eac4-4189-9657-af62d41870ef" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-correlation-request-id": [ - "82a31dc5-4194-4776-a9dd-b05510169004" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002020Z:82a31dc5-4194-4776-a9dd-b05510169004" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:20:19 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/operationresults/2b95b951-ffc6-4206-948b-87492299a791?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvMmI5NWI5NTEtZmZjNi00MjA2LTk0OGItODc0OTIyOTlhNzkxP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0cb43b6a-eac4-4189-9657-af62d41870ef" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "980ff598-dd6d-4bf3-bcf5-0c042ccd3ea3" - ], - "x-ms-client-request-id": [ - "0cb43b6a-eac4-4189-9657-af62d41870ef" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-correlation-request-id": [ - "23989812-d8ed-45f4-aad6-09b76691de60" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002030Z:23989812-d8ed-45f4-aad6-09b76691de60" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:20:30 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/operationresults/2b95b951-ffc6-4206-948b-87492299a791?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvMmI5NWI5NTEtZmZjNi00MjA2LTk0OGItODc0OTIyOTlhNzkxP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0cb43b6a-eac4-4189-9657-af62d41870ef" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0431899e-4f4e-40ed-be6b-f62d76efc0e5" - ], - "x-ms-client-request-id": [ - "0cb43b6a-eac4-4189-9657-af62d41870ef" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11986" - ], - "x-ms-correlation-request-id": [ - "0319e5de-cbc3-4bad-9d10-f3179cc30aa7" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002040Z:0319e5de-cbc3-4bad-9d10-f3179cc30aa7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:20:40 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/operationresults/2b95b951-ffc6-4206-948b-87492299a791?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvMmI5NWI5NTEtZmZjNi00MjA2LTk0OGItODc0OTIyOTlhNzkxP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0cb43b6a-eac4-4189-9657-af62d41870ef" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1ee3759b-613e-4551-87de-6e5536dc1ab1" - ], - "x-ms-client-request-id": [ - "0cb43b6a-eac4-4189-9657-af62d41870ef" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11985" - ], - "x-ms-correlation-request-id": [ - "4eb7806e-267f-419f-8676-6a949ef92c3a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002051Z:4eb7806e-267f-419f-8676-6a949ef92c3a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:20:50 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/operationresults/2b95b951-ffc6-4206-948b-87492299a791?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvMmI5NWI5NTEtZmZjNi00MjA2LTk0OGItODc0OTIyOTlhNzkxP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0cb43b6a-eac4-4189-9657-af62d41870ef" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b3cba396-5564-40e5-beb4-925287b5db37" - ], - "x-ms-client-request-id": [ - "0cb43b6a-eac4-4189-9657-af62d41870ef" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11984" - ], - "x-ms-correlation-request-id": [ - "db3d0c31-fcff-4eb0-9acd-9ce150263be2" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002101Z:db3d0c31-fcff-4eb0-9acd-9ce150263be2" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:01 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/operationresults/2b95b951-ffc6-4206-948b-87492299a791?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvMmI5NWI5NTEtZmZjNi00MjA2LTk0OGItODc0OTIyOTlhNzkxP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0cb43b6a-eac4-4189-9657-af62d41870ef" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1e4bde20-c609-43a2-b1d3-a3e6e779d0f6" - ], - "x-ms-client-request-id": [ - "0cb43b6a-eac4-4189-9657-af62d41870ef" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11983" - ], - "x-ms-correlation-request-id": [ - "6b3b07a9-2054-4c66-a0c6-c37a29fb4140" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002111Z:6b3b07a9-2054-4c66-a0c6-c37a29fb4140" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:11 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps570/providers/Microsoft.Cdn/profiles/ps2407?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzMjQwNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0cb43b6a-eac4-4189-9657-af62d41870ef" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ffbc3e4d-0e4e-447e-abbf-85d98b25ff47" - ], - "x-ms-client-request-id": [ - "0cb43b6a-eac4-4189-9657-af62d41870ef" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "b0408ee9-0e53-49f6-a6a4-be5b323161bf" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002111Z:b0408ee9-0e53-49f6-a6a4-be5b323161bf" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:11 GMT" - ], - "Content-Length": [ - "349" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/profiles/ps2407\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps2407\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps570/providers/Microsoft.Cdn/profiles/ps2407?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzMjQwNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "39dde9dd-67e7-4000-aeda-ee88d1b43117" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0e163160-8867-4acc-b458-ce3aeb17caa4" - ], - "x-ms-client-request-id": [ - "39dde9dd-67e7-4000-aeda-ee88d1b43117" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "47" - ], - "x-ms-correlation-request-id": [ - "4e85d3d9-6431-4e5e-aa6e-aee93f38da95" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002154Z:4e85d3d9-6431-4e5e-aa6e-aee93f38da95" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:53 GMT" - ], - "Content-Length": [ - "349" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/profiles/ps2407\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps2407\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"testVerizonEP\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4396e942-5bda-4a3c-b752-0995fcfc24d1" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "78" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "31785e3f-0b66-439b-9b27-8cbb16081d5f" - ], - "x-ms-client-request-id": [ - "4396e942-5bda-4a3c-b752-0995fcfc24d1" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "b04591ce-fbb1-4c75-9661-5978f46532d1" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002112Z:b04591ce-fbb1-4c75-9661-5978f46532d1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:12 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzMjQwNy9lbmRwb2ludHMvdGVzdFZlcml6b25FUD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"origins\": [\r\n {\r\n \"name\": \"ps3782\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\"\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4396e942-5bda-4a3c-b752-0995fcfc24d1" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "202" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b68c759b-8964-4f1e-928a-86493c4ddb46" - ], - "x-ms-client-request-id": [ - "4396e942-5bda-4a3c-b752-0995fcfc24d1" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/operationresults/1194e806-4993-4361-8321-2ec260c5f298?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "273113ec-e099-46b2-a960-f93d96ed26d9" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002118Z:273113ec-e099-46b2-a960-f93d96ed26d9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:17 GMT" - ], - "Content-Length": [ - "1070" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"testVerizonEP\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"testVerizonEP.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps3782\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/operationresults/1194e806-4993-4361-8321-2ec260c5f298?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvMTE5NGU4MDYtNDk5My00MzYxLTgzMjEtMmVjMjYwYzVmMjk4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4396e942-5bda-4a3c-b752-0995fcfc24d1" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "330ba0b8-55f2-4b0e-9396-99cd3ec7255c" - ], - "x-ms-client-request-id": [ - "4396e942-5bda-4a3c-b752-0995fcfc24d1" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11982" - ], - "x-ms-correlation-request-id": [ - "36e8d9d9-44de-401e-9937-413f33b8f507" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002128Z:36e8d9d9-44de-401e-9937-413f33b8f507" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:27 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/operationresults/1194e806-4993-4361-8321-2ec260c5f298?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvMTE5NGU4MDYtNDk5My00MzYxLTgzMjEtMmVjMjYwYzVmMjk4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4396e942-5bda-4a3c-b752-0995fcfc24d1" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c2aea312-1481-4d63-ad7b-e7f0277a32a8" - ], - "x-ms-client-request-id": [ - "4396e942-5bda-4a3c-b752-0995fcfc24d1" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11981" - ], - "x-ms-correlation-request-id": [ - "8634aa57-f479-45ca-b944-f0c9c956ced3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002138Z:8634aa57-f479-45ca-b944-f0c9c956ced3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:37 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzMjQwNy9lbmRwb2ludHMvdGVzdFZlcml6b25FUD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4396e942-5bda-4a3c-b752-0995fcfc24d1" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "62181359-0a8f-402d-99c5-c38e366ed455" - ], - "x-ms-client-request-id": [ - "4396e942-5bda-4a3c-b752-0995fcfc24d1" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "85036237-35ea-467f-819a-99b658cf2799" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002138Z:85036237-35ea-467f-819a-99b658cf2799" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:38 GMT" - ], - "Content-Length": [ - "1068" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"testVerizonEP\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"testVerizonEP.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps3782\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzMjQwNy9lbmRwb2ludHMvdGVzdFZlcml6b25FUD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c23f0119-f064-4b4e-8ff0-854d140af445" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5181167f-3bc9-4efd-8f46-807c339154c9" - ], - "x-ms-client-request-id": [ - "c23f0119-f064-4b4e-8ff0-854d140af445" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "37d4e0fc-af46-40dc-95f3-66a9b7aea75a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002138Z:37d4e0fc-af46-40dc-95f3-66a9b7aea75a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:38 GMT" - ], - "Content-Length": [ - "1068" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"testVerizonEP\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"testVerizonEP.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps3782\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP/validateCustomDomain?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzMjQwNy9lbmRwb2ludHMvdGVzdFZlcml6b25FUC92YWxpZGF0ZUN1c3RvbURvbWFpbj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"hostName\": \"testVerizon.dustydog.us\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c85ee362-8e94-4637-b7d8-d278e50c8f0e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "45" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7e1ae21e-8a99-4be8-b4f1-9ee8152b85db" - ], - "x-ms-client-request-id": [ - "c85ee362-8e94-4637-b7d8-d278e50c8f0e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "1c332fd3-9188-4c42-abee-fba3b91c5aec" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002139Z:1c332fd3-9188-4c42-abee-fba3b91c5aec" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:39 GMT" - ], - "Content-Length": [ - "59" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"customDomainValidated\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP/validateCustomDomain?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzMjQwNy9lbmRwb2ludHMvdGVzdFZlcml6b25FUC92YWxpZGF0ZUN1c3RvbURvbWFpbj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"hostName\": \"testVerizon.dustydog.us\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1bdb58d7-761c-4d9f-a5d6-c88d1fe1ff18" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "45" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "580a9483-6b37-49f4-802f-09e2c059666a" - ], - "x-ms-client-request-id": [ - "1bdb58d7-761c-4d9f-a5d6-c88d1fe1ff18" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "b91300a4-6a12-415d-b744-4b57c5e4d321" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002140Z:b91300a4-6a12-415d-b744-4b57c5e4d321" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:39 GMT" - ], - "Content-Length": [ - "59" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"customDomainValidated\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP/customDomains?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzMjQwNy9lbmRwb2ludHMvdGVzdFZlcml6b25FUC9jdXN0b21Eb21haW5zP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d1f1ab3d-9767-49ca-9b2f-96d558523658" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "cb65b6d3-78fe-4516-93d8-71305973387e" - ], - "x-ms-client-request-id": [ - "d1f1ab3d-9767-49ca-9b2f-96d558523658" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11980" - ], - "x-ms-correlation-request-id": [ - "9c62f69d-ce88-47aa-b9ec-0580985c1502" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002140Z:9c62f69d-ce88-47aa-b9ec-0580985c1502" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:40 GMT" - ], - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP/customDomains?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzMjQwNy9lbmRwb2ludHMvdGVzdFZlcml6b25FUC9jdXN0b21Eb21haW5zP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "39dde9dd-67e7-4000-aeda-ee88d1b43117" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "08e82356-f69d-4ee7-bc05-5d2524e731cc" - ], - "x-ms-client-request-id": [ - "39dde9dd-67e7-4000-aeda-ee88d1b43117" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11976" - ], - "x-ms-correlation-request-id": [ - "d1675fb4-a7a8-4283-aee2-875218d769f5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002154Z:d1675fb4-a7a8-4283-aee2-875218d769f5" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:53 GMT" - ], - "Content-Length": [ - "493" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP/customdomains/ps9425\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps9425\",\r\n \"properties\": {\r\n \"hostName\": \"testverizon.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP/customDomains/ps9425?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzMjQwNy9lbmRwb2ludHMvdGVzdFZlcml6b25FUC9jdXN0b21Eb21haW5zL3BzOTQyNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"hostName\": \"testVerizon.dustydog.us\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d1f1ab3d-9767-49ca-9b2f-96d558523658" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ebfb73bd-d415-4892-92ab-f40a0e5fc72c" - ], - "x-ms-client-request-id": [ - "d1f1ab3d-9767-49ca-9b2f-96d558523658" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/operationresults/71365955-9dc9-4019-a1ac-008944498c43?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], - "x-ms-correlation-request-id": [ - "5ffd4fcc-f734-40bb-954c-8c5d688aeddb" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002142Z:5ffd4fcc-f734-40bb-954c-8c5d688aeddb" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:41 GMT" - ], - "Content-Length": [ - "482" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP/customdomains/ps9425\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps9425\",\r\n \"properties\": {\r\n \"hostName\": \"testverizon.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Creating\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/operationresults/71365955-9dc9-4019-a1ac-008944498c43?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvNzEzNjU5NTUtOWRjOS00MDE5LWExYWMtMDA4OTQ0NDk4YzQzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d1f1ab3d-9767-49ca-9b2f-96d558523658" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d60c9fe7-8b60-4ef0-8dd8-867ae764fb29" - ], - "x-ms-client-request-id": [ - "d1f1ab3d-9767-49ca-9b2f-96d558523658" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11979" - ], - "x-ms-correlation-request-id": [ - "9124a09a-16c8-40ba-9515-ba679c8ab2ad" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002152Z:9124a09a-16c8-40ba-9515-ba679c8ab2ad" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:51 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP/customDomains/ps9425?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzMjQwNy9lbmRwb2ludHMvdGVzdFZlcml6b25FUC9jdXN0b21Eb21haW5zL3BzOTQyNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d1f1ab3d-9767-49ca-9b2f-96d558523658" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "587055c9-5d02-4f1e-99dd-745906e1e452" - ], - "x-ms-client-request-id": [ - "d1f1ab3d-9767-49ca-9b2f-96d558523658" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11978" - ], - "x-ms-correlation-request-id": [ - "2a8d3de1-34f2-4d25-8a5f-d6cfe84d2272" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002153Z:2a8d3de1-34f2-4d25-8a5f-d6cfe84d2272" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:52 GMT" - ], - "Content-Length": [ - "481" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP/customdomains/ps9425\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps9425\",\r\n \"properties\": {\r\n \"hostName\": \"testverizon.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP/customDomains/ps9425?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzMjQwNy9lbmRwb2ludHMvdGVzdFZlcml6b25FUC9jdXN0b21Eb21haW5zL3BzOTQyNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "14246e22-9b1a-47a3-8f7e-7689069c83aa" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5a4c9cd6-b7de-475c-aab3-cb6aa0c8bb9e" - ], - "x-ms-client-request-id": [ - "14246e22-9b1a-47a3-8f7e-7689069c83aa" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11977" - ], - "x-ms-correlation-request-id": [ - "1447d32e-473c-4164-9c77-28a902af8f4c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002153Z:1447d32e-473c-4164-9c77-28a902af8f4c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:53 GMT" - ], - "Content-Length": [ - "481" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP/customdomains/ps9425\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps9425\",\r\n \"properties\": {\r\n \"hostName\": \"testverizon.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Disabled\",\r\n \"customHttpsProvisioningSubstate\": \"None\",\r\n \"customHttpsParameters\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP/customDomains/ps9425?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzMjQwNy9lbmRwb2ludHMvdGVzdFZlcml6b25FUC9jdXN0b21Eb21haW5zL3BzOTQyNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "80d412a9-f469-47bc-9526-4bec7ebb9c35" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "54054715-b34e-4590-af68-b59c72d6d391" - ], - "x-ms-client-request-id": [ - "80d412a9-f469-47bc-9526-4bec7ebb9c35" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11975" - ], - "x-ms-correlation-request-id": [ - "fe232ab5-3495-4626-b072-1aaca98d90de" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002157Z:fe232ab5-3495-4626-b072-1aaca98d90de" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:57 GMT" - ], - "Content-Length": [ - "726" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP/customdomains/ps9425\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps9425\",\r\n \"properties\": {\r\n \"hostName\": \"testverizon.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Enabling\",\r\n \"customHttpsProvisioningSubstate\": \"SubmittingDomainControlValidationRequest\",\r\n \"customHttpsParameters\": {\r\n \"certificateSource\": \"Cdn\",\r\n \"certificateSourceParameters\": {\r\n \"certificateType\": \"Shared\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.CdnCertificateSourceParameters\"\r\n },\r\n \"protocolType\": \"IPBased\",\r\n \"minimumTlsVersion\": \"None\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP/customDomains/ps9425/enableCustomHttps?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNTcwL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzMjQwNy9lbmRwb2ludHMvdGVzdFZlcml6b25FUC9jdXN0b21Eb21haW5zL3BzOTQyNS9lbmFibGVDdXN0b21IdHRwcz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"certificateSource\": \"Cdn\",\r\n \"certificateSourceParameters\": {\r\n \"certificateType\": \"Shared\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.CdnCertificateSourceParameters\"\r\n },\r\n \"protocolType\": \"IPBased\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "39dde9dd-67e7-4000-aeda-ee88d1b43117" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "221" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/operationresults/428dc627-fb0e-491c-a8a6-53064f58a773/profileresults/ps2407/endpointresults/testVerizonEP/customdomainresults/ps9425?api-version=2020-09-01" - ], - "Retry-After": [ - "120" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "46320dff-0efb-415c-a9d1-4e9324bf0c58" - ], - "x-ms-client-request-id": [ - "39dde9dd-67e7-4000-aeda-ee88d1b43117" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/operationresults/428dc627-fb0e-491c-a8a6-53064f58a773?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], - "x-ms-correlation-request-id": [ - "c70452cb-de40-4a89-9124-fa4620226139" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002157Z:c70452cb-de40-4a89-9124-fa4620226139" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:56 GMT" - ], - "Content-Length": [ - "726" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570/providers/Microsoft.Cdn/profiles/ps2407/endpoints/testVerizonEP/customdomains/ps9425\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/customdomains\",\r\n \"name\": \"ps9425\",\r\n \"properties\": {\r\n \"hostName\": \"testverizon.dustydog.us\",\r\n \"validationData\": null,\r\n \"resourceState\": \"Active\",\r\n \"customHttpsProvisioningState\": \"Enabling\",\r\n \"customHttpsProvisioningSubstate\": \"SubmittingDomainControlValidationRequest\",\r\n \"customHttpsParameters\": {\r\n \"certificateSource\": \"Cdn\",\r\n \"certificateSourceParameters\": {\r\n \"certificateType\": \"Shared\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.CdnCertificateSourceParameters\"\r\n },\r\n \"protocolType\": \"IPBased\",\r\n \"minimumTlsVersion\": \"None\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps570?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNTcwP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bdcdc301-07ad-4d27-ac76-2ec2ecf3f776" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14997" - ], - "x-ms-request-id": [ - "5d7bd733-30f8-4206-96ff-f248a3f708e6" - ], - "x-ms-correlation-request-id": [ - "5d7bd733-30f8-4206-96ff-f248a3f708e6" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002158Z:5d7bd733-30f8-4206-96ff-f248a3f708e6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:21:58 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVM01DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11984" - ], - "x-ms-request-id": [ - "498d7fac-6e56-4905-b008-1e89230dee00" - ], - "x-ms-correlation-request-id": [ - "498d7fac-6e56-4905-b008-1e89230dee00" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002213Z:498d7fac-6e56-4905-b008-1e89230dee00" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:22:13 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVM01DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11983" - ], - "x-ms-request-id": [ - "3974436f-b97f-49ab-acca-67fcf0f248d7" - ], - "x-ms-correlation-request-id": [ - "3974436f-b97f-49ab-acca-67fcf0f248d7" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002228Z:3974436f-b97f-49ab-acca-67fcf0f248d7" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:22:28 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVM01DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11982" - ], - "x-ms-request-id": [ - "6e3053c7-cec3-4ba0-a826-fcc5eda34a5c" - ], - "x-ms-correlation-request-id": [ - "6e3053c7-cec3-4ba0-a826-fcc5eda34a5c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002243Z:6e3053c7-cec3-4ba0-a826-fcc5eda34a5c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:22:43 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVM01DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11981" - ], - "x-ms-request-id": [ - "16b277e6-d7eb-43c7-b5bb-47c3e48e801e" - ], - "x-ms-correlation-request-id": [ - "16b277e6-d7eb-43c7-b5bb-47c3e48e801e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002259Z:16b277e6-d7eb-43c7-b5bb-47c3e48e801e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:22:58 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVM01DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11980" - ], - "x-ms-request-id": [ - "50133491-8c8d-48f3-8724-7c5b5c39f8b7" - ], - "x-ms-correlation-request-id": [ - "50133491-8c8d-48f3-8724-7c5b5c39f8b7" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002314Z:50133491-8c8d-48f3-8724-7c5b5c39f8b7" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:23:13 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVM01DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11979" - ], - "x-ms-request-id": [ - "23b8b8d9-c9e6-41c1-bc0f-969594c30158" - ], - "x-ms-correlation-request-id": [ - "23b8b8d9-c9e6-41c1-bc0f-969594c30158" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002329Z:23b8b8d9-c9e6-41c1-bc0f-969594c30158" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:23:29 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVM01DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11978" - ], - "x-ms-request-id": [ - "02693f66-faa7-4520-8dbe-0549b56db38a" - ], - "x-ms-correlation-request-id": [ - "02693f66-faa7-4520-8dbe-0549b56db38a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002344Z:02693f66-faa7-4520-8dbe-0549b56db38a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:23:44 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVM01DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11977" - ], - "x-ms-request-id": [ - "d9fc6deb-6d73-43d9-9edd-e83b2fa3863f" - ], - "x-ms-correlation-request-id": [ - "d9fc6deb-6d73-43d9-9edd-e83b2fa3863f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002359Z:d9fc6deb-6d73-43d9-9edd-e83b2fa3863f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:23:59 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVM01DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11976" - ], - "x-ms-request-id": [ - "9424c42f-f7e9-41f2-9b32-cd58d0617efe" - ], - "x-ms-correlation-request-id": [ - "9424c42f-f7e9-41f2-9b32-cd58d0617efe" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002414Z:9424c42f-f7e9-41f2-9b32-cd58d0617efe" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:24:14 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVM01DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11975" - ], - "x-ms-request-id": [ - "2bfae1c1-ebc3-4bb4-a1bb-d58cc8d39274" - ], - "x-ms-correlation-request-id": [ - "2bfae1c1-ebc3-4bb4-a1bb-d58cc8d39274" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002429Z:2bfae1c1-ebc3-4bb4-a1bb-d58cc8d39274" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:24:29 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVM01DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11974" - ], - "x-ms-request-id": [ - "f6c08015-4542-4e40-8e2a-6b66f609cfc3" - ], - "x-ms-correlation-request-id": [ - "f6c08015-4542-4e40-8e2a-6b66f609cfc3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002444Z:f6c08015-4542-4e40-8e2a-6b66f609cfc3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:24:44 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzU3MC1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVM01DMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11973" - ], - "x-ms-request-id": [ - "99e23a2f-4866-4554-b07f-8410e9c3b3f2" - ], - "x-ms-correlation-request-id": [ - "99e23a2f-4866-4554-b07f-8410e9c3b3f2" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210310T002444Z:99e23a2f-4866-4554-b07f-8410e9c3b3f2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 10 Mar 2021 00:24:44 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-VerizonCustomDomainEnableHttpsWithRunningEndpoint": [ - "ps9425", - "ps2407", - "ps570", - "ps3782" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/EndpointValidateProbeUrl.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/EndpointValidateProbeUrl.json deleted file mode 100644 index 6c70614cf03a..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/EndpointValidateProbeUrl.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/validateProbe?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3ZhbGlkYXRlUHJvYmU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"probeURL\": \"https://azurecdn-files.azureedge.net/dsa-test/probe-v.txt\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "372a7671-cb61-4a62-8f13-1475b674ac2f" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "79" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b1267acb-bdd8-4f3d-9701-efe69a4cc1ad" - ], - "x-ms-client-request-id": [ - "372a7671-cb61-4a62-8f13-1475b674ac2f" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "5a90cf77-aead-4143-91b2-7ad8bdf0fe07" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T223756Z:5a90cf77-aead-4143-91b2-7ad8bdf0fe07" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:37:56 GMT" - ], - "Content-Length": [ - "50" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"isValid\": true,\r\n \"errorCode\": \"None\",\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/validateProbe?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3ZhbGlkYXRlUHJvYmU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"probeURL\": \"https://www.notexist.com/notexist/notexist.txt\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "965aa2da-dd44-4b0c-bd2d-794fce370bd2" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "68" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "00602c2d-a73e-48ad-85c1-749616fc6351" - ], - "x-ms-client-request-id": [ - "965aa2da-dd44-4b0c-bd2d-794fce370bd2" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "06bd23b1-4c59-40cf-a1dd-c09e3ce2e5a4" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T223757Z:06bd23b1-4c59-40cf-a1dd-c09e3ce2e5a4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:37:56 GMT" - ], - "Content-Length": [ - "194" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"isValid\": false,\r\n \"errorCode\": \"EndpointProbeCannotBeRetrieved\",\r\n \"message\": \"We couldn't retrieve the input probe. Please verify that it is publicly accessible and its size is approximately 10 KB.\"\r\n}", - "StatusCode": 200 - } - ], - "Names": {}, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCreateWithDsa.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCreateWithDsa.json deleted file mode 100644 index 938ea5a15580..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCreateWithDsa.json +++ /dev/null @@ -1,1692 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8455?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODQ1NT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b69bca9d-836e-43b4-942f-116d311673b4" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "cb07c4b3-8c5d-4d22-bbf5-729d88a70fc8" - ], - "x-ms-correlation-request-id": [ - "cb07c4b3-8c5d-4d22-bbf5-729d88a70fc8" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224402Z:cb07c4b3-8c5d-4d22-bbf5-729d88a70fc8" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:44:01 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8455\",\r\n \"name\": \"ps8455\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "293acb50-c497-415a-9e81-a93cd6c4fcf6" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d39c5ed5-0be3-4d26-a7bf-0f3b5a9c45c2" - ], - "x-ms-client-request-id": [ - "293acb50-c497-415a-9e81-a93cd6c4fcf6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "2b0dbc3d-d18a-4e56-bc66-c69fecb0b774" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224403Z:2b0dbc3d-d18a-4e56-bc66-c69fecb0b774" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:44:03 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8455/providers/Microsoft.Cdn/profiles/ps2002?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODQ1NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczIwMDI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "293acb50-c497-415a-9e81-a93cd6c4fcf6" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "78" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0966750b-7530-4738-b9dc-05b280e917e3" - ], - "x-ms-client-request-id": [ - "293acb50-c497-415a-9e81-a93cd6c4fcf6" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8455/providers/Microsoft.Cdn/operationresults/ad3400d8-b2b8-4483-8580-f41aabe70725?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "1fbd1284-d226-477f-8d88-4099d8d9302e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224408Z:1fbd1284-d226-477f-8d88-4099d8d9302e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:44:07 GMT" - ], - "Content-Length": [ - "320" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8455/providers/Microsoft.Cdn/profiles/ps2002\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps2002\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8455/providers/Microsoft.Cdn/operationresults/ad3400d8-b2b8-4483-8580-f41aabe70725?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODQ1NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2FkMzQwMGQ4LWIyYjgtNDQ4My04NTgwLWY0MWFhYmU3MDcyNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "293acb50-c497-415a-9e81-a93cd6c4fcf6" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0fa0e78e-22b6-4969-81eb-32f836822d00" - ], - "x-ms-client-request-id": [ - "293acb50-c497-415a-9e81-a93cd6c4fcf6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "55b4adc6-c746-494d-9d77-77840d9a6de0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224418Z:55b4adc6-c746-494d-9d77-77840d9a6de0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:44:17 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8455/providers/Microsoft.Cdn/operationresults/ad3400d8-b2b8-4483-8580-f41aabe70725?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODQ1NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2FkMzQwMGQ4LWIyYjgtNDQ4My04NTgwLWY0MWFhYmU3MDcyNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "293acb50-c497-415a-9e81-a93cd6c4fcf6" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1927cfb3-8759-4392-8e21-413fb60d95b1" - ], - "x-ms-client-request-id": [ - "293acb50-c497-415a-9e81-a93cd6c4fcf6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "52bcc037-f082-40f0-ad7c-958449d2d91d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224428Z:52bcc037-f082-40f0-ad7c-958449d2d91d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:44:28 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8455/providers/Microsoft.Cdn/operationresults/ad3400d8-b2b8-4483-8580-f41aabe70725?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODQ1NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2FkMzQwMGQ4LWIyYjgtNDQ4My04NTgwLWY0MWFhYmU3MDcyNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "293acb50-c497-415a-9e81-a93cd6c4fcf6" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "65378328-5570-4b7b-8179-9188bf5fa976" - ], - "x-ms-client-request-id": [ - "293acb50-c497-415a-9e81-a93cd6c4fcf6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "ef014c51-6807-498e-a085-98f2353413f3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224438Z:ef014c51-6807-498e-a085-98f2353413f3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:44:38 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8455/providers/Microsoft.Cdn/operationresults/ad3400d8-b2b8-4483-8580-f41aabe70725?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODQ1NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2FkMzQwMGQ4LWIyYjgtNDQ4My04NTgwLWY0MWFhYmU3MDcyNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "293acb50-c497-415a-9e81-a93cd6c4fcf6" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "778e473e-9538-4eb1-97ca-4717c2d8e2e5" - ], - "x-ms-client-request-id": [ - "293acb50-c497-415a-9e81-a93cd6c4fcf6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "68c96bbf-24dd-41f7-93a2-71e0a6a94fe7" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224448Z:68c96bbf-24dd-41f7-93a2-71e0a6a94fe7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:44:48 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8455/providers/Microsoft.Cdn/operationresults/ad3400d8-b2b8-4483-8580-f41aabe70725?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODQ1NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2FkMzQwMGQ4LWIyYjgtNDQ4My04NTgwLWY0MWFhYmU3MDcyNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "293acb50-c497-415a-9e81-a93cd6c4fcf6" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "25a87f58-243d-4159-9a4c-7eb9d291c7fb" - ], - "x-ms-client-request-id": [ - "293acb50-c497-415a-9e81-a93cd6c4fcf6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "840901b3-d458-4be5-b60e-de5b29f3166e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224459Z:840901b3-d458-4be5-b60e-de5b29f3166e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:44:58 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8455/providers/Microsoft.Cdn/profiles/ps2002?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODQ1NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczIwMDI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "293acb50-c497-415a-9e81-a93cd6c4fcf6" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f6fb77fb-d2be-48ee-b9f7-30c8a70f55fb" - ], - "x-ms-client-request-id": [ - "293acb50-c497-415a-9e81-a93cd6c4fcf6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "8c37924e-8ac6-4ae6-b191-0ca6827decf7" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224459Z:8c37924e-8ac6-4ae6-b191-0ca6827decf7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:44:58 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8455/providers/Microsoft.Cdn/profiles/ps2002\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps2002\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps3395\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b0e86b50-b137-4381-a93b-7aefde64dd6c" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9c0f41f6-541f-4455-9ab4-eb2f52da4ea1" - ], - "x-ms-client-request-id": [ - "b0e86b50-b137-4381-a93b-7aefde64dd6c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "abc617cc-7fe0-48e0-a0e6-27fa551e2c26" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224459Z:abc617cc-7fe0-48e0-a0e6-27fa551e2c26" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:44:59 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps3395\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9923ae53-6b40-431c-be50-62c7629856de" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "31e18c1b-1339-4a06-b79a-c670ebfb02ae" - ], - "x-ms-client-request-id": [ - "9923ae53-6b40-431c-be50-62c7629856de" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "ce997066-8295-4309-af30-09d592e8158e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224500Z:ce997066-8295-4309-af30-09d592e8158e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:44:59 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8455/providers/Microsoft.Cdn/profiles/ps2002/endpoints/ps3395?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODQ1NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczIwMDIvZW5kcG9pbnRzL3BzMzM5NT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"originPath\": \"/dsa-test\",\r\n \"contentTypesToCompress\": [],\r\n \"originHostHeader\": \"azurecdn-files.azureedge.net\",\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"NotSet\",\r\n \"optimizationType\": \"DynamicSiteAcceleration\",\r\n \"probePath\": \"/probe-v.txt\",\r\n \"origins\": [\r\n {\r\n \"name\": \"ps2014\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\"\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9923ae53-6b40-431c-be50-62c7629856de" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "550" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f45835c0-7d0c-4e5d-8dc0-65d487f35c54" - ], - "x-ms-client-request-id": [ - "9923ae53-6b40-431c-be50-62c7629856de" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8455/providers/Microsoft.Cdn/operationresults/2903a23b-6851-4135-9f34-8e629c289d38?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "f647e522-9e16-484e-8e33-3596b711ad62" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224504Z:f647e522-9e16-484e-8e33-3596b711ad62" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:45:03 GMT" - ], - "Content-Length": [ - "1114" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8455/providers/Microsoft.Cdn/profiles/ps2002/endpoints/ps3395\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps3395\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps3395.azureedge.net\",\r\n \"originHostHeader\": \"azurecdn-files.azureedge.net\",\r\n \"originPath\": \"/dsa-test\",\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": \"DynamicSiteAcceleration\",\r\n \"probePath\": \"/probe-v.txt\",\r\n \"origins\": [\r\n {\r\n \"name\": \"ps2014\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8455/providers/Microsoft.Cdn/operationresults/2903a23b-6851-4135-9f34-8e629c289d38?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODQ1NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzI5MDNhMjNiLTY4NTEtNDEzNS05ZjM0LThlNjI5YzI4OWQzOD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9923ae53-6b40-431c-be50-62c7629856de" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "45505c2f-0250-4a43-934c-6e778ae32e11" - ], - "x-ms-client-request-id": [ - "9923ae53-6b40-431c-be50-62c7629856de" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "85fe66ff-eba3-42be-bfb6-83df3c5fd986" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224515Z:85fe66ff-eba3-42be-bfb6-83df3c5fd986" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:45:14 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8455/providers/Microsoft.Cdn/operationresults/2903a23b-6851-4135-9f34-8e629c289d38?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODQ1NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzI5MDNhMjNiLTY4NTEtNDEzNS05ZjM0LThlNjI5YzI4OWQzOD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9923ae53-6b40-431c-be50-62c7629856de" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7c5561ec-88ed-4694-89ee-389b01edfa2d" - ], - "x-ms-client-request-id": [ - "9923ae53-6b40-431c-be50-62c7629856de" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "2eb34635-ddf6-4705-baad-b262aa984d47" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224525Z:2eb34635-ddf6-4705-baad-b262aa984d47" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:45:25 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8455/providers/Microsoft.Cdn/profiles/ps2002/endpoints/ps3395?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODQ1NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczIwMDIvZW5kcG9pbnRzL3BzMzM5NT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9923ae53-6b40-431c-be50-62c7629856de" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "354712f6-1a96-4edf-bcc2-6e674acde0eb" - ], - "x-ms-client-request-id": [ - "9923ae53-6b40-431c-be50-62c7629856de" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "846199db-5371-46d5-8a01-c6c4bf1ca8cf" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224525Z:846199db-5371-46d5-8a01-c6c4bf1ca8cf" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:45:25 GMT" - ], - "Content-Length": [ - "1112" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8455/providers/Microsoft.Cdn/profiles/ps2002/endpoints/ps3395\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps3395\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps3395.azureedge.net\",\r\n \"originHostHeader\": \"azurecdn-files.azureedge.net\",\r\n \"originPath\": \"/dsa-test\",\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": \"DynamicSiteAcceleration\",\r\n \"probePath\": \"/probe-v.txt\",\r\n \"origins\": [\r\n {\r\n \"name\": \"ps2014\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8455?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODQ1NT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "46e774ab-8896-46b8-9695-1498e5ea84ba" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "73a3dd7a-9f31-422a-a474-9a996d00ceb5" - ], - "x-ms-correlation-request-id": [ - "73a3dd7a-9f31-422a-a474-9a996d00ceb5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224526Z:73a3dd7a-9f31-422a-a474-9a996d00ceb5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:45:25 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnME5UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "7c6d3f9d-466f-4e2e-951e-2d91f2005a5b" - ], - "x-ms-correlation-request-id": [ - "7c6d3f9d-466f-4e2e-951e-2d91f2005a5b" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224541Z:7c6d3f9d-466f-4e2e-951e-2d91f2005a5b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:45:41 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnME5UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "d77bc8ad-28f5-45da-a446-fc30af72bc94" - ], - "x-ms-correlation-request-id": [ - "d77bc8ad-28f5-45da-a446-fc30af72bc94" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224556Z:d77bc8ad-28f5-45da-a446-fc30af72bc94" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:45:56 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnME5UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "386e26b9-159d-4bea-875c-49adff49274d" - ], - "x-ms-correlation-request-id": [ - "386e26b9-159d-4bea-875c-49adff49274d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224611Z:386e26b9-159d-4bea-875c-49adff49274d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:46:11 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnME5UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "b229bb25-1101-48c0-9db6-eda57880f7b0" - ], - "x-ms-correlation-request-id": [ - "b229bb25-1101-48c0-9db6-eda57880f7b0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224627Z:b229bb25-1101-48c0-9db6-eda57880f7b0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:46:26 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnME5UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "754ccc14-22d9-40db-8645-0567a44300c1" - ], - "x-ms-correlation-request-id": [ - "754ccc14-22d9-40db-8645-0567a44300c1" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224642Z:754ccc14-22d9-40db-8645-0567a44300c1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:46:41 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnME5UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "b764a295-a01c-4171-823f-46ea4c6188e1" - ], - "x-ms-correlation-request-id": [ - "b764a295-a01c-4171-823f-46ea4c6188e1" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224657Z:b764a295-a01c-4171-823f-46ea4c6188e1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:46:56 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnME5UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "16195248-466e-45af-8e8d-0de7ba7c97c5" - ], - "x-ms-correlation-request-id": [ - "16195248-466e-45af-8e8d-0de7ba7c97c5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224712Z:16195248-466e-45af-8e8d-0de7ba7c97c5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:47:12 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnME5UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "c5e51343-0051-4367-b9f1-66155fa16e38" - ], - "x-ms-correlation-request-id": [ - "c5e51343-0051-4367-b9f1-66155fa16e38" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224727Z:c5e51343-0051-4367-b9f1-66155fa16e38" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:47:27 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnME5UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "396a926b-34e3-4437-9a74-ccb89d25c5cc" - ], - "x-ms-correlation-request-id": [ - "396a926b-34e3-4437-9a74-ccb89d25c5cc" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224742Z:396a926b-34e3-4437-9a74-ccb89d25c5cc" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:47:42 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnME5UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "9a4b0557-b37a-47c7-9229-14ae851ff09c" - ], - "x-ms-correlation-request-id": [ - "9a4b0557-b37a-47c7-9229-14ae851ff09c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224757Z:9a4b0557-b37a-47c7-9229-14ae851ff09c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:47:57 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg0NTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnME5UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "8bb2b85a-123a-4795-b7f2-2fb485576b05" - ], - "x-ms-correlation-request-id": [ - "8bb2b85a-123a-4795-b7f2-2fb485576b05" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T224757Z:8bb2b85a-123a-4795-b7f2-2fb485576b05" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:47:57 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-EndpointCreateWithDsa": [ - "ps2002", - "ps8455", - "ps3395", - "ps2014" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCreateWithRulesEngine.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCreateWithRulesEngine.json deleted file mode 100644 index 632e52c9dfcb..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCreateWithRulesEngine.json +++ /dev/null @@ -1,1896 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8751?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc1MT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a50a5810-f4ca-412a-9ef8-85d5c886c144" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "361aabab-926e-4db8-8e36-eb369528f24a" - ], - "x-ms-correlation-request-id": [ - "361aabab-926e-4db8-8e36-eb369528f24a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225032Z:361aabab-926e-4db8-8e36-eb369528f24a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:50:31 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8751\",\r\n \"name\": \"ps8751\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce3e21c3-4a8e-4f86-97a8-1f833c58e67c" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8398a4a9-1292-45ff-be34-ae2791bd9a61" - ], - "x-ms-client-request-id": [ - "ce3e21c3-4a8e-4f86-97a8-1f833c58e67c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "391e688c-6b5c-4230-9b86-0d8157722a64" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225033Z:391e688c-6b5c-4230-9b86-0d8157722a64" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:50:33 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8751/providers/Microsoft.Cdn/profiles/ps3398?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODc1MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMzOTg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce3e21c3-4a8e-4f86-97a8-1f833c58e67c" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "80" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "739fd5b0-d15e-439a-ba06-a30c75a7d9ae" - ], - "x-ms-client-request-id": [ - "ce3e21c3-4a8e-4f86-97a8-1f833c58e67c" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8751/providers/Microsoft.Cdn/operationresults/40023ee0-d900-419e-a16b-c695f8e98afd?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "f002350b-8f7a-4135-8f23-d4a66d30f822" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225037Z:f002350b-8f7a-4135-8f23-d4a66d30f822" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:50:37 GMT" - ], - "Content-Length": [ - "322" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8751/providers/Microsoft.Cdn/profiles/ps3398\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps3398\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8751/providers/Microsoft.Cdn/operationresults/40023ee0-d900-419e-a16b-c695f8e98afd?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc1MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzQwMDIzZWUwLWQ5MDAtNDE5ZS1hMTZiLWM2OTVmOGU5OGFmZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce3e21c3-4a8e-4f86-97a8-1f833c58e67c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "34c8dc62-80d5-4859-9210-56f884aeb5a7" - ], - "x-ms-client-request-id": [ - "ce3e21c3-4a8e-4f86-97a8-1f833c58e67c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "aa9d74b4-08be-4e38-b7a1-e96ef99cb351" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225048Z:aa9d74b4-08be-4e38-b7a1-e96ef99cb351" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:50:47 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8751/providers/Microsoft.Cdn/operationresults/40023ee0-d900-419e-a16b-c695f8e98afd?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc1MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzQwMDIzZWUwLWQ5MDAtNDE5ZS1hMTZiLWM2OTVmOGU5OGFmZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce3e21c3-4a8e-4f86-97a8-1f833c58e67c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "bf6cee32-d9a4-4a4d-ac27-743328b3c088" - ], - "x-ms-client-request-id": [ - "ce3e21c3-4a8e-4f86-97a8-1f833c58e67c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "5d24db5f-fd5b-4ae1-a2dd-0cd66df7d2ab" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225058Z:5d24db5f-fd5b-4ae1-a2dd-0cd66df7d2ab" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:50:57 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8751/providers/Microsoft.Cdn/profiles/ps3398?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODc1MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMzOTg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce3e21c3-4a8e-4f86-97a8-1f833c58e67c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "69db036c-530c-496e-b5d1-20dd5124ba91" - ], - "x-ms-client-request-id": [ - "ce3e21c3-4a8e-4f86-97a8-1f833c58e67c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "95e5112b-01d9-4902-8927-1f8a214a0ad5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225058Z:95e5112b-01d9-4902-8927-1f8a214a0ad5" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:50:57 GMT" - ], - "Content-Length": [ - "321" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8751/providers/Microsoft.Cdn/profiles/ps3398\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps3398\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps3613\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4cc47092-72d9-45df-aae6-751faa071254" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1eb3560b-4f34-4fbd-b462-236bb4af8157" - ], - "x-ms-client-request-id": [ - "4cc47092-72d9-45df-aae6-751faa071254" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "8803c57a-30a0-4bc0-aadd-06999e337578" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225059Z:8803c57a-30a0-4bc0-aadd-06999e337578" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:50:58 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps3613\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a2b1b6e8-041d-48fc-a549-fa84f3ce4074" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0f979168-8cdc-46e8-912e-2f230507a901" - ], - "x-ms-client-request-id": [ - "a2b1b6e8-041d-48fc-a549-fa84f3ce4074" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "0894ba57-6aa7-4808-9b86-28b3f99a5898" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225059Z:0894ba57-6aa7-4808-9b86-28b3f99a5898" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:50:58 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8751/providers/Microsoft.Cdn/profiles/ps3398/endpoints/ps3613?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODc1MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMzOTgvZW5kcG9pbnRzL3BzMzYxMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"deliveryPolicy\": {\r\n \"description\": \"Sample delivery policy\",\r\n \"rules\": [\r\n {\r\n \"name\": \"EmptyCondition\",\r\n \"order\": 0,\r\n \"actions\": [\r\n {\r\n \"name\": \"UrlRedirect\",\r\n \"parameters\": {\r\n \"redirectType\": \"Found\",\r\n \"destinationProtocol\": \"MatchRequest\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters\"\r\n }\r\n },\r\n {\r\n \"name\": \"CacheKeyQueryString\",\r\n \"parameters\": {\r\n \"queryStringBehavior\": \"IncludeAll\",\r\n \"queryParameters\": \"\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"Rule1\",\r\n \"order\": 1,\r\n \"conditions\": [\r\n {\r\n \"name\": \"IsDevice\",\r\n \"parameters\": {\r\n \"negateCondition\": false,\r\n \"matchValues\": [\r\n \"Desktop\"\r\n ],\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleIsDeviceConditionParameters\",\r\n \"operator\": \"Equal\"\r\n }\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"name\": \"UrlRewrite\",\r\n \"parameters\": {\r\n \"sourcePattern\": \"/abc\",\r\n \"destination\": \"/def\",\r\n \"preserveUnmatchedPath\": true,\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters\"\r\n }\r\n },\r\n {\r\n \"name\": \"CacheKeyQueryString\",\r\n \"parameters\": {\r\n \"queryStringBehavior\": \"ExcludeAll\",\r\n \"queryParameters\": \"\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"origins\": [\r\n {\r\n \"name\": \"ps184\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\"\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a2b1b6e8-041d-48fc-a549-fa84f3ce4074" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "2295" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ddd3f970-ac82-4de6-a2a1-6f91f09010d1" - ], - "x-ms-client-request-id": [ - "a2b1b6e8-041d-48fc-a549-fa84f3ce4074" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8751/providers/Microsoft.Cdn/operationresults/58d75c8d-e63f-443f-8192-2d7317ee6546?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "fdc8163f-a60f-4e34-b65a-d23312c72476" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225104Z:fdc8163f-a60f-4e34-b65a-d23312c72476" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:51:03 GMT" - ], - "Content-Length": [ - "2274" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8751/providers/Microsoft.Cdn/profiles/ps3398/endpoints/ps3613\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps3613\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps3613.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps184\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": {\r\n \"description\": \"Sample delivery policy\",\r\n \"rules\": [\r\n {\r\n \"name\": \"EmptyCondition\",\r\n \"order\": 0,\r\n \"conditions\": [],\r\n \"actions\": [\r\n {\r\n \"name\": \"UrlRedirect\",\r\n \"parameters\": {\r\n \"redirectType\": \"Found\",\r\n \"destinationProtocol\": \"MatchRequest\",\r\n \"customQueryString\": null,\r\n \"customPath\": null,\r\n \"customHostname\": null,\r\n \"customFragment\": null,\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters\"\r\n }\r\n },\r\n {\r\n \"name\": \"CacheKeyQueryString\",\r\n \"parameters\": {\r\n \"queryStringBehavior\": \"IncludeAll\",\r\n \"queryParameters\": \"\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"Rule1\",\r\n \"order\": 1,\r\n \"conditions\": [\r\n {\r\n \"name\": \"IsDevice\",\r\n \"parameters\": {\r\n \"matchValues\": [\r\n \"0\"\r\n ],\r\n \"operator\": \"Equal\",\r\n \"negateCondition\": false,\r\n \"transforms\": [],\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleIsDeviceConditionParameters\"\r\n }\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"name\": \"UrlRewrite\",\r\n \"parameters\": {\r\n \"sourcePattern\": \"/abc\",\r\n \"destination\": \"/def\",\r\n \"preserveUnmatchedPath\": true,\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters\"\r\n }\r\n },\r\n {\r\n \"name\": \"CacheKeyQueryString\",\r\n \"parameters\": {\r\n \"queryStringBehavior\": \"ExcludeAll\",\r\n \"queryParameters\": \"\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8751/providers/Microsoft.Cdn/operationresults/58d75c8d-e63f-443f-8192-2d7317ee6546?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc1MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzU4ZDc1YzhkLWU2M2YtNDQzZi04MTkyLTJkNzMxN2VlNjU0Nj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a2b1b6e8-041d-48fc-a549-fa84f3ce4074" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f9b5d7df-e927-43b0-97d0-0e3508ee02f3" - ], - "x-ms-client-request-id": [ - "a2b1b6e8-041d-48fc-a549-fa84f3ce4074" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "c0d86873-63d5-4a0f-9746-1bb12fecc644" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225114Z:c0d86873-63d5-4a0f-9746-1bb12fecc644" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:51:14 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8751/providers/Microsoft.Cdn/operationresults/58d75c8d-e63f-443f-8192-2d7317ee6546?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc1MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzU4ZDc1YzhkLWU2M2YtNDQzZi04MTkyLTJkNzMxN2VlNjU0Nj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a2b1b6e8-041d-48fc-a549-fa84f3ce4074" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e2061b3b-e069-4ec8-85be-0a8ae57b6f1b" - ], - "x-ms-client-request-id": [ - "a2b1b6e8-041d-48fc-a549-fa84f3ce4074" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "f16b2cba-7702-4ed2-9edb-1265e0a17cb9" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225124Z:f16b2cba-7702-4ed2-9edb-1265e0a17cb9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:51:24 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8751/providers/Microsoft.Cdn/profiles/ps3398/endpoints/ps3613?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODc1MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMzOTgvZW5kcG9pbnRzL3BzMzYxMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a2b1b6e8-041d-48fc-a549-fa84f3ce4074" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "246b4838-0f01-4491-a280-1b284ffef158" - ], - "x-ms-client-request-id": [ - "a2b1b6e8-041d-48fc-a549-fa84f3ce4074" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "de0334ee-815c-43f9-8ae7-7a08be082120" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225125Z:de0334ee-815c-43f9-8ae7-7a08be082120" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:51:25 GMT" - ], - "Content-Length": [ - "2278" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8751/providers/Microsoft.Cdn/profiles/ps3398/endpoints/ps3613\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps3613\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps3613.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps184\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": {\r\n \"description\": \"Sample delivery policy\",\r\n \"rules\": [\r\n {\r\n \"name\": \"EmptyCondition\",\r\n \"order\": 0,\r\n \"conditions\": [],\r\n \"actions\": [\r\n {\r\n \"name\": \"UrlRedirect\",\r\n \"parameters\": {\r\n \"redirectType\": \"Found\",\r\n \"destinationProtocol\": \"MatchRequest\",\r\n \"customQueryString\": null,\r\n \"customPath\": null,\r\n \"customHostname\": null,\r\n \"customFragment\": null,\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters\"\r\n }\r\n },\r\n {\r\n \"name\": \"CacheKeyQueryString\",\r\n \"parameters\": {\r\n \"queryStringBehavior\": \"IncludeAll\",\r\n \"queryParameters\": \"\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"Rule1\",\r\n \"order\": 1,\r\n \"conditions\": [\r\n {\r\n \"name\": \"IsDevice\",\r\n \"parameters\": {\r\n \"matchValues\": [\r\n \"Desktop\"\r\n ],\r\n \"operator\": \"Equal\",\r\n \"negateCondition\": false,\r\n \"transforms\": [],\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleIsDeviceConditionParameters\"\r\n }\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"name\": \"UrlRewrite\",\r\n \"parameters\": {\r\n \"sourcePattern\": \"/abc\",\r\n \"destination\": \"/def\",\r\n \"preserveUnmatchedPath\": true,\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters\"\r\n }\r\n },\r\n {\r\n \"name\": \"CacheKeyQueryString\",\r\n \"parameters\": {\r\n \"queryStringBehavior\": \"ExcludeAll\",\r\n \"queryParameters\": \"\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8751/providers/Microsoft.Cdn/profiles/ps3398/endpoints/ps3613?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODc1MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMzOTgvZW5kcG9pbnRzL3BzMzYxMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a9ff1d10-1405-4afa-b9b7-8a400780709a" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "960245ab-2e28-44ed-b6b2-804fccba1336" - ], - "x-ms-client-request-id": [ - "a9ff1d10-1405-4afa-b9b7-8a400780709a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "47" - ], - "x-ms-correlation-request-id": [ - "a6b0b205-3658-4947-a524-9e1118067482" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225148Z:a6b0b205-3658-4947-a524-9e1118067482" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:51:48 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8751/providers/Microsoft.Cdn/profiles/ps3398/endpoints?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODc1MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMzOTgvZW5kcG9pbnRzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "678ab40f-8f37-422d-b955-326500be93cb" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4eb0c5d7-9d41-4ebc-b8fb-8723766bf7ac" - ], - "x-ms-client-request-id": [ - "678ab40f-8f37-422d-b955-326500be93cb" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "01d6f15e-bceb-4146-aebf-1b0852fbaf4a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225125Z:01d6f15e-bceb-4146-aebf-1b0852fbaf4a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:51:25 GMT" - ], - "Content-Length": [ - "2290" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8751/providers/Microsoft.Cdn/profiles/ps3398/endpoints/ps3613\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps3613\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps3613.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps184\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": {\r\n \"description\": \"Sample delivery policy\",\r\n \"rules\": [\r\n {\r\n \"name\": \"EmptyCondition\",\r\n \"order\": 0,\r\n \"conditions\": [],\r\n \"actions\": [\r\n {\r\n \"name\": \"UrlRedirect\",\r\n \"parameters\": {\r\n \"redirectType\": \"Found\",\r\n \"destinationProtocol\": \"MatchRequest\",\r\n \"customQueryString\": null,\r\n \"customPath\": null,\r\n \"customHostname\": null,\r\n \"customFragment\": null,\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters\"\r\n }\r\n },\r\n {\r\n \"name\": \"CacheKeyQueryString\",\r\n \"parameters\": {\r\n \"queryStringBehavior\": \"IncludeAll\",\r\n \"queryParameters\": \"\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters\"\r\n }\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"Rule1\",\r\n \"order\": 1,\r\n \"conditions\": [\r\n {\r\n \"name\": \"IsDevice\",\r\n \"parameters\": {\r\n \"matchValues\": [\r\n \"Desktop\"\r\n ],\r\n \"operator\": \"Equal\",\r\n \"negateCondition\": false,\r\n \"transforms\": [],\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleIsDeviceConditionParameters\"\r\n }\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"name\": \"UrlRewrite\",\r\n \"parameters\": {\r\n \"sourcePattern\": \"/abc\",\r\n \"destination\": \"/def\",\r\n \"preserveUnmatchedPath\": true,\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters\"\r\n }\r\n },\r\n {\r\n \"name\": \"CacheKeyQueryString\",\r\n \"parameters\": {\r\n \"queryStringBehavior\": \"ExcludeAll\",\r\n \"queryParameters\": \"\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8751/providers/Microsoft.Cdn/profiles/ps3398/endpoints/ps3613?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODc1MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMzOTgvZW5kcG9pbnRzL3BzMzYxMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "678ab40f-8f37-422d-b955-326500be93cb" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8751/providers/Microsoft.Cdn/operationresults/d9dbb40d-f9db-4fdb-a935-025f5732ba94/profileresults/ps3398/endpointresults/ps3613?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "12dccb59-0abf-4613-917e-0a99b5a39c13" - ], - "x-ms-client-request-id": [ - "678ab40f-8f37-422d-b955-326500be93cb" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8751/providers/Microsoft.Cdn/operationresults/d9dbb40d-f9db-4fdb-a935-025f5732ba94?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-correlation-request-id": [ - "f8c7123c-ff5c-44fd-bd46-8caf56f80905" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225127Z:f8c7123c-ff5c-44fd-bd46-8caf56f80905" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:51:27 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8751/providers/Microsoft.Cdn/operationresults/d9dbb40d-f9db-4fdb-a935-025f5732ba94?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc1MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q5ZGJiNDBkLWY5ZGItNGZkYi1hOTM1LTAyNWY1NzMyYmE5ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "678ab40f-8f37-422d-b955-326500be93cb" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "db36e407-b0f8-40f2-bd45-49bca0691a65" - ], - "x-ms-client-request-id": [ - "678ab40f-8f37-422d-b955-326500be93cb" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "032c3ca3-246a-4c4d-8416-a5725dd2dae9" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225137Z:032c3ca3-246a-4c4d-8416-a5725dd2dae9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:51:37 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8751/providers/Microsoft.Cdn/operationresults/d9dbb40d-f9db-4fdb-a935-025f5732ba94?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc1MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q5ZGJiNDBkLWY5ZGItNGZkYi1hOTM1LTAyNWY1NzMyYmE5ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "678ab40f-8f37-422d-b955-326500be93cb" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "288d43c5-0b04-47d6-9178-b1202ea3239a" - ], - "x-ms-client-request-id": [ - "678ab40f-8f37-422d-b955-326500be93cb" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "9074beaa-7303-46c2-bad4-f324aa7ffd1f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225147Z:9074beaa-7303-46c2-bad4-f324aa7ffd1f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:51:47 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8751/providers/Microsoft.Cdn/operationresults/d9dbb40d-f9db-4fdb-a935-025f5732ba94/profileresults/ps3398/endpointresults/ps3613?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc1MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q5ZGJiNDBkLWY5ZGItNGZkYi1hOTM1LTAyNWY1NzMyYmE5NC9wcm9maWxlcmVzdWx0cy9wczMzOTgvZW5kcG9pbnRyZXN1bHRzL3BzMzYxMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "678ab40f-8f37-422d-b955-326500be93cb" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "95759026-5ede-43ac-8b27-26b30113a522" - ], - "x-ms-client-request-id": [ - "678ab40f-8f37-422d-b955-326500be93cb" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "2d6d532a-a6db-49b1-8d97-ef9812400189" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225147Z:2d6d532a-a6db-49b1-8d97-ef9812400189" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:51:47 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8751?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODc1MT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a108503b-28ec-4807-a19d-c4aa6fadcf48" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "ad3c016d-7e59-4967-acce-df359671e858" - ], - "x-ms-correlation-request-id": [ - "ad3c016d-7e59-4967-acce-df359671e858" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225149Z:ad3c016d-7e59-4967-acce-df359671e858" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:51:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM05URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "c8a5d9a3-6282-4678-87c5-9dc96d7c843f" - ], - "x-ms-correlation-request-id": [ - "c8a5d9a3-6282-4678-87c5-9dc96d7c843f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225204Z:c8a5d9a3-6282-4678-87c5-9dc96d7c843f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:52:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM05URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "e485dabe-f1b5-4c00-bbab-bba5e8f43681" - ], - "x-ms-correlation-request-id": [ - "e485dabe-f1b5-4c00-bbab-bba5e8f43681" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225219Z:e485dabe-f1b5-4c00-bbab-bba5e8f43681" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:52:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM05URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "701defd5-0cee-4dff-af80-420918e0ddc3" - ], - "x-ms-correlation-request-id": [ - "701defd5-0cee-4dff-af80-420918e0ddc3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225234Z:701defd5-0cee-4dff-af80-420918e0ddc3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:52:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM05URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "4e247b33-ab51-41c6-b9f2-de6d62ef0e69" - ], - "x-ms-correlation-request-id": [ - "4e247b33-ab51-41c6-b9f2-de6d62ef0e69" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225249Z:4e247b33-ab51-41c6-b9f2-de6d62ef0e69" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:52:48 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM05URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "72427eff-2aac-400d-b2ea-dda558c20b55" - ], - "x-ms-correlation-request-id": [ - "72427eff-2aac-400d-b2ea-dda558c20b55" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225304Z:72427eff-2aac-400d-b2ea-dda558c20b55" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:53:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM05URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "5c172d74-fc17-4f5b-b7b2-470e4869f5af" - ], - "x-ms-correlation-request-id": [ - "5c172d74-fc17-4f5b-b7b2-470e4869f5af" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225320Z:5c172d74-fc17-4f5b-b7b2-470e4869f5af" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:53:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM05URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "7c88d3f6-e3ad-49ab-bcb4-cd8921918802" - ], - "x-ms-correlation-request-id": [ - "7c88d3f6-e3ad-49ab-bcb4-cd8921918802" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225335Z:7c88d3f6-e3ad-49ab-bcb4-cd8921918802" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:53:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM05URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "4ff40292-df27-45c9-9957-7fc765fd245f" - ], - "x-ms-correlation-request-id": [ - "4ff40292-df27-45c9-9957-7fc765fd245f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225350Z:4ff40292-df27-45c9-9957-7fc765fd245f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:53:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM05URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "b7de8f2b-0c81-41bb-9b03-31588b1ef670" - ], - "x-ms-correlation-request-id": [ - "b7de8f2b-0c81-41bb-9b03-31588b1ef670" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225405Z:b7de8f2b-0c81-41bb-9b03-31588b1ef670" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:54:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM05URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "73abe3ec-79e7-4df7-89c3-4cd850018096" - ], - "x-ms-correlation-request-id": [ - "73abe3ec-79e7-4df7-89c3-4cd850018096" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225420Z:73abe3ec-79e7-4df7-89c3-4cd850018096" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:54:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg3NTEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnM05URXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "7ed46f4f-2a21-4717-a53f-3abb78bec764" - ], - "x-ms-correlation-request-id": [ - "7ed46f4f-2a21-4717-a53f-3abb78bec764" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225420Z:7ed46f4f-2a21-4717-a53f-3abb78bec764" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:54:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-EndpointCreateWithRulesEngine": [ - "ps3398", - "ps8751", - "ps3613", - "ps184" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCrudAndAction.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCrudAndAction.json deleted file mode 100644 index 25d3af32a8c8..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCrudAndAction.json +++ /dev/null @@ -1,2466 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzg4OD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8b40ebe0-520e-426d-9dce-b9183a715db8" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-request-id": [ - "bf64a4eb-00aa-45b4-b6b6-e4863804da3b" - ], - "x-ms-correlation-request-id": [ - "bf64a4eb-00aa-45b4-b6b6-e4863804da3b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225439Z:bf64a4eb-00aa-45b4-b6b6-e4863804da3b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:54:39 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7888\",\r\n \"name\": \"ps7888\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b104f595-ff56-4292-b275-78f7ad3c2099" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1f22570e-5c77-4347-9399-ef53990b575e" - ], - "x-ms-client-request-id": [ - "b104f595-ff56-4292-b275-78f7ad3c2099" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "5ca71fe5-1c5f-4e03-ab31-88939589a09a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225440Z:5ca71fe5-1c5f-4e03-ab31-88939589a09a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:54:39 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQzODc/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b104f595-ff56-4292-b275-78f7ad3c2099" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "80" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "84f0073e-0f78-4d3e-b81c-7169edb3600e" - ], - "x-ms-client-request-id": [ - "b104f595-ff56-4292-b275-78f7ad3c2099" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/6c23b7f5-f08b-4c51-b765-167f875e40a4?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "0f01bdc5-cec1-4148-a489-2050224cb6f5" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225444Z:0f01bdc5-cec1-4148-a489-2050224cb6f5" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:54:43 GMT" - ], - "Content-Length": [ - "322" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps4387\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/6c23b7f5-f08b-4c51-b765-167f875e40a4?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzZjMjNiN2Y1LWYwOGItNGM1MS1iNzY1LTE2N2Y4NzVlNDBhND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b104f595-ff56-4292-b275-78f7ad3c2099" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "10ae818a-f339-4d00-898b-20ce5adc9393" - ], - "x-ms-client-request-id": [ - "b104f595-ff56-4292-b275-78f7ad3c2099" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "581e1c66-f43f-4807-87bc-a967fe894f29" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225454Z:581e1c66-f43f-4807-87bc-a967fe894f29" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:54:54 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/6c23b7f5-f08b-4c51-b765-167f875e40a4?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzZjMjNiN2Y1LWYwOGItNGM1MS1iNzY1LTE2N2Y4NzVlNDBhND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b104f595-ff56-4292-b275-78f7ad3c2099" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3693b1e2-25fd-4037-9f42-b51fc4d2f24b" - ], - "x-ms-client-request-id": [ - "b104f595-ff56-4292-b275-78f7ad3c2099" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "8d7fe4b7-d79a-4f24-ae4d-c6ac48278175" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225504Z:8d7fe4b7-d79a-4f24-ae4d-c6ac48278175" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:55:04 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQzODc/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b104f595-ff56-4292-b275-78f7ad3c2099" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "bc22c842-bfc3-447e-a3ca-66b342241d49" - ], - "x-ms-client-request-id": [ - "b104f595-ff56-4292-b275-78f7ad3c2099" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "2f89b874-05c4-49eb-9559-bed013277f9f" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225504Z:2f89b874-05c4-49eb-9559-bed013277f9f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:55:04 GMT" - ], - "Content-Length": [ - "321" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps4387\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps368\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "81924642-523c-460a-9ab0-25b15d096db5" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "70" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "244b911c-94b9-4fc2-91a6-e2f1316d863e" - ], - "x-ms-client-request-id": [ - "81924642-523c-460a-9ab0-25b15d096db5" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "14e635e7-9855-443e-9b32-6866981c7bba" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225505Z:14e635e7-9855-443e-9b32-6866981c7bba" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:55:05 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps368\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7fab1e93-d299-4fc7-aae2-7553c410212a" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "70" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0f1652f2-00cc-447d-916c-7069ff2f7934" - ], - "x-ms-client-request-id": [ - "7fab1e93-d299-4fc7-aae2-7553c410212a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "096911c5-6a90-43a1-b57e-cc0b42a9bbfe" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225507Z:096911c5-6a90-43a1-b57e-cc0b42a9bbfe" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:55:07 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps368\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "83a3651e-77ab-436b-971f-546f8d453264" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "70" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b37645ba-0cfc-47cd-bd5b-7c67b5648bdb" - ], - "x-ms-client-request-id": [ - "83a3651e-77ab-436b-971f-546f8d453264" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1197" - ], - "x-ms-correlation-request-id": [ - "d1a95eba-f0d5-4cb0-9631-f23f7c67ecc3" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225534Z:d1a95eba-f0d5-4cb0-9631-f23f7c67ecc3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:55:33 GMT" - ], - "Content-Length": [ - "88" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": false,\r\n \"reason\": \"Name is already in use\",\r\n \"message\": \"Name not available\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387/endpoints/ps368?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQzODcvZW5kcG9pbnRzL3BzMzY4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"deliveryPolicy\": {\r\n \"description\": \"Sample delivery policy\",\r\n \"rules\": [\r\n {\r\n \"name\": \"Rule1\",\r\n \"order\": 1,\r\n \"conditions\": [\r\n {\r\n \"name\": \"UrlPath\",\r\n \"parameters\": {\r\n \"operator\": \"Contains\",\r\n \"negateCondition\": false,\r\n \"matchValues\": [\r\n \"abc\"\r\n ],\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters\"\r\n }\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"name\": \"ModifyResponseHeader\",\r\n \"parameters\": {\r\n \"headerAction\": \"Append\",\r\n \"headerName\": \"Access-Control-Allow-Origin\",\r\n \"value\": \"*\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"origins\": [\r\n {\r\n \"name\": \"ps8564\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\"\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7fab1e93-d299-4fc7-aae2-7553c410212a" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "1200" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "660421ed-e57d-4ba5-bb0e-7f7c0c3e36ec" - ], - "x-ms-client-request-id": [ - "7fab1e93-d299-4fc7-aae2-7553c410212a" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/bfe38b46-17b3-4bd8-b52d-9827331ef2de?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "690810b7-0a70-4002-8414-a74f2ef1b0af" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225512Z:690810b7-0a70-4002-8414-a74f2ef1b0af" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:55:12 GMT" - ], - "Content-Length": [ - "1555" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387/endpoints/ps368\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps368\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps368.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps8564\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": {\r\n \"description\": \"Sample delivery policy\",\r\n \"rules\": [\r\n {\r\n \"name\": \"Rule1\",\r\n \"order\": 1,\r\n \"conditions\": [\r\n {\r\n \"name\": \"UrlPath\",\r\n \"parameters\": {\r\n \"operator\": \"Contains\",\r\n \"negateCondition\": false,\r\n \"matchValues\": [\r\n \"abc\"\r\n ],\r\n \"transforms\": [],\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters\"\r\n }\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"name\": \"ModifyResponseHeader\",\r\n \"parameters\": {\r\n \"headerAction\": \"Append\",\r\n \"headerName\": \"Access-Control-Allow-Origin\",\r\n \"value\": \"*\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/bfe38b46-17b3-4bd8-b52d-9827331ef2de?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JmZTM4YjQ2LTE3YjMtNGJkOC1iNTJkLTk4MjczMzFlZjJkZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7fab1e93-d299-4fc7-aae2-7553c410212a" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "366bea48-c7de-4cb1-bf25-38d0d0b96b0f" - ], - "x-ms-client-request-id": [ - "7fab1e93-d299-4fc7-aae2-7553c410212a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "33846f03-4247-46f5-a9c6-c69f1ddecbc0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225523Z:33846f03-4247-46f5-a9c6-c69f1ddecbc0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:55:22 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/bfe38b46-17b3-4bd8-b52d-9827331ef2de?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JmZTM4YjQ2LTE3YjMtNGJkOC1iNTJkLTk4MjczMzFlZjJkZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7fab1e93-d299-4fc7-aae2-7553c410212a" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5523a6d1-f246-4971-bb1d-e8170b42c591" - ], - "x-ms-client-request-id": [ - "7fab1e93-d299-4fc7-aae2-7553c410212a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "c67c99ae-a0ea-4cb4-b0ac-6f24b8698dad" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225533Z:c67c99ae-a0ea-4cb4-b0ac-6f24b8698dad" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:55:32 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387/endpoints/ps368?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQzODcvZW5kcG9pbnRzL3BzMzY4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7fab1e93-d299-4fc7-aae2-7553c410212a" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5105f3c2-ebf2-4347-b365-21d6ce32ebfc" - ], - "x-ms-client-request-id": [ - "7fab1e93-d299-4fc7-aae2-7553c410212a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "4e7eb20b-f9de-4cb0-b880-faa3b41769b4" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225533Z:4e7eb20b-f9de-4cb0-b880-faa3b41769b4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:55:33 GMT" - ], - "Content-Length": [ - "1553" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387/endpoints/ps368\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps368\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps368.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps8564\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": {\r\n \"description\": \"Sample delivery policy\",\r\n \"rules\": [\r\n {\r\n \"name\": \"Rule1\",\r\n \"order\": 1,\r\n \"conditions\": [\r\n {\r\n \"name\": \"UrlPath\",\r\n \"parameters\": {\r\n \"operator\": \"Contains\",\r\n \"negateCondition\": false,\r\n \"matchValues\": [\r\n \"abc\"\r\n ],\r\n \"transforms\": [],\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters\"\r\n }\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"name\": \"ModifyResponseHeader\",\r\n \"parameters\": {\r\n \"headerAction\": \"Append\",\r\n \"headerName\": \"Access-Control-Allow-Origin\",\r\n \"value\": \"*\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387/endpoints/ps368?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQzODcvZW5kcG9pbnRzL3BzMzY4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "657a32cb-1ecb-4b7a-8e95-c98dbf9bd38e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "cf2fe6cc-d7e1-422f-94ce-7006bffc7ce0" - ], - "x-ms-client-request-id": [ - "657a32cb-1ecb-4b7a-8e95-c98dbf9bd38e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "d7fbc354-19f6-4b85-802c-6e9ed516965a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225556Z:d7fbc354-19f6-4b85-802c-6e9ed516965a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:55:56 GMT" - ], - "Content-Length": [ - "1553" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387/endpoints/ps368\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps368\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps368.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps8564\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": {\r\n \"description\": \"Sample delivery policy\",\r\n \"rules\": [\r\n {\r\n \"name\": \"Rule1\",\r\n \"order\": 1,\r\n \"conditions\": [\r\n {\r\n \"name\": \"UrlPath\",\r\n \"parameters\": {\r\n \"operator\": \"Contains\",\r\n \"negateCondition\": false,\r\n \"matchValues\": [\r\n \"abc\"\r\n ],\r\n \"transforms\": [],\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters\"\r\n }\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"name\": \"ModifyResponseHeader\",\r\n \"parameters\": {\r\n \"headerAction\": \"Append\",\r\n \"headerName\": \"Access-Control-Allow-Origin\",\r\n \"value\": \"*\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Stopped\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387/endpoints/ps368?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQzODcvZW5kcG9pbnRzL3BzMzY4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "09c67d8b-6673-4b9b-9c36-275f1b32aeff" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3335fb2e-4fec-4af0-bbf3-940e9a2f4a2d" - ], - "x-ms-client-request-id": [ - "09c67d8b-6673-4b9b-9c36-275f1b32aeff" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "47" - ], - "x-ms-correlation-request-id": [ - "cad5c248-3049-46c6-805c-22b50c09d5f4" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225609Z:cad5c248-3049-46c6-805c-22b50c09d5f4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:56:08 GMT" - ], - "Content-Length": [ - "1553" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387/endpoints/ps368\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps368\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps368.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps8564\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": {\r\n \"description\": \"Sample delivery policy\",\r\n \"rules\": [\r\n {\r\n \"name\": \"Rule1\",\r\n \"order\": 1,\r\n \"conditions\": [\r\n {\r\n \"name\": \"UrlPath\",\r\n \"parameters\": {\r\n \"operator\": \"Contains\",\r\n \"negateCondition\": false,\r\n \"matchValues\": [\r\n \"abc\"\r\n ],\r\n \"transforms\": [],\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters\"\r\n }\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"name\": \"ModifyResponseHeader\",\r\n \"parameters\": {\r\n \"headerAction\": \"Append\",\r\n \"headerName\": \"Access-Control-Allow-Origin\",\r\n \"value\": \"*\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387/endpoints/ps368?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQzODcvZW5kcG9pbnRzL3BzMzY4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "35b20ddc-b5ce-4d02-bfe7-df8da2a964b2" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b40ae4d5-ad55-46b7-bc55-8d0796eedd62" - ], - "x-ms-client-request-id": [ - "35b20ddc-b5ce-4d02-bfe7-df8da2a964b2" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "45" - ], - "x-ms-correlation-request-id": [ - "5b25cdef-a2c5-4060-a912-e1cfd556a7b3" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225633Z:5b25cdef-a2c5-4060-a912-e1cfd556a7b3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:56:32 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387/endpoints/ps368/stop?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQzODcvZW5kcG9pbnRzL3BzMzY4L3N0b3A/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2e16f001-585e-4b2c-ad61-85679a6c93f9" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/49971d9d-9bab-4d3e-af0a-be407a1d03cb/profileresults/ps4387/endpointresults/ps368?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9b4b3e04-9811-4ccc-befc-36cd0f3bca7a" - ], - "x-ms-client-request-id": [ - "2e16f001-585e-4b2c-ad61-85679a6c93f9" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/49971d9d-9bab-4d3e-af0a-be407a1d03cb?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "bd268549-45b1-4cf8-af9e-292178e09798" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225535Z:bd268549-45b1-4cf8-af9e-292178e09798" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:55:35 GMT" - ], - "Content-Length": [ - "1554" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387/endpoints/ps368\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps368\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps368.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps8564\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": {\r\n \"description\": \"Sample delivery policy\",\r\n \"rules\": [\r\n {\r\n \"name\": \"Rule1\",\r\n \"order\": 1,\r\n \"conditions\": [\r\n {\r\n \"name\": \"UrlPath\",\r\n \"parameters\": {\r\n \"operator\": \"Contains\",\r\n \"negateCondition\": false,\r\n \"matchValues\": [\r\n \"abc\"\r\n ],\r\n \"transforms\": [],\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters\"\r\n }\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"name\": \"ModifyResponseHeader\",\r\n \"parameters\": {\r\n \"headerAction\": \"Append\",\r\n \"headerName\": \"Access-Control-Allow-Origin\",\r\n \"value\": \"*\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Stopping\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/49971d9d-9bab-4d3e-af0a-be407a1d03cb?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzQ5OTcxZDlkLTliYWItNGQzZS1hZjBhLWJlNDA3YTFkMDNjYj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2e16f001-585e-4b2c-ad61-85679a6c93f9" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ba8b088c-08c5-485e-858e-d1f4ec4cefe7" - ], - "x-ms-client-request-id": [ - "2e16f001-585e-4b2c-ad61-85679a6c93f9" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "59a055b0-6423-4b45-9e3c-0070f74efc86" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225545Z:59a055b0-6423-4b45-9e3c-0070f74efc86" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:55:45 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/49971d9d-9bab-4d3e-af0a-be407a1d03cb?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzQ5OTcxZDlkLTliYWItNGQzZS1hZjBhLWJlNDA3YTFkMDNjYj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2e16f001-585e-4b2c-ad61-85679a6c93f9" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9b718a33-e16e-470a-9225-47b105f372e5" - ], - "x-ms-client-request-id": [ - "2e16f001-585e-4b2c-ad61-85679a6c93f9" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "d04d4c88-68fc-4256-b9e2-375c19b6853a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225555Z:d04d4c88-68fc-4256-b9e2-375c19b6853a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:55:55 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/49971d9d-9bab-4d3e-af0a-be407a1d03cb/profileresults/ps4387/endpointresults/ps368?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzQ5OTcxZDlkLTliYWItNGQzZS1hZjBhLWJlNDA3YTFkMDNjYi9wcm9maWxlcmVzdWx0cy9wczQzODcvZW5kcG9pbnRyZXN1bHRzL3BzMzY4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2e16f001-585e-4b2c-ad61-85679a6c93f9" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a7efe0a1-27bf-4e8c-a32c-87d0dc35303d" - ], - "x-ms-client-request-id": [ - "2e16f001-585e-4b2c-ad61-85679a6c93f9" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "14d118fd-92e5-48f4-a89e-dd56dc7d7737" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225556Z:14d118fd-92e5-48f4-a89e-dd56dc7d7737" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:55:55 GMT" - ], - "Content-Length": [ - "1648" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/49971d9d-9bab-4d3e-af0a-be407a1d03cb/profileresults/ps4387/endpointresults/ps368\",\r\n \"type\": \"Microsoft.Cdn/operationresults/profileresults/endpointresults\",\r\n \"name\": \"ps368\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps368.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps8564\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": {\r\n \"description\": \"Sample delivery policy\",\r\n \"rules\": [\r\n {\r\n \"name\": \"Rule1\",\r\n \"order\": 1,\r\n \"conditions\": [\r\n {\r\n \"name\": \"UrlPath\",\r\n \"parameters\": {\r\n \"operator\": \"Contains\",\r\n \"negateCondition\": false,\r\n \"matchValues\": [\r\n \"abc\"\r\n ],\r\n \"transforms\": [],\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters\"\r\n }\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"name\": \"ModifyResponseHeader\",\r\n \"parameters\": {\r\n \"headerAction\": \"Append\",\r\n \"headerName\": \"Access-Control-Allow-Origin\",\r\n \"value\": \"*\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Stopped\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387/endpoints/ps368/start?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQzODcvZW5kcG9pbnRzL3BzMzY4L3N0YXJ0P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "384957d4-d717-44a2-b086-0cf495bb9964" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/d2bcb6f0-bc89-4cd3-bf98-00626388acc3/profileresults/ps4387/endpointresults/ps368?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "12bef228-0adc-491d-9cfb-8cdf3d51da6c" - ], - "x-ms-client-request-id": [ - "384957d4-d717-44a2-b086-0cf495bb9964" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/d2bcb6f0-bc89-4cd3-bf98-00626388acc3?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "cb05600f-b0c9-4b25-a21c-a9019d03bf7f" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225558Z:cb05600f-b0c9-4b25-a21c-a9019d03bf7f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:55:57 GMT" - ], - "Content-Length": [ - "1554" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387/endpoints/ps368\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps368\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps368.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps8564\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": {\r\n \"description\": \"Sample delivery policy\",\r\n \"rules\": [\r\n {\r\n \"name\": \"Rule1\",\r\n \"order\": 1,\r\n \"conditions\": [\r\n {\r\n \"name\": \"UrlPath\",\r\n \"parameters\": {\r\n \"operator\": \"Contains\",\r\n \"negateCondition\": false,\r\n \"matchValues\": [\r\n \"abc\"\r\n ],\r\n \"transforms\": [],\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters\"\r\n }\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"name\": \"ModifyResponseHeader\",\r\n \"parameters\": {\r\n \"headerAction\": \"Append\",\r\n \"headerName\": \"Access-Control-Allow-Origin\",\r\n \"value\": \"*\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Starting\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/d2bcb6f0-bc89-4cd3-bf98-00626388acc3?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2QyYmNiNmYwLWJjODktNGNkMy1iZjk4LTAwNjI2Mzg4YWNjMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "384957d4-d717-44a2-b086-0cf495bb9964" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c3ed1bb9-5bc9-463e-888e-2357b3567bb2" - ], - "x-ms-client-request-id": [ - "384957d4-d717-44a2-b086-0cf495bb9964" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-correlation-request-id": [ - "cb4cd123-f487-4ae2-add0-2eefa7bf7640" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225608Z:cb4cd123-f487-4ae2-add0-2eefa7bf7640" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:56:07 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/d2bcb6f0-bc89-4cd3-bf98-00626388acc3/profileresults/ps4387/endpointresults/ps368?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2QyYmNiNmYwLWJjODktNGNkMy1iZjk4LTAwNjI2Mzg4YWNjMy9wcm9maWxlcmVzdWx0cy9wczQzODcvZW5kcG9pbnRyZXN1bHRzL3BzMzY4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "384957d4-d717-44a2-b086-0cf495bb9964" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "26c5a207-e077-4258-a9a7-f77882767906" - ], - "x-ms-client-request-id": [ - "384957d4-d717-44a2-b086-0cf495bb9964" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-correlation-request-id": [ - "46f98ef0-be23-4cf3-bd94-f5c1d1762597" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225608Z:46f98ef0-be23-4cf3-bd94-f5c1d1762597" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:56:08 GMT" - ], - "Content-Length": [ - "1648" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/d2bcb6f0-bc89-4cd3-bf98-00626388acc3/profileresults/ps4387/endpointresults/ps368\",\r\n \"type\": \"Microsoft.Cdn/operationresults/profileresults/endpointresults\",\r\n \"name\": \"ps368\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps368.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps8564\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": {\r\n \"description\": \"Sample delivery policy\",\r\n \"rules\": [\r\n {\r\n \"name\": \"Rule1\",\r\n \"order\": 1,\r\n \"conditions\": [\r\n {\r\n \"name\": \"UrlPath\",\r\n \"parameters\": {\r\n \"operator\": \"Contains\",\r\n \"negateCondition\": false,\r\n \"matchValues\": [\r\n \"abc\"\r\n ],\r\n \"transforms\": [],\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters\"\r\n }\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"name\": \"ModifyResponseHeader\",\r\n \"parameters\": {\r\n \"headerAction\": \"Append\",\r\n \"headerName\": \"Access-Control-Allow-Origin\",\r\n \"value\": \"*\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387/endpoints/ps368/validateCustomDomain?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQzODcvZW5kcG9pbnRzL3BzMzY4L3ZhbGlkYXRlQ3VzdG9tRG9tYWluP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"hostName\": \"unverifiedcustomdomain.com\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bb3f21f7-a7d9-46d7-a156-27403e7b1031" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "48" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "54706030-9333-413c-889b-3ba9efe7e8b3" - ], - "x-ms-client-request-id": [ - "bb3f21f7-a7d9-46d7-a156-27403e7b1031" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "b38b632f-4543-4732-a04e-25d18048e353" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225609Z:b38b632f-4543-4732-a04e-25d18048e353" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:56:09 GMT" - ], - "Content-Length": [ - "266" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"customDomainValidated\": false,\r\n \"reason\": \"IncorrectMapping\",\r\n \"message\": \"We couldn't find a DNS record for custom domain that points to endpoint. To map a domain to this endpoint, create a CNAME record with your DNS provider for custom domain that points to endpoint.\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387/endpoints?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQzODcvZW5kcG9pbnRzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c543084e-7d4c-4938-a709-a448bcfd233b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1306961f-08dc-48b4-b1e1-aa30afef49c8" - ], - "x-ms-client-request-id": [ - "c543084e-7d4c-4938-a709-a448bcfd233b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "46" - ], - "x-ms-correlation-request-id": [ - "833adf67-44df-44c0-80b0-62eb9e01ac73" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225610Z:833adf67-44df-44c0-80b0-62eb9e01ac73" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:56:09 GMT" - ], - "Content-Length": [ - "1565" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387/endpoints/ps368\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps368\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps368.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps8564\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": {\r\n \"description\": \"Sample delivery policy\",\r\n \"rules\": [\r\n {\r\n \"name\": \"Rule1\",\r\n \"order\": 1,\r\n \"conditions\": [\r\n {\r\n \"name\": \"UrlPath\",\r\n \"parameters\": {\r\n \"operator\": \"Contains\",\r\n \"negateCondition\": false,\r\n \"matchValues\": [\r\n \"abc\"\r\n ],\r\n \"transforms\": [],\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters\"\r\n }\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"name\": \"ModifyResponseHeader\",\r\n \"parameters\": {\r\n \"headerAction\": \"Append\",\r\n \"headerName\": \"Access-Control-Allow-Origin\",\r\n \"value\": \"*\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7888/providers/Microsoft.Cdn/profiles/ps4387/endpoints/ps368?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQzODcvZW5kcG9pbnRzL3BzMzY4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c543084e-7d4c-4938-a709-a448bcfd233b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/8c87f7de-e57a-4b49-a959-4072c90fc1bb/profileresults/ps4387/endpointresults/ps368?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "87c15d09-afa5-4275-a851-5f375a00e0cf" - ], - "x-ms-client-request-id": [ - "c543084e-7d4c-4938-a709-a448bcfd233b" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/8c87f7de-e57a-4b49-a959-4072c90fc1bb?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-correlation-request-id": [ - "b9a14ee2-bd1f-42ca-b377-1f5d29de0110" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225611Z:b9a14ee2-bd1f-42ca-b377-1f5d29de0110" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:56:11 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/8c87f7de-e57a-4b49-a959-4072c90fc1bb?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzhjODdmN2RlLWU1N2EtNGI0OS1hOTU5LTQwNzJjOTBmYzFiYj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c543084e-7d4c-4938-a709-a448bcfd233b" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "17bd235d-edb8-47bf-bbea-78b3b213d7f7" - ], - "x-ms-client-request-id": [ - "c543084e-7d4c-4938-a709-a448bcfd233b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-correlation-request-id": [ - "0ee41b38-fc9c-44cf-be16-aa4b969f63f0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225622Z:0ee41b38-fc9c-44cf-be16-aa4b969f63f0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:56:21 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/8c87f7de-e57a-4b49-a959-4072c90fc1bb?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzhjODdmN2RlLWU1N2EtNGI0OS1hOTU5LTQwNzJjOTBmYzFiYj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c543084e-7d4c-4938-a709-a448bcfd233b" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "352ce03b-3db5-43ae-b97b-47278de45521" - ], - "x-ms-client-request-id": [ - "c543084e-7d4c-4938-a709-a448bcfd233b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-correlation-request-id": [ - "a5662eb5-9171-47bf-ade3-4559ed733db0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225632Z:a5662eb5-9171-47bf-ade3-4559ed733db0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:56:31 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888/providers/Microsoft.Cdn/operationresults/8c87f7de-e57a-4b49-a959-4072c90fc1bb/profileresults/ps4387/endpointresults/ps368?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzg4OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzhjODdmN2RlLWU1N2EtNGI0OS1hOTU5LTQwNzJjOTBmYzFiYi9wcm9maWxlcmVzdWx0cy9wczQzODcvZW5kcG9pbnRyZXN1bHRzL3BzMzY4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c543084e-7d4c-4938-a709-a448bcfd233b" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3312d129-0886-4df6-a2bb-d6ead742853a" - ], - "x-ms-client-request-id": [ - "c543084e-7d4c-4938-a709-a448bcfd233b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-correlation-request-id": [ - "dfc86314-89c2-4d63-b79d-ea6001aae499" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225632Z:dfc86314-89c2-4d63-b79d-ea6001aae499" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:56:31 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7888?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzg4OD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c6a1ca52-b9dc-4faa-8291-6d4c88fddc55" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc4ODgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" - ], - "x-ms-request-id": [ - "f29ee5bc-58fd-4aec-83ee-851a6ace1335" - ], - "x-ms-correlation-request-id": [ - "f29ee5bc-58fd-4aec-83ee-851a6ace1335" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225633Z:f29ee5bc-58fd-4aec-83ee-851a6ace1335" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:56:33 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc4ODgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjNE9EZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc4ODgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-request-id": [ - "61ffc6ad-dc3e-4695-bddb-9f0d144c13b5" - ], - "x-ms-correlation-request-id": [ - "61ffc6ad-dc3e-4695-bddb-9f0d144c13b5" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225648Z:61ffc6ad-dc3e-4695-bddb-9f0d144c13b5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:56:48 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc4ODgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjNE9EZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc4ODgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11986" - ], - "x-ms-request-id": [ - "a06bf2cf-5ff3-47b5-af2b-c8399c71b40f" - ], - "x-ms-correlation-request-id": [ - "a06bf2cf-5ff3-47b5-af2b-c8399c71b40f" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225703Z:a06bf2cf-5ff3-47b5-af2b-c8399c71b40f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:57:03 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc4ODgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjNE9EZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc4ODgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11985" - ], - "x-ms-request-id": [ - "af85f219-585c-4008-859a-79dc487baab9" - ], - "x-ms-correlation-request-id": [ - "af85f219-585c-4008-859a-79dc487baab9" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225718Z:af85f219-585c-4008-859a-79dc487baab9" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:57:18 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc4ODgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjNE9EZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc4ODgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11984" - ], - "x-ms-request-id": [ - "5199998e-124a-493c-8ad5-23b8038d815b" - ], - "x-ms-correlation-request-id": [ - "5199998e-124a-493c-8ad5-23b8038d815b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225733Z:5199998e-124a-493c-8ad5-23b8038d815b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:57:33 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc4ODgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjNE9EZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc4ODgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11983" - ], - "x-ms-request-id": [ - "680d1256-bb2d-400a-863b-8a55fef6fa8f" - ], - "x-ms-correlation-request-id": [ - "680d1256-bb2d-400a-863b-8a55fef6fa8f" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225748Z:680d1256-bb2d-400a-863b-8a55fef6fa8f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:57:48 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc4ODgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjNE9EZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc4ODgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11982" - ], - "x-ms-request-id": [ - "6fc28dcc-2abb-4540-ad8f-7f3abab2dd66" - ], - "x-ms-correlation-request-id": [ - "6fc28dcc-2abb-4540-ad8f-7f3abab2dd66" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225803Z:6fc28dcc-2abb-4540-ad8f-7f3abab2dd66" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:58:03 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc4ODgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjNE9EZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11981" - ], - "x-ms-request-id": [ - "0183f625-0a35-4320-81ec-6cf1ee9724fe" - ], - "x-ms-correlation-request-id": [ - "0183f625-0a35-4320-81ec-6cf1ee9724fe" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225818Z:0183f625-0a35-4320-81ec-6cf1ee9724fe" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:58:18 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc4ODgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjNE9EZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11980" - ], - "x-ms-request-id": [ - "d31dc83d-4904-4c28-b394-08af8ccf2a21" - ], - "x-ms-correlation-request-id": [ - "d31dc83d-4904-4c28-b394-08af8ccf2a21" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T225818Z:d31dc83d-4904-4c28-b394-08af8ccf2a21" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:58:18 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-EndpointCrudAndAction": [ - "ps4387", - "ps7888", - "ps368", - "ps8564" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCrudAndActionWithAllProperties.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCrudAndActionWithAllProperties.json deleted file mode 100644 index 9d5f88542623..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCrudAndActionWithAllProperties.json +++ /dev/null @@ -1,5457 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Nz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "cc41cc28-45d8-4b3a-9415-2e54ee9ceddb" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "c3211257-c322-45a6-b081-a05c1df93e1e" - ], - "x-ms-correlation-request-id": [ - "c3211257-c322-45a6-b081-a05c1df93e1e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225854Z:c3211257-c322-45a6-b081-a05c1df93e1e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:58:53 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6977\",\r\n \"name\": \"ps6977\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7bd4b800-87bb-412f-91e7-c78b8795fb2d" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4f5d1781-44d2-47a4-afae-da4feb40e371" - ], - "x-ms-client-request-id": [ - "7bd4b800-87bb-412f-91e7-c78b8795fb2d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "66bc791e-fe0d-4556-a308-913cc4c99fc9" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225856Z:66bc791e-fe0d-4556-a308-913cc4c99fc9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:58:56 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg4OTY/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7bd4b800-87bb-412f-91e7-c78b8795fb2d" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "78" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "de77e143-a917-41dc-9864-b92561cb02dc" - ], - "x-ms-client-request-id": [ - "7bd4b800-87bb-412f-91e7-c78b8795fb2d" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/70e66220-e947-4761-b09e-85bc33b73ae2?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "d534fed1-eaa2-46b3-a555-85dfbb8e9c04" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225900Z:d534fed1-eaa2-46b3-a555-85dfbb8e9c04" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:59:00 GMT" - ], - "Content-Length": [ - "320" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps8896\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/70e66220-e947-4761-b09e-85bc33b73ae2?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzcwZTY2MjIwLWU5NDctNDc2MS1iMDllLTg1YmMzM2I3M2FlMj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7bd4b800-87bb-412f-91e7-c78b8795fb2d" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1f2b53f7-aa6b-4309-9cae-13d64c4c1bc0" - ], - "x-ms-client-request-id": [ - "7bd4b800-87bb-412f-91e7-c78b8795fb2d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11972" - ], - "x-ms-correlation-request-id": [ - "9acf18ad-4cf2-4f45-8a0e-98735b079ad3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225910Z:9acf18ad-4cf2-4f45-8a0e-98735b079ad3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:59:10 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/70e66220-e947-4761-b09e-85bc33b73ae2?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzcwZTY2MjIwLWU5NDctNDc2MS1iMDllLTg1YmMzM2I3M2FlMj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7bd4b800-87bb-412f-91e7-c78b8795fb2d" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b074b848-05ca-40f5-b7fe-1387f0e956ee" - ], - "x-ms-client-request-id": [ - "7bd4b800-87bb-412f-91e7-c78b8795fb2d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11971" - ], - "x-ms-correlation-request-id": [ - "3426b0bd-c8a3-48aa-8050-d9ba1cd54e73" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225921Z:3426b0bd-c8a3-48aa-8050-d9ba1cd54e73" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:59:20 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/70e66220-e947-4761-b09e-85bc33b73ae2?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzcwZTY2MjIwLWU5NDctNDc2MS1iMDllLTg1YmMzM2I3M2FlMj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7bd4b800-87bb-412f-91e7-c78b8795fb2d" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "16dd7d2a-da4b-4616-bb37-2ed9221771f2" - ], - "x-ms-client-request-id": [ - "7bd4b800-87bb-412f-91e7-c78b8795fb2d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11970" - ], - "x-ms-correlation-request-id": [ - "fe918ce0-faba-4c43-94fc-d24b154db93f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225931Z:fe918ce0-faba-4c43-94fc-d24b154db93f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:59:30 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/70e66220-e947-4761-b09e-85bc33b73ae2?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzcwZTY2MjIwLWU5NDctNDc2MS1iMDllLTg1YmMzM2I3M2FlMj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7bd4b800-87bb-412f-91e7-c78b8795fb2d" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "886ff33f-d08e-466b-adb1-96583c0e3029" - ], - "x-ms-client-request-id": [ - "7bd4b800-87bb-412f-91e7-c78b8795fb2d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11969" - ], - "x-ms-correlation-request-id": [ - "ab759d4d-9cf2-4a50-8c63-23300f8c5593" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225941Z:ab759d4d-9cf2-4a50-8c63-23300f8c5593" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:59:40 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/70e66220-e947-4761-b09e-85bc33b73ae2?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzcwZTY2MjIwLWU5NDctNDc2MS1iMDllLTg1YmMzM2I3M2FlMj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7bd4b800-87bb-412f-91e7-c78b8795fb2d" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "98aafd98-a8dc-4fce-bac3-4a21a74a5f87" - ], - "x-ms-client-request-id": [ - "7bd4b800-87bb-412f-91e7-c78b8795fb2d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11968" - ], - "x-ms-correlation-request-id": [ - "dc49ea23-35b9-4b43-adff-090298753bf6" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225951Z:dc49ea23-35b9-4b43-adff-090298753bf6" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:59:50 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg4OTY/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7bd4b800-87bb-412f-91e7-c78b8795fb2d" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "77f931e4-80da-441c-a99f-447e48d4e969" - ], - "x-ms-client-request-id": [ - "7bd4b800-87bb-412f-91e7-c78b8795fb2d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "34ea1c76-ddfd-4b08-b196-e901a7bd31e1" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225951Z:34ea1c76-ddfd-4b08-b196-e901a7bd31e1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:59:51 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps8896\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps645\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f530ab09-8ce3-428a-bf50-9a3c37a59d7d" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "70" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "683d46f7-5508-427b-af24-a4e8333e514e" - ], - "x-ms-client-request-id": [ - "f530ab09-8ce3-428a-bf50-9a3c37a59d7d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "1c4f79e5-d308-4a3e-adce-23dac3d3df9d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225952Z:1c4f79e5-d308-4a3e-adce-23dac3d3df9d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:59:51 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps645\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "39caf9e7-3bcf-4895-8f5c-2a261224298b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "70" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7dddaa37-dff1-4c2c-a8dd-fcd5a8fcdec6" - ], - "x-ms-client-request-id": [ - "39caf9e7-3bcf-4895-8f5c-2a261224298b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "a5a17d8e-dea3-4b7b-b87d-93db6334480f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225952Z:a5a17d8e-dea3-4b7b-b87d-93db6334480f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:59:52 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps645\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e8803af9-7d52-4738-a1e6-5f389e456ea7" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "70" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9c248ab3-76cf-4f6d-b1b6-84c5acdab1c0" - ], - "x-ms-client-request-id": [ - "e8803af9-7d52-4738-a1e6-5f389e456ea7" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1197" - ], - "x-ms-correlation-request-id": [ - "c20d9b19-f134-4170-9aed-36b227d96d6e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230030Z:c20d9b19-f134-4170-9aed-36b227d96d6e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:00:29 GMT" - ], - "Content-Length": [ - "88" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": false,\r\n \"reason\": \"Name is already in use\",\r\n \"message\": \"Name not available\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints/ps645?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg4OTYvZW5kcG9pbnRzL3BzNjQ1P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": \"GeneralWebDelivery\",\r\n \"origins\": [\r\n {\r\n \"name\": \"ps1191\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUS\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "39caf9e7-3bcf-4895-8f5c-2a261224298b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "677" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0b2d6b59-0c5d-4d51-abf1-651bc7839c47" - ], - "x-ms-client-request-id": [ - "39caf9e7-3bcf-4895-8f5c-2a261224298b" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/f0f9a5e6-441e-4e93-94b6-825beea73adf?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "88e10a6d-c6f5-4953-a986-64bdf49bf8c5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T225956Z:88e10a6d-c6f5-4953-a986-64bdf49bf8c5" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 22:59:56 GMT" - ], - "Content-Length": [ - "1137" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints/ps645\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps645\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps645.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": \"GeneralWebDelivery\",\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps1191\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/f0f9a5e6-441e-4e93-94b6-825beea73adf?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2YwZjlhNWU2LTQ0MWUtNGU5My05NGI2LTgyNWJlZWE3M2FkZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "39caf9e7-3bcf-4895-8f5c-2a261224298b" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8a3c56c4-433d-4669-ab0e-a931c3ead094" - ], - "x-ms-client-request-id": [ - "39caf9e7-3bcf-4895-8f5c-2a261224298b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11967" - ], - "x-ms-correlation-request-id": [ - "24e13189-dbc3-4cd1-9036-3616c104f9c0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230007Z:24e13189-dbc3-4cd1-9036-3616c104f9c0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:00:06 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/f0f9a5e6-441e-4e93-94b6-825beea73adf?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2YwZjlhNWU2LTQ0MWUtNGU5My05NGI2LTgyNWJlZWE3M2FkZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "39caf9e7-3bcf-4895-8f5c-2a261224298b" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "60ce8a06-21c7-4a88-be7b-a273dca29a8f" - ], - "x-ms-client-request-id": [ - "39caf9e7-3bcf-4895-8f5c-2a261224298b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11966" - ], - "x-ms-correlation-request-id": [ - "7cb28fc3-a23c-4d63-8ef3-146596ffd232" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230017Z:7cb28fc3-a23c-4d63-8ef3-146596ffd232" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:00:16 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/f0f9a5e6-441e-4e93-94b6-825beea73adf?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2YwZjlhNWU2LTQ0MWUtNGU5My05NGI2LTgyNWJlZWE3M2FkZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "39caf9e7-3bcf-4895-8f5c-2a261224298b" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b924a5e4-716a-4ad3-b878-eb198a909832" - ], - "x-ms-client-request-id": [ - "39caf9e7-3bcf-4895-8f5c-2a261224298b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11965" - ], - "x-ms-correlation-request-id": [ - "1548ba00-75cb-420b-b608-3f46d2aa25a1" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230027Z:1548ba00-75cb-420b-b608-3f46d2aa25a1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:00:26 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints/ps645?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg4OTYvZW5kcG9pbnRzL3BzNjQ1P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "39caf9e7-3bcf-4895-8f5c-2a261224298b" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "fc0128b6-575e-4732-8f5b-efdb9ce2c521" - ], - "x-ms-client-request-id": [ - "39caf9e7-3bcf-4895-8f5c-2a261224298b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "2014325f-8869-48d3-b834-a33ffb37edee" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230027Z:2014325f-8869-48d3-b834-a33ffb37edee" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:00:26 GMT" - ], - "Content-Length": [ - "1135" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints/ps645\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps645\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps645.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": \"GeneralWebDelivery\",\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps1191\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints/ps645?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg4OTYvZW5kcG9pbnRzL3BzNjQ1P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "68c5e82f-03bb-4b65-aaad-2ec959ea3dcc" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c3105eac-9de6-44f8-852e-fd1ff384ad40" - ], - "x-ms-client-request-id": [ - "68c5e82f-03bb-4b65-aaad-2ec959ea3dcc" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "6917daea-f699-435c-a7bf-8f16247c8ffa" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230052Z:6917daea-f699-435c-a7bf-8f16247c8ffa" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:00:52 GMT" - ], - "Content-Length": [ - "1135" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints/ps645\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps645\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps645.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": \"GeneralWebDelivery\",\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps1191\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Stopped\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints/ps645?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg4OTYvZW5kcG9pbnRzL3BzNjQ1P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "eb8e2302-e823-4d3b-ac4e-130cfa227702" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ebd5d13f-c8e7-464d-a21f-8febd723fa3b" - ], - "x-ms-client-request-id": [ - "eb8e2302-e823-4d3b-ac4e-130cfa227702" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "47" - ], - "x-ms-correlation-request-id": [ - "e84c5716-3f32-46b5-bbc1-7dbffc13b7d4" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230114Z:e84c5716-3f32-46b5-bbc1-7dbffc13b7d4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:01:14 GMT" - ], - "Content-Length": [ - "1135" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints/ps645\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps645\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps645.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": \"GeneralWebDelivery\",\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps1191\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints/ps645?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg4OTYvZW5kcG9pbnRzL3BzNjQ1P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b1a7188a-99a0-4101-9ecb-5569e4027e76" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e3fb97c8-1937-4211-9c76-18dfa9acfeeb" - ], - "x-ms-client-request-id": [ - "b1a7188a-99a0-4101-9ecb-5569e4027e76" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "45" - ], - "x-ms-correlation-request-id": [ - "f71be164-15b7-45a5-9d55-24b75fcd0c75" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230810Z:f71be164-15b7-45a5-9d55-24b75fcd0c75" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:08:09 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints/ps645/stop?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg4OTYvZW5kcG9pbnRzL3BzNjQ1L3N0b3A/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7d500e8e-bb69-4ea7-a8a4-2846a56b24c5" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/4fce08b2-ac3c-4c0c-b5bf-eabdb811867b/profileresults/ps8896/endpointresults/ps645?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "753ddd3b-3108-4aa1-b5cb-47234d3bd6a2" - ], - "x-ms-client-request-id": [ - "7d500e8e-bb69-4ea7-a8a4-2846a56b24c5" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/4fce08b2-ac3c-4c0c-b5bf-eabdb811867b?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "3e08a74c-1153-42c2-9dc5-4e8b3c2ac45a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230031Z:3e08a74c-1153-42c2-9dc5-4e8b3c2ac45a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:00:30 GMT" - ], - "Content-Length": [ - "1136" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints/ps645\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps645\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps645.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": \"GeneralWebDelivery\",\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps1191\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Stopping\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/4fce08b2-ac3c-4c0c-b5bf-eabdb811867b?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzRmY2UwOGIyLWFjM2MtNGMwYy1iNWJmLWVhYmRiODExODY3Yj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7d500e8e-bb69-4ea7-a8a4-2846a56b24c5" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6eaa4155-03b6-403c-a879-0c9f05678376" - ], - "x-ms-client-request-id": [ - "7d500e8e-bb69-4ea7-a8a4-2846a56b24c5" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11964" - ], - "x-ms-correlation-request-id": [ - "98880198-5bf5-4d89-ae24-e2be85b032a0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230041Z:98880198-5bf5-4d89-ae24-e2be85b032a0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:00:40 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/4fce08b2-ac3c-4c0c-b5bf-eabdb811867b?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzRmY2UwOGIyLWFjM2MtNGMwYy1iNWJmLWVhYmRiODExODY3Yj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7d500e8e-bb69-4ea7-a8a4-2846a56b24c5" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4d9d1a7e-3370-4869-b901-d748b00ee676" - ], - "x-ms-client-request-id": [ - "7d500e8e-bb69-4ea7-a8a4-2846a56b24c5" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11963" - ], - "x-ms-correlation-request-id": [ - "925baf1b-8045-4330-b894-b4d638beb972" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230051Z:925baf1b-8045-4330-b894-b4d638beb972" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:00:51 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/4fce08b2-ac3c-4c0c-b5bf-eabdb811867b/profileresults/ps8896/endpointresults/ps645?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzRmY2UwOGIyLWFjM2MtNGMwYy1iNWJmLWVhYmRiODExODY3Yi9wcm9maWxlcmVzdWx0cy9wczg4OTYvZW5kcG9pbnRyZXN1bHRzL3BzNjQ1P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7d500e8e-bb69-4ea7-a8a4-2846a56b24c5" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "af645137-37c0-4371-8093-a1c62dbe53ec" - ], - "x-ms-client-request-id": [ - "7d500e8e-bb69-4ea7-a8a4-2846a56b24c5" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11962" - ], - "x-ms-correlation-request-id": [ - "792a73d3-9d7e-4fe8-ac69-aaaf78a56590" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230052Z:792a73d3-9d7e-4fe8-ac69-aaaf78a56590" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:00:52 GMT" - ], - "Content-Length": [ - "1230" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/4fce08b2-ac3c-4c0c-b5bf-eabdb811867b/profileresults/ps8896/endpointresults/ps645\",\r\n \"type\": \"Microsoft.Cdn/operationresults/profileresults/endpointresults\",\r\n \"name\": \"ps645\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps645.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": \"GeneralWebDelivery\",\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps1191\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Stopped\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints/ps645/start?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg4OTYvZW5kcG9pbnRzL3BzNjQ1L3N0YXJ0P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0cc8e77b-eaa8-401d-aa93-53113cec0fec" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/e23ce89a-a8bc-4495-a2d1-37bcb13be550/profileresults/ps8896/endpointresults/ps645?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5b1051d8-bcb3-4870-a09b-35aecd1bc753" - ], - "x-ms-client-request-id": [ - "0cc8e77b-eaa8-401d-aa93-53113cec0fec" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/e23ce89a-a8bc-4495-a2d1-37bcb13be550?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "4eb6f4d5-5ba4-41de-a072-1237d923d957" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230053Z:4eb6f4d5-5ba4-41de-a072-1237d923d957" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:00:53 GMT" - ], - "Content-Length": [ - "1136" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints/ps645\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps645\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps645.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": \"GeneralWebDelivery\",\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps1191\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Starting\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/e23ce89a-a8bc-4495-a2d1-37bcb13be550?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2UyM2NlODlhLWE4YmMtNDQ5NS1hMmQxLTM3YmNiMTNiZTU1MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0cc8e77b-eaa8-401d-aa93-53113cec0fec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "48da3286-cd9e-4ae2-8fc2-011bf7807a9c" - ], - "x-ms-client-request-id": [ - "0cc8e77b-eaa8-401d-aa93-53113cec0fec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11961" - ], - "x-ms-correlation-request-id": [ - "a4c2f1b7-7aaa-4836-a7fc-baa50c4604af" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230103Z:a4c2f1b7-7aaa-4836-a7fc-baa50c4604af" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:01:03 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/e23ce89a-a8bc-4495-a2d1-37bcb13be550?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2UyM2NlODlhLWE4YmMtNDQ5NS1hMmQxLTM3YmNiMTNiZTU1MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0cc8e77b-eaa8-401d-aa93-53113cec0fec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c7945779-d5d1-443b-a048-74ee32353ba7" - ], - "x-ms-client-request-id": [ - "0cc8e77b-eaa8-401d-aa93-53113cec0fec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11960" - ], - "x-ms-correlation-request-id": [ - "20470bf8-39b2-4b0c-87e4-f04d40fd5361" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230113Z:20470bf8-39b2-4b0c-87e4-f04d40fd5361" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:01:13 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/e23ce89a-a8bc-4495-a2d1-37bcb13be550/profileresults/ps8896/endpointresults/ps645?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2UyM2NlODlhLWE4YmMtNDQ5NS1hMmQxLTM3YmNiMTNiZTU1MC9wcm9maWxlcmVzdWx0cy9wczg4OTYvZW5kcG9pbnRyZXN1bHRzL3BzNjQ1P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0cc8e77b-eaa8-401d-aa93-53113cec0fec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "275a7aa1-eda9-4094-a7d1-84e17fb5edf6" - ], - "x-ms-client-request-id": [ - "0cc8e77b-eaa8-401d-aa93-53113cec0fec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11959" - ], - "x-ms-correlation-request-id": [ - "2a05b4b0-775d-4717-96c9-3d1cb67a3d52" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230114Z:2a05b4b0-775d-4717-96c9-3d1cb67a3d52" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:01:13 GMT" - ], - "Content-Length": [ - "1230" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/e23ce89a-a8bc-4495-a2d1-37bcb13be550/profileresults/ps8896/endpointresults/ps645\",\r\n \"type\": \"Microsoft.Cdn/operationresults/profileresults/endpointresults\",\r\n \"name\": \"ps645\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps645.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": \"GeneralWebDelivery\",\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps1191\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints/ps645/purge?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg4OTYvZW5kcG9pbnRzL3BzNjQ1L3B1cmdlP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"contentPaths\": [\r\n \"/pic1.jpg\",\r\n \"/pic2.jpg\"\r\n ]\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "65" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/288dfe05-309f-4a17-b223-d18f0f7005da/profileresults/ps8896/endpointresults/ps645?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "308c2b9e-bc1b-4fa9-9162-e97757772570" - ], - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/288dfe05-309f-4a17-b223-d18f0f7005da?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "8b178584-86f5-4630-9adc-c703deea838f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230116Z:8b178584-86f5-4630-9adc-c703deea838f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:01:16 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/288dfe05-309f-4a17-b223-d18f0f7005da?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzI4OGRmZTA1LTMwOWYtNGExNy1iMjIzLWQxOGYwZjcwMDVkYT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "01a60ca1-706c-4bc7-9bda-3083b6bbddec" - ], - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11958" - ], - "x-ms-correlation-request-id": [ - "b101105e-ef4c-4dc6-875d-c847a8085c76" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230126Z:b101105e-ef4c-4dc6-875d-c847a8085c76" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:01:26 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/288dfe05-309f-4a17-b223-d18f0f7005da?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzI4OGRmZTA1LTMwOWYtNGExNy1iMjIzLWQxOGYwZjcwMDVkYT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a32aba88-e3e9-49a8-846e-05d50429a725" - ], - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11957" - ], - "x-ms-correlation-request-id": [ - "ccb1a980-a6c9-4d53-9642-b235e0f7f36d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230136Z:ccb1a980-a6c9-4d53-9642-b235e0f7f36d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:01:36 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/288dfe05-309f-4a17-b223-d18f0f7005da?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzI4OGRmZTA1LTMwOWYtNGExNy1iMjIzLWQxOGYwZjcwMDVkYT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "809cf4d8-95d8-4669-bca1-b1c74ad68a8d" - ], - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11956" - ], - "x-ms-correlation-request-id": [ - "35031d66-1283-43dd-9c0e-3306d75e8254" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230146Z:35031d66-1283-43dd-9c0e-3306d75e8254" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:01:46 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/288dfe05-309f-4a17-b223-d18f0f7005da?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzI4OGRmZTA1LTMwOWYtNGExNy1iMjIzLWQxOGYwZjcwMDVkYT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "340b8ca8-f070-41bc-9e73-134d1b88347f" - ], - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11955" - ], - "x-ms-correlation-request-id": [ - "142860a1-f076-4999-ad73-3c9901e3ec8d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230157Z:142860a1-f076-4999-ad73-3c9901e3ec8d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:01:56 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/288dfe05-309f-4a17-b223-d18f0f7005da?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzI4OGRmZTA1LTMwOWYtNGExNy1iMjIzLWQxOGYwZjcwMDVkYT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "32e39531-f21f-4fdd-874b-b2c775486e78" - ], - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11954" - ], - "x-ms-correlation-request-id": [ - "8605c8f3-1acd-4cae-83d7-0466e9596960" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230207Z:8605c8f3-1acd-4cae-83d7-0466e9596960" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:02:06 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/288dfe05-309f-4a17-b223-d18f0f7005da?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzI4OGRmZTA1LTMwOWYtNGExNy1iMjIzLWQxOGYwZjcwMDVkYT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "48403b39-8b00-4833-979f-372935d230d8" - ], - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11953" - ], - "x-ms-correlation-request-id": [ - "fabdf6aa-5e48-421c-82eb-73e95394cf8f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230217Z:fabdf6aa-5e48-421c-82eb-73e95394cf8f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:02:16 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/288dfe05-309f-4a17-b223-d18f0f7005da?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzI4OGRmZTA1LTMwOWYtNGExNy1iMjIzLWQxOGYwZjcwMDVkYT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "adeda88b-b216-4a98-abd5-490d53da6d9a" - ], - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11952" - ], - "x-ms-correlation-request-id": [ - "3957de3f-51d4-4560-800c-01d4f9d9c735" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230227Z:3957de3f-51d4-4560-800c-01d4f9d9c735" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:02:26 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/288dfe05-309f-4a17-b223-d18f0f7005da?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzI4OGRmZTA1LTMwOWYtNGExNy1iMjIzLWQxOGYwZjcwMDVkYT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a324526d-2856-4d89-89e7-142f9ddbf8e3" - ], - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11951" - ], - "x-ms-correlation-request-id": [ - "84080a9e-a580-42de-98be-5c4d827b5856" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230237Z:84080a9e-a580-42de-98be-5c4d827b5856" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:02:36 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/288dfe05-309f-4a17-b223-d18f0f7005da?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzI4OGRmZTA1LTMwOWYtNGExNy1iMjIzLWQxOGYwZjcwMDVkYT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b94ed391-01b3-4e8a-8d22-44440086af5a" - ], - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11950" - ], - "x-ms-correlation-request-id": [ - "25e6634a-a83a-44fe-b006-4fe6da48a33f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230247Z:25e6634a-a83a-44fe-b006-4fe6da48a33f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:02:47 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/288dfe05-309f-4a17-b223-d18f0f7005da?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzI4OGRmZTA1LTMwOWYtNGExNy1iMjIzLWQxOGYwZjcwMDVkYT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d94f6384-9c7e-46a6-a0b9-c00fd8ea2f73" - ], - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11949" - ], - "x-ms-correlation-request-id": [ - "9febd826-4af5-4a60-a670-e167ac4a5daa" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230257Z:9febd826-4af5-4a60-a670-e167ac4a5daa" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:02:57 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/288dfe05-309f-4a17-b223-d18f0f7005da?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzI4OGRmZTA1LTMwOWYtNGExNy1iMjIzLWQxOGYwZjcwMDVkYT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e513f75f-aab8-4c01-aee0-7ac7a6109125" - ], - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11948" - ], - "x-ms-correlation-request-id": [ - "6e1a652b-f2ce-4f9a-a7b0-1333078ce0c8" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230308Z:6e1a652b-f2ce-4f9a-a7b0-1333078ce0c8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:03:07 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/288dfe05-309f-4a17-b223-d18f0f7005da?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzI4OGRmZTA1LTMwOWYtNGExNy1iMjIzLWQxOGYwZjcwMDVkYT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ff0e3c75-d5ee-4890-8b3e-2d7866606c11" - ], - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11947" - ], - "x-ms-correlation-request-id": [ - "d2854c5d-9af4-478b-b660-db6a4dc2f9fe" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230318Z:d2854c5d-9af4-478b-b660-db6a4dc2f9fe" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:03:17 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/288dfe05-309f-4a17-b223-d18f0f7005da?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzI4OGRmZTA1LTMwOWYtNGExNy1iMjIzLWQxOGYwZjcwMDVkYT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "10ee5b6a-b317-4e7d-a745-704a5ae9afbb" - ], - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11946" - ], - "x-ms-correlation-request-id": [ - "918dac0e-b903-474a-aa84-27ee69c4efb0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230328Z:918dac0e-b903-474a-aa84-27ee69c4efb0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:03:28 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/288dfe05-309f-4a17-b223-d18f0f7005da/profileresults/ps8896/endpointresults/ps645?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzI4OGRmZTA1LTMwOWYtNGExNy1iMjIzLWQxOGYwZjcwMDVkYS9wcm9maWxlcmVzdWx0cy9wczg4OTYvZW5kcG9pbnRyZXN1bHRzL3BzNjQ1P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "aad8c877-4c5e-439b-bdc3-632862f7dcb4" - ], - "x-ms-client-request-id": [ - "ce5eb227-e9b9-461a-bfa3-79ba7431fb8c" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11945" - ], - "x-ms-correlation-request-id": [ - "a747393d-17e8-48be-b37a-b02e62813281" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230328Z:a747393d-17e8-48be-b37a-b02e62813281" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:03:28 GMT" - ], - "Content-Length": [ - "1230" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/288dfe05-309f-4a17-b223-d18f0f7005da/profileresults/ps8896/endpointresults/ps645\",\r\n \"type\": \"Microsoft.Cdn/operationresults/profileresults/endpointresults\",\r\n \"name\": \"ps645\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps645.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": \"GeneralWebDelivery\",\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps1191\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints/ps645/load?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg4OTYvZW5kcG9pbnRzL3BzNjQ1L2xvYWQ/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"contentPaths\": [\r\n \"/pic1.jpg\",\r\n \"/pic2.jpg\"\r\n ]\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "65" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f/profileresults/ps8896/endpointresults/ps645?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "97507be3-89a7-4655-8640-81d0967c188a" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "5c2b9b9e-ece0-4db9-acef-cfde570dc24b" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230331Z:5c2b9b9e-ece0-4db9-acef-cfde570dc24b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:03:31 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f0eb3b81-09fc-4d35-afd2-474d3e7170fd" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11944" - ], - "x-ms-correlation-request-id": [ - "ddf30538-74db-4485-9248-257c89cd17c1" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230341Z:ddf30538-74db-4485-9248-257c89cd17c1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:03:41 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ca6e6724-ff51-4ed0-9ced-72526ed64a45" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11943" - ], - "x-ms-correlation-request-id": [ - "9bf737fb-7ebd-48f3-a259-6b337a6c9981" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230351Z:9bf737fb-7ebd-48f3-a259-6b337a6c9981" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:03:51 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0e9a6680-c673-4433-99f7-3f96681c1531" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11942" - ], - "x-ms-correlation-request-id": [ - "e96b4efe-fffc-4420-874b-de6c4334d593" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230401Z:e96b4efe-fffc-4420-874b-de6c4334d593" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:04:01 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9e7532aa-6b0c-4c6d-b84a-32b51e1f0be4" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11941" - ], - "x-ms-correlation-request-id": [ - "22b2211f-6c82-45f2-9151-e655b5b3e755" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230412Z:22b2211f-6c82-45f2-9151-e655b5b3e755" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:04:11 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11940" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "92842eb5-0439-47d4-8bf1-05e625ba5bc5" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-correlation-request-id": [ - "a73be0ca-e011-44f6-92b1-b69186f0fb59" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230422Z:a73be0ca-e011-44f6-92b1-b69186f0fb59" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:04:21 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c4bdb351-a8d4-4f93-beac-f0fa215337c5" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11939" - ], - "x-ms-correlation-request-id": [ - "704aeb66-c628-42eb-b198-c29f6bc5e57d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230432Z:704aeb66-c628-42eb-b198-c29f6bc5e57d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:04:31 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "84f489b4-f92f-4d6f-a35c-ac7ccf5bd9a1" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11938" - ], - "x-ms-correlation-request-id": [ - "e0f97210-4c42-4975-9227-2fec0335c947" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230442Z:e0f97210-4c42-4975-9227-2fec0335c947" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:04:41 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d048f656-b52e-4b89-a99a-b9c3f6aa58b6" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11937" - ], - "x-ms-correlation-request-id": [ - "ebd1d8f0-1772-4968-8eb1-0eab87492648" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230452Z:ebd1d8f0-1772-4968-8eb1-0eab87492648" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:04:51 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1165da2b-4a32-45b9-a07b-6086dc8b5632" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11936" - ], - "x-ms-correlation-request-id": [ - "5c1ce0dc-82f2-4c62-8247-d5240f256c28" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230502Z:5c1ce0dc-82f2-4c62-8247-d5240f256c28" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:05:02 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "198656cc-a5d3-4394-adf3-1f3974c7ff73" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11935" - ], - "x-ms-correlation-request-id": [ - "366057e3-05eb-4893-9212-88bf38c2cd5d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230513Z:366057e3-05eb-4893-9212-88bf38c2cd5d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:05:13 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "34ebd271-c0a9-4368-8a07-045c50e71311" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11934" - ], - "x-ms-correlation-request-id": [ - "93b7b3f2-a13b-4e2e-9d7a-5e6317c4cf46" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230523Z:93b7b3f2-a13b-4e2e-9d7a-5e6317c4cf46" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:05:23 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "53d595be-2c75-48af-a74e-fdd1609ae689" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11933" - ], - "x-ms-correlation-request-id": [ - "9236fc67-15b2-4d6e-9a3c-0ca8f42b6dcc" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230533Z:9236fc67-15b2-4d6e-9a3c-0ca8f42b6dcc" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:05:33 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "09c0d1b0-0e33-42e0-8a3f-3c488f02f05b" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11932" - ], - "x-ms-correlation-request-id": [ - "33faeb4a-6eca-4a17-b95f-1f2dab3d0ee0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230543Z:33faeb4a-6eca-4a17-b95f-1f2dab3d0ee0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:05:43 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7588a74e-4b81-4cb1-8010-ea32f40831be" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11931" - ], - "x-ms-correlation-request-id": [ - "b5602825-bd5d-40c4-a8a1-2f3267e14887" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230553Z:b5602825-bd5d-40c4-a8a1-2f3267e14887" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:05:53 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "be3b48bf-2a0f-4296-9e0e-26b80608f889" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11930" - ], - "x-ms-correlation-request-id": [ - "dc30cd5c-95c9-4fb3-9446-0721a848ac5a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230603Z:dc30cd5c-95c9-4fb3-9446-0721a848ac5a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:06:03 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3834f522-6faa-4f53-bc7b-5381c9b9da20" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11929" - ], - "x-ms-correlation-request-id": [ - "25030e9d-8e30-453a-a870-ec8b742f49cc" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230613Z:25030e9d-8e30-453a-a870-ec8b742f49cc" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:06:13 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "650c4310-2a35-4c65-b19c-9cebacaf5a44" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11928" - ], - "x-ms-correlation-request-id": [ - "e649d5e3-83d8-4b6d-a7e7-781a6abfa65c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230624Z:e649d5e3-83d8-4b6d-a7e7-781a6abfa65c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:06:23 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "49f26bef-6e16-4e99-96ce-48ed6d1b3394" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11927" - ], - "x-ms-correlation-request-id": [ - "c70b3f0b-a655-443e-afc3-7c734919313e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230634Z:c70b3f0b-a655-443e-afc3-7c734919313e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:06:33 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "92034805-6f9e-4cde-8206-9528edbbca7d" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11926" - ], - "x-ms-correlation-request-id": [ - "4b8aef26-e191-4fb7-a61d-3880a3aa3964" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230644Z:4b8aef26-e191-4fb7-a61d-3880a3aa3964" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:06:43 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7ca690c3-8370-4aac-9cc2-87eac5533ec6" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11925" - ], - "x-ms-correlation-request-id": [ - "5a20dfc8-8e27-435a-b756-e950ab316928" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230654Z:5a20dfc8-8e27-435a-b756-e950ab316928" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:06:53 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "648c9b97-dfe2-4902-b9eb-5dd456dc5fc9" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11924" - ], - "x-ms-correlation-request-id": [ - "e7fe3413-f685-405c-9464-695c7ac9e6fa" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230704Z:e7fe3413-f685-405c-9464-695c7ac9e6fa" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:07:03 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f7965e06-cf21-4d57-a3e6-37013e28ed98" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11923" - ], - "x-ms-correlation-request-id": [ - "9300dae7-4acb-4281-8ec3-7288df3c873e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230714Z:9300dae7-4acb-4281-8ec3-7288df3c873e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:07:13 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ee00a550-8ca7-46a0-80f6-c7773ef54349" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11922" - ], - "x-ms-correlation-request-id": [ - "c78fe92e-b7a3-481b-870b-36eb6c3f7661" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230725Z:c78fe92e-b7a3-481b-870b-36eb6c3f7661" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:07:25 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c800b6c6-80bd-4ab4-9820-5dafcb17d81a" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11921" - ], - "x-ms-correlation-request-id": [ - "9bcb7090-7653-4ca4-a70c-5a918240e991" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230735Z:9bcb7090-7653-4ca4-a70c-5a918240e991" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:07:35 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7c22ea61-2406-478e-94f9-8e5b8c4b8873" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11920" - ], - "x-ms-correlation-request-id": [ - "5d7c5bf9-bca8-4c22-9271-c3b66d761195" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230745Z:5d7c5bf9-bca8-4c22-9271-c3b66d761195" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:07:45 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f/profileresults/ps8896/endpointresults/ps645?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JjMmYwODg1LTYzN2UtNDAyMS1hYTQxLWVlM2M4MGJiNGQxZi9wcm9maWxlcmVzdWx0cy9wczg4OTYvZW5kcG9pbnRyZXN1bHRzL3BzNjQ1P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "75872a15-8a44-48f6-ab73-50cb18421470" - ], - "x-ms-client-request-id": [ - "de6e1296-9d69-458a-b930-71f7fd7fead3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11919" - ], - "x-ms-correlation-request-id": [ - "94b74611-051e-4a51-931b-518a1bc21987" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230745Z:94b74611-051e-4a51-931b-518a1bc21987" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:07:45 GMT" - ], - "Content-Length": [ - "1230" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/bc2f0885-637e-4021-aa41-ee3c80bb4d1f/profileresults/ps8896/endpointresults/ps645\",\r\n \"type\": \"Microsoft.Cdn/operationresults/profileresults/endpointresults\",\r\n \"name\": \"ps645\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps645.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": \"GeneralWebDelivery\",\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps1191\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints/ps645/validateCustomDomain?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg4OTYvZW5kcG9pbnRzL3BzNjQ1L3ZhbGlkYXRlQ3VzdG9tRG9tYWluP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"hostName\": \"unverifiedcustomdomain.com\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7d8dea41-998d-4b84-b887-c8576b297acb" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "48" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ff262916-c9dc-4dfb-88ef-dc4548c7a388" - ], - "x-ms-client-request-id": [ - "7d8dea41-998d-4b84-b887-c8576b297acb" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "171eb0c1-6646-4b8e-88f9-d7f1725ef404" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230746Z:171eb0c1-6646-4b8e-88f9-d7f1725ef404" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:07:46 GMT" - ], - "Content-Length": [ - "266" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"customDomainValidated\": false,\r\n \"reason\": \"IncorrectMapping\",\r\n \"message\": \"We couldn't find a DNS record for custom domain that points to endpoint. To map a domain to this endpoint, create a CNAME record with your DNS provider for custom domain that points to endpoint.\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg4OTYvZW5kcG9pbnRzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4b90415b-57ab-410c-ab7a-0e57176c7ca1" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b64521e8-c9b5-4ae1-a4db-7f0f7e768952" - ], - "x-ms-client-request-id": [ - "4b90415b-57ab-410c-ab7a-0e57176c7ca1" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "46" - ], - "x-ms-correlation-request-id": [ - "b1a0dfe4-6e8f-4e5a-bc18-e9b4a6a37b61" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230746Z:b1a0dfe4-6e8f-4e5a-bc18-e9b4a6a37b61" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:07:46 GMT" - ], - "Content-Length": [ - "1147" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints/ps645\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps645\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps645.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": \"GeneralWebDelivery\",\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps1191\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6977/providers/Microsoft.Cdn/profiles/ps8896/endpoints/ps645?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg4OTYvZW5kcG9pbnRzL3BzNjQ1P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4b90415b-57ab-410c-ab7a-0e57176c7ca1" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/75fe6347-c905-4b6b-aa1e-f84c497d5a6b/profileresults/ps8896/endpointresults/ps645?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f69f80dc-98cd-455d-bf80-daad419ff075" - ], - "x-ms-client-request-id": [ - "4b90415b-57ab-410c-ab7a-0e57176c7ca1" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/75fe6347-c905-4b6b-aa1e-f84c497d5a6b?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" - ], - "x-ms-correlation-request-id": [ - "73d2b5a3-3c7d-4d77-8a07-cb1107b0d5c3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230749Z:73d2b5a3-3c7d-4d77-8a07-cb1107b0d5c3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:07:48 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/75fe6347-c905-4b6b-aa1e-f84c497d5a6b?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzc1ZmU2MzQ3LWM5MDUtNGI2Yi1hYTFlLWY4NGM0OTdkNWE2Yj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4b90415b-57ab-410c-ab7a-0e57176c7ca1" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ae1df5be-b618-4f84-904b-f4d212340e3e" - ], - "x-ms-client-request-id": [ - "4b90415b-57ab-410c-ab7a-0e57176c7ca1" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11918" - ], - "x-ms-correlation-request-id": [ - "562ddd1a-ca43-4887-9572-a1029c0211f7" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230759Z:562ddd1a-ca43-4887-9572-a1029c0211f7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:07:59 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/75fe6347-c905-4b6b-aa1e-f84c497d5a6b?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzc1ZmU2MzQ3LWM5MDUtNGI2Yi1hYTFlLWY4NGM0OTdkNWE2Yj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4b90415b-57ab-410c-ab7a-0e57176c7ca1" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c0f29f54-dde6-4f0d-a708-9665ef19bd28" - ], - "x-ms-client-request-id": [ - "4b90415b-57ab-410c-ab7a-0e57176c7ca1" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11917" - ], - "x-ms-correlation-request-id": [ - "e4db0223-c215-4f36-b9ee-3ff7075d7640" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230809Z:e4db0223-c215-4f36-b9ee-3ff7075d7640" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:08:09 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977/providers/Microsoft.Cdn/operationresults/75fe6347-c905-4b6b-aa1e-f84c497d5a6b/profileresults/ps8896/endpointresults/ps645?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Ny9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzc1ZmU2MzQ3LWM5MDUtNGI2Yi1hYTFlLWY4NGM0OTdkNWE2Yi9wcm9maWxlcmVzdWx0cy9wczg4OTYvZW5kcG9pbnRyZXN1bHRzL3BzNjQ1P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4b90415b-57ab-410c-ab7a-0e57176c7ca1" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1449df17-5e4f-4079-946a-8afd47675cb0" - ], - "x-ms-client-request-id": [ - "4b90415b-57ab-410c-ab7a-0e57176c7ca1" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11916" - ], - "x-ms-correlation-request-id": [ - "7577f2bc-7ae9-4788-8b45-0077588d34a2" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T230809Z:7577f2bc-7ae9-4788-8b45-0077588d34a2" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:08:09 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6977?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjk3Nz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "09bb6695-8fa3-44f0-9566-d85fd3efe814" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5NzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "0821bccc-35d0-4e26-a0ca-b7812b28243f" - ], - "x-ms-correlation-request-id": [ - "0821bccc-35d0-4e26-a0ca-b7812b28243f" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T230810Z:0821bccc-35d0-4e26-a0ca-b7812b28243f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:08:09 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5NzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU56Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5NzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "0670342b-03fb-4eb2-b68c-edf09b25213c" - ], - "x-ms-correlation-request-id": [ - "0670342b-03fb-4eb2-b68c-edf09b25213c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T230825Z:0670342b-03fb-4eb2-b68c-edf09b25213c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:08:24 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5NzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU56Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5NzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "7099d73c-5f65-4ac8-8a1a-4307ee559dae" - ], - "x-ms-correlation-request-id": [ - "7099d73c-5f65-4ac8-8a1a-4307ee559dae" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T230840Z:7099d73c-5f65-4ac8-8a1a-4307ee559dae" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:08:39 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5NzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU56Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5NzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "836ffd1b-8054-42c0-8b65-a47aee60e56d" - ], - "x-ms-correlation-request-id": [ - "836ffd1b-8054-42c0-8b65-a47aee60e56d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T230855Z:836ffd1b-8054-42c0-8b65-a47aee60e56d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:08:54 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5NzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU56Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5NzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "26b07a5f-6e37-4c4b-8322-2b24ab0dfa8d" - ], - "x-ms-correlation-request-id": [ - "26b07a5f-6e37-4c4b-8322-2b24ab0dfa8d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T230910Z:26b07a5f-6e37-4c4b-8322-2b24ab0dfa8d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:09:09 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5NzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU56Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5NzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "3715091d-1510-464c-b1f9-f6db98fde330" - ], - "x-ms-correlation-request-id": [ - "3715091d-1510-464c-b1f9-f6db98fde330" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T230925Z:3715091d-1510-464c-b1f9-f6db98fde330" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:09:24 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5NzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU56Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5NzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "5febe1fe-132b-4a14-ad78-08feb010827c" - ], - "x-ms-correlation-request-id": [ - "5febe1fe-132b-4a14-ad78-08feb010827c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T230940Z:5febe1fe-132b-4a14-ad78-08feb010827c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:09:40 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5NzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU56Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "4652b14b-5cf3-42ce-9331-b9583c1df404" - ], - "x-ms-correlation-request-id": [ - "4652b14b-5cf3-42ce-9331-b9583c1df404" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T230955Z:4652b14b-5cf3-42ce-9331-b9583c1df404" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:09:55 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5NzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU56Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "4ca5f540-19eb-46b6-ae74-0a8560110267" - ], - "x-ms-correlation-request-id": [ - "4ca5f540-19eb-46b6-ae74-0a8560110267" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T230955Z:4ca5f540-19eb-46b6-ae74-0a8560110267" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:09:55 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-EndpointCrudAndActionWithAllProperties": [ - "ps8896", - "ps6977", - "ps645", - "ps1191" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCrudAndActionWithAllPropertiesWithPiping.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCrudAndActionWithAllPropertiesWithPiping.json deleted file mode 100644 index e6215fe21589..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCrudAndActionWithAllPropertiesWithPiping.json +++ /dev/null @@ -1,6324 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9f0f14ab-afe6-478f-a417-9bf69741efef" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "3acb1cac-6b33-49d6-98f8-f5bfe97d9632" - ], - "x-ms-correlation-request-id": [ - "3acb1cac-6b33-49d6-98f8-f5bfe97d9632" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231038Z:3acb1cac-6b33-49d6-98f8-f5bfe97d9632" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:10:38 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3307\",\r\n \"name\": \"ps3307\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "84e0cd55-87ad-4385-9d3b-ecfb69c59de3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ec3f423d-8d19-4087-9afb-063af6962299" - ], - "x-ms-client-request-id": [ - "84e0cd55-87ad-4385-9d3b-ecfb69c59de3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "07f2be5c-b00c-4885-9c86-b563089b305b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231040Z:07f2be5c-b00c-4885-9c86-b563089b305b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:10:40 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMwMDY/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "84e0cd55-87ad-4385-9d3b-ecfb69c59de3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "78" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0aca53e6-4393-4e5b-bbca-52a90a7ec25e" - ], - "x-ms-client-request-id": [ - "84e0cd55-87ad-4385-9d3b-ecfb69c59de3" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/89fe1748-c7d4-481d-ac42-acce06a5fd38?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "1ece03c5-0ddc-4d86-a88e-2a2494ac79ac" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231042Z:1ece03c5-0ddc-4d86-a88e-2a2494ac79ac" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:10:42 GMT" - ], - "Content-Length": [ - "320" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps3006\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/89fe1748-c7d4-481d-ac42-acce06a5fd38?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzg5ZmUxNzQ4LWM3ZDQtNDgxZC1hYzQyLWFjY2UwNmE1ZmQzOD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "84e0cd55-87ad-4385-9d3b-ecfb69c59de3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "edfc6650-f4e6-4a88-8fd8-8734a117e57e" - ], - "x-ms-client-request-id": [ - "84e0cd55-87ad-4385-9d3b-ecfb69c59de3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "da2d06c0-2eff-4529-92ae-cb67b3d3e541" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231053Z:da2d06c0-2eff-4529-92ae-cb67b3d3e541" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:10:52 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/89fe1748-c7d4-481d-ac42-acce06a5fd38?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzg5ZmUxNzQ4LWM3ZDQtNDgxZC1hYzQyLWFjY2UwNmE1ZmQzOD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "84e0cd55-87ad-4385-9d3b-ecfb69c59de3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b98aaa01-d954-4f05-84ef-6924e327de21" - ], - "x-ms-client-request-id": [ - "84e0cd55-87ad-4385-9d3b-ecfb69c59de3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "40ff6720-d80a-4b31-8322-36d2766cf52b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231103Z:40ff6720-d80a-4b31-8322-36d2766cf52b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:11:02 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/89fe1748-c7d4-481d-ac42-acce06a5fd38?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzg5ZmUxNzQ4LWM3ZDQtNDgxZC1hYzQyLWFjY2UwNmE1ZmQzOD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "84e0cd55-87ad-4385-9d3b-ecfb69c59de3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e0ea5397-bd42-4854-a957-2f3fbf4ba009" - ], - "x-ms-client-request-id": [ - "84e0cd55-87ad-4385-9d3b-ecfb69c59de3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "16c8d53e-bff1-4e47-acb6-9cd4a70a5dcd" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231113Z:16c8d53e-bff1-4e47-acb6-9cd4a70a5dcd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:11:13 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/89fe1748-c7d4-481d-ac42-acce06a5fd38?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzg5ZmUxNzQ4LWM3ZDQtNDgxZC1hYzQyLWFjY2UwNmE1ZmQzOD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "84e0cd55-87ad-4385-9d3b-ecfb69c59de3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6d177b86-b83b-4df2-af33-b1dec30f8a39" - ], - "x-ms-client-request-id": [ - "84e0cd55-87ad-4385-9d3b-ecfb69c59de3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "0cf0d6e4-21c4-4b7e-b9c0-e1ecbf27576b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231123Z:0cf0d6e4-21c4-4b7e-b9c0-e1ecbf27576b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:11:23 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/89fe1748-c7d4-481d-ac42-acce06a5fd38?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzg5ZmUxNzQ4LWM3ZDQtNDgxZC1hYzQyLWFjY2UwNmE1ZmQzOD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "84e0cd55-87ad-4385-9d3b-ecfb69c59de3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0975679e-1229-4cd2-8e93-4e82ecdb88de" - ], - "x-ms-client-request-id": [ - "84e0cd55-87ad-4385-9d3b-ecfb69c59de3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "5ebe92b9-488c-4110-987d-094bdf9e55e3" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231133Z:5ebe92b9-488c-4110-987d-094bdf9e55e3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:11:33 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/89fe1748-c7d4-481d-ac42-acce06a5fd38?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzg5ZmUxNzQ4LWM3ZDQtNDgxZC1hYzQyLWFjY2UwNmE1ZmQzOD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "84e0cd55-87ad-4385-9d3b-ecfb69c59de3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b11e47a2-5cda-443c-893b-650f374e46ef" - ], - "x-ms-client-request-id": [ - "84e0cd55-87ad-4385-9d3b-ecfb69c59de3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "b888a152-41b8-4713-b7e1-e8d00dd29394" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231143Z:b888a152-41b8-4713-b7e1-e8d00dd29394" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:11:43 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMwMDY/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "84e0cd55-87ad-4385-9d3b-ecfb69c59de3" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c8223366-704f-4641-a280-22571a9545c7" - ], - "x-ms-client-request-id": [ - "84e0cd55-87ad-4385-9d3b-ecfb69c59de3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "eff138ee-9d44-4d27-bdb4-831e3ae38436" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231144Z:eff138ee-9d44-4d27-bdb4-831e3ae38436" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:11:43 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps3006\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps4033\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9720d417-8acc-48a9-83ee-89b54b7c6dfc" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e48d41d6-8441-4c58-a4fb-c6020828357e" - ], - "x-ms-client-request-id": [ - "9720d417-8acc-48a9-83ee-89b54b7c6dfc" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "df40838c-517b-4cca-aea4-93d449e19748" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231144Z:df40838c-517b-4cca-aea4-93d449e19748" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:11:44 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps4033\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7a8990be-0bfa-4c05-bd06-1185ce403e70" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0bd2756a-8fbb-4b79-8373-e9588a05457d" - ], - "x-ms-client-request-id": [ - "7a8990be-0bfa-4c05-bd06-1185ce403e70" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "6ced52d6-7b04-4955-a41b-e57d15135297" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231145Z:6ced52d6-7b04-4955-a41b-e57d15135297" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:11:44 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps4033\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "dffcb00c-e9ce-4eb9-83c2-0d99cd6e4f46" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e2567cff-64aa-4748-b2bd-789eaa2c37b0" - ], - "x-ms-client-request-id": [ - "dffcb00c-e9ce-4eb9-83c2-0d99cd6e4f46" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1197" - ], - "x-ms-correlation-request-id": [ - "09e4be90-22d0-444f-bbfb-27ffe824bc7e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231209Z:09e4be90-22d0-444f-bbfb-27ffe824bc7e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:12:08 GMT" - ], - "Content-Length": [ - "88" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": false,\r\n \"reason\": \"Name is already in use\",\r\n \"message\": \"Name not available\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMwMDYvZW5kcG9pbnRzL3BzNDAzMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"origins\": [\r\n {\r\n \"name\": \"ps6428\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUS\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7a8990be-0bfa-4c05-bd06-1185ce403e70" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "630" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "481ce473-49a6-4455-a5f5-ef1d8e4cb2c3" - ], - "x-ms-client-request-id": [ - "7a8990be-0bfa-4c05-bd06-1185ce403e70" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/e5f9a98d-ad09-44b9-a56d-8e49628cc5c2?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "bb2695f9-b99d-415c-b99f-7e26914918c3" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231148Z:bb2695f9-b99d-415c-b99f-7e26914918c3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:11:47 GMT" - ], - "Content-Length": [ - "1124" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps4033\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps4033.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps6428\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/e5f9a98d-ad09-44b9-a56d-8e49628cc5c2?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2U1ZjlhOThkLWFkMDktNDRiOS1hNTZkLThlNDk2MjhjYzVjMj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7a8990be-0bfa-4c05-bd06-1185ce403e70" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "89b72309-73e5-4255-8ef4-666e306f05a2" - ], - "x-ms-client-request-id": [ - "7a8990be-0bfa-4c05-bd06-1185ce403e70" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "05104edc-ab6d-4b77-96c9-c84b9be94727" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231158Z:05104edc-ab6d-4b77-96c9-c84b9be94727" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:11:57 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/e5f9a98d-ad09-44b9-a56d-8e49628cc5c2?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2U1ZjlhOThkLWFkMDktNDRiOS1hNTZkLThlNDk2MjhjYzVjMj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7a8990be-0bfa-4c05-bd06-1185ce403e70" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e3e03519-7bd2-44c2-8e1b-e9ef14ff8220" - ], - "x-ms-client-request-id": [ - "7a8990be-0bfa-4c05-bd06-1185ce403e70" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "b4e6ab18-36aa-4767-92d6-6036a1341a9e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231208Z:b4e6ab18-36aa-4767-92d6-6036a1341a9e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:12:08 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMwMDYvZW5kcG9pbnRzL3BzNDAzMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7a8990be-0bfa-4c05-bd06-1185ce403e70" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "56ba409d-36c7-4226-971a-57bd9cba7c3f" - ], - "x-ms-client-request-id": [ - "7a8990be-0bfa-4c05-bd06-1185ce403e70" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "a8e1242c-91b6-428d-81d0-0ec8c00ba15a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231209Z:a8e1242c-91b6-428d-81d0-0ec8c00ba15a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:12:08 GMT" - ], - "Content-Length": [ - "1122" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps4033\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps4033.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps6428\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMwMDYvZW5kcG9pbnRzL3BzNDAzMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f6f16b66-a9a0-4ae6-a9fe-1df36149fc93" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "db8a1db7-97c2-4b22-9be0-327a0717097a" - ], - "x-ms-client-request-id": [ - "f6f16b66-a9a0-4ae6-a9fe-1df36149fc93" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "700502d3-b698-4b06-b6a8-80abc6f74ac1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231232Z:700502d3-b698-4b06-b6a8-80abc6f74ac1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:12:31 GMT" - ], - "Content-Length": [ - "1122" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps4033\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps4033.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps6428\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Stopped\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMwMDYvZW5kcG9pbnRzL3BzNDAzMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f5349131-5f6c-43fb-a456-af44c1200907" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2164c181-794c-4838-9f60-cee6a3b1e63a" - ], - "x-ms-client-request-id": [ - "f5349131-5f6c-43fb-a456-af44c1200907" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "47" - ], - "x-ms-correlation-request-id": [ - "2ebf6a13-0212-4f16-ad25-fde8b0565966" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231254Z:2ebf6a13-0212-4f16-ad25-fde8b0565966" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:12:54 GMT" - ], - "Content-Length": [ - "1122" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps4033\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps4033.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps6428\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMwMDYvZW5kcG9pbnRzL3BzNDAzMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "cd13f9cb-dadc-4ccc-a383-143dee327970" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "862fd85a-89c9-4016-9b01-0874617b2067" - ], - "x-ms-client-request-id": [ - "cd13f9cb-dadc-4ccc-a383-143dee327970" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "b74133db-a637-4fc3-bfc4-171975726486" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232057Z:b74133db-a637-4fc3-bfc4-171975726486" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:20:56 GMT" - ], - "Content-Length": [ - "1125" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps4033\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps4033.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/pictures\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"UseQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps6428\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMwMDYvZW5kcG9pbnRzL3BzNDAzMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2be10b9c-339a-463b-8aa7-f42f09d1a61f" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "38ae8ad4-7248-4f63-a9af-178c72d36af7" - ], - "x-ms-client-request-id": [ - "2be10b9c-339a-463b-8aa7-f42f09d1a61f" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "47" - ], - "x-ms-correlation-request-id": [ - "64733959-958d-4732-bbbe-efdb89fbdb07" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232119Z:64733959-958d-4732-bbbe-efdb89fbdb07" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:21:19 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033/stop?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMwMDYvZW5kcG9pbnRzL3BzNDAzMy9zdG9wP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ad140c6b-909a-44c8-8f6e-7fbe16161d00" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/a2f32f4f-6a7d-4821-b45a-bb715b08836f/profileresults/ps3006/endpointresults/ps4033?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b28b25d1-7c8c-49ca-98de-3018fe2086e3" - ], - "x-ms-client-request-id": [ - "ad140c6b-909a-44c8-8f6e-7fbe16161d00" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/a2f32f4f-6a7d-4821-b45a-bb715b08836f?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "6b03c4c0-f883-407a-baa7-19750aea3b0f" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231211Z:6b03c4c0-f883-407a-baa7-19750aea3b0f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:12:10 GMT" - ], - "Content-Length": [ - "1123" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps4033\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps4033.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps6428\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Stopping\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/a2f32f4f-6a7d-4821-b45a-bb715b08836f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2EyZjMyZjRmLTZhN2QtNDgyMS1iNDVhLWJiNzE1YjA4ODM2Zj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ad140c6b-909a-44c8-8f6e-7fbe16161d00" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e383ea49-71ac-4a38-9fc8-f7f378060e4b" - ], - "x-ms-client-request-id": [ - "ad140c6b-909a-44c8-8f6e-7fbe16161d00" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-correlation-request-id": [ - "8fef81c4-00e6-49d5-88ff-effd434f374a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231221Z:8fef81c4-00e6-49d5-88ff-effd434f374a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:12:20 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/a2f32f4f-6a7d-4821-b45a-bb715b08836f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2EyZjMyZjRmLTZhN2QtNDgyMS1iNDVhLWJiNzE1YjA4ODM2Zj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ad140c6b-909a-44c8-8f6e-7fbe16161d00" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3965417d-e1ad-4d3a-a56b-fb269365f0bd" - ], - "x-ms-client-request-id": [ - "ad140c6b-909a-44c8-8f6e-7fbe16161d00" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-correlation-request-id": [ - "fcdb658f-9a14-42c5-a540-f2b6d035a430" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231231Z:fcdb658f-9a14-42c5-a540-f2b6d035a430" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:12:30 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/a2f32f4f-6a7d-4821-b45a-bb715b08836f/profileresults/ps3006/endpointresults/ps4033?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2EyZjMyZjRmLTZhN2QtNDgyMS1iNDVhLWJiNzE1YjA4ODM2Zi9wcm9maWxlcmVzdWx0cy9wczMwMDYvZW5kcG9pbnRyZXN1bHRzL3BzNDAzMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ad140c6b-909a-44c8-8f6e-7fbe16161d00" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "655d2cee-a601-46c5-9d2e-1a012d3e9d47" - ], - "x-ms-client-request-id": [ - "ad140c6b-909a-44c8-8f6e-7fbe16161d00" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-correlation-request-id": [ - "61d8c572-e9d0-4525-a490-fc56f0c30eb8" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231231Z:61d8c572-e9d0-4525-a490-fc56f0c30eb8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:12:30 GMT" - ], - "Content-Length": [ - "1217" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/a2f32f4f-6a7d-4821-b45a-bb715b08836f/profileresults/ps3006/endpointresults/ps4033\",\r\n \"type\": \"Microsoft.Cdn/operationresults/profileresults/endpointresults\",\r\n \"name\": \"ps4033\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps4033.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps6428\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Stopped\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033/start?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMwMDYvZW5kcG9pbnRzL3BzNDAzMy9zdGFydD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5ad978c0-2552-462d-9f5b-2a9e6b7f1c70" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/ac840dab-7668-406d-b45c-7aa071383a8b/profileresults/ps3006/endpointresults/ps4033?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d25877c7-3dea-4ab6-976b-bb447a6ec0ae" - ], - "x-ms-client-request-id": [ - "5ad978c0-2552-462d-9f5b-2a9e6b7f1c70" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/ac840dab-7668-406d-b45c-7aa071383a8b?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "95502fb3-02d3-41d7-a63b-ef26a6c463aa" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231233Z:95502fb3-02d3-41d7-a63b-ef26a6c463aa" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:12:32 GMT" - ], - "Content-Length": [ - "1123" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps4033\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps4033.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps6428\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Starting\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/ac840dab-7668-406d-b45c-7aa071383a8b?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2FjODQwZGFiLTc2NjgtNDA2ZC1iNDVjLTdhYTA3MTM4M2E4Yj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5ad978c0-2552-462d-9f5b-2a9e6b7f1c70" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "af3b4b1d-e972-496a-956b-6d032e40c84e" - ], - "x-ms-client-request-id": [ - "5ad978c0-2552-462d-9f5b-2a9e6b7f1c70" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-correlation-request-id": [ - "478f9a5c-c183-4e92-8afb-46cad0206b1e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231243Z:478f9a5c-c183-4e92-8afb-46cad0206b1e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:12:43 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/ac840dab-7668-406d-b45c-7aa071383a8b?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2FjODQwZGFiLTc2NjgtNDA2ZC1iNDVjLTdhYTA3MTM4M2E4Yj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5ad978c0-2552-462d-9f5b-2a9e6b7f1c70" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ad46d8ab-c127-4c12-9ac1-3c0c4eb13dd0" - ], - "x-ms-client-request-id": [ - "5ad978c0-2552-462d-9f5b-2a9e6b7f1c70" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-correlation-request-id": [ - "36d11cfe-cbae-4ce4-964a-55ccfa01780a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231253Z:36d11cfe-cbae-4ce4-964a-55ccfa01780a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:12:53 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/ac840dab-7668-406d-b45c-7aa071383a8b/profileresults/ps3006/endpointresults/ps4033?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2FjODQwZGFiLTc2NjgtNDA2ZC1iNDVjLTdhYTA3MTM4M2E4Yi9wcm9maWxlcmVzdWx0cy9wczMwMDYvZW5kcG9pbnRyZXN1bHRzL3BzNDAzMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5ad978c0-2552-462d-9f5b-2a9e6b7f1c70" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9128f070-0ebb-4f9d-93b2-d2b56fa84f1f" - ], - "x-ms-client-request-id": [ - "5ad978c0-2552-462d-9f5b-2a9e6b7f1c70" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11986" - ], - "x-ms-correlation-request-id": [ - "55d210c1-e782-405f-bf84-d1c982966cd1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231253Z:55d210c1-e782-405f-bf84-d1c982966cd1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:12:53 GMT" - ], - "Content-Length": [ - "1217" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/ac840dab-7668-406d-b45c-7aa071383a8b/profileresults/ps3006/endpointresults/ps4033\",\r\n \"type\": \"Microsoft.Cdn/operationresults/profileresults/endpointresults\",\r\n \"name\": \"ps4033\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps4033.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps6428\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033/purge?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMwMDYvZW5kcG9pbnRzL3BzNDAzMy9wdXJnZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"contentPaths\": [\r\n \"/pic1.jpg\",\r\n \"/pic2.jpg\"\r\n ]\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "65" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/bb47e8c5-3ceb-4ef7-a51c-6ce14697cf44/profileresults/ps3006/endpointresults/ps4033?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "70cbbe1f-9408-4150-8d1a-3fe9ea5c7e98" - ], - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/bb47e8c5-3ceb-4ef7-a51c-6ce14697cf44?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "a7ad5847-1fbe-4a8b-bb60-d5583cc7eac0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231255Z:a7ad5847-1fbe-4a8b-bb60-d5583cc7eac0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:12:55 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/bb47e8c5-3ceb-4ef7-a51c-6ce14697cf44?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JiNDdlOGM1LTNjZWItNGVmNy1hNTFjLTZjZTE0Njk3Y2Y0ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4495ec44-d702-46ad-8704-459beb06e24f" - ], - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11985" - ], - "x-ms-correlation-request-id": [ - "1fa02a68-336c-4791-8a11-eeec9f6b59ca" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231305Z:1fa02a68-336c-4791-8a11-eeec9f6b59ca" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:13:05 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/bb47e8c5-3ceb-4ef7-a51c-6ce14697cf44?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JiNDdlOGM1LTNjZWItNGVmNy1hNTFjLTZjZTE0Njk3Y2Y0ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "24bfd24d-4786-4a9c-a3ec-adc5103f7692" - ], - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11984" - ], - "x-ms-correlation-request-id": [ - "4cdd17c2-746b-444e-8545-74806c9a607d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231315Z:4cdd17c2-746b-444e-8545-74806c9a607d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:13:15 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/bb47e8c5-3ceb-4ef7-a51c-6ce14697cf44?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JiNDdlOGM1LTNjZWItNGVmNy1hNTFjLTZjZTE0Njk3Y2Y0ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1000bbdc-ec0f-4370-9644-73dc24861d51" - ], - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11983" - ], - "x-ms-correlation-request-id": [ - "d9ef79fc-dabe-4f53-8723-eaeefa09abed" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231325Z:d9ef79fc-dabe-4f53-8723-eaeefa09abed" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:13:25 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/bb47e8c5-3ceb-4ef7-a51c-6ce14697cf44?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JiNDdlOGM1LTNjZWItNGVmNy1hNTFjLTZjZTE0Njk3Y2Y0ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "fd03697c-9445-4e65-9a9e-f094a7d3e60f" - ], - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11982" - ], - "x-ms-correlation-request-id": [ - "abf286de-3164-4439-8182-1fdb77337b54" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231336Z:abf286de-3164-4439-8182-1fdb77337b54" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:13:35 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/bb47e8c5-3ceb-4ef7-a51c-6ce14697cf44?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JiNDdlOGM1LTNjZWItNGVmNy1hNTFjLTZjZTE0Njk3Y2Y0ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d890159e-5f6e-403c-b9e8-66be91349728" - ], - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11981" - ], - "x-ms-correlation-request-id": [ - "8c91f494-1233-4095-b952-ea2f813a0707" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231346Z:8c91f494-1233-4095-b952-ea2f813a0707" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:13:45 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/bb47e8c5-3ceb-4ef7-a51c-6ce14697cf44?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JiNDdlOGM1LTNjZWItNGVmNy1hNTFjLTZjZTE0Njk3Y2Y0ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6547f598-e78f-44c7-bd9f-35934c36912f" - ], - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11980" - ], - "x-ms-correlation-request-id": [ - "e239ef18-4f81-497b-8c71-6f2f8d3aff4e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231356Z:e239ef18-4f81-497b-8c71-6f2f8d3aff4e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:13:55 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/bb47e8c5-3ceb-4ef7-a51c-6ce14697cf44?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JiNDdlOGM1LTNjZWItNGVmNy1hNTFjLTZjZTE0Njk3Y2Y0ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "462d5de7-ac25-4466-856c-3303de240987" - ], - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11979" - ], - "x-ms-correlation-request-id": [ - "8df76f21-e240-4309-bdee-1488f054d939" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231406Z:8df76f21-e240-4309-bdee-1488f054d939" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:14:05 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/bb47e8c5-3ceb-4ef7-a51c-6ce14697cf44?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JiNDdlOGM1LTNjZWItNGVmNy1hNTFjLTZjZTE0Njk3Y2Y0ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6f5200a6-90ac-4ebd-9aa3-ce9a64f3f312" - ], - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11978" - ], - "x-ms-correlation-request-id": [ - "33a35060-2e9c-40b1-802d-9e6172435eee" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231416Z:33a35060-2e9c-40b1-802d-9e6172435eee" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:14:15 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/bb47e8c5-3ceb-4ef7-a51c-6ce14697cf44?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JiNDdlOGM1LTNjZWItNGVmNy1hNTFjLTZjZTE0Njk3Y2Y0ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "03f4ffb3-ff97-4576-ab76-b8adf3940ddf" - ], - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11977" - ], - "x-ms-correlation-request-id": [ - "2b673265-289d-49af-b74d-6e5db244ddb3" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231426Z:2b673265-289d-49af-b74d-6e5db244ddb3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:14:25 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/bb47e8c5-3ceb-4ef7-a51c-6ce14697cf44?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JiNDdlOGM1LTNjZWItNGVmNy1hNTFjLTZjZTE0Njk3Y2Y0ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e81d6a6f-fa2d-484c-b886-49a5052c40cb" - ], - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11976" - ], - "x-ms-correlation-request-id": [ - "c7bd6d0c-b2df-406c-bbaf-6332445a142d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231436Z:c7bd6d0c-b2df-406c-bbaf-6332445a142d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:14:36 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/bb47e8c5-3ceb-4ef7-a51c-6ce14697cf44?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JiNDdlOGM1LTNjZWItNGVmNy1hNTFjLTZjZTE0Njk3Y2Y0ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "de0b9955-0264-4a81-845f-9e6b1c4fe59f" - ], - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11975" - ], - "x-ms-correlation-request-id": [ - "be572033-acd1-4ab7-a657-ea506ed3e882" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231446Z:be572033-acd1-4ab7-a657-ea506ed3e882" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:14:46 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/bb47e8c5-3ceb-4ef7-a51c-6ce14697cf44?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JiNDdlOGM1LTNjZWItNGVmNy1hNTFjLTZjZTE0Njk3Y2Y0ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "43bfe65a-c188-470c-899a-5ec1733c7d8d" - ], - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11974" - ], - "x-ms-correlation-request-id": [ - "7c1ee75c-e479-4596-8eaf-b1ac171b8e9f" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231457Z:7c1ee75c-e479-4596-8eaf-b1ac171b8e9f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:14:56 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/bb47e8c5-3ceb-4ef7-a51c-6ce14697cf44?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JiNDdlOGM1LTNjZWItNGVmNy1hNTFjLTZjZTE0Njk3Y2Y0ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0200132d-1e60-44b9-9d98-f6740188f527" - ], - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11973" - ], - "x-ms-correlation-request-id": [ - "65abf335-40c1-4740-aaec-7761ebce8634" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231507Z:65abf335-40c1-4740-aaec-7761ebce8634" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:15:07 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/bb47e8c5-3ceb-4ef7-a51c-6ce14697cf44/profileresults/ps3006/endpointresults/ps4033?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2JiNDdlOGM1LTNjZWItNGVmNy1hNTFjLTZjZTE0Njk3Y2Y0NC9wcm9maWxlcmVzdWx0cy9wczMwMDYvZW5kcG9pbnRyZXN1bHRzL3BzNDAzMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "754a9392-1842-4623-8e03-ebf2dae3beb3" - ], - "x-ms-client-request-id": [ - "82672626-367e-4fda-a003-b0b6ad778c03" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11972" - ], - "x-ms-correlation-request-id": [ - "86f2dec4-c83c-4861-b2aa-d39fb1e2c647" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231507Z:86f2dec4-c83c-4861-b2aa-d39fb1e2c647" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:15:07 GMT" - ], - "Content-Length": [ - "1217" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/bb47e8c5-3ceb-4ef7-a51c-6ce14697cf44/profileresults/ps3006/endpointresults/ps4033\",\r\n \"type\": \"Microsoft.Cdn/operationresults/profileresults/endpointresults\",\r\n \"name\": \"ps4033\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps4033.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps6428\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033/load?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMwMDYvZW5kcG9pbnRzL3BzNDAzMy9sb2FkP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"contentPaths\": [\r\n \"/pic1.jpg\",\r\n \"/pic2.jpg\"\r\n ]\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "65" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad/profileresults/ps3006/endpointresults/ps4033?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6e0e956e-e560-435b-bcd8-0eb4d14598ae" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "2e5748f1-8ae3-4b33-acb2-ffa92738b8c1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231508Z:2e5748f1-8ae3-4b33-acb2-ffa92738b8c1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:15:08 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a2753601-33e7-4999-bc46-92d9e6cd93a8" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11971" - ], - "x-ms-correlation-request-id": [ - "117193eb-bcbe-4e5a-898b-cd62158ef87e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231518Z:117193eb-bcbe-4e5a-898b-cd62158ef87e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:15:18 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11970" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6ba66d7f-fc3a-4ad6-80ee-3b94c9a917e9" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-correlation-request-id": [ - "15ba92ee-1ae9-483f-9223-2c559d2f0865" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231529Z:15ba92ee-1ae9-483f-9223-2c559d2f0865" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:15:28 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5bf37e32-6e77-41ef-98a4-0d2091346e9b" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11969" - ], - "x-ms-correlation-request-id": [ - "3a34e97a-5037-48da-a9b1-e6846abae7e1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231539Z:3a34e97a-5037-48da-a9b1-e6846abae7e1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:15:38 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d06513b3-1ba2-408c-811f-93dd62405b45" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11968" - ], - "x-ms-correlation-request-id": [ - "25111adf-8dbb-4fef-9b0e-498b77681cc5" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231549Z:25111adf-8dbb-4fef-9b0e-498b77681cc5" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:15:48 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b8155393-d8c0-4288-b2ba-7a169eebdf0d" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11967" - ], - "x-ms-correlation-request-id": [ - "87ba8fa0-cdf9-4b3f-8565-dea53ad110ce" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231559Z:87ba8fa0-cdf9-4b3f-8565-dea53ad110ce" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:15:58 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "fe1d477e-e196-4290-baca-186360e35d36" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11966" - ], - "x-ms-correlation-request-id": [ - "fbe1e5c9-240e-4742-8cb3-1393d6df7157" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231609Z:fbe1e5c9-240e-4742-8cb3-1393d6df7157" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:16:08 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7c26e7f3-e7af-48cf-857d-7c7ebd3ff4c0" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11965" - ], - "x-ms-correlation-request-id": [ - "663413a2-f239-408e-9836-b9a6a5b85c38" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231619Z:663413a2-f239-408e-9836-b9a6a5b85c38" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:16:18 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3a8c9159-01e9-40a4-9913-abfd9f6ffcf9" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11964" - ], - "x-ms-correlation-request-id": [ - "50df98e3-fd5d-4915-9422-e9747dc31f04" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231629Z:50df98e3-fd5d-4915-9422-e9747dc31f04" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:16:29 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "006f0e0b-e4e6-443b-819b-3e78dd989797" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11963" - ], - "x-ms-correlation-request-id": [ - "4c859bef-4734-4c9f-bd4c-cf2147cba009" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231640Z:4c859bef-4734-4c9f-bd4c-cf2147cba009" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:16:39 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "674c17fb-b17f-4d71-9ddc-03fe4eb9be35" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11962" - ], - "x-ms-correlation-request-id": [ - "bb08a841-ec8b-4145-8650-4c016e2b00b2" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231650Z:bb08a841-ec8b-4145-8650-4c016e2b00b2" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:16:50 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "651b3d23-7acd-4d7e-9d4b-9bd8ec8140df" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11961" - ], - "x-ms-correlation-request-id": [ - "202a0652-e2ea-4ad1-a83b-f31f494d87a2" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231700Z:202a0652-e2ea-4ad1-a83b-f31f494d87a2" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:17:00 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0587476d-6e53-451d-81c8-7633c52a95cc" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11960" - ], - "x-ms-correlation-request-id": [ - "b1e92ca4-e0d4-4957-bb9d-7cd449c44dab" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231710Z:b1e92ca4-e0d4-4957-bb9d-7cd449c44dab" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:17:10 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "70bd38ca-d493-4c0f-b12b-0c37885ea38c" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11959" - ], - "x-ms-correlation-request-id": [ - "c6845d99-ec0e-4297-8d62-b55a11be3397" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231720Z:c6845d99-ec0e-4297-8d62-b55a11be3397" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:17:20 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "66f97c63-7c40-49c3-b4a0-b8ca2531f08d" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11958" - ], - "x-ms-correlation-request-id": [ - "de98ab7e-5289-4f2e-8c39-50c45e331f48" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231730Z:de98ab7e-5289-4f2e-8c39-50c45e331f48" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:17:30 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "40699d41-c717-48d2-bb78-2b9d17371d19" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11957" - ], - "x-ms-correlation-request-id": [ - "ebaaf78b-6195-44a1-a161-5fe76e1eac0a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231740Z:ebaaf78b-6195-44a1-a161-5fe76e1eac0a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:17:40 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "256417f3-58e0-4243-821e-21897855111b" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11956" - ], - "x-ms-correlation-request-id": [ - "7bc8b570-ddcf-4ad6-8305-ce4e53bfdae4" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231751Z:7bc8b570-ddcf-4ad6-8305-ce4e53bfdae4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:17:50 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "dab73bc3-72aa-4257-8f89-a400fb522538" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11955" - ], - "x-ms-correlation-request-id": [ - "dfd22646-9b5b-4891-beb3-06396f59f67c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231801Z:dfd22646-9b5b-4891-beb3-06396f59f67c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:18:00 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "77ef7aca-0c71-4cd8-b72f-65ed269f54f1" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11954" - ], - "x-ms-correlation-request-id": [ - "392f971d-9901-4268-a9f8-d574b0408f3a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231811Z:392f971d-9901-4268-a9f8-d574b0408f3a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:18:10 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3d977029-45b5-4df0-b578-3c5be8a1c5a0" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11953" - ], - "x-ms-correlation-request-id": [ - "e8a5ef40-0eef-420d-bddc-027991117db5" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231821Z:e8a5ef40-0eef-420d-bddc-027991117db5" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:18:20 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "48dd72e1-7616-4b12-8a99-5a9db90778bb" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11952" - ], - "x-ms-correlation-request-id": [ - "762204cc-36e7-45be-843f-2698360bebe8" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231831Z:762204cc-36e7-45be-843f-2698360bebe8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:18:30 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "76147576-985f-4b07-9da7-05a6df3e4609" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11951" - ], - "x-ms-correlation-request-id": [ - "a41d5998-b9c0-48f2-8d15-a93c1e5dd890" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231841Z:a41d5998-b9c0-48f2-8d15-a93c1e5dd890" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:18:41 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b3887efc-8af3-4e94-839b-361fb4aaa853" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11950" - ], - "x-ms-correlation-request-id": [ - "6d0712fc-52ca-4576-9b71-54bf76d7bbd9" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231851Z:6d0712fc-52ca-4576-9b71-54bf76d7bbd9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:18:51 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1e81b519-2397-486a-bd57-8b56ddb5af1e" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11949" - ], - "x-ms-correlation-request-id": [ - "c53f77c9-55a4-48cc-beb6-6948d9f5e172" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231902Z:c53f77c9-55a4-48cc-beb6-6948d9f5e172" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:19:01 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "245a839c-1007-4bdd-a841-f88bbf471fb8" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11948" - ], - "x-ms-correlation-request-id": [ - "56409b7d-7cac-4b3b-8e19-984b117f09a2" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231912Z:56409b7d-7cac-4b3b-8e19-984b117f09a2" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:19:11 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "fb97c7fb-2009-4464-8863-29889c172a94" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11947" - ], - "x-ms-correlation-request-id": [ - "0bfad28e-2b11-4c55-920f-7a5a57a68a6f" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231922Z:0bfad28e-2b11-4c55-920f-7a5a57a68a6f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:19:22 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3c1deeb5-d808-4d42-8363-ac938b0d362b" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11946" - ], - "x-ms-correlation-request-id": [ - "85f80b7d-0e79-4e93-b194-7514dbac6d7e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231932Z:85f80b7d-0e79-4e93-b194-7514dbac6d7e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:19:32 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "58a40426-77f4-4c86-956e-364fc05cbf5a" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11945" - ], - "x-ms-correlation-request-id": [ - "a369dc0c-60be-432d-ba81-ae2f32c75a45" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231942Z:a369dc0c-60be-432d-ba81-ae2f32c75a45" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:19:42 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "58c638e3-4a6f-4b47-93f1-5d814961154c" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11944" - ], - "x-ms-correlation-request-id": [ - "11f63494-3d8c-411b-b1f6-be6548b7d9a9" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T231952Z:11f63494-3d8c-411b-b1f6-be6548b7d9a9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:19:52 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "74fd43f3-a3d1-4984-82ef-67dc2fee5a09" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11943" - ], - "x-ms-correlation-request-id": [ - "b0b4a800-66cf-4ea7-88e6-4c6d00f496cd" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232002Z:b0b4a800-66cf-4ea7-88e6-4c6d00f496cd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:20:02 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e95d9f12-5b54-4b05-831f-6a14ee88edcd" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11942" - ], - "x-ms-correlation-request-id": [ - "582ea29a-dce4-43e5-adfd-9abc852eae4e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232013Z:582ea29a-dce4-43e5-adfd-9abc852eae4e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:20:12 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "083fcbe8-7bf8-4a92-ba05-56709000fe09" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11941" - ], - "x-ms-correlation-request-id": [ - "6821cd23-768c-45eb-8033-e8643a99d8ed" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232023Z:6821cd23-768c-45eb-8033-e8643a99d8ed" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:20:22 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad/profileresults/ps3006/endpointresults/ps4033?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdmODMyNDNmLWVlZjktNGNlZS05NzE2LWYyNjdiMGYwNjRhZC9wcm9maWxlcmVzdWx0cy9wczMwMDYvZW5kcG9pbnRyZXN1bHRzL3BzNDAzMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "36a057c6-0011-49bc-8135-00ae25d3c852" - ], - "x-ms-client-request-id": [ - "bf527c88-3251-45f9-815b-0960c9ec18ec" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11940" - ], - "x-ms-correlation-request-id": [ - "9d1999fa-ea41-4cd6-8af8-abce98450795" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232023Z:9d1999fa-ea41-4cd6-8af8-abce98450795" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:20:22 GMT" - ], - "Content-Length": [ - "1217" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/7f83243f-eef9-4cee-9716-f267b0f064ad/profileresults/ps3006/endpointresults/ps4033\",\r\n \"type\": \"Microsoft.Cdn/operationresults/profileresults/endpointresults\",\r\n \"name\": \"ps4033\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps4033.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/videos\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"BypassCaching\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps6428\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMwMDYvZW5kcG9pbnRzL3BzNDAzMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"originPath\": \"/pictures\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"UseQueryString\",\r\n \"geoFilters\": []\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "cd13f9cb-dadc-4ccc-a383-143dee327970" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "424" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/6b9060bf-f8d1-44ed-99a0-779196fbe9a4/profileresults/ps3006/endpointresults/ps4033?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "feb3eb3c-253d-4fdf-b695-2b04984e4894" - ], - "x-ms-client-request-id": [ - "cd13f9cb-dadc-4ccc-a383-143dee327970" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/6b9060bf-f8d1-44ed-99a0-779196fbe9a4?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "98" - ], - "x-ms-correlation-request-id": [ - "d09c3a14-9526-46ab-9f41-ff789077846a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232026Z:d09c3a14-9526-46ab-9f41-ff789077846a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:20:25 GMT" - ], - "Content-Length": [ - "1125" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps4033\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps4033.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/pictures\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"UseQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps6428\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/6b9060bf-f8d1-44ed-99a0-779196fbe9a4?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzZiOTA2MGJmLWY4ZDEtNDRlZC05OWEwLTc3OTE5NmZiZTlhND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "cd13f9cb-dadc-4ccc-a383-143dee327970" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11939" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ff436555-aace-4f45-bf65-ae06d8738eef" - ], - "x-ms-client-request-id": [ - "cd13f9cb-dadc-4ccc-a383-143dee327970" - ], - "Server": [ - "Kestrel" - ], - "x-ms-correlation-request-id": [ - "551947a2-d69d-4d69-88c6-6054b8bb1283" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232036Z:551947a2-d69d-4d69-88c6-6054b8bb1283" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:20:35 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/6b9060bf-f8d1-44ed-99a0-779196fbe9a4?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzZiOTA2MGJmLWY4ZDEtNDRlZC05OWEwLTc3OTE5NmZiZTlhND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "cd13f9cb-dadc-4ccc-a383-143dee327970" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5eda8db7-d183-4109-aa36-0d807f2b872a" - ], - "x-ms-client-request-id": [ - "cd13f9cb-dadc-4ccc-a383-143dee327970" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11938" - ], - "x-ms-correlation-request-id": [ - "4c54ad18-45ca-4cab-acb4-49314e06f620" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232046Z:4c54ad18-45ca-4cab-acb4-49314e06f620" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:20:46 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/6b9060bf-f8d1-44ed-99a0-779196fbe9a4?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzZiOTA2MGJmLWY4ZDEtNDRlZC05OWEwLTc3OTE5NmZiZTlhND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "cd13f9cb-dadc-4ccc-a383-143dee327970" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "796342c1-cf81-4ea1-9292-e24a23177a3b" - ], - "x-ms-client-request-id": [ - "cd13f9cb-dadc-4ccc-a383-143dee327970" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11937" - ], - "x-ms-correlation-request-id": [ - "ffdb213b-e4b1-41b5-a3aa-021655098367" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232057Z:ffdb213b-e4b1-41b5-a3aa-021655098367" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:20:56 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMwMDYvZW5kcG9pbnRzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5cb3f932-3855-4242-b44f-1b3e487aeadd" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "853660c8-0fc1-4832-8f5a-7da06ac1054c" - ], - "x-ms-client-request-id": [ - "5cb3f932-3855-4242-b44f-1b3e487aeadd" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "5186e7a9-415f-4601-a5e0-a22f2aabad29" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232057Z:5186e7a9-415f-4601-a5e0-a22f2aabad29" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:20:56 GMT" - ], - "Content-Length": [ - "1137" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps4033\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"hostName\": \"ps4033.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/pictures\",\r\n \"contentTypesToCompress\": [\r\n \"application/json\",\r\n \"text/html\"\r\n ],\r\n \"isCompressionEnabled\": true,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"UseQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps6428\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 123,\r\n \"httpsPort\": 456,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3307/providers/Microsoft.Cdn/profiles/ps3006/endpoints/ps4033?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMwMDYvZW5kcG9pbnRzL3BzNDAzMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5cb3f932-3855-4242-b44f-1b3e487aeadd" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/b744428e-da15-47b7-b95f-1d11b40407c3/profileresults/ps3006/endpointresults/ps4033?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "cf92be57-330c-4acc-bbbd-26969495268f" - ], - "x-ms-client-request-id": [ - "5cb3f932-3855-4242-b44f-1b3e487aeadd" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/b744428e-da15-47b7-b95f-1d11b40407c3?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-correlation-request-id": [ - "09941738-a102-46de-9d8b-b909a797e1b4" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232058Z:09941738-a102-46de-9d8b-b909a797e1b4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:20:57 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/b744428e-da15-47b7-b95f-1d11b40407c3?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2I3NDQ0MjhlLWRhMTUtNDdiNy1iOTVmLTFkMTFiNDA0MDdjMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5cb3f932-3855-4242-b44f-1b3e487aeadd" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8dedd5b0-8f47-4635-bfdb-1b71500949fa" - ], - "x-ms-client-request-id": [ - "5cb3f932-3855-4242-b44f-1b3e487aeadd" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11936" - ], - "x-ms-correlation-request-id": [ - "4784b6d2-a467-47f6-bb4e-ff773ba233cc" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232108Z:4784b6d2-a467-47f6-bb4e-ff773ba233cc" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:21:07 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/b744428e-da15-47b7-b95f-1d11b40407c3?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2I3NDQ0MjhlLWRhMTUtNDdiNy1iOTVmLTFkMTFiNDA0MDdjMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5cb3f932-3855-4242-b44f-1b3e487aeadd" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "493ab759-835d-437d-8056-2e06d67276d5" - ], - "x-ms-client-request-id": [ - "5cb3f932-3855-4242-b44f-1b3e487aeadd" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11935" - ], - "x-ms-correlation-request-id": [ - "5d9167a2-6e27-41fb-8c3d-cbc294c02b98" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232119Z:5d9167a2-6e27-41fb-8c3d-cbc294c02b98" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:21:19 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307/providers/Microsoft.Cdn/operationresults/b744428e-da15-47b7-b95f-1d11b40407c3/profileresults/ps3006/endpointresults/ps4033?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2I3NDQ0MjhlLWRhMTUtNDdiNy1iOTVmLTFkMTFiNDA0MDdjMy9wcm9maWxlcmVzdWx0cy9wczMwMDYvZW5kcG9pbnRyZXN1bHRzL3BzNDAzMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5cb3f932-3855-4242-b44f-1b3e487aeadd" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1e391b57-84b3-4125-810e-cb1f2603e0b2" - ], - "x-ms-client-request-id": [ - "5cb3f932-3855-4242-b44f-1b3e487aeadd" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11934" - ], - "x-ms-correlation-request-id": [ - "49cda4d1-4fca-4992-9f88-8587f6092e90" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232119Z:49cda4d1-4fca-4992-9f88-8587f6092e90" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:21:19 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3307?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzMwNz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1aa9c02e-b8ed-45f7-82b0-163171bd2f4a" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "c917325a-3371-4df3-8c61-7d99bd306c05" - ], - "x-ms-correlation-request-id": [ - "c917325a-3371-4df3-8c61-7d99bd306c05" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232120Z:c917325a-3371-4df3-8c61-7d99bd306c05" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:21:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNek1EY3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "61c9b291-e18e-4919-ab13-738ad50863aa" - ], - "x-ms-correlation-request-id": [ - "61c9b291-e18e-4919-ab13-738ad50863aa" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232135Z:61c9b291-e18e-4919-ab13-738ad50863aa" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:21:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNek1EY3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "f6dce7b4-ec4c-4349-96a9-f90c910116f3" - ], - "x-ms-correlation-request-id": [ - "f6dce7b4-ec4c-4349-96a9-f90c910116f3" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232150Z:f6dce7b4-ec4c-4349-96a9-f90c910116f3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:21:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNek1EY3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "a5ad1557-382f-4691-ab80-d12552557c98" - ], - "x-ms-correlation-request-id": [ - "a5ad1557-382f-4691-ab80-d12552557c98" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232205Z:a5ad1557-382f-4691-ab80-d12552557c98" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:22:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNek1EY3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "818d1a2c-82fb-474c-b794-e143dc30dc6c" - ], - "x-ms-correlation-request-id": [ - "818d1a2c-82fb-474c-b794-e143dc30dc6c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232220Z:818d1a2c-82fb-474c-b794-e143dc30dc6c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:22:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNek1EY3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "d9bf1fd1-72cf-4913-86ff-70526ced8713" - ], - "x-ms-correlation-request-id": [ - "d9bf1fd1-72cf-4913-86ff-70526ced8713" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232235Z:d9bf1fd1-72cf-4913-86ff-70526ced8713" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:22:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNek1EY3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "02afa44c-1ef5-4b5b-a7f3-a4b42a91d032" - ], - "x-ms-correlation-request-id": [ - "02afa44c-1ef5-4b5b-a7f3-a4b42a91d032" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232250Z:02afa44c-1ef5-4b5b-a7f3-a4b42a91d032" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:22:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNek1EY3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "0b163f20-199d-456b-a0ef-41d7c4f54fa3" - ], - "x-ms-correlation-request-id": [ - "0b163f20-199d-456b-a0ef-41d7c4f54fa3" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232305Z:0b163f20-199d-456b-a0ef-41d7c4f54fa3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:23:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNek1EY3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "22165910-d37b-4616-9b1d-e94e2506dc79" - ], - "x-ms-correlation-request-id": [ - "22165910-d37b-4616-9b1d-e94e2506dc79" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232320Z:22165910-d37b-4616-9b1d-e94e2506dc79" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:23:20 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNek1EY3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "35947f86-5cc2-42f9-9b12-ac1404eb7a60" - ], - "x-ms-correlation-request-id": [ - "35947f86-5cc2-42f9-9b12-ac1404eb7a60" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232335Z:35947f86-5cc2-42f9-9b12-ac1404eb7a60" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:23:35 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNek1EY3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "3a1792af-a200-4786-bb66-8c4a3751e242" - ], - "x-ms-correlation-request-id": [ - "3a1792af-a200-4786-bb66-8c4a3751e242" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232350Z:3a1792af-a200-4786-bb66-8c4a3751e242" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:23:50 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNek1EY3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "129d221b-47e2-4c21-82b2-d503fac35885" - ], - "x-ms-correlation-request-id": [ - "129d221b-47e2-4c21-82b2-d503fac35885" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232405Z:129d221b-47e2-4c21-82b2-d503fac35885" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:24:05 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMzMDctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNek1EY3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "d6093a95-de57-4327-9c3e-9cf2b81ad3a6" - ], - "x-ms-correlation-request-id": [ - "d6093a95-de57-4327-9c3e-9cf2b81ad3a6" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T232405Z:d6093a95-de57-4327-9c3e-9cf2b81ad3a6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:24:05 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-EndpointCrudAndActionWithAllPropertiesWithPiping": [ - "ps3006", - "ps3307", - "ps4033", - "ps6428" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCrudAndActionWithPiping.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCrudAndActionWithPiping.json deleted file mode 100644 index a763f3684b02..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointCrudAndActionWithPiping.json +++ /dev/null @@ -1,2610 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzI0NT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c35816b5-0be5-4758-9d97-42243ee3512e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "09bb3722-2787-474e-ba9c-0fb0a0552cfa" - ], - "x-ms-correlation-request-id": [ - "09bb3722-2787-474e-ba9c-0fb0a0552cfa" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232723Z:09bb3722-2787-474e-ba9c-0fb0a0552cfa" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:27:23 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3245\",\r\n \"name\": \"ps3245\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9eab4a6b-e99c-41e3-850e-6b4ed95ff995" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5463f496-b396-4db8-b53f-a5716e680bd0" - ], - "x-ms-client-request-id": [ - "9eab4a6b-e99c-41e3-850e-6b4ed95ff995" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "acbb8a4a-77b9-4d8f-be9b-990eeee15798" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232724Z:acbb8a4a-77b9-4d8f-be9b-990eeee15798" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:27:24 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU1OTk/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9eab4a6b-e99c-41e3-850e-6b4ed95ff995" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "80" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "126132f9-6127-4cf8-9f83-6b9fd6d63b2a" - ], - "x-ms-client-request-id": [ - "9eab4a6b-e99c-41e3-850e-6b4ed95ff995" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/09b6d260-12e1-4323-aa19-bd6899eaee59?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "6c2648a8-a9cc-4419-85ed-96868334a020" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232728Z:6c2648a8-a9cc-4419-85ed-96868334a020" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:27:27 GMT" - ], - "Content-Length": [ - "322" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps5599\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/09b6d260-12e1-4323-aa19-bd6899eaee59?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzA5YjZkMjYwLTEyZTEtNDMyMy1hYTE5LWJkNjg5OWVhZWU1OT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9eab4a6b-e99c-41e3-850e-6b4ed95ff995" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7d1e1278-967c-4714-bbaa-510b06d9e7a0" - ], - "x-ms-client-request-id": [ - "9eab4a6b-e99c-41e3-850e-6b4ed95ff995" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "947d95d8-f899-4dec-bc54-9b8b007bffef" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232739Z:947d95d8-f899-4dec-bc54-9b8b007bffef" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:27:38 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU1OTk/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9eab4a6b-e99c-41e3-850e-6b4ed95ff995" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "341ebe9d-dbd7-4feb-b4d5-3531222c9242" - ], - "x-ms-client-request-id": [ - "9eab4a6b-e99c-41e3-850e-6b4ed95ff995" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "e647ec14-a6d6-4cd4-9cb9-65cdaa453604" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232739Z:e647ec14-a6d6-4cd4-9cb9-65cdaa453604" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:27:38 GMT" - ], - "Content-Length": [ - "321" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps5599\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps7987\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "21c9c352-a81f-4570-8577-2ee66e47b403" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "da229a3e-464b-4503-a8a5-9649c31822ad" - ], - "x-ms-client-request-id": [ - "21c9c352-a81f-4570-8577-2ee66e47b403" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "b202c654-8cf9-49d4-9cf5-16bd404a4bda" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232739Z:b202c654-8cf9-49d4-9cf5-16bd404a4bda" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:27:38 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps7987\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "695fae5d-1372-4475-b6b6-48fcee6aedac" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "748fae2c-5ebe-4d29-bae2-4ac7d61038c2" - ], - "x-ms-client-request-id": [ - "695fae5d-1372-4475-b6b6-48fcee6aedac" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "bf0f97e6-60b2-496e-9ef9-14b4d4f3db3e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232740Z:bf0f97e6-60b2-496e-9ef9-14b4d4f3db3e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:27:39 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps7987\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8a31f630-f8f3-4daa-92c9-20b2a153508d" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f69b8373-29fa-4ab7-a894-ff4a441cbfc4" - ], - "x-ms-client-request-id": [ - "8a31f630-f8f3-4daa-92c9-20b2a153508d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1197" - ], - "x-ms-correlation-request-id": [ - "2693feed-c5a4-44c0-a968-2934bc607ec3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232806Z:2693feed-c5a4-44c0-a968-2934bc607ec3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:28:05 GMT" - ], - "Content-Length": [ - "88" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": false,\r\n \"reason\": \"Name is already in use\",\r\n \"message\": \"Name not available\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU1OTkvZW5kcG9pbnRzL3BzNzk4Nz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"origins\": [\r\n {\r\n \"name\": \"ps2306\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\"\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "695fae5d-1372-4475-b6b6-48fcee6aedac" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "202" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a5d0bdd3-30ad-441b-a5af-c84a0a0d8ce4" - ], - "x-ms-client-request-id": [ - "695fae5d-1372-4475-b6b6-48fcee6aedac" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/50ab1bca-41e1-4b24-aabe-896321a54cee?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "76a2fb90-edbf-4589-a94c-54dc887fff0c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232745Z:76a2fb90-edbf-4589-a94c-54dc887fff0c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:27:45 GMT" - ], - "Content-Length": [ - "1047" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps7987\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps7987.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps2306\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/50ab1bca-41e1-4b24-aabe-896321a54cee?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzUwYWIxYmNhLTQxZTEtNGIyNC1hYWJlLTg5NjMyMWE1NGNlZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "695fae5d-1372-4475-b6b6-48fcee6aedac" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6337cc40-ab92-4120-baa3-2bfc9517a723" - ], - "x-ms-client-request-id": [ - "695fae5d-1372-4475-b6b6-48fcee6aedac" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "39153544-f0a9-4662-8beb-6c3ebfdc0b42" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232755Z:39153544-f0a9-4662-8beb-6c3ebfdc0b42" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:27:55 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/50ab1bca-41e1-4b24-aabe-896321a54cee?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzUwYWIxYmNhLTQxZTEtNGIyNC1hYWJlLTg5NjMyMWE1NGNlZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "695fae5d-1372-4475-b6b6-48fcee6aedac" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b6b9f4d5-143e-4264-9581-55214427314d" - ], - "x-ms-client-request-id": [ - "695fae5d-1372-4475-b6b6-48fcee6aedac" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "d7d9c953-56ec-48ef-aaa0-cfe3e1f99ff1" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232805Z:d7d9c953-56ec-48ef-aaa0-cfe3e1f99ff1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:28:05 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU1OTkvZW5kcG9pbnRzL3BzNzk4Nz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "695fae5d-1372-4475-b6b6-48fcee6aedac" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6d06eb8b-dfc7-4acf-b590-3df57b57eec8" - ], - "x-ms-client-request-id": [ - "695fae5d-1372-4475-b6b6-48fcee6aedac" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "6ac28911-7eb2-4a99-b59e-8e8e63ce2722" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232805Z:6ac28911-7eb2-4a99-b59e-8e8e63ce2722" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:28:05 GMT" - ], - "Content-Length": [ - "1045" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps7987\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps7987.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps2306\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU1OTkvZW5kcG9pbnRzL3BzNzk4Nz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "602b608c-20f8-4733-a81b-f60fb335d15b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "cbf6885b-8207-4c7a-a90b-aac6caef440d" - ], - "x-ms-client-request-id": [ - "602b608c-20f8-4733-a81b-f60fb335d15b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "de985d65-2c40-4af0-8c1c-36a14ae29569" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232828Z:de985d65-2c40-4af0-8c1c-36a14ae29569" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:28:27 GMT" - ], - "Content-Length": [ - "1045" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps7987\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps7987.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps2306\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Stopped\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU1OTkvZW5kcG9pbnRzL3BzNzk4Nz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d3a246fe-5548-4668-9a43-c89ea16fce92" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1a6a8af0-f78e-4bde-afe3-9ced9edbe371" - ], - "x-ms-client-request-id": [ - "d3a246fe-5548-4668-9a43-c89ea16fce92" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "47" - ], - "x-ms-correlation-request-id": [ - "c0607890-da8d-406b-88dc-a630cf761c44" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232839Z:c0607890-da8d-406b-88dc-a630cf761c44" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:28:39 GMT" - ], - "Content-Length": [ - "1045" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps7987\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps7987.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps2306\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU1OTkvZW5kcG9pbnRzL3BzNzk4Nz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2324c5fa-0815-46b3-b479-931b3b83f1b1" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7c82bf48-91b3-4f95-bec8-529ca36b1f4a" - ], - "x-ms-client-request-id": [ - "2324c5fa-0815-46b3-b479-931b3b83f1b1" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "46" - ], - "x-ms-correlation-request-id": [ - "04f8ef6f-8035-47ca-9e29-48dd6b40b607" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232853Z:04f8ef6f-8035-47ca-9e29-48dd6b40b607" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:28:52 GMT" - ], - "Content-Length": [ - "1576" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps7987\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps7987.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/pictures\",\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"UseQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps2306\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": {\r\n \"description\": \"Updated Delivery Policy\",\r\n \"rules\": [\r\n {\r\n \"name\": \"Rule1\",\r\n \"order\": 1,\r\n \"conditions\": [\r\n {\r\n \"name\": \"UrlPath\",\r\n \"parameters\": {\r\n \"operator\": \"Contains\",\r\n \"negateCondition\": false,\r\n \"matchValues\": [\r\n \"abc\"\r\n ],\r\n \"transforms\": [],\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters\"\r\n }\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"name\": \"ModifyResponseHeader\",\r\n \"parameters\": {\r\n \"headerAction\": \"Append\",\r\n \"headerName\": \"Access-Control-Allow-Origin\",\r\n \"value\": \"*\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU1OTkvZW5kcG9pbnRzL3BzNzk4Nz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b278cd8f-4ada-459b-ac30-326d2c979a80" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "70f5b1d3-5639-4646-96fe-936d5f1acf65" - ], - "x-ms-client-request-id": [ - "b278cd8f-4ada-459b-ac30-326d2c979a80" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "44" - ], - "x-ms-correlation-request-id": [ - "100e1f04-74ae-4b38-a71d-72ab62355b03" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232916Z:100e1f04-74ae-4b38-a71d-72ab62355b03" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:29:15 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987/stop?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU1OTkvZW5kcG9pbnRzL3BzNzk4Ny9zdG9wP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "adb67b00-7cae-463c-876a-05c5f284a3d1" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/776883cd-9418-40b7-99b0-7bd8a5365374/profileresults/ps5599/endpointresults/ps7987?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e7349761-5ea2-49aa-af30-6b854b1c360c" - ], - "x-ms-client-request-id": [ - "adb67b00-7cae-463c-876a-05c5f284a3d1" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/776883cd-9418-40b7-99b0-7bd8a5365374?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "e07892db-2841-4221-a21b-25eb2b314d9a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232807Z:e07892db-2841-4221-a21b-25eb2b314d9a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:28:06 GMT" - ], - "Content-Length": [ - "1046" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps7987\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps7987.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps2306\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Stopping\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/776883cd-9418-40b7-99b0-7bd8a5365374?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzc3Njg4M2NkLTk0MTgtNDBiNy05OWIwLTdiZDhhNTM2NTM3ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "adb67b00-7cae-463c-876a-05c5f284a3d1" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "023ee20c-6369-4252-a224-fa3a8dfd4932" - ], - "x-ms-client-request-id": [ - "adb67b00-7cae-463c-876a-05c5f284a3d1" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "d7f2fa69-1c70-4c30-809b-67c580bb7e63" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232817Z:d7f2fa69-1c70-4c30-809b-67c580bb7e63" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:28:16 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/776883cd-9418-40b7-99b0-7bd8a5365374?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzc3Njg4M2NkLTk0MTgtNDBiNy05OWIwLTdiZDhhNTM2NTM3ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "adb67b00-7cae-463c-876a-05c5f284a3d1" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d32ecb9c-2b2f-4b29-9f42-861fa2ed5d03" - ], - "x-ms-client-request-id": [ - "adb67b00-7cae-463c-876a-05c5f284a3d1" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "dbc03855-d00f-4b8c-b9a2-026833b951e1" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232827Z:dbc03855-d00f-4b8c-b9a2-026833b951e1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:28:26 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/776883cd-9418-40b7-99b0-7bd8a5365374/profileresults/ps5599/endpointresults/ps7987?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzc3Njg4M2NkLTk0MTgtNDBiNy05OWIwLTdiZDhhNTM2NTM3NC9wcm9maWxlcmVzdWx0cy9wczU1OTkvZW5kcG9pbnRyZXN1bHRzL3BzNzk4Nz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "adb67b00-7cae-463c-876a-05c5f284a3d1" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d2b97cee-ad53-4ff6-9d70-e3314c352f44" - ], - "x-ms-client-request-id": [ - "adb67b00-7cae-463c-876a-05c5f284a3d1" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "6f6a80eb-6e24-4ddf-9b87-7d2333800bb9" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232827Z:6f6a80eb-6e24-4ddf-9b87-7d2333800bb9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:28:27 GMT" - ], - "Content-Length": [ - "1140" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/776883cd-9418-40b7-99b0-7bd8a5365374/profileresults/ps5599/endpointresults/ps7987\",\r\n \"type\": \"Microsoft.Cdn/operationresults/profileresults/endpointresults\",\r\n \"name\": \"ps7987\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps7987.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps2306\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Stopped\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987/start?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU1OTkvZW5kcG9pbnRzL3BzNzk4Ny9zdGFydD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3a7ea7c5-c4d2-4b2a-a3d6-a9137cf0b789" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/cb96cd7b-a092-4fd2-8f46-baa647195e8f/profileresults/ps5599/endpointresults/ps7987?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d29eed70-7f79-48ed-ba60-1e3419571dfa" - ], - "x-ms-client-request-id": [ - "3a7ea7c5-c4d2-4b2a-a3d6-a9137cf0b789" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/cb96cd7b-a092-4fd2-8f46-baa647195e8f?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "39d145bc-638f-49c9-9357-c4b3bafd70fd" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232829Z:39d145bc-638f-49c9-9357-c4b3bafd70fd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:28:28 GMT" - ], - "Content-Length": [ - "1046" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps7987\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps7987.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps2306\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Starting\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/cb96cd7b-a092-4fd2-8f46-baa647195e8f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2NiOTZjZDdiLWEwOTItNGZkMi04ZjQ2LWJhYTY0NzE5NWU4Zj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3a7ea7c5-c4d2-4b2a-a3d6-a9137cf0b789" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f1147370-2c05-4035-861a-abd397ba4b8d" - ], - "x-ms-client-request-id": [ - "3a7ea7c5-c4d2-4b2a-a3d6-a9137cf0b789" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "ee244443-3d86-4e36-878a-2efd3895580f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232839Z:ee244443-3d86-4e36-878a-2efd3895580f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:28:38 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/cb96cd7b-a092-4fd2-8f46-baa647195e8f/profileresults/ps5599/endpointresults/ps7987?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2NiOTZjZDdiLWEwOTItNGZkMi04ZjQ2LWJhYTY0NzE5NWU4Zi9wcm9maWxlcmVzdWx0cy9wczU1OTkvZW5kcG9pbnRyZXN1bHRzL3BzNzk4Nz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3a7ea7c5-c4d2-4b2a-a3d6-a9137cf0b789" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7d5fa5f1-a97b-4d78-af16-40aea7fc1601" - ], - "x-ms-client-request-id": [ - "3a7ea7c5-c4d2-4b2a-a3d6-a9137cf0b789" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "2eac6c6a-1af1-4b37-ba72-93e7ea6e18da" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232839Z:2eac6c6a-1af1-4b37-ba72-93e7ea6e18da" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:28:39 GMT" - ], - "Content-Length": [ - "1140" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/cb96cd7b-a092-4fd2-8f46-baa647195e8f/profileresults/ps5599/endpointresults/ps7987\",\r\n \"type\": \"Microsoft.Cdn/operationresults/profileresults/endpointresults\",\r\n \"name\": \"ps7987\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps7987.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps2306\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987/validateCustomDomain?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU1OTkvZW5kcG9pbnRzL3BzNzk4Ny92YWxpZGF0ZUN1c3RvbURvbWFpbj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"hostName\": \"unverifiedcustomdomain.com\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "45111dfd-22fd-4f9f-9612-81c8b1bdee82" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "48" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "30e9dd97-fa04-4945-82b5-51385e38e857" - ], - "x-ms-client-request-id": [ - "45111dfd-22fd-4f9f-9612-81c8b1bdee82" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "6b21840b-6db2-46a2-887e-80a90b0922b4" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232840Z:6b21840b-6db2-46a2-887e-80a90b0922b4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:28:40 GMT" - ], - "Content-Length": [ - "266" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"customDomainValidated\": false,\r\n \"reason\": \"IncorrectMapping\",\r\n \"message\": \"We couldn't find a DNS record for custom domain that points to endpoint. To map a domain to this endpoint, create a CNAME record with your DNS provider for custom domain that points to endpoint.\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU1OTkvZW5kcG9pbnRzL3BzNzk4Nz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"tags\": {},\r\n \"properties\": {\r\n \"originPath\": \"/pictures\",\r\n \"contentTypesToCompress\": [],\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"UseQueryString\",\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": {\r\n \"description\": \"Updated Delivery Policy\",\r\n \"rules\": [\r\n {\r\n \"name\": \"Rule1\",\r\n \"order\": 1,\r\n \"conditions\": [\r\n {\r\n \"name\": \"UrlPath\",\r\n \"parameters\": {\r\n \"operator\": \"Contains\",\r\n \"negateCondition\": false,\r\n \"matchValues\": [\r\n \"abc\"\r\n ],\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters\"\r\n }\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"name\": \"ModifyResponseHeader\",\r\n \"parameters\": {\r\n \"headerAction\": \"Append\",\r\n \"headerName\": \"Access-Control-Allow-Origin\",\r\n \"value\": \"*\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2324c5fa-0815-46b3-b479-931b3b83f1b1" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "1323" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/15ac7413-a3a9-462a-bb5a-14d02649ed03/profileresults/ps5599/endpointresults/ps7987?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c5c1dde6-b660-45a9-94dc-f4fb1758e069" - ], - "x-ms-client-request-id": [ - "2324c5fa-0815-46b3-b479-931b3b83f1b1" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/15ac7413-a3a9-462a-bb5a-14d02649ed03?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "98" - ], - "x-ms-correlation-request-id": [ - "a533b759-65f2-4df4-96b3-de020ce2559c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232842Z:a533b759-65f2-4df4-96b3-de020ce2559c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:28:42 GMT" - ], - "Content-Length": [ - "1576" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps7987\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps7987.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/pictures\",\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"UseQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps2306\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": {\r\n \"description\": \"Updated Delivery Policy\",\r\n \"rules\": [\r\n {\r\n \"name\": \"Rule1\",\r\n \"order\": 1,\r\n \"conditions\": [\r\n {\r\n \"name\": \"UrlPath\",\r\n \"parameters\": {\r\n \"operator\": \"Contains\",\r\n \"negateCondition\": false,\r\n \"matchValues\": [\r\n \"abc\"\r\n ],\r\n \"transforms\": [],\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters\"\r\n }\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"name\": \"ModifyResponseHeader\",\r\n \"parameters\": {\r\n \"headerAction\": \"Append\",\r\n \"headerName\": \"Access-Control-Allow-Origin\",\r\n \"value\": \"*\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/15ac7413-a3a9-462a-bb5a-14d02649ed03?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzE1YWM3NDEzLWEzYTktNDYyYS1iYjVhLTE0ZDAyNjQ5ZWQwMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2324c5fa-0815-46b3-b479-931b3b83f1b1" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e80ddda8-07bc-4c84-8da1-3794937cd1c5" - ], - "x-ms-client-request-id": [ - "2324c5fa-0815-46b3-b479-931b3b83f1b1" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-correlation-request-id": [ - "bcdfb02d-d34d-4556-80a8-3b2527d045b3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232853Z:bcdfb02d-d34d-4556-80a8-3b2527d045b3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:28:52 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU1OTkvZW5kcG9pbnRzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b462d5d9-e160-462b-b9cc-9841f709dd26" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "36635921-2795-4c01-aba7-63117982f85e" - ], - "x-ms-client-request-id": [ - "b462d5d9-e160-462b-b9cc-9841f709dd26" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "45" - ], - "x-ms-correlation-request-id": [ - "769a3a77-702e-44c8-8491-ea83b89504c1" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232853Z:769a3a77-702e-44c8-8491-ea83b89504c1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:28:53 GMT" - ], - "Content-Length": [ - "1588" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps7987\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps7987.azureedge.net\",\r\n \"originHostHeader\": \"www.microsoft.com\",\r\n \"originPath\": \"/pictures\",\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"UseQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps2306\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": {\r\n \"description\": \"Updated Delivery Policy\",\r\n \"rules\": [\r\n {\r\n \"name\": \"Rule1\",\r\n \"order\": 1,\r\n \"conditions\": [\r\n {\r\n \"name\": \"UrlPath\",\r\n \"parameters\": {\r\n \"operator\": \"Contains\",\r\n \"negateCondition\": false,\r\n \"matchValues\": [\r\n \"abc\"\r\n ],\r\n \"transforms\": [],\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters\"\r\n }\r\n }\r\n ],\r\n \"actions\": [\r\n {\r\n \"name\": \"ModifyResponseHeader\",\r\n \"parameters\": {\r\n \"headerAction\": \"Append\",\r\n \"headerName\": \"Access-Control-Allow-Origin\",\r\n \"value\": \"*\",\r\n \"@odata.type\": \"#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters\"\r\n }\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3245/providers/Microsoft.Cdn/profiles/ps5599/endpoints/ps7987?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczU1OTkvZW5kcG9pbnRzL3BzNzk4Nz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b462d5d9-e160-462b-b9cc-9841f709dd26" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/3ff9a17d-6cc1-4f03-a8d6-f933e5b15e25/profileresults/ps5599/endpointresults/ps7987?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b185c775-a489-4bf7-a7f4-2dd7607c19be" - ], - "x-ms-client-request-id": [ - "b462d5d9-e160-462b-b9cc-9841f709dd26" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/3ff9a17d-6cc1-4f03-a8d6-f933e5b15e25?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-correlation-request-id": [ - "a1bf7584-b5a3-490a-a7b6-98af7f5d6589" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232855Z:a1bf7584-b5a3-490a-a7b6-98af7f5d6589" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:28:54 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/3ff9a17d-6cc1-4f03-a8d6-f933e5b15e25?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzNmZjlhMTdkLTZjYzEtNGYwMy1hOGQ2LWY5MzNlNWIxNWUyNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b462d5d9-e160-462b-b9cc-9841f709dd26" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "00ccf2e2-38f1-4a7b-8c63-bb18a394dc40" - ], - "x-ms-client-request-id": [ - "b462d5d9-e160-462b-b9cc-9841f709dd26" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-correlation-request-id": [ - "6a6f8bcb-29fc-4242-80fa-a8efeac98531" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232905Z:6a6f8bcb-29fc-4242-80fa-a8efeac98531" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:29:04 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/3ff9a17d-6cc1-4f03-a8d6-f933e5b15e25?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzNmZjlhMTdkLTZjYzEtNGYwMy1hOGQ2LWY5MzNlNWIxNWUyNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b462d5d9-e160-462b-b9cc-9841f709dd26" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3b6d910f-a90d-400d-8716-2ab4fe58d82b" - ], - "x-ms-client-request-id": [ - "b462d5d9-e160-462b-b9cc-9841f709dd26" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-correlation-request-id": [ - "2e183f38-69d7-4442-8830-10db361a8c7b" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232915Z:2e183f38-69d7-4442-8830-10db361a8c7b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:29:14 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245/providers/Microsoft.Cdn/operationresults/3ff9a17d-6cc1-4f03-a8d6-f933e5b15e25/profileresults/ps5599/endpointresults/ps7987?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzI0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzNmZjlhMTdkLTZjYzEtNGYwMy1hOGQ2LWY5MzNlNWIxNWUyNS9wcm9maWxlcmVzdWx0cy9wczU1OTkvZW5kcG9pbnRyZXN1bHRzL3BzNzk4Nz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b462d5d9-e160-462b-b9cc-9841f709dd26" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b137dfb6-1fc7-4b3e-a4b9-81d141585680" - ], - "x-ms-client-request-id": [ - "b462d5d9-e160-462b-b9cc-9841f709dd26" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-correlation-request-id": [ - "7c63d7d0-3791-4aea-a48f-6e483e9b6f6e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232916Z:7c63d7d0-3791-4aea-a48f-6e483e9b6f6e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:29:15 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3245?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzI0NT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "79b689ca-ad94-4eb7-845a-59591bc23aa5" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "8dfb5573-530e-432d-9f88-3a7901ded2fa" - ], - "x-ms-correlation-request-id": [ - "8dfb5573-530e-432d-9f88-3a7901ded2fa" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232917Z:8dfb5573-530e-432d-9f88-3a7901ded2fa" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:29:16 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "99e9c8ed-9930-412b-8ebf-9133adec0cf0" - ], - "x-ms-correlation-request-id": [ - "99e9c8ed-9930-412b-8ebf-9133adec0cf0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232932Z:99e9c8ed-9930-412b-8ebf-9133adec0cf0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:29:31 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "3cb65161-a5c5-4bb9-a5a6-aac89558b2ee" - ], - "x-ms-correlation-request-id": [ - "3cb65161-a5c5-4bb9-a5a6-aac89558b2ee" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T232947Z:3cb65161-a5c5-4bb9-a5a6-aac89558b2ee" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:29:47 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "a3b2d11d-b347-4cf1-b52e-099d3d7a10ae" - ], - "x-ms-correlation-request-id": [ - "a3b2d11d-b347-4cf1-b52e-099d3d7a10ae" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T233002Z:a3b2d11d-b347-4cf1-b52e-099d3d7a10ae" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:30:02 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "ab4d5c29-459e-4542-aaaa-bf486a486dba" - ], - "x-ms-correlation-request-id": [ - "ab4d5c29-459e-4542-aaaa-bf486a486dba" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T233017Z:ab4d5c29-459e-4542-aaaa-bf486a486dba" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:30:17 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "1250b066-ef57-4362-8f79-d6f97f746650" - ], - "x-ms-correlation-request-id": [ - "1250b066-ef57-4362-8f79-d6f97f746650" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T233033Z:1250b066-ef57-4362-8f79-d6f97f746650" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:30:32 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "3856c1fc-7b80-4b85-973d-04c34cfb1dbe" - ], - "x-ms-correlation-request-id": [ - "3856c1fc-7b80-4b85-973d-04c34cfb1dbe" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T233048Z:3856c1fc-7b80-4b85-973d-04c34cfb1dbe" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:30:48 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "85756c81-8808-45c6-9cea-38e9de3a59bc" - ], - "x-ms-correlation-request-id": [ - "85756c81-8808-45c6-9cea-38e9de3a59bc" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T233103Z:85756c81-8808-45c6-9cea-38e9de3a59bc" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:31:02 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMyNDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "76322982-4eee-4192-b273-1ab720c94fd3" - ], - "x-ms-correlation-request-id": [ - "76322982-4eee-4192-b273-1ab720c94fd3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T233103Z:76322982-4eee-4192-b273-1ab720c94fd3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:31:03 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-EndpointCrudAndActionWithPiping": [ - "ps5599", - "ps3245", - "ps7987", - "ps2306" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointGeoFilters.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointGeoFilters.json deleted file mode 100644 index 5316da1a1851..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointGeoFilters.json +++ /dev/null @@ -1,1704 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3971?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzk3MT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "290eca43-0542-4e60-bec0-879237a88042" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "d47c6e9c-3331-4942-81f3-8842202c4911" - ], - "x-ms-correlation-request-id": [ - "d47c6e9c-3331-4942-81f3-8842202c4911" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T233930Z:d47c6e9c-3331-4942-81f3-8842202c4911" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:39:30 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3971\",\r\n \"name\": \"ps3971\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "08322449-12f4-4ca8-9f21-417ccb7a2dd7" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "373ec8b5-0db0-49c9-bc71-1796b5c2baa8" - ], - "x-ms-client-request-id": [ - "08322449-12f4-4ca8-9f21-417ccb7a2dd7" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "e461071e-c5c0-431c-b68b-7f9b6a317fb1" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T233931Z:e461071e-c5c0-431c-b68b-7f9b6a317fb1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:39:30 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3971/providers/Microsoft.Cdn/profiles/ps4628?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzk3MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQ2Mjg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "08322449-12f4-4ca8-9f21-417ccb7a2dd7" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "77" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2f39701e-cb9c-460d-9903-95df86265353" - ], - "x-ms-client-request-id": [ - "08322449-12f4-4ca8-9f21-417ccb7a2dd7" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3971/providers/Microsoft.Cdn/operationresults/7bef07ca-30f8-4015-a3da-ba535bda50bc?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "d4eae474-2a30-4d1f-acce-f94bf8f22ff3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T233935Z:d4eae474-2a30-4d1f-acce-f94bf8f22ff3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:39:34 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3971/providers/Microsoft.Cdn/profiles/ps4628\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps4628\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3971/providers/Microsoft.Cdn/operationresults/7bef07ca-30f8-4015-a3da-ba535bda50bc?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzk3MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdiZWYwN2NhLTMwZjgtNDAxNS1hM2RhLWJhNTM1YmRhNTBiYz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "08322449-12f4-4ca8-9f21-417ccb7a2dd7" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "71480380-8da8-42c4-a4b2-8cc18208b2b3" - ], - "x-ms-client-request-id": [ - "08322449-12f4-4ca8-9f21-417ccb7a2dd7" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "878a6866-412d-4c29-94b2-910818072e7c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T233945Z:878a6866-412d-4c29-94b2-910818072e7c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:39:45 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3971/providers/Microsoft.Cdn/profiles/ps4628?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzk3MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQ2Mjg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "08322449-12f4-4ca8-9f21-417ccb7a2dd7" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "18ea0003-e3c0-4c3c-88a2-b61065bb648d" - ], - "x-ms-client-request-id": [ - "08322449-12f4-4ca8-9f21-417ccb7a2dd7" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "db23189f-b9b5-4bc0-bf62-58b234835b0c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T233945Z:db23189f-b9b5-4bc0-bf62-58b234835b0c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:39:45 GMT" - ], - "Content-Length": [ - "318" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3971/providers/Microsoft.Cdn/profiles/ps4628\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps4628\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps5541\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "05381322-7fcb-4159-802f-50bd04701383" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2c68bcd1-2d6c-4650-b92a-cc48b9e09e2b" - ], - "x-ms-client-request-id": [ - "05381322-7fcb-4159-802f-50bd04701383" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "78abd570-41c9-4570-8638-085af6879993" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T233946Z:78abd570-41c9-4570-8638-085af6879993" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:39:46 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3971/providers/Microsoft.Cdn/profiles/ps4628/endpoints/ps5541?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzk3MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQ2MjgvZW5kcG9pbnRzL3BzNTU0MT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"geoFilters\": [\r\n {\r\n \"relativePath\": \"/mycar\",\r\n \"action\": \"Block\",\r\n \"countryCodes\": [\r\n \"GA\",\r\n \"AT\"\r\n ]\r\n }\r\n ],\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7260\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\"\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUs\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "05381322-7fcb-4159-802f-50bd04701383" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "383" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c833be71-620c-4ea8-aabf-a6f602033aad" - ], - "x-ms-client-request-id": [ - "05381322-7fcb-4159-802f-50bd04701383" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3971/providers/Microsoft.Cdn/operationresults/6f522737-eb0f-4b44-8daa-f00ab0e2a0d4?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "7fe2f0ee-118c-4682-9d00-f7d9c3384f0f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T233950Z:7fe2f0ee-118c-4682-9d00-f7d9c3384f0f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:39:50 GMT" - ], - "Content-Length": [ - "1119" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3971/providers/Microsoft.Cdn/profiles/ps4628/endpoints/ps5541\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps5541\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps5541.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7260\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [\r\n {\r\n \"relativePath\": \"/mycar\",\r\n \"action\": \"Block\",\r\n \"countryCodes\": [\r\n \"GA\",\r\n \"AT\"\r\n ]\r\n }\r\n ],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3971/providers/Microsoft.Cdn/operationresults/6f522737-eb0f-4b44-8daa-f00ab0e2a0d4?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzk3MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzZmNTIyNzM3LWViMGYtNGI0NC04ZGFhLWYwMGFiMGUyYTBkND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "05381322-7fcb-4159-802f-50bd04701383" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5081f7cc-5c0d-4091-9440-e51af58e293b" - ], - "x-ms-client-request-id": [ - "05381322-7fcb-4159-802f-50bd04701383" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "75e3892e-bbc9-4f7e-b469-b505027f8de4" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234000Z:75e3892e-bbc9-4f7e-b469-b505027f8de4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:40:00 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3971/providers/Microsoft.Cdn/operationresults/6f522737-eb0f-4b44-8daa-f00ab0e2a0d4?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzk3MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzZmNTIyNzM3LWViMGYtNGI0NC04ZGFhLWYwMGFiMGUyYTBkND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "05381322-7fcb-4159-802f-50bd04701383" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "39da6110-3381-42e0-80fb-e4be77d29c54" - ], - "x-ms-client-request-id": [ - "05381322-7fcb-4159-802f-50bd04701383" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-correlation-request-id": [ - "a10c8665-5aa2-40d0-bc7f-511a4ba5c8af" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234011Z:a10c8665-5aa2-40d0-bc7f-511a4ba5c8af" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:40:10 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3971/providers/Microsoft.Cdn/profiles/ps4628/endpoints/ps5541?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzk3MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQ2MjgvZW5kcG9pbnRzL3BzNTU0MT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "05381322-7fcb-4159-802f-50bd04701383" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "93121565-b8f3-4a67-86cf-300957d309e8" - ], - "x-ms-client-request-id": [ - "05381322-7fcb-4159-802f-50bd04701383" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "101ff202-1c40-4a09-94b4-ad15990bc316" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234011Z:101ff202-1c40-4a09-94b4-ad15990bc316" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:40:10 GMT" - ], - "Content-Length": [ - "1117" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3971/providers/Microsoft.Cdn/profiles/ps4628/endpoints/ps5541\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps5541\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps5541.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7260\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [\r\n {\r\n \"relativePath\": \"/mycar\",\r\n \"action\": \"Block\",\r\n \"countryCodes\": [\r\n \"GA\",\r\n \"AT\"\r\n ]\r\n }\r\n ],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3971/providers/Microsoft.Cdn/profiles/ps4628/endpoints/ps5541?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzk3MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQ2MjgvZW5kcG9pbnRzL3BzNTU0MT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "039d4b8f-2668-4bd9-8a87-14846d483082" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a91106d7-07f5-40a5-84bc-d5a576e3a4f1" - ], - "x-ms-client-request-id": [ - "039d4b8f-2668-4bd9-8a87-14846d483082" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "e162d299-c916-4b19-9941-68256f311e37" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234011Z:e162d299-c916-4b19-9941-68256f311e37" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:40:11 GMT" - ], - "Content-Length": [ - "1117" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3971/providers/Microsoft.Cdn/profiles/ps4628/endpoints/ps5541\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps5541\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps5541.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7260\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [\r\n {\r\n \"relativePath\": \"/mycar\",\r\n \"action\": \"Block\",\r\n \"countryCodes\": [\r\n \"GA\",\r\n \"AT\"\r\n ]\r\n }\r\n ],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3971/providers/Microsoft.Cdn/profiles/ps4628/endpoints/ps5541?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzk3MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQ2MjgvZW5kcG9pbnRzL3BzNTU0MT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "00e37352-1117-430b-81fd-b4ae2542e1d4" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "24a031ed-8cf0-4cb6-8622-e568735c0dee" - ], - "x-ms-client-request-id": [ - "00e37352-1117-430b-81fd-b4ae2542e1d4" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "47" - ], - "x-ms-correlation-request-id": [ - "959eddd8-287e-43e7-b2e4-261d429f4fe7" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234034Z:959eddd8-287e-43e7-b2e4-261d429f4fe7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:40:33 GMT" - ], - "Content-Length": [ - "1191" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3971/providers/Microsoft.Cdn/profiles/ps4628/endpoints/ps5541\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps5541\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps5541.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7260\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [\r\n {\r\n \"relativePath\": \"/mycar\",\r\n \"action\": \"Block\",\r\n \"countryCodes\": [\r\n \"GA\",\r\n \"AT\"\r\n ]\r\n },\r\n {\r\n \"relativePath\": \"/mypicture\",\r\n \"action\": \"Block\",\r\n \"countryCodes\": [\r\n \"GA\",\r\n \"AT\"\r\n ]\r\n }\r\n ],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3971/providers/Microsoft.Cdn/profiles/ps4628/endpoints/ps5541?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzk3MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQ2MjgvZW5kcG9pbnRzL3BzNTU0MT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"tags\": {},\r\n \"properties\": {\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"geoFilters\": [\r\n {\r\n \"relativePath\": \"/mycar\",\r\n \"action\": \"Block\",\r\n \"countryCodes\": [\r\n \"GA\",\r\n \"AT\"\r\n ]\r\n },\r\n {\r\n \"relativePath\": \"/mypicture\",\r\n \"action\": \"Block\",\r\n \"countryCodes\": [\r\n \"GA\",\r\n \"AT\"\r\n ]\r\n }\r\n ]\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "00e37352-1117-430b-81fd-b4ae2542e1d4" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "564" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3971/providers/Microsoft.Cdn/operationresults/6031e3aa-437e-4be2-9c6a-7a717c106089/profileresults/ps4628/endpointresults/ps5541?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "bc47eaa1-3e14-427e-bbd0-8f46cc0434f3" - ], - "x-ms-client-request-id": [ - "00e37352-1117-430b-81fd-b4ae2542e1d4" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3971/providers/Microsoft.Cdn/operationresults/6031e3aa-437e-4be2-9c6a-7a717c106089?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "98" - ], - "x-ms-correlation-request-id": [ - "ac4e7f5e-9f43-498d-8b77-7fa08a91d242" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234013Z:ac4e7f5e-9f43-498d-8b77-7fa08a91d242" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:40:13 GMT" - ], - "Content-Length": [ - "1191" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3971/providers/Microsoft.Cdn/profiles/ps4628/endpoints/ps5541\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps5541\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps5541.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7260\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [\r\n {\r\n \"relativePath\": \"/mycar\",\r\n \"action\": \"Block\",\r\n \"countryCodes\": [\r\n \"GA\",\r\n \"AT\"\r\n ]\r\n },\r\n {\r\n \"relativePath\": \"/mypicture\",\r\n \"action\": \"Block\",\r\n \"countryCodes\": [\r\n \"GA\",\r\n \"AT\"\r\n ]\r\n }\r\n ],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3971/providers/Microsoft.Cdn/operationresults/6031e3aa-437e-4be2-9c6a-7a717c106089?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzk3MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzYwMzFlM2FhLTQzN2UtNGJlMi05YzZhLTdhNzE3YzEwNjA4OT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "00e37352-1117-430b-81fd-b4ae2542e1d4" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a5bf8147-65cd-4603-a73a-b979002f005e" - ], - "x-ms-client-request-id": [ - "00e37352-1117-430b-81fd-b4ae2542e1d4" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-correlation-request-id": [ - "4b017698-08ef-4336-9aae-5e2138c563d3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234023Z:4b017698-08ef-4336-9aae-5e2138c563d3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:40:23 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3971/providers/Microsoft.Cdn/operationresults/6031e3aa-437e-4be2-9c6a-7a717c106089?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzk3MS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzYwMzFlM2FhLTQzN2UtNGJlMi05YzZhLTdhNzE3YzEwNjA4OT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "00e37352-1117-430b-81fd-b4ae2542e1d4" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "50fab67e-8e31-4903-91ca-3cd660c2fffc" - ], - "x-ms-client-request-id": [ - "00e37352-1117-430b-81fd-b4ae2542e1d4" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-correlation-request-id": [ - "9217766d-9b93-484c-a65a-7d694a3a3768" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234034Z:9217766d-9b93-484c-a65a-7d694a3a3768" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:40:33 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3971?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzk3MT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ab475b68-79b3-4987-97d3-40658fc0039c" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "62295eed-0494-4311-9783-2a566ffd5641" - ], - "x-ms-correlation-request-id": [ - "62295eed-0494-4311-9783-2a566ffd5641" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234035Z:62295eed-0494-4311-9783-2a566ffd5641" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:40:35 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNU56RXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "c7c98236-f3c1-48a5-ae83-65f4570d69ed" - ], - "x-ms-correlation-request-id": [ - "c7c98236-f3c1-48a5-ae83-65f4570d69ed" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234050Z:c7c98236-f3c1-48a5-ae83-65f4570d69ed" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:40:50 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNU56RXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "a837191a-eca3-45f6-b0a8-cd928df6c7d5" - ], - "x-ms-correlation-request-id": [ - "a837191a-eca3-45f6-b0a8-cd928df6c7d5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234105Z:a837191a-eca3-45f6-b0a8-cd928df6c7d5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:41:05 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNU56RXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "db8916f7-465e-42a0-8181-24a7742ae601" - ], - "x-ms-correlation-request-id": [ - "db8916f7-465e-42a0-8181-24a7742ae601" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234120Z:db8916f7-465e-42a0-8181-24a7742ae601" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:41:20 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNU56RXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "9e5b16a1-7c38-4701-af95-155b5e844c99" - ], - "x-ms-correlation-request-id": [ - "9e5b16a1-7c38-4701-af95-155b5e844c99" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234135Z:9e5b16a1-7c38-4701-af95-155b5e844c99" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:41:35 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNU56RXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "3e67e630-c733-4fae-b59e-7e858d86bc60" - ], - "x-ms-correlation-request-id": [ - "3e67e630-c733-4fae-b59e-7e858d86bc60" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234150Z:3e67e630-c733-4fae-b59e-7e858d86bc60" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:41:50 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNU56RXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "4ded6f5d-fd5e-4405-b4e8-2675d87ef7d7" - ], - "x-ms-correlation-request-id": [ - "4ded6f5d-fd5e-4405-b4e8-2675d87ef7d7" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234206Z:4ded6f5d-fd5e-4405-b4e8-2675d87ef7d7" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:42:05 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNU56RXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "81a9771f-717f-45e0-bae1-a3901b5216d0" - ], - "x-ms-correlation-request-id": [ - "81a9771f-717f-45e0-bae1-a3901b5216d0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234221Z:81a9771f-717f-45e0-bae1-a3901b5216d0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:42:20 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNU56RXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "984866ad-5614-4c6f-be93-4477e594aa42" - ], - "x-ms-correlation-request-id": [ - "984866ad-5614-4c6f-be93-4477e594aa42" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234236Z:984866ad-5614-4c6f-be93-4477e594aa42" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:42:36 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNU56RXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "98eba501-a4e1-4b12-9a0a-0bd996d1f2d2" - ], - "x-ms-correlation-request-id": [ - "98eba501-a4e1-4b12-9a0a-0bd996d1f2d2" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234251Z:98eba501-a4e1-4b12-9a0a-0bd996d1f2d2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:42:51 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNU56RXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "d4b13736-780f-4d3e-8c89-4b83e497c0e0" - ], - "x-ms-correlation-request-id": [ - "d4b13736-780f-4d3e-8c89-4b83e497c0e0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234306Z:d4b13736-780f-4d3e-8c89-4b83e497c0e0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:43:06 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM5NzEtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNU56RXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "29118af8-93f7-4e6c-86e6-0cfdc1be6afb" - ], - "x-ms-correlation-request-id": [ - "29118af8-93f7-4e6c-86e6-0cfdc1be6afb" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234306Z:29118af8-93f7-4e6c-86e6-0cfdc1be6afb" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:43:06 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-EndpointGeoFilters": [ - "ps4628", - "ps3971", - "ps5541", - "ps7260" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointPipeline.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointPipeline.json deleted file mode 100644 index 323e1d3ecd26..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointPipeline.json +++ /dev/null @@ -1,3067 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzcyNj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9a5bb0f4-3b10-4acd-95a5-3855af3455d1" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-request-id": [ - "c63dec47-de6f-4637-b623-a4f2a97ea9e9" - ], - "x-ms-correlation-request-id": [ - "c63dec47-de6f-4637-b623-a4f2a97ea9e9" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234400Z:c63dec47-de6f-4637-b623-a4f2a97ea9e9" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:44:00 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3726\",\r\n \"name\": \"ps3726\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1645b89f-ec00-446f-80c1-d46bbf6f180e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "63c531f0-ce63-4233-b0c6-23dd302974a0" - ], - "x-ms-client-request-id": [ - "1645b89f-ec00-446f-80c1-d46bbf6f180e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "2055d861-338f-47ea-831c-54b3fdb61d38" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234402Z:2055d861-338f-47ea-831c-54b3fdb61d38" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:44:02 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNDc/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1645b89f-ec00-446f-80c1-d46bbf6f180e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "78" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e88c20ff-a390-4625-a225-2f9b9c95dc98" - ], - "x-ms-client-request-id": [ - "1645b89f-ec00-446f-80c1-d46bbf6f180e" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/eea0842a-259e-4f9f-9ac1-e645ed0b65f3?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "83dd33d8-8c39-4d8b-b4ee-6937a85d5b8c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234407Z:83dd33d8-8c39-4d8b-b4ee-6937a85d5b8c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:44:06 GMT" - ], - "Content-Length": [ - "320" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps9047\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/eea0842a-259e-4f9f-9ac1-e645ed0b65f3?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2VlYTA4NDJhLTI1OWUtNGY5Zi05YWMxLWU2NDVlZDBiNjVmMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1645b89f-ec00-446f-80c1-d46bbf6f180e" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0ede4ae2-75e2-49cc-bbf1-f4347dde4b49" - ], - "x-ms-client-request-id": [ - "1645b89f-ec00-446f-80c1-d46bbf6f180e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "355ee1ca-64c7-4e3f-8acf-95cedde3f254" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234417Z:355ee1ca-64c7-4e3f-8acf-95cedde3f254" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:44:16 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/eea0842a-259e-4f9f-9ac1-e645ed0b65f3?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2VlYTA4NDJhLTI1OWUtNGY5Zi05YWMxLWU2NDVlZDBiNjVmMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1645b89f-ec00-446f-80c1-d46bbf6f180e" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9cab32e6-2ea7-41ed-9d18-cabc9dca48c2" - ], - "x-ms-client-request-id": [ - "1645b89f-ec00-446f-80c1-d46bbf6f180e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "79706a62-61d4-4f39-a1a6-9aa3bb2357a6" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234427Z:79706a62-61d4-4f39-a1a6-9aa3bb2357a6" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:44:26 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/eea0842a-259e-4f9f-9ac1-e645ed0b65f3?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2VlYTA4NDJhLTI1OWUtNGY5Zi05YWMxLWU2NDVlZDBiNjVmMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1645b89f-ec00-446f-80c1-d46bbf6f180e" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "62056c58-8cd0-4187-94ae-ec50247a32a0" - ], - "x-ms-client-request-id": [ - "1645b89f-ec00-446f-80c1-d46bbf6f180e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "d7ccb0d1-ca41-4207-acec-bbf5c9530a62" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234437Z:d7ccb0d1-ca41-4207-acec-bbf5c9530a62" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:44:36 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/eea0842a-259e-4f9f-9ac1-e645ed0b65f3?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2VlYTA4NDJhLTI1OWUtNGY5Zi05YWMxLWU2NDVlZDBiNjVmMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1645b89f-ec00-446f-80c1-d46bbf6f180e" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "83a06fc6-b5a2-4c75-9afb-f2f1d737d308" - ], - "x-ms-client-request-id": [ - "1645b89f-ec00-446f-80c1-d46bbf6f180e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "4f3a09d4-a767-432d-8374-7f424fd99dbb" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234447Z:4f3a09d4-a767-432d-8374-7f424fd99dbb" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:44:47 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/eea0842a-259e-4f9f-9ac1-e645ed0b65f3?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2VlYTA4NDJhLTI1OWUtNGY5Zi05YWMxLWU2NDVlZDBiNjVmMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1645b89f-ec00-446f-80c1-d46bbf6f180e" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "06ffb70f-fa57-4371-a7e7-7963440e0358" - ], - "x-ms-client-request-id": [ - "1645b89f-ec00-446f-80c1-d46bbf6f180e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "573f5084-4fca-4f96-8317-082d1b29a5dd" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234458Z:573f5084-4fca-4f96-8317-082d1b29a5dd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:44:57 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNDc/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1645b89f-ec00-446f-80c1-d46bbf6f180e" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "47735a36-5f23-48e7-9563-294421189381" - ], - "x-ms-client-request-id": [ - "1645b89f-ec00-446f-80c1-d46bbf6f180e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "83d906bb-002b-4c3b-9928-8092f117f05a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234458Z:83d906bb-002b-4c3b-9928-8092f117f05a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:44:57 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps9047\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNDc/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "39e4e5d4-ce79-4088-a888-bd6e41723cef" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ac885ba6-faf5-4ae2-9c8b-4d7204c397e3" - ], - "x-ms-client-request-id": [ - "39e4e5d4-ce79-4088-a888-bd6e41723cef" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "47" - ], - "x-ms-correlation-request-id": [ - "8a7b42a9-e9be-4d2d-965b-70d6349ec44c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234550Z:8a7b42a9-e9be-4d2d-965b-70d6349ec44c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:45:49 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps9047\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNDc/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "18a0f822-1d29-4845-93b4-9b1c443a9fa1" - ], - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "46" - ], - "x-ms-correlation-request-id": [ - "f92ce416-611e-433c-a8ae-7d9968884015" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234551Z:f92ce416-611e-433c-a8ae-7d9968884015" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:45:50 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps9047\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNDc/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1e303e2d-396a-4de1-bee9-ceb7ab645d31" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2b02c945-1a12-48ef-8827-a2e67754977c" - ], - "x-ms-client-request-id": [ - "1e303e2d-396a-4de1-bee9-ceb7ab645d31" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "45" - ], - "x-ms-correlation-request-id": [ - "26ed3c85-69fa-40ab-b734-41741ebf9188" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234636Z:26ed3c85-69fa-40ab-b734-41741ebf9188" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:46:36 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps9047\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps6809\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "edf1e676-af72-4a9f-af0e-6352cce83f03" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6b69f24b-5a8d-4778-9eea-23bfe205eed4" - ], - "x-ms-client-request-id": [ - "edf1e676-af72-4a9f-af0e-6352cce83f03" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "8755d853-e13f-4b75-9ce7-3c38573675c0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234458Z:8755d853-e13f-4b75-9ce7-3c38573675c0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:44:57 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps9108\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ebfba172-7001-439b-ac1a-922d8c442db0" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ac6099d1-3532-494c-b5b0-290edaafc0e3" - ], - "x-ms-client-request-id": [ - "ebfba172-7001-439b-ac1a-922d8c442db0" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "8d92ef78-956b-4bf1-bf03-8ec90323daa8" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234525Z:8d92ef78-956b-4bf1-bf03-8ec90323daa8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:45:25 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints/ps6809?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNDcvZW5kcG9pbnRzL3BzNjgwOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7115\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\"\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUs\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "edf1e676-af72-4a9f-af0e-6352cce83f03" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "202" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ba507231-8f91-4ef6-a1ae-49750668fe91" - ], - "x-ms-client-request-id": [ - "edf1e676-af72-4a9f-af0e-6352cce83f03" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/1c3195b5-1663-46ad-92ab-83d2c4097ae5?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "2d1282ec-14e8-4159-9e86-049794b30d57" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234503Z:2d1282ec-14e8-4159-9e86-049794b30d57" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:45:03 GMT" - ], - "Content-Length": [ - "1050" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints/ps6809\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps6809\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps6809.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7115\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/1c3195b5-1663-46ad-92ab-83d2c4097ae5?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzFjMzE5NWI1LTE2NjMtNDZhZC05MmFiLTgzZDJjNDA5N2FlNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "edf1e676-af72-4a9f-af0e-6352cce83f03" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f00c56ac-29e4-493a-8ec4-ae48149f7a0e" - ], - "x-ms-client-request-id": [ - "edf1e676-af72-4a9f-af0e-6352cce83f03" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "9b775e04-cac6-43f4-87e8-2d23b1f49030" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234513Z:9b775e04-cac6-43f4-87e8-2d23b1f49030" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:45:13 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/1c3195b5-1663-46ad-92ab-83d2c4097ae5?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzFjMzE5NWI1LTE2NjMtNDZhZC05MmFiLTgzZDJjNDA5N2FlNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "edf1e676-af72-4a9f-af0e-6352cce83f03" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1721ff37-1499-4e5c-ab1e-e4b9f665a1a4" - ], - "x-ms-client-request-id": [ - "edf1e676-af72-4a9f-af0e-6352cce83f03" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "038f4461-c50a-42e1-bbe3-da1ba0d64782" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234523Z:038f4461-c50a-42e1-bbe3-da1ba0d64782" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:45:23 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints/ps6809?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNDcvZW5kcG9pbnRzL3BzNjgwOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "edf1e676-af72-4a9f-af0e-6352cce83f03" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e8bb4ad4-f72d-4e92-9723-a086d4d4066c" - ], - "x-ms-client-request-id": [ - "edf1e676-af72-4a9f-af0e-6352cce83f03" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "44fe6d6d-72fd-42b0-85de-3814a94ea7e5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234524Z:44fe6d6d-72fd-42b0-85de-3814a94ea7e5" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:45:23 GMT" - ], - "Content-Length": [ - "1048" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints/ps6809\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps6809\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps6809.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7115\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints/ps9108?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNDcvZW5kcG9pbnRzL3BzOTEwOD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7115\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\"\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUs\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ebfba172-7001-439b-ac1a-922d8c442db0" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "202" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ef837d97-c1da-4d79-9c05-ac6633cfc36d" - ], - "x-ms-client-request-id": [ - "ebfba172-7001-439b-ac1a-922d8c442db0" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/3e29bc80-625a-474d-a774-54789fb5038f?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "98" - ], - "x-ms-correlation-request-id": [ - "d34e1c4d-9249-46db-be77-84c6054d4e06" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234529Z:d34e1c4d-9249-46db-be77-84c6054d4e06" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:45:29 GMT" - ], - "Content-Length": [ - "1050" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints/ps9108\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps9108\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps9108.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7115\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/3e29bc80-625a-474d-a774-54789fb5038f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzNlMjliYzgwLTYyNWEtNDc0ZC1hNzc0LTU0Nzg5ZmI1MDM4Zj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ebfba172-7001-439b-ac1a-922d8c442db0" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5e8ea825-053f-44df-95e2-930d24bcab4f" - ], - "x-ms-client-request-id": [ - "ebfba172-7001-439b-ac1a-922d8c442db0" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "089b6238-5f3e-4bea-b1be-180af7bd1789" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234539Z:089b6238-5f3e-4bea-b1be-180af7bd1789" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:45:39 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/3e29bc80-625a-474d-a774-54789fb5038f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzNlMjliYzgwLTYyNWEtNDc0ZC1hNzc0LTU0Nzg5ZmI1MDM4Zj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ebfba172-7001-439b-ac1a-922d8c442db0" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3f111904-36e2-4868-b586-896ca39ef43d" - ], - "x-ms-client-request-id": [ - "ebfba172-7001-439b-ac1a-922d8c442db0" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-correlation-request-id": [ - "e8de4fbe-2830-4513-a618-053e3c082423" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234549Z:e8de4fbe-2830-4513-a618-053e3c082423" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:45:49 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints/ps9108?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNDcvZW5kcG9pbnRzL3BzOTEwOD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ebfba172-7001-439b-ac1a-922d8c442db0" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "37722519-2f6c-4d43-91e5-813badde39b1" - ], - "x-ms-client-request-id": [ - "ebfba172-7001-439b-ac1a-922d8c442db0" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "1ae3502b-c43b-4bf2-9f76-4c36788bb1ca" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234550Z:1ae3502b-c43b-4bf2-9f76-4c36788bb1ca" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:45:49 GMT" - ], - "Content-Length": [ - "1048" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints/ps9108\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps9108\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps9108.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7115\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNDcvZW5kcG9pbnRzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "39e4e5d4-ce79-4088-a888-bd6e41723cef" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "16e6dba3-e612-4472-a701-7e3964becf52" - ], - "x-ms-client-request-id": [ - "39e4e5d4-ce79-4088-a888-bd6e41723cef" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "47" - ], - "x-ms-correlation-request-id": [ - "f5bfbe85-2f6e-427c-8b3d-55995f7eb406" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234550Z:f5bfbe85-2f6e-427c-8b3d-55995f7eb406" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:45:50 GMT" - ], - "Content-Length": [ - "2109" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints/ps6809\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps6809\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps6809.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7115\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints/ps9108\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps9108\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps9108.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7115\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNDcvZW5kcG9pbnRzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e76d9ba9-045c-48be-8fdd-c9cf6e9f475d" - ], - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "46" - ], - "x-ms-correlation-request-id": [ - "97a17390-b3a1-407e-9404-89860fedaac4" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234551Z:97a17390-b3a1-407e-9404-89860fedaac4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:45:50 GMT" - ], - "Content-Length": [ - "2109" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints/ps6809\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps6809\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps6809.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7115\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints/ps9108\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps9108\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps9108.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7115\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNDcvZW5kcG9pbnRzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6197af68-2da2-4fac-b497-b28c72c53e4e" - ], - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "45" - ], - "x-ms-correlation-request-id": [ - "fc66dae0-c422-4e4c-9510-b31a92ddf5cd" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234551Z:fc66dae0-c422-4e4c-9510-b31a92ddf5cd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:45:51 GMT" - ], - "Content-Length": [ - "2109" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints/ps6809\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps6809\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps6809.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7115\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints/ps9108\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps9108\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps9108.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7115\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNDcvZW5kcG9pbnRzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f7848f12-1348-47a1-8314-95f8a9fdcb22" - ], - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "44" - ], - "x-ms-correlation-request-id": [ - "c4290a7e-7c8d-43ac-a7a2-01540320b69f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234613Z:c4290a7e-7c8d-43ac-a7a2-01540320b69f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:46:12 GMT" - ], - "Content-Length": [ - "1060" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints/ps9108\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps9108\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps9108.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps7115\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNDcvZW5kcG9pbnRzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1e303e2d-396a-4de1-bee9-ceb7ab645d31" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "89f99306-75f9-4876-87a2-159ab05ad1f5" - ], - "x-ms-client-request-id": [ - "1e303e2d-396a-4de1-bee9-ceb7ab645d31" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "43" - ], - "x-ms-correlation-request-id": [ - "d51c7860-185d-42d0-b2fb-aa6800e66d10" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234636Z:d51c7860-185d-42d0-b2fb-aa6800e66d10" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:46:36 GMT" - ], - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints/ps6809?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNDcvZW5kcG9pbnRzL3BzNjgwOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/b6206b57-168b-4348-93a0-07ad56dd066e/profileresults/ps9047/endpointresults/ps6809?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "107b499b-8018-4a32-af83-d5ccc88d6dbf" - ], - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/b6206b57-168b-4348-93a0-07ad56dd066e?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-correlation-request-id": [ - "b35f3aff-a3e4-4a00-a57f-a4a805e1202f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234552Z:b35f3aff-a3e4-4a00-a57f-a4a805e1202f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:45:52 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/b6206b57-168b-4348-93a0-07ad56dd066e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2I2MjA2YjU3LTE2OGItNDM0OC05M2EwLTA3YWQ1NmRkMDY2ZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0daeda92-5f1f-42e2-b3ad-1224dcbbc980" - ], - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-correlation-request-id": [ - "1fa4bc7c-07e8-4149-acfc-e2bf62b71d54" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234603Z:1fa4bc7c-07e8-4149-acfc-e2bf62b71d54" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:46:02 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/b6206b57-168b-4348-93a0-07ad56dd066e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2I2MjA2YjU3LTE2OGItNDM0OC05M2EwLTA3YWQ1NmRkMDY2ZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8fce99fe-e63d-4b28-b573-24f2a87b89bf" - ], - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-correlation-request-id": [ - "992a4bc7-0554-4364-9792-1e86c0b3e693" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234613Z:992a4bc7-0554-4364-9792-1e86c0b3e693" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:46:12 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/b6206b57-168b-4348-93a0-07ad56dd066e/profileresults/ps9047/endpointresults/ps6809?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2I2MjA2YjU3LTE2OGItNDM0OC05M2EwLTA3YWQ1NmRkMDY2ZS9wcm9maWxlcmVzdWx0cy9wczkwNDcvZW5kcG9pbnRyZXN1bHRzL3BzNjgwOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8ef11463-6f0e-420d-86e1-5a7ab1822955" - ], - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-correlation-request-id": [ - "ae20169b-a923-4680-91d0-59298a1c8867" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234613Z:ae20169b-a923-4680-91d0-59298a1c8867" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:46:12 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3726/providers/Microsoft.Cdn/profiles/ps9047/endpoints/ps9108?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczkwNDcvZW5kcG9pbnRzL3BzOTEwOD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/716c7859-72ba-496d-b353-a88ce8774a85/profileresults/ps9047/endpointresults/ps9108?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4fb8fb0f-c586-4186-9f53-dc7685ecea89" - ], - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/716c7859-72ba-496d-b353-a88ce8774a85?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" - ], - "x-ms-correlation-request-id": [ - "9235bc3c-55dc-4605-98a0-2348b1698a0a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234615Z:9235bc3c-55dc-4605-98a0-2348b1698a0a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:46:14 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/716c7859-72ba-496d-b353-a88ce8774a85?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzcxNmM3ODU5LTcyYmEtNDk2ZC1iMzUzLWE4OGNlODc3NGE4NT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0e1587f4-8040-437d-b1fc-4a10da735efa" - ], - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-correlation-request-id": [ - "df91acc1-cb4f-40a9-a78e-8e67661642d8" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234625Z:df91acc1-cb4f-40a9-a78e-8e67661642d8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:46:25 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/716c7859-72ba-496d-b353-a88ce8774a85?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzcxNmM3ODU5LTcyYmEtNDk2ZC1iMzUzLWE4OGNlODc3NGE4NT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "19c42d37-fb7e-4147-9a12-9890e363c28d" - ], - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11986" - ], - "x-ms-correlation-request-id": [ - "e918232e-81a9-4646-a0c6-0e5be99eb200" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234635Z:e918232e-81a9-4646-a0c6-0e5be99eb200" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:46:35 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726/providers/Microsoft.Cdn/operationresults/716c7859-72ba-496d-b353-a88ce8774a85/profileresults/ps9047/endpointresults/ps9108?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzcyNi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzcxNmM3ODU5LTcyYmEtNDk2ZC1iMzUzLWE4OGNlODc3NGE4NS9wcm9maWxlcmVzdWx0cy9wczkwNDcvZW5kcG9pbnRyZXN1bHRzL3BzOTEwOD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "fe69095c-f168-4898-80bf-28fac68efebe" - ], - "x-ms-client-request-id": [ - "f03cbd89-5e31-4cf3-a50c-e598eba0063b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11985" - ], - "x-ms-correlation-request-id": [ - "a8d7ac3d-242f-46f4-8bfc-151b1943d5fc" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234636Z:a8d7ac3d-242f-46f4-8bfc-151b1943d5fc" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:46:36 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3726?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzcyNj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "65082e58-d3e1-46c0-a34a-9fe26280bfc5" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" - ], - "x-ms-request-id": [ - "1f3edf2e-1dce-42bf-8280-1ae2e71086b5" - ], - "x-ms-correlation-request-id": [ - "1f3edf2e-1dce-42bf-8280-1ae2e71086b5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234637Z:1f3edf2e-1dce-42bf-8280-1ae2e71086b5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:46:37 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNM01qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "66dbbad6-9e78-4844-a1de-28c3ba248ea5" - ], - "x-ms-correlation-request-id": [ - "66dbbad6-9e78-4844-a1de-28c3ba248ea5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234653Z:66dbbad6-9e78-4844-a1de-28c3ba248ea5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:46:53 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNM01qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "371a82a3-7f99-4b5c-a9a2-692096d91fa6" - ], - "x-ms-correlation-request-id": [ - "371a82a3-7f99-4b5c-a9a2-692096d91fa6" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234708Z:371a82a3-7f99-4b5c-a9a2-692096d91fa6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:47:08 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNM01qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "fb02a25c-eded-4193-acac-1e76bff8fcbc" - ], - "x-ms-correlation-request-id": [ - "fb02a25c-eded-4193-acac-1e76bff8fcbc" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234723Z:fb02a25c-eded-4193-acac-1e76bff8fcbc" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:47:23 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNM01qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "655ed68e-37d4-4474-a01b-a3cd8eb4d376" - ], - "x-ms-correlation-request-id": [ - "655ed68e-37d4-4474-a01b-a3cd8eb4d376" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234738Z:655ed68e-37d4-4474-a01b-a3cd8eb4d376" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:47:37 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNM01qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "da9f2d56-992a-44b1-bf62-65e2c03ac1af" - ], - "x-ms-correlation-request-id": [ - "da9f2d56-992a-44b1-bf62-65e2c03ac1af" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234753Z:da9f2d56-992a-44b1-bf62-65e2c03ac1af" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:47:52 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNM01qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-request-id": [ - "40ca1a70-c315-4ab6-9585-eb9bc06cb459" - ], - "x-ms-correlation-request-id": [ - "40ca1a70-c315-4ab6-9585-eb9bc06cb459" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234808Z:40ca1a70-c315-4ab6-9585-eb9bc06cb459" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:48:07 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNM01qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11986" - ], - "x-ms-request-id": [ - "02983737-25ed-4805-a58d-095423b0c40e" - ], - "x-ms-correlation-request-id": [ - "02983737-25ed-4805-a58d-095423b0c40e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234823Z:02983737-25ed-4805-a58d-095423b0c40e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:48:22 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNM01qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11985" - ], - "x-ms-request-id": [ - "10756d7f-e4b6-4214-b1ca-da5002d7340c" - ], - "x-ms-correlation-request-id": [ - "10756d7f-e4b6-4214-b1ca-da5002d7340c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234838Z:10756d7f-e4b6-4214-b1ca-da5002d7340c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:48:37 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNM01qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11984" - ], - "x-ms-request-id": [ - "33fb2646-f824-4055-94c1-908fa5aabfff" - ], - "x-ms-correlation-request-id": [ - "33fb2646-f824-4055-94c1-908fa5aabfff" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234853Z:33fb2646-f824-4055-94c1-908fa5aabfff" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:48:53 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNM01qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11983" - ], - "x-ms-request-id": [ - "4cc47f72-0193-4ea0-b9f8-fda3c4d6d027" - ], - "x-ms-correlation-request-id": [ - "4cc47f72-0193-4ea0-b9f8-fda3c4d6d027" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234908Z:4cc47f72-0193-4ea0-b9f8-fda3c4d6d027" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:49:08 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNM01qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11982" - ], - "x-ms-request-id": [ - "d6a29097-52ae-4963-a8b3-6cb82b92174e" - ], - "x-ms-correlation-request-id": [ - "d6a29097-52ae-4963-a8b3-6cb82b92174e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234924Z:d6a29097-52ae-4963-a8b3-6cb82b92174e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:49:23 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM3MjYtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNM01qWXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11981" - ], - "x-ms-request-id": [ - "88f720e3-03af-4486-bf14-e05459a0c8de" - ], - "x-ms-correlation-request-id": [ - "88f720e3-03af-4486-bf14-e05459a0c8de" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234924Z:88f720e3-03af-4486-bf14-e05459a0c8de" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:49:23 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-EndpointPipeline": [ - "ps9047", - "ps3726", - "ps6809", - "ps9108", - "ps7115" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointResourceUsage.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointResourceUsage.json deleted file mode 100644 index 21908c10127c..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.EndpointTests/TestEndpointResourceUsage.json +++ /dev/null @@ -1,1491 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1715?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTcxNT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "763904a6-e180-4b65-b3bb-568a04161ca4" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-request-id": [ - "556e3065-f8cf-4ed6-8e44-a9c3655d9b18" - ], - "x-ms-correlation-request-id": [ - "556e3065-f8cf-4ed6-8e44-a9c3655d9b18" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234938Z:556e3065-f8cf-4ed6-8e44-a9c3655d9b18" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:49:38 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps1715\",\r\n \"name\": \"ps1715\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "210228f1-8ac3-4fb2-ac4a-02ec67f45013" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6fb52705-cbfc-4a58-9a42-644a90095db0" - ], - "x-ms-client-request-id": [ - "210228f1-8ac3-4fb2-ac4a-02ec67f45013" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "b86247ee-4cda-4708-bf50-1b8a83f355c9" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234940Z:b86247ee-4cda-4708-bf50-1b8a83f355c9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:49:39 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps1715/providers/Microsoft.Cdn/profiles/ps1520?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTcxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE1MjA/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "210228f1-8ac3-4fb2-ac4a-02ec67f45013" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "77" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "386bf4ac-0472-48f1-9995-a9210a3b5e20" - ], - "x-ms-client-request-id": [ - "210228f1-8ac3-4fb2-ac4a-02ec67f45013" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1715/providers/Microsoft.Cdn/operationresults/b9859717-44f0-496f-9acb-f92ff93203a0?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "d5b21c8d-9a70-4b6a-9e09-7166cc710167" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234944Z:d5b21c8d-9a70-4b6a-9e09-7166cc710167" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:49:43 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1715/providers/Microsoft.Cdn/profiles/ps1520\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps1520\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1715/providers/Microsoft.Cdn/operationresults/b9859717-44f0-496f-9acb-f92ff93203a0?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTcxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2I5ODU5NzE3LTQ0ZjAtNDk2Zi05YWNiLWY5MmZmOTMyMDNhMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "210228f1-8ac3-4fb2-ac4a-02ec67f45013" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8e1380df-ef82-41a8-90b8-74422aef7f74" - ], - "x-ms-client-request-id": [ - "210228f1-8ac3-4fb2-ac4a-02ec67f45013" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "6948f4a2-a286-4cfd-8305-b86aeaade91c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234954Z:6948f4a2-a286-4cfd-8305-b86aeaade91c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:49:53 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps1715/providers/Microsoft.Cdn/profiles/ps1520?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTcxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE1MjA/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "210228f1-8ac3-4fb2-ac4a-02ec67f45013" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5e7eed4f-c85b-416f-b434-01d0449888a3" - ], - "x-ms-client-request-id": [ - "210228f1-8ac3-4fb2-ac4a-02ec67f45013" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "8c717581-de22-4923-8512-5a1b6a924f8a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234954Z:8c717581-de22-4923-8512-5a1b6a924f8a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:49:53 GMT" - ], - "Content-Length": [ - "318" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1715/providers/Microsoft.Cdn/profiles/ps1520\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps1520\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps1338\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b05f5a3c-3f28-4f9e-be9a-f52d3d4d80eb" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "07249a8c-aa43-4b12-95ed-963eeb590712" - ], - "x-ms-client-request-id": [ - "b05f5a3c-3f28-4f9e-be9a-f52d3d4d80eb" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "22949609-2ef8-43b2-ba0c-60ee0b99c1ce" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234955Z:22949609-2ef8-43b2-ba0c-60ee0b99c1ce" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:49:54 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps1715/providers/Microsoft.Cdn/profiles/ps1520/endpoints/ps1338?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTcxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE1MjAvZW5kcG9pbnRzL3BzMTMzOD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"origins\": [\r\n {\r\n \"name\": \"ps3215\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\"\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUs\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b05f5a3c-3f28-4f9e-be9a-f52d3d4d80eb" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "202" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7cd394d4-1c24-4ff2-9c76-98e0879305d3" - ], - "x-ms-client-request-id": [ - "b05f5a3c-3f28-4f9e-be9a-f52d3d4d80eb" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1715/providers/Microsoft.Cdn/operationresults/a59f237f-9b8b-4f84-8b96-0bad86fb51de?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "29bd655a-e55f-494e-a61a-f7bf2e1b21ee" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T234958Z:29bd655a-e55f-494e-a61a-f7bf2e1b21ee" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:49:57 GMT" - ], - "Content-Length": [ - "1050" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1715/providers/Microsoft.Cdn/profiles/ps1520/endpoints/ps1338\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps1338\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps1338.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps3215\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1715/providers/Microsoft.Cdn/operationresults/a59f237f-9b8b-4f84-8b96-0bad86fb51de?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTcxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2E1OWYyMzdmLTliOGItNGY4NC04Yjk2LTBiYWQ4NmZiNTFkZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b05f5a3c-3f28-4f9e-be9a-f52d3d4d80eb" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f469424e-3e1e-4dd5-bf3b-0eb133659399" - ], - "x-ms-client-request-id": [ - "b05f5a3c-3f28-4f9e-be9a-f52d3d4d80eb" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "d4438c13-06ae-493a-a051-134a5bebac0a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T235008Z:d4438c13-06ae-493a-a051-134a5bebac0a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:50:08 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1715/providers/Microsoft.Cdn/operationresults/a59f237f-9b8b-4f84-8b96-0bad86fb51de?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTcxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2E1OWYyMzdmLTliOGItNGY4NC04Yjk2LTBiYWQ4NmZiNTFkZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b05f5a3c-3f28-4f9e-be9a-f52d3d4d80eb" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3ca0a496-75fc-4dd3-893d-fd4113aec518" - ], - "x-ms-client-request-id": [ - "b05f5a3c-3f28-4f9e-be9a-f52d3d4d80eb" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "7363a74c-cfa9-480b-a794-aa683c0c2d03" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T235019Z:7363a74c-cfa9-480b-a794-aa683c0c2d03" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:50:18 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps1715/providers/Microsoft.Cdn/profiles/ps1520/endpoints/ps1338?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTcxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE1MjAvZW5kcG9pbnRzL3BzMTMzOD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b05f5a3c-3f28-4f9e-be9a-f52d3d4d80eb" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "94e9d296-61c8-4eb0-84f6-76dcf12c2b2e" - ], - "x-ms-client-request-id": [ - "b05f5a3c-3f28-4f9e-be9a-f52d3d4d80eb" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "8a41d57b-c971-4d37-9dd7-cc06514b8735" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T235019Z:8a41d57b-c971-4d37-9dd7-cc06514b8735" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:50:18 GMT" - ], - "Content-Length": [ - "1048" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1715/providers/Microsoft.Cdn/profiles/ps1520/endpoints/ps1338\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps1338\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps1338.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps3215\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps1715/providers/Microsoft.Cdn/profiles/ps1520/endpoints/ps1338/checkResourceUsage?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTcxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE1MjAvZW5kcG9pbnRzL3BzMTMzOC9jaGVja1Jlc291cmNlVXNhZ2U/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "898c1c82-b9a9-4619-9e87-19dcf46485b2" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "770940ab-c99f-4780-8da1-6736539ba5a4" - ], - "x-ms-client-request-id": [ - "898c1c82-b9a9-4619-9e87-19dcf46485b2" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "4ebaf4dd-70a0-4311-aa4f-7c680fb645fa" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T235020Z:4ebaf4dd-70a0-4311-aa4f-7c680fb645fa" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:50:19 GMT" - ], - "Content-Length": [ - "233" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"resourceType\": \"customdomain\",\r\n \"unit\": \"count\",\r\n \"currentValue\": 0,\r\n \"limit\": 20\r\n },\r\n {\r\n \"resourceType\": \"geofilter\",\r\n \"unit\": \"count\",\r\n \"currentValue\": 0,\r\n \"limit\": 25\r\n },\r\n {\r\n \"resourceType\": \"deliveryrule\",\r\n \"unit\": \"count\",\r\n \"currentValue\": 0,\r\n \"limit\": 20\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps1715?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTcxNT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "665c9fb1-f753-405e-92e5-ef2150d1b324" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "e70e8de9-3099-4086-bff1-2dcfef7453b5" - ], - "x-ms-correlation-request-id": [ - "e70e8de9-3099-4086-bff1-2dcfef7453b5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T235020Z:e70e8de9-3099-4086-bff1-2dcfef7453b5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:50:20 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFM01UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "95b74c29-05b0-4141-b3ce-c4cd8a14cca1" - ], - "x-ms-correlation-request-id": [ - "95b74c29-05b0-4141-b3ce-c4cd8a14cca1" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T235035Z:95b74c29-05b0-4141-b3ce-c4cd8a14cca1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:50:35 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFM01UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "4545c72f-ce95-4ce2-b5ac-b7822f714fa0" - ], - "x-ms-correlation-request-id": [ - "4545c72f-ce95-4ce2-b5ac-b7822f714fa0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T235051Z:4545c72f-ce95-4ce2-b5ac-b7822f714fa0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:50:51 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFM01UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "7204d180-3a17-43dc-a6a3-53073638d9a3" - ], - "x-ms-correlation-request-id": [ - "7204d180-3a17-43dc-a6a3-53073638d9a3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T235106Z:7204d180-3a17-43dc-a6a3-53073638d9a3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:51:06 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFM01UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "e5d79603-7fdd-4297-9f60-a23bda3f1698" - ], - "x-ms-correlation-request-id": [ - "e5d79603-7fdd-4297-9f60-a23bda3f1698" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T235121Z:e5d79603-7fdd-4297-9f60-a23bda3f1698" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:51:21 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFM01UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "503ee525-5fe5-4001-a91d-617dafd5ba96" - ], - "x-ms-correlation-request-id": [ - "503ee525-5fe5-4001-a91d-617dafd5ba96" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T235136Z:503ee525-5fe5-4001-a91d-617dafd5ba96" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:51:36 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFM01UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "7a251113-c756-47a6-862e-4572d5c2b558" - ], - "x-ms-correlation-request-id": [ - "7a251113-c756-47a6-862e-4572d5c2b558" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T235151Z:7a251113-c756-47a6-862e-4572d5c2b558" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:51:51 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFM01UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "16112ff4-1dff-4463-a780-de0b13acca7e" - ], - "x-ms-correlation-request-id": [ - "16112ff4-1dff-4463-a780-de0b13acca7e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T235206Z:16112ff4-1dff-4463-a780-de0b13acca7e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:52:06 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFM01UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "d3c10a08-db1f-4b8f-9908-8df1e189019e" - ], - "x-ms-correlation-request-id": [ - "d3c10a08-db1f-4b8f-9908-8df1e189019e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T235221Z:d3c10a08-db1f-4b8f-9908-8df1e189019e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:52:21 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFM01UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "51b5cb93-f317-47e7-827e-158b36fd8265" - ], - "x-ms-correlation-request-id": [ - "51b5cb93-f317-47e7-827e-158b36fd8265" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T235236Z:51b5cb93-f317-47e7-827e-158b36fd8265" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:52:36 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFM01UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "2ac1fa98-94de-4b5c-910f-91e1461bbef6" - ], - "x-ms-correlation-request-id": [ - "2ac1fa98-94de-4b5c-910f-91e1461bbef6" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T235252Z:2ac1fa98-94de-4b5c-910f-91e1461bbef6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:52:51 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFM01UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "e90b7185-40f4-41e7-8233-c1c1f97bc0c3" - ], - "x-ms-correlation-request-id": [ - "e90b7185-40f4-41e7-8233-c1c1f97bc0c3" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T235307Z:e90b7185-40f4-41e7-8233-c1c1f97bc0c3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:53:07 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzE3MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFM01UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "46401528-94ad-4d2e-8d74-8b11ebdda9d6" - ], - "x-ms-correlation-request-id": [ - "46401528-94ad-4d2e-8d74-8b11ebdda9d6" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T235307Z:46401528-94ad-4d2e-8d74-8b11ebdda9d6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 23:53:07 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-EndpointResourceUsage": [ - "ps1520", - "ps1715", - "ps1338", - "ps3215" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginGroupTests/TestCreateOriginGroup.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginGroupTests/TestCreateOriginGroup.json deleted file mode 100644 index 24cab97fe422..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginGroupTests/TestCreateOriginGroup.json +++ /dev/null @@ -1,1694 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjkxND9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c42bfce8-ba26-4d44-9955-3296fccd06e4" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "da013beb-603c-4243-94bd-6477becb5fab" - ], - "x-ms-correlation-request-id": [ - "da013beb-603c-4243-94bd-6477becb5fab" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192250Z:da013beb-603c-4243-94bd-6477becb5fab" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:22:50 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6914\",\r\n \"name\": \"ps6914\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "885f7316-4c5f-44cb-952e-28b920501314" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b5a325fb-c4c9-4c9b-ad1a-748d6f9f7e64" - ], - "x-ms-client-request-id": [ - "885f7316-4c5f-44cb-952e-28b920501314" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "f43147e8-6482-4bbd-bc26-e61f268d1cd8" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192251Z:f43147e8-6482-4bbd-bc26-e61f268d1cd8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:22:51 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjkxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczgyMTU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "885f7316-4c5f-44cb-952e-28b920501314" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "80" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "17691a09-b9f4-40c6-9b2b-3fcd58f2f8d3" - ], - "x-ms-client-request-id": [ - "885f7316-4c5f-44cb-952e-28b920501314" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/operationresults/a2627b17-2b5a-46f0-901b-520ff7b63983?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "eea4618d-1600-46ad-a7fe-cef55cd25f2c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192255Z:eea4618d-1600-46ad-a7fe-cef55cd25f2c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:22:54 GMT" - ], - "Content-Length": [ - "322" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps8215\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/operationresults/a2627b17-2b5a-46f0-901b-520ff7b63983?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjkxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2EyNjI3YjE3LTJiNWEtNDZmMC05MDFiLTUyMGZmN2I2Mzk4Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "885f7316-4c5f-44cb-952e-28b920501314" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7584ca3b-f34b-4542-b074-ae331df57948" - ], - "x-ms-client-request-id": [ - "885f7316-4c5f-44cb-952e-28b920501314" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "f91acbd1-ea6c-4949-bff4-b0590eaddd46" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192305Z:f91acbd1-ea6c-4949-bff4-b0590eaddd46" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:23:04 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/operationresults/a2627b17-2b5a-46f0-901b-520ff7b63983?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjkxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2EyNjI3YjE3LTJiNWEtNDZmMC05MDFiLTUyMGZmN2I2Mzk4Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "885f7316-4c5f-44cb-952e-28b920501314" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e48b0701-ffe2-46d0-b34e-68773704b3c6" - ], - "x-ms-client-request-id": [ - "885f7316-4c5f-44cb-952e-28b920501314" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "79fc83fa-b0cc-44d0-b71e-ee3991ae121c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192315Z:79fc83fa-b0cc-44d0-b71e-ee3991ae121c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:23:14 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjkxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczgyMTU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "885f7316-4c5f-44cb-952e-28b920501314" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ee1b7358-666b-491b-98d7-7a6bc157dfbc" - ], - "x-ms-client-request-id": [ - "885f7316-4c5f-44cb-952e-28b920501314" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "b67feae2-503f-45aa-a16c-652d98cb2dab" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192315Z:b67feae2-503f-45aa-a16c-652d98cb2dab" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:23:15 GMT" - ], - "Content-Length": [ - "321" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps8215\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps8923\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8e0def0b-d749-45af-82b0-ec0bd376ffd4" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "37357b50-b141-4804-9983-55de5bd962fc" - ], - "x-ms-client-request-id": [ - "8e0def0b-d749-45af-82b0-ec0bd376ffd4" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "5403c274-6c9a-436d-bc66-9c138f86e4cf" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192316Z:5403c274-6c9a-436d-bc66-9c138f86e4cf" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:23:15 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215/endpoints/ps8923?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjkxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczgyMTUvZW5kcG9pbnRzL3BzODkyMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"defaultOriginGroup\": {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215/endpoints/ps8923/origingroups/ps9858\"\r\n },\r\n \"origins\": [\r\n {\r\n \"name\": \"ps3547\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\"\r\n }\r\n }\r\n ],\r\n \"originGroups\": [\r\n {\r\n \"name\": \"ps9858\",\r\n \"properties\": {\r\n \"healthProbeSettings\": {\r\n \"probePath\": \"/health.aspx\",\r\n \"probeRequestType\": \"GET\",\r\n \"probeProtocol\": \"Https\",\r\n \"probeIntervalInSeconds\": 240\r\n },\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215/endpoints/ps8923/origins/ps3547\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8e0def0b-d749-45af-82b0-ec0bd376ffd4" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "967" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "51893346-f8cb-460b-b539-b9e5a1072a9e" - ], - "x-ms-client-request-id": [ - "8e0def0b-d749-45af-82b0-ec0bd376ffd4" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/operationresults/0941633d-3978-464c-8829-7b736ca99d70?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "3603f2c5-1534-4e05-9c30-001ea5e55136" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192321Z:3603f2c5-1534-4e05-9c30-001ea5e55136" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:23:21 GMT" - ], - "Content-Length": [ - "1640" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215/endpoints/ps8923\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps8923\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps8923.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps3547\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [\r\n {\r\n \"name\": \"ps9858\",\r\n \"properties\": {\r\n \"healthProbeSettings\": {\r\n \"probePath\": \"/health.aspx\",\r\n \"probeRequestType\": \"GET\",\r\n \"probeProtocol\": \"Https\",\r\n \"probeIntervalInSeconds\": 240\r\n },\r\n \"responseBasedOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": null,\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215/endpoints/ps8923/origins/ps3547\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"defaultOriginGroup\": {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215/endpoints/ps8923/origingroups/ps9858\"\r\n },\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/operationresults/0941633d-3978-464c-8829-7b736ca99d70?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjkxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzA5NDE2MzNkLTM5NzgtNDY0Yy04ODI5LTdiNzM2Y2E5OWQ3MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8e0def0b-d749-45af-82b0-ec0bd376ffd4" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6ed00eaa-9b13-4536-8855-372f0a940576" - ], - "x-ms-client-request-id": [ - "8e0def0b-d749-45af-82b0-ec0bd376ffd4" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "172f9546-31af-4ff4-b4ee-3b89057df14c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192332Z:172f9546-31af-4ff4-b4ee-3b89057df14c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:23:31 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/operationresults/0941633d-3978-464c-8829-7b736ca99d70?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjkxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzA5NDE2MzNkLTM5NzgtNDY0Yy04ODI5LTdiNzM2Y2E5OWQ3MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8e0def0b-d749-45af-82b0-ec0bd376ffd4" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4a4e3a5b-a8cc-4a05-9404-47fc5b6d063f" - ], - "x-ms-client-request-id": [ - "8e0def0b-d749-45af-82b0-ec0bd376ffd4" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "29c5e3d6-c286-40fe-b67e-6c51f4a1e733" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192342Z:29c5e3d6-c286-40fe-b67e-6c51f4a1e733" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:23:42 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215/endpoints/ps8923?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjkxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczgyMTUvZW5kcG9pbnRzL3BzODkyMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8e0def0b-d749-45af-82b0-ec0bd376ffd4" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "170e1453-fd58-4f59-b7ca-e38210d5d40c" - ], - "x-ms-client-request-id": [ - "8e0def0b-d749-45af-82b0-ec0bd376ffd4" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "cb01541e-27ba-46f4-a8ce-90dd5f0476d4" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192342Z:cb01541e-27ba-46f4-a8ce-90dd5f0476d4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:23:42 GMT" - ], - "Content-Length": [ - "1638" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215/endpoints/ps8923\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps8923\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps8923.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps3547\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [\r\n {\r\n \"name\": \"ps9858\",\r\n \"properties\": {\r\n \"healthProbeSettings\": {\r\n \"probePath\": \"/health.aspx\",\r\n \"probeRequestType\": \"GET\",\r\n \"probeProtocol\": \"Https\",\r\n \"probeIntervalInSeconds\": 240\r\n },\r\n \"responseBasedOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": null,\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215/endpoints/ps8923/origins/ps3547\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"defaultOriginGroup\": {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215/endpoints/ps8923/origingroups/ps9858\"\r\n },\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215/endpoints/ps8923/originGroups/ps4057?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjkxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczgyMTUvZW5kcG9pbnRzL3BzODkyMy9vcmlnaW5Hcm91cHMvcHM0MDU3P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"healthProbeSettings\": {\r\n \"probePath\": \"/check-health.aspx\",\r\n \"probeRequestType\": \"HEAD\",\r\n \"probeProtocol\": \"Http\",\r\n \"probeIntervalInSeconds\": 120\r\n },\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215/endpoints/ps8923/origins/ps3547\"\r\n }\r\n ]\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a45eecac-d9f0-4fbc-8a21-df27d25bff99" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "418" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e27ee28a-6cd5-4e7e-a6ab-416183f9ddf9" - ], - "x-ms-client-request-id": [ - "a45eecac-d9f0-4fbc-8a21-df27d25bff99" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/operationresults/666b2168-c5b9-4f8b-8383-42bd807d461f?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "5ac8417f-1a37-41d2-978a-3c235c1115d4" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192344Z:5ac8417f-1a37-41d2-978a-3c235c1115d4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:23:44 GMT" - ], - "Content-Length": [ - "715" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215/endpoints/ps8923/origingroups/ps4057\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/origingroups\",\r\n \"name\": \"ps4057\",\r\n \"properties\": {\r\n \"healthProbeSettings\": {\r\n \"probePath\": \"/check-health.aspx\",\r\n \"probeRequestType\": \"HEAD\",\r\n \"probeProtocol\": \"Http\",\r\n \"probeIntervalInSeconds\": 120\r\n },\r\n \"responseBasedOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": null,\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215/endpoints/ps8923/origins/ps3547\"\r\n }\r\n ],\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/operationresults/666b2168-c5b9-4f8b-8383-42bd807d461f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjkxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzY2NmIyMTY4LWM1YjktNGY4Yi04MzgzLTQyYmQ4MDdkNDYxZj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a45eecac-d9f0-4fbc-8a21-df27d25bff99" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b0c0f7de-3fa1-4819-9a9c-7b9868f1af13" - ], - "x-ms-client-request-id": [ - "a45eecac-d9f0-4fbc-8a21-df27d25bff99" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "2e10aa0a-9885-47fd-b2aa-ea0804c6ace2" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192354Z:2e10aa0a-9885-47fd-b2aa-ea0804c6ace2" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:23:54 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215/endpoints/ps8923/originGroups/ps4057?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjkxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczgyMTUvZW5kcG9pbnRzL3BzODkyMy9vcmlnaW5Hcm91cHMvcHM0MDU3P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a45eecac-d9f0-4fbc-8a21-df27d25bff99" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "cf304838-1cb3-429a-a489-918a1ec7f91f" - ], - "x-ms-client-request-id": [ - "a45eecac-d9f0-4fbc-8a21-df27d25bff99" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "6867e8cc-8ff3-4166-82b9-463815383851" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192354Z:6867e8cc-8ff3-4166-82b9-463815383851" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:23:54 GMT" - ], - "Content-Length": [ - "714" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215/endpoints/ps8923/origingroups/ps4057\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/origingroups\",\r\n \"name\": \"ps4057\",\r\n \"properties\": {\r\n \"healthProbeSettings\": {\r\n \"probePath\": \"/check-health.aspx\",\r\n \"probeRequestType\": \"HEAD\",\r\n \"probeProtocol\": \"Http\",\r\n \"probeIntervalInSeconds\": 120\r\n },\r\n \"responseBasedOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": null,\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914/providers/Microsoft.Cdn/profiles/ps8215/endpoints/ps8923/origins/ps3547\"\r\n }\r\n ],\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps6914?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjkxND9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "163903d8-6c4d-4518-97fa-d865b3402841" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "f5690dbb-a284-4c2a-868a-ce9811e0b9cd" - ], - "x-ms-correlation-request-id": [ - "f5690dbb-a284-4c2a-868a-ce9811e0b9cd" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192355Z:f5690dbb-a284-4c2a-868a-ce9811e0b9cd" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:23:55 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "5f641168-17f8-49d3-a087-4d73cf84d2f9" - ], - "x-ms-correlation-request-id": [ - "5f641168-17f8-49d3-a087-4d73cf84d2f9" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192410Z:5f641168-17f8-49d3-a087-4d73cf84d2f9" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:24:09 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "3f55c02e-bf57-41d0-ba57-9927cb4b3e3a" - ], - "x-ms-correlation-request-id": [ - "3f55c02e-bf57-41d0-ba57-9927cb4b3e3a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192425Z:3f55c02e-bf57-41d0-ba57-9927cb4b3e3a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:24:24 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "3981728c-58ae-47fc-ac85-4b07bca8d840" - ], - "x-ms-correlation-request-id": [ - "3981728c-58ae-47fc-ac85-4b07bca8d840" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192441Z:3981728c-58ae-47fc-ac85-4b07bca8d840" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:24:40 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "ff83650c-09ad-4145-b800-8f88dcd04706" - ], - "x-ms-correlation-request-id": [ - "ff83650c-09ad-4145-b800-8f88dcd04706" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192456Z:ff83650c-09ad-4145-b800-8f88dcd04706" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:24:55 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "398c2fc1-8f68-4f84-8323-727901db86cf" - ], - "x-ms-correlation-request-id": [ - "398c2fc1-8f68-4f84-8323-727901db86cf" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192511Z:398c2fc1-8f68-4f84-8323-727901db86cf" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:25:10 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "fab92a40-a632-4a62-bc3f-8666175ae12b" - ], - "x-ms-correlation-request-id": [ - "fab92a40-a632-4a62-bc3f-8666175ae12b" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192526Z:fab92a40-a632-4a62-bc3f-8666175ae12b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:25:25 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "f58fb9eb-a2d6-493e-a796-2c4172c1fc52" - ], - "x-ms-correlation-request-id": [ - "f58fb9eb-a2d6-493e-a796-2c4172c1fc52" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192541Z:f58fb9eb-a2d6-493e-a796-2c4172c1fc52" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:25:40 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "9a70d02b-a7f0-4293-80af-e703aaa02442" - ], - "x-ms-correlation-request-id": [ - "9a70d02b-a7f0-4293-80af-e703aaa02442" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192556Z:9a70d02b-a7f0-4293-80af-e703aaa02442" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:25:55 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "132ff4c6-9b19-4bce-bdca-f8430e2e7f58" - ], - "x-ms-correlation-request-id": [ - "132ff4c6-9b19-4bce-bdca-f8430e2e7f58" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192611Z:132ff4c6-9b19-4bce-bdca-f8430e2e7f58" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:26:10 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "383eb936-3abe-4999-bb59-a4da6ebd3a63" - ], - "x-ms-correlation-request-id": [ - "383eb936-3abe-4999-bb59-a4da6ebd3a63" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192626Z:383eb936-3abe-4999-bb59-a4da6ebd3a63" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:26:26 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "0cb4496c-f819-4aee-9635-2956763bf175" - ], - "x-ms-correlation-request-id": [ - "0cb4496c-f819-4aee-9635-2956763bf175" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192641Z:0cb4496c-f819-4aee-9635-2956763bf175" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:26:41 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzY5MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZNU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-request-id": [ - "7d2495e2-1645-4799-885b-912a6258babf" - ], - "x-ms-correlation-request-id": [ - "7d2495e2-1645-4799-885b-912a6258babf" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T192641Z:7d2495e2-1645-4799-885b-912a6258babf" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:26:41 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-CreateOriginGroup": [ - "ps6914", - "ps8215", - "ps8923", - "ps9858", - "ps3547", - "ps4057" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginGroupTests/TestGetSetOriginGroup.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginGroupTests/TestGetSetOriginGroup.json deleted file mode 100644 index 03fd23db7db4..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginGroupTests/TestGetSetOriginGroup.json +++ /dev/null @@ -1,1762 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "242c7d97-d985-48a3-bd90-c4e6d14feb86" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "3c2ed168-6fa5-45b6-bbdd-446eb0b8ead7" - ], - "x-ms-correlation-request-id": [ - "3c2ed168-6fa5-45b6-bbdd-446eb0b8ead7" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191459Z:3c2ed168-6fa5-45b6-bbdd-446eb0b8ead7" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:14:58 GMT" - ], - "Content-Length": [ - "161" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps11\",\r\n \"name\": \"ps11\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5c6760e4-51a5-4120-9374-ad2dafd478ac" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a3ca1246-fd4b-417b-849a-cf8060fb5c66" - ], - "x-ms-client-request-id": [ - "5c6760e4-51a5-4120-9374-ad2dafd478ac" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "49b96656-fe1a-4da0-94cd-d707cf4b1a67" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191500Z:49b96656-fe1a-4da0-94cd-d707cf4b1a67" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:15:00 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps11/providers/Microsoft.Cdn/profiles/ps9278?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTEvcHJvdmlkZXJzL01pY3Jvc29mdC5DZG4vcHJvZmlsZXMvcHM5Mjc4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5c6760e4-51a5-4120-9374-ad2dafd478ac" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "80" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6750f572-2d33-4f37-8658-6d3e23544e8b" - ], - "x-ms-client-request-id": [ - "5c6760e4-51a5-4120-9374-ad2dafd478ac" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/operationresults/373cddb4-79b2-4ae6-825e-0cdd70dbda7e?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "9877686f-c53e-4029-a5f0-353bed56f68c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191504Z:9877686f-c53e-4029-a5f0-353bed56f68c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:15:04 GMT" - ], - "Content-Length": [ - "320" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/profiles/ps9278\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps9278\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/operationresults/373cddb4-79b2-4ae6-825e-0cdd70dbda7e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTEvcHJvdmlkZXJzL01pY3Jvc29mdC5DZG4vb3BlcmF0aW9ucmVzdWx0cy8zNzNjZGRiNC03OWIyLTRhZTYtODI1ZS0wY2RkNzBkYmRhN2U/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5c6760e4-51a5-4120-9374-ad2dafd478ac" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "24f84af8-6243-408b-92a7-77cbbd0d06dc" - ], - "x-ms-client-request-id": [ - "5c6760e4-51a5-4120-9374-ad2dafd478ac" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "6af3758d-157a-4c92-bd39-9f4a50726026" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191515Z:6af3758d-157a-4c92-bd39-9f4a50726026" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:15:14 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/operationresults/373cddb4-79b2-4ae6-825e-0cdd70dbda7e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTEvcHJvdmlkZXJzL01pY3Jvc29mdC5DZG4vb3BlcmF0aW9ucmVzdWx0cy8zNzNjZGRiNC03OWIyLTRhZTYtODI1ZS0wY2RkNzBkYmRhN2U/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5c6760e4-51a5-4120-9374-ad2dafd478ac" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "59256067-5d1d-4da7-8863-2df33a5428a0" - ], - "x-ms-client-request-id": [ - "5c6760e4-51a5-4120-9374-ad2dafd478ac" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "adf0b8e1-a341-46fc-ae55-de1cd841bc34" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191525Z:adf0b8e1-a341-46fc-ae55-de1cd841bc34" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:15:24 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps11/providers/Microsoft.Cdn/profiles/ps9278?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTEvcHJvdmlkZXJzL01pY3Jvc29mdC5DZG4vcHJvZmlsZXMvcHM5Mjc4P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5c6760e4-51a5-4120-9374-ad2dafd478ac" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5e4f3e49-ef8f-466b-93b9-d3b13a0f507e" - ], - "x-ms-client-request-id": [ - "5c6760e4-51a5-4120-9374-ad2dafd478ac" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "382938cc-5ee9-47c1-9bd6-3e74bac329d8" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191525Z:382938cc-5ee9-47c1-9bd6-3e74bac329d8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:15:24 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/profiles/ps9278\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps9278\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps2581\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "35c1e1d8-7b13-4d15-9ba3-7337b9b86f3a" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5b4c18e2-0ee4-42a3-b4db-db1ca26a6e26" - ], - "x-ms-client-request-id": [ - "35c1e1d8-7b13-4d15-9ba3-7337b9b86f3a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "483e7960-f2b2-4aff-a3ab-584f2d10ae20" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191527Z:483e7960-f2b2-4aff-a3ab-584f2d10ae20" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:15:26 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTEvcHJvdmlkZXJzL01pY3Jvc29mdC5DZG4vcHJvZmlsZXMvcHM5Mjc4L2VuZHBvaW50cy9wczI1ODE/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"defaultOriginGroup\": {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581/origingroups/ps3238\"\r\n },\r\n \"origins\": [\r\n {\r\n \"name\": \"ps589\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\"\r\n }\r\n }\r\n ],\r\n \"originGroups\": [\r\n {\r\n \"name\": \"ps3238\",\r\n \"properties\": {\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581/origins/ps589\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "35c1e1d8-7b13-4d15-9ba3-7337b9b86f3a" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "747" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ade30c99-9848-4482-b058-fde5f82eb1ae" - ], - "x-ms-client-request-id": [ - "35c1e1d8-7b13-4d15-9ba3-7337b9b86f3a" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/operationresults/51a27153-eb07-42aa-8d55-d324d8408690?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "e9810985-39a4-42d0-beea-577c3a5548dd" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191534Z:e9810985-39a4-42d0-beea-577c3a5548dd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:15:34 GMT" - ], - "Content-Length": [ - "1530" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps2581\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps2581.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps589\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [\r\n {\r\n \"name\": \"ps3238\",\r\n \"properties\": {\r\n \"healthProbeSettings\": null,\r\n \"responseBasedOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": null,\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581/origins/ps589\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"defaultOriginGroup\": {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581/origingroups/ps3238\"\r\n },\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/operationresults/51a27153-eb07-42aa-8d55-d324d8408690?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTEvcHJvdmlkZXJzL01pY3Jvc29mdC5DZG4vb3BlcmF0aW9ucmVzdWx0cy81MWEyNzE1My1lYjA3LTQyYWEtOGQ1NS1kMzI0ZDg0MDg2OTA/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "35c1e1d8-7b13-4d15-9ba3-7337b9b86f3a" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "fa35945f-f121-4765-8810-dfe2bf82b709" - ], - "x-ms-client-request-id": [ - "35c1e1d8-7b13-4d15-9ba3-7337b9b86f3a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "54658023-467a-4725-a7cc-00321eb239af" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191544Z:54658023-467a-4725-a7cc-00321eb239af" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:15:44 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/operationresults/51a27153-eb07-42aa-8d55-d324d8408690?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTEvcHJvdmlkZXJzL01pY3Jvc29mdC5DZG4vb3BlcmF0aW9ucmVzdWx0cy81MWEyNzE1My1lYjA3LTQyYWEtOGQ1NS1kMzI0ZDg0MDg2OTA/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "35c1e1d8-7b13-4d15-9ba3-7337b9b86f3a" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5c54cd89-73a9-4974-b43b-807fb6b7a3cf" - ], - "x-ms-client-request-id": [ - "35c1e1d8-7b13-4d15-9ba3-7337b9b86f3a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "3322a248-d542-4016-8fdf-1a36551f7313" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191554Z:3322a248-d542-4016-8fdf-1a36551f7313" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:15:54 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTEvcHJvdmlkZXJzL01pY3Jvc29mdC5DZG4vcHJvZmlsZXMvcHM5Mjc4L2VuZHBvaW50cy9wczI1ODE/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "35c1e1d8-7b13-4d15-9ba3-7337b9b86f3a" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5cfbb882-eb98-447e-ba6e-a6ebbf347dac" - ], - "x-ms-client-request-id": [ - "35c1e1d8-7b13-4d15-9ba3-7337b9b86f3a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "efdc2496-51c0-4ac2-8764-b7c9f7b17e19" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191555Z:efdc2496-51c0-4ac2-8764-b7c9f7b17e19" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:15:54 GMT" - ], - "Content-Length": [ - "1528" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps2581\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps2581.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps589\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [\r\n {\r\n \"name\": \"ps3238\",\r\n \"properties\": {\r\n \"healthProbeSettings\": null,\r\n \"responseBasedOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": null,\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581/origins/ps589\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"defaultOriginGroup\": {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581/origingroups/ps3238\"\r\n },\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581/originGroups/ps3238?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTEvcHJvdmlkZXJzL01pY3Jvc29mdC5DZG4vcHJvZmlsZXMvcHM5Mjc4L2VuZHBvaW50cy9wczI1ODEvb3JpZ2luR3JvdXBzL3BzMzIzOD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "39478380-d281-481b-a5be-63a9ac211646" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9104d851-6083-44f1-80cf-e992fbdbeab8" - ], - "x-ms-client-request-id": [ - "39478380-d281-481b-a5be-63a9ac211646" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "666f3add-1f32-4788-bf7a-cea4299ec07f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191555Z:666f3add-1f32-4788-bf7a-cea4299ec07f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:15:55 GMT" - ], - "Content-Length": [ - "601" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581/origingroups/ps3238\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/origingroups\",\r\n \"name\": \"ps3238\",\r\n \"properties\": {\r\n \"healthProbeSettings\": null,\r\n \"responseBasedOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": null,\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581/origins/ps589\"\r\n }\r\n ],\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581/originGroups/ps3238?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTEvcHJvdmlkZXJzL01pY3Jvc29mdC5DZG4vcHJvZmlsZXMvcHM5Mjc4L2VuZHBvaW50cy9wczI1ODEvb3JpZ2luR3JvdXBzL3BzMzIzOD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8c852535-da7d-4603-90ff-77c84ec76549" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "17edde1a-8662-41ad-8f33-89ed09b77595" - ], - "x-ms-client-request-id": [ - "8c852535-da7d-4603-90ff-77c84ec76549" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "c9597209-3e76-4354-ba47-9026497e588d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191607Z:c9597209-3e76-4354-ba47-9026497e588d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:16:07 GMT" - ], - "Content-Length": [ - "710" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581/origingroups/ps3238\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/origingroups\",\r\n \"name\": \"ps3238\",\r\n \"properties\": {\r\n \"healthProbeSettings\": {\r\n \"probePath\": \"/health-status.aspx\",\r\n \"probeRequestType\": \"GET\",\r\n \"probeProtocol\": \"Https\",\r\n \"probeIntervalInSeconds\": 120\r\n },\r\n \"responseBasedOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": null,\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581/origins/ps589\"\r\n }\r\n ],\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581/originGroups/ps3238?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMTEvcHJvdmlkZXJzL01pY3Jvc29mdC5DZG4vcHJvZmlsZXMvcHM5Mjc4L2VuZHBvaW50cy9wczI1ODEvb3JpZ2luR3JvdXBzL3BzMzIzOD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"properties\": {\r\n \"healthProbeSettings\": {\r\n \"probePath\": \"/health-status.aspx\",\r\n \"probeRequestType\": \"GET\",\r\n \"probeProtocol\": \"Https\",\r\n \"probeIntervalInSeconds\": 120\r\n },\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581/origins/ps589\"\r\n }\r\n ]\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8c852535-da7d-4603-90ff-77c84ec76549" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "416" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/operationresults/d7938afc-3366-40aa-88e1-c31b6eed1107/profileresults/ps9278/endpointresults/ps2581/origingroupresults/ps3238?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3f4dd12f-f9da-42c7-89d9-06a82617d158" - ], - "x-ms-client-request-id": [ - "8c852535-da7d-4603-90ff-77c84ec76549" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/operationresults/d7938afc-3366-40aa-88e1-c31b6eed1107?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "a391ace1-27d5-4c76-a984-abccb64ff721" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191557Z:a391ace1-27d5-4c76-a984-abccb64ff721" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:15:57 GMT" - ], - "Content-Length": [ - "710" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581/origingroups/ps3238\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/origingroups\",\r\n \"name\": \"ps3238\",\r\n \"properties\": {\r\n \"healthProbeSettings\": {\r\n \"probePath\": \"/health-status.aspx\",\r\n \"probeRequestType\": \"GET\",\r\n \"probeProtocol\": \"Https\",\r\n \"probeIntervalInSeconds\": 120\r\n },\r\n \"responseBasedOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": null,\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/profiles/ps9278/endpoints/ps2581/origins/ps589\"\r\n }\r\n ],\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11/providers/Microsoft.Cdn/operationresults/d7938afc-3366-40aa-88e1-c31b6eed1107?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTEvcHJvdmlkZXJzL01pY3Jvc29mdC5DZG4vb3BlcmF0aW9ucmVzdWx0cy9kNzkzOGFmYy0zMzY2LTQwYWEtODhlMS1jMzFiNmVlZDExMDc/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8c852535-da7d-4603-90ff-77c84ec76549" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "02366db3-c173-4576-8207-df3960490a6c" - ], - "x-ms-client-request-id": [ - "8c852535-da7d-4603-90ff-77c84ec76549" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "584ac5b3-1db2-4078-80cd-e48897ed759d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191607Z:584ac5b3-1db2-4078-80cd-e48897ed759d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:16:07 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps11?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMTE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2dda4b2f-e15f-41d4-8273-6863fe2eca9b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "7683ae7e-4d76-4759-aa94-37d3b15aa3ec" - ], - "x-ms-correlation-request-id": [ - "7683ae7e-4d76-4759-aa94-37d3b15aa3ec" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191608Z:7683ae7e-4d76-4759-aa94-37d3b15aa3ec" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:16:07 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeExWZEZVMVJWVXlJc0ltcHZZa3h2WTJGMGFXOXVJam9pZDJWemRIVnpJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "bf875e2b-9a29-46c2-b113-df77acaebe48" - ], - "x-ms-correlation-request-id": [ - "bf875e2b-9a29-46c2-b113-df77acaebe48" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191623Z:bf875e2b-9a29-46c2-b113-df77acaebe48" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:16:23 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeExWZEZVMVJWVXlJc0ltcHZZa3h2WTJGMGFXOXVJam9pZDJWemRIVnpJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "ff6bb8d0-fe14-454a-a584-cdf77d032319" - ], - "x-ms-correlation-request-id": [ - "ff6bb8d0-fe14-454a-a584-cdf77d032319" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191638Z:ff6bb8d0-fe14-454a-a584-cdf77d032319" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:16:38 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeExWZEZVMVJWVXlJc0ltcHZZa3h2WTJGMGFXOXVJam9pZDJWemRIVnpJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "d235b57d-129d-4171-aa3c-b0b31edb5ab1" - ], - "x-ms-correlation-request-id": [ - "d235b57d-129d-4171-aa3c-b0b31edb5ab1" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191654Z:d235b57d-129d-4171-aa3c-b0b31edb5ab1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:16:53 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeExWZEZVMVJWVXlJc0ltcHZZa3h2WTJGMGFXOXVJam9pZDJWemRIVnpJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "09796e63-d73a-47ef-86f3-2e8bc0fe8294" - ], - "x-ms-correlation-request-id": [ - "09796e63-d73a-47ef-86f3-2e8bc0fe8294" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191709Z:09796e63-d73a-47ef-86f3-2e8bc0fe8294" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:17:09 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeExWZEZVMVJWVXlJc0ltcHZZa3h2WTJGMGFXOXVJam9pZDJWemRIVnpJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "76c5266d-826d-423c-9190-4ff4452c75d8" - ], - "x-ms-correlation-request-id": [ - "76c5266d-826d-423c-9190-4ff4452c75d8" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191724Z:76c5266d-826d-423c-9190-4ff4452c75d8" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:17:24 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeExWZEZVMVJWVXlJc0ltcHZZa3h2WTJGMGFXOXVJam9pZDJWemRIVnpJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "ef2a213d-7554-4b81-88e6-c041b2ad9fc5" - ], - "x-ms-correlation-request-id": [ - "ef2a213d-7554-4b81-88e6-c041b2ad9fc5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191739Z:ef2a213d-7554-4b81-88e6-c041b2ad9fc5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:17:39 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeExWZEZVMVJWVXlJc0ltcHZZa3h2WTJGMGFXOXVJam9pZDJWemRIVnpJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "d8e94dbb-a626-4ae1-a3f2-412825a7d4f8" - ], - "x-ms-correlation-request-id": [ - "d8e94dbb-a626-4ae1-a3f2-412825a7d4f8" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191754Z:d8e94dbb-a626-4ae1-a3f2-412825a7d4f8" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:17:54 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeExWZEZVMVJWVXlJc0ltcHZZa3h2WTJGMGFXOXVJam9pZDJWemRIVnpJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "cf3d6393-c537-4319-ae2b-29653ad7643c" - ], - "x-ms-correlation-request-id": [ - "cf3d6393-c537-4319-ae2b-29653ad7643c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191809Z:cf3d6393-c537-4319-ae2b-29653ad7643c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:18:09 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeExWZEZVMVJWVXlJc0ltcHZZa3h2WTJGMGFXOXVJam9pZDJWemRIVnpJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "d7fc0a60-58fa-4bdc-9bb7-677a2c585a38" - ], - "x-ms-correlation-request-id": [ - "d7fc0a60-58fa-4bdc-9bb7-677a2c585a38" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191824Z:d7fc0a60-58fa-4bdc-9bb7-677a2c585a38" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:18:24 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeExWZEZVMVJWVXlJc0ltcHZZa3h2WTJGMGFXOXVJam9pZDJWemRIVnpJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "9cb82cf0-91ca-4297-8988-917c099c5c33" - ], - "x-ms-correlation-request-id": [ - "9cb82cf0-91ca-4297-8988-917c099c5c33" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191839Z:9cb82cf0-91ca-4297-8988-917c099c5c33" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:18:39 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeExWZEZVMVJWVXlJc0ltcHZZa3h2WTJGMGFXOXVJam9pZDJWemRIVnpJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "dcd91a85-fda4-48a5-a6cf-2a292d84433a" - ], - "x-ms-correlation-request-id": [ - "dcd91a85-fda4-48a5-a6cf-2a292d84433a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191854Z:dcd91a85-fda4-48a5-a6cf-2a292d84433a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:18:54 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzExLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpFeExWZEZVMVJWVXlJc0ltcHZZa3h2WTJGMGFXOXVJam9pZDJWemRIVnpJbjA/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-request-id": [ - "0a1fe5e1-7995-4882-92fb-a7057d3505ee" - ], - "x-ms-correlation-request-id": [ - "0a1fe5e1-7995-4882-92fb-a7057d3505ee" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T191854Z:0a1fe5e1-7995-4882-92fb-a7057d3505ee" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:18:54 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-GetSetOriginGroup": [ - "ps11", - "ps9278", - "ps2581", - "ps3238", - "ps589" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginGroupTests/TestRemoveOriginGroup.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginGroupTests/TestRemoveOriginGroup.json deleted file mode 100644 index 84ef5fd9ec12..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginGroupTests/TestRemoveOriginGroup.json +++ /dev/null @@ -1,1967 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjM5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a3c92165-f769-4d62-956d-78e85d8aae8b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "2ed1baa6-114f-44c5-8d39-c2bad8a8e166" - ], - "x-ms-correlation-request-id": [ - "2ed1baa6-114f-44c5-8d39-c2bad8a8e166" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T191857Z:2ed1baa6-114f-44c5-8d39-c2bad8a8e166" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:18:56 GMT" - ], - "Content-Length": [ - "163" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps639\",\r\n \"name\": \"ps639\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "272e5195-ab0f-4d7b-892b-e7fbe9ec3c91" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5629c38f-11e9-48d9-8490-cec6299cabb6" - ], - "x-ms-client-request-id": [ - "272e5195-ab0f-4d7b-892b-e7fbe9ec3c91" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "b8dc3461-aabb-4c08-9029-fd177a477e5d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T191858Z:b8dc3461-aabb-4c08-9029-fd177a477e5d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:18:58 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps639/providers/Microsoft.Cdn/profiles/ps4013?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNDAxMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "272e5195-ab0f-4d7b-892b-e7fbe9ec3c91" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "80" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ec3c42db-40c7-48c1-8eed-70c52d8d2835" - ], - "x-ms-client-request-id": [ - "272e5195-ab0f-4d7b-892b-e7fbe9ec3c91" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/operationresults/392be682-e7c9-4b9a-8324-05cfaeb5b4e6?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "a2e648fa-d8b1-43e3-ba8e-4a91cceb5a12" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T191901Z:a2e648fa-d8b1-43e3-ba8e-4a91cceb5a12" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:19:01 GMT" - ], - "Content-Length": [ - "321" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/profiles/ps4013\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps4013\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/operationresults/392be682-e7c9-4b9a-8324-05cfaeb5b4e6?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvMzkyYmU2ODItZTdjOS00YjlhLTgzMjQtMDVjZmFlYjViNGU2P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "272e5195-ab0f-4d7b-892b-e7fbe9ec3c91" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "570cfb27-454f-4a52-8b28-84db5e2ed779" - ], - "x-ms-client-request-id": [ - "272e5195-ab0f-4d7b-892b-e7fbe9ec3c91" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "979ecd7c-c5fc-48af-a2e9-959a1daae5d4" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T191911Z:979ecd7c-c5fc-48af-a2e9-959a1daae5d4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:19:11 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/operationresults/392be682-e7c9-4b9a-8324-05cfaeb5b4e6?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvMzkyYmU2ODItZTdjOS00YjlhLTgzMjQtMDVjZmFlYjViNGU2P2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "272e5195-ab0f-4d7b-892b-e7fbe9ec3c91" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "920a8a58-e4d7-49a6-857d-4fd7eb49317e" - ], - "x-ms-client-request-id": [ - "272e5195-ab0f-4d7b-892b-e7fbe9ec3c91" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "32248b12-a706-472d-86bb-5fb580cbfbbb" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T191921Z:32248b12-a706-472d-86bb-5fb580cbfbbb" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:19:21 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps639/providers/Microsoft.Cdn/profiles/ps4013?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNDAxMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "272e5195-ab0f-4d7b-892b-e7fbe9ec3c91" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e1d38125-9195-499d-9fd0-26d4297be5eb" - ], - "x-ms-client-request-id": [ - "272e5195-ab0f-4d7b-892b-e7fbe9ec3c91" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "19027cb2-6bd5-4d51-9b00-7fd951db33ac" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T191921Z:19027cb2-6bd5-4d51-9b00-7fd951db33ac" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:19:21 GMT" - ], - "Content-Length": [ - "320" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/profiles/ps4013\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps4013\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps6532\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "493b29e3-22f6-485b-82c1-2d93f8a105f3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c0f03602-f886-466a-9b90-b1b28e5cae80" - ], - "x-ms-client-request-id": [ - "493b29e3-22f6-485b-82c1-2d93f8a105f3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "cd5435c0-64c0-460b-9c91-3b5c4e7d2de5" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T191922Z:cd5435c0-64c0-460b-9c91-3b5c4e7d2de5" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:19:22 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNDAxMy9lbmRwb2ludHMvcHM2NTMyP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"defaultOriginGroup\": {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532/origingroups/ps5588\"\r\n },\r\n \"origins\": [\r\n {\r\n \"name\": \"ps948\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\"\r\n }\r\n }\r\n ],\r\n \"originGroups\": [\r\n {\r\n \"name\": \"ps5588\",\r\n \"properties\": {\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532/origins/ps948\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "493b29e3-22f6-485b-82c1-2d93f8a105f3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "749" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b2328df6-b526-4f60-8ebd-f87bd1080352" - ], - "x-ms-client-request-id": [ - "493b29e3-22f6-485b-82c1-2d93f8a105f3" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/operationresults/c61eebc1-3da4-44b2-92ab-b6ecca9ed7cc?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "a3a9baed-210a-443b-ac3f-87fb5fa70be0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T191927Z:a3a9baed-210a-443b-ac3f-87fb5fa70be0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:19:26 GMT" - ], - "Content-Length": [ - "1533" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps6532\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps6532.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps948\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [\r\n {\r\n \"name\": \"ps5588\",\r\n \"properties\": {\r\n \"healthProbeSettings\": null,\r\n \"responseBasedOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": null,\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532/origins/ps948\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"defaultOriginGroup\": {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532/origingroups/ps5588\"\r\n },\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/operationresults/c61eebc1-3da4-44b2-92ab-b6ecca9ed7cc?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvYzYxZWViYzEtM2RhNC00NGIyLTkyYWItYjZlY2NhOWVkN2NjP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "493b29e3-22f6-485b-82c1-2d93f8a105f3" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f38140c2-5a1b-4072-b170-d63ff80ca3d5" - ], - "x-ms-client-request-id": [ - "493b29e3-22f6-485b-82c1-2d93f8a105f3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "ab37a997-6592-476c-8ec5-a5b35a3e55c2" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T191937Z:ab37a997-6592-476c-8ec5-a5b35a3e55c2" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:19:36 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/operationresults/c61eebc1-3da4-44b2-92ab-b6ecca9ed7cc?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvYzYxZWViYzEtM2RhNC00NGIyLTkyYWItYjZlY2NhOWVkN2NjP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "493b29e3-22f6-485b-82c1-2d93f8a105f3" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0b5bf2af-f334-491b-b48f-80bd7062db4a" - ], - "x-ms-client-request-id": [ - "493b29e3-22f6-485b-82c1-2d93f8a105f3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "8fde30ed-003e-416f-a69b-703b3e655350" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T191947Z:8fde30ed-003e-416f-a69b-703b3e655350" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:19:46 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNDAxMy9lbmRwb2ludHMvcHM2NTMyP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "493b29e3-22f6-485b-82c1-2d93f8a105f3" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0aa01bb6-c686-48d0-8a56-25869b3ab482" - ], - "x-ms-client-request-id": [ - "493b29e3-22f6-485b-82c1-2d93f8a105f3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "602730a5-449a-4872-a831-7e683da524dc" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T191947Z:602730a5-449a-4872-a831-7e683da524dc" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:19:47 GMT" - ], - "Content-Length": [ - "1531" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps6532\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps6532.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps948\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [\r\n {\r\n \"name\": \"ps5588\",\r\n \"properties\": {\r\n \"healthProbeSettings\": null,\r\n \"responseBasedOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": null,\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532/origins/ps948\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"defaultOriginGroup\": {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532/origingroups/ps5588\"\r\n },\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532/originGroups/ps8092?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNDAxMy9lbmRwb2ludHMvcHM2NTMyL29yaWdpbkdyb3Vwcy9wczgwOTI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"healthProbeSettings\": {\r\n \"probePath\": \"/check-health.aspx\",\r\n \"probeRequestType\": \"HEAD\",\r\n \"probeProtocol\": \"Http\",\r\n \"probeIntervalInSeconds\": 120\r\n },\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532/origins/ps948\"\r\n }\r\n ]\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "40547c9d-b550-4b82-af4f-a574e61a5c88" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "416" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "373d712a-02d6-4c4a-9139-7f088751d56f" - ], - "x-ms-client-request-id": [ - "40547c9d-b550-4b82-af4f-a574e61a5c88" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/operationresults/2e947624-b745-4b17-aaf2-232e4b2aac0e?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "d426058f-3ac8-46a4-96c4-ac504ca55418" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T191949Z:d426058f-3ac8-46a4-96c4-ac504ca55418" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:19:48 GMT" - ], - "Content-Length": [ - "712" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532/origingroups/ps8092\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/origingroups\",\r\n \"name\": \"ps8092\",\r\n \"properties\": {\r\n \"healthProbeSettings\": {\r\n \"probePath\": \"/check-health.aspx\",\r\n \"probeRequestType\": \"HEAD\",\r\n \"probeProtocol\": \"Http\",\r\n \"probeIntervalInSeconds\": 120\r\n },\r\n \"responseBasedOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": null,\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532/origins/ps948\"\r\n }\r\n ],\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/operationresults/2e947624-b745-4b17-aaf2-232e4b2aac0e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvMmU5NDc2MjQtYjc0NS00YjE3LWFhZjItMjMyZTRiMmFhYzBlP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "40547c9d-b550-4b82-af4f-a574e61a5c88" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0a7b0522-d49c-41ec-9113-338c7de4c2c9" - ], - "x-ms-client-request-id": [ - "40547c9d-b550-4b82-af4f-a574e61a5c88" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "ff0d5038-fd58-48c8-bfad-21d5a831c47b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T191959Z:ff0d5038-fd58-48c8-bfad-21d5a831c47b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:19:58 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532/originGroups/ps8092?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNDAxMy9lbmRwb2ludHMvcHM2NTMyL29yaWdpbkdyb3Vwcy9wczgwOTI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "40547c9d-b550-4b82-af4f-a574e61a5c88" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "49f227c6-77fc-4540-b860-0c5b4def0b9c" - ], - "x-ms-client-request-id": [ - "40547c9d-b550-4b82-af4f-a574e61a5c88" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "0884e402-124b-4070-bcd7-5d2c106183f1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T192000Z:0884e402-124b-4070-bcd7-5d2c106183f1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:19:59 GMT" - ], - "Content-Length": [ - "711" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532/origingroups/ps8092\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/origingroups\",\r\n \"name\": \"ps8092\",\r\n \"properties\": {\r\n \"healthProbeSettings\": {\r\n \"probePath\": \"/check-health.aspx\",\r\n \"probeRequestType\": \"HEAD\",\r\n \"probeProtocol\": \"Http\",\r\n \"probeIntervalInSeconds\": 120\r\n },\r\n \"responseBasedOriginErrorDetectionSettings\": null,\r\n \"trafficRestorationTimeToHealedOrNewEndpointsInMinutes\": null,\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532/origins/ps948\"\r\n }\r\n ],\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532/originGroups/ps8092?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNDAxMy9lbmRwb2ludHMvcHM2NTMyL29yaWdpbkdyb3Vwcy9wczgwOTI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1d8620a5-28bb-4d46-a996-09a38ffcc9c3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "29691a1c-f053-4fba-a584-6123eb2ee17e" - ], - "x-ms-client-request-id": [ - "1d8620a5-28bb-4d46-a996-09a38ffcc9c3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-correlation-request-id": [ - "9675fe86-d7e9-476c-a559-6cbc1145b0be" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T192011Z:9675fe86-d7e9-476c-a559-6cbc1145b0be" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:20:10 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532/originGroups/ps8092?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNDAxMy9lbmRwb2ludHMvcHM2NTMyL29yaWdpbkdyb3Vwcy9wczgwOTI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d5a63b00-304b-4b7b-9c5c-2b9396d2c880" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/operationresults/63347541-2523-40c6-8533-94adde3aa3b2/profileresults/ps4013/endpointresults/ps6532/origingroupresults/ps8092?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a6010a9d-2dd7-415a-bbcd-5b32509e871a" - ], - "x-ms-client-request-id": [ - "d5a63b00-304b-4b7b-9c5c-2b9396d2c880" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/operationresults/63347541-2523-40c6-8533-94adde3aa3b2?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-correlation-request-id": [ - "eaf223b7-d84d-4128-b835-d7e29b6754be" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T192001Z:eaf223b7-d84d-4128-b835-d7e29b6754be" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:20:00 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/operationresults/63347541-2523-40c6-8533-94adde3aa3b2?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvNjMzNDc1NDEtMjUyMy00MGM2LTg1MzMtOTRhZGRlM2FhM2IyP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d5a63b00-304b-4b7b-9c5c-2b9396d2c880" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b260dedf-d8d4-4ed1-af73-235c29f1a822" - ], - "x-ms-client-request-id": [ - "d5a63b00-304b-4b7b-9c5c-2b9396d2c880" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "41bad9d4-aac4-4227-9b52-1977ebedc939" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T192011Z:41bad9d4-aac4-4227-9b52-1977ebedc939" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:20:10 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/operationresults/63347541-2523-40c6-8533-94adde3aa3b2/profileresults/ps4013/endpointresults/ps6532/origingroupresults/ps8092?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL29wZXJhdGlvbnJlc3VsdHMvNjMzNDc1NDEtMjUyMy00MGM2LTg1MzMtOTRhZGRlM2FhM2IyL3Byb2ZpbGVyZXN1bHRzL3BzNDAxMy9lbmRwb2ludHJlc3VsdHMvcHM2NTMyL29yaWdpbmdyb3VwcmVzdWx0cy9wczgwOTI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d5a63b00-304b-4b7b-9c5c-2b9396d2c880" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "61ccdc9f-39fe-4241-b5e4-be6e3b60e8f0" - ], - "x-ms-correlation-request-id": [ - "61ccdc9f-39fe-4241-b5e4-be6e3b60e8f0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T192011Z:61ccdc9f-39fe-4241-b5e4-be6e3b60e8f0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:20:10 GMT" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "236" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"InvalidResourceType\",\r\n \"message\": \"Resource type 'operationresults/profileresults/endpointresults/origingroupresults' of provider namespace 'Microsoft.Cdn' was not found in global location for api version '2020-09-01'.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532/originGroups/ps8092?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNjM5L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzL3BzNDAxMy9lbmRwb2ludHMvcHM2NTMyL29yaWdpbkdyb3Vwcy9wczgwOTI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"properties\": {\r\n \"healthProbeSettings\": {\r\n \"probeRequestType\": \"NotSet\",\r\n \"probeProtocol\": \"NotSet\",\r\n \"probeIntervalInSeconds\": 60\r\n },\r\n \"origins\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639/providers/Microsoft.Cdn/profiles/ps4013/endpoints/ps6532/origins/ps948\"\r\n }\r\n ]\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5bc4a141-34fc-44e3-b432-d89825fbd655" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "377" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f81cc8dc-cf89-4e3a-b3c9-c641dce81c05" - ], - "x-ms-client-request-id": [ - "5bc4a141-34fc-44e3-b432-d89825fbd655" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "87c24b49-4809-4765-b5f3-15225625d9fd" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T192012Z:87c24b49-4809-4765-b5f3-15225625d9fd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:20:11 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps639?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNjM5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c7ff3008-7ab4-486d-86a9-58ddb468015e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "acd1cbc4-40bd-421d-922f-533ffdbde7fc" - ], - "x-ms-correlation-request-id": [ - "acd1cbc4-40bd-421d-922f-533ffdbde7fc" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T192017Z:acd1cbc4-40bd-421d-922f-533ffdbde7fc" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:20:16 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZek9TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "54a1395d-9ceb-473a-ba37-8e33c1991703" - ], - "x-ms-correlation-request-id": [ - "54a1395d-9ceb-473a-ba37-8e33c1991703" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T192032Z:54a1395d-9ceb-473a-ba37-8e33c1991703" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:20:31 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZek9TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "a1436fc8-01a3-4aae-b01f-d6aeec3bd9a7" - ], - "x-ms-correlation-request-id": [ - "a1436fc8-01a3-4aae-b01f-d6aeec3bd9a7" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T192047Z:a1436fc8-01a3-4aae-b01f-d6aeec3bd9a7" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:20:46 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZek9TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "5b2c9630-9d08-47be-8db4-5b648c4ac491" - ], - "x-ms-correlation-request-id": [ - "5b2c9630-9d08-47be-8db4-5b648c4ac491" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T192102Z:5b2c9630-9d08-47be-8db4-5b648c4ac491" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:21:01 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZek9TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "2e322a40-8a93-4d3a-bcbc-9f8f1fbf39ad" - ], - "x-ms-correlation-request-id": [ - "2e322a40-8a93-4d3a-bcbc-9f8f1fbf39ad" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T192117Z:2e322a40-8a93-4d3a-bcbc-9f8f1fbf39ad" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:21:16 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZek9TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "60f1e34e-4d3d-4045-a835-a3faef937b3b" - ], - "x-ms-correlation-request-id": [ - "60f1e34e-4d3d-4045-a835-a3faef937b3b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T192132Z:60f1e34e-4d3d-4045-a835-a3faef937b3b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:21:31 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZek9TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "ec618914-8492-448a-b47f-b12008bfa80d" - ], - "x-ms-correlation-request-id": [ - "ec618914-8492-448a-b47f-b12008bfa80d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T192147Z:ec618914-8492-448a-b47f-b12008bfa80d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:21:47 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZek9TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "deb6aaea-d6ee-437f-b540-0ef827690767" - ], - "x-ms-correlation-request-id": [ - "deb6aaea-d6ee-437f-b540-0ef827690767" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T192202Z:deb6aaea-d6ee-437f-b540-0ef827690767" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:22:02 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZek9TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "08eb6b91-8e3f-47fe-9eda-5d683d4227f6" - ], - "x-ms-correlation-request-id": [ - "08eb6b91-8e3f-47fe-9eda-5d683d4227f6" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T192217Z:08eb6b91-8e3f-47fe-9eda-5d683d4227f6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:22:17 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZek9TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "2ada4b60-17b9-4ed1-ab70-b298c05472a1" - ], - "x-ms-correlation-request-id": [ - "2ada4b60-17b9-4ed1-ab70-b298c05472a1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T192232Z:2ada4b60-17b9-4ed1-ab70-b298c05472a1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:22:32 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZek9TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "23df5863-0b65-4e07-af67-dc0a26ebfcae" - ], - "x-ms-correlation-request-id": [ - "23df5863-0b65-4e07-af67-dc0a26ebfcae" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T192247Z:23df5863-0b65-4e07-af67-dc0a26ebfcae" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:22:47 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzYzOS1XRVNUVVMiLCJqb2JMb2NhdGlvbiI6Indlc3R1cyJ9?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpZek9TMVhSVk5VVlZNaUxDSnFiMkpNYjJOaGRHbHZiaUk2SW5kbGMzUjFjeUo5P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "8ddccf17-27cc-4b6b-9d7f-81749e5d27ce" - ], - "x-ms-correlation-request-id": [ - "8ddccf17-27cc-4b6b-9d7f-81749e5d27ce" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T192247Z:8ddccf17-27cc-4b6b-9d7f-81749e5d27ce" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:22:47 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-RemoveOriginGroup": [ - "ps639", - "ps4013", - "ps6532", - "ps5588", - "ps948", - "ps8092" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginTests/TestOriginGetSetWhenEndpointDoesnotExist.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginTests/TestOriginGetSetWhenEndpointDoesnotExist.json deleted file mode 100644 index 84a5e73fdc48..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginTests/TestOriginGetSetWhenEndpointDoesnotExist.json +++ /dev/null @@ -1,1875 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2734?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjczND9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "11561b37-6e28-44e8-afbc-c60173aa7895" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "a1ce2e89-e863-41bd-ac2b-212a6011f92f" - ], - "x-ms-correlation-request-id": [ - "a1ce2e89-e863-41bd-ac2b-212a6011f92f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195025Z:a1ce2e89-e863-41bd-ac2b-212a6011f92f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:50:24 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2734\",\r\n \"name\": \"ps2734\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c1d56c31-41c3-4246-a4fc-c4280079e086" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b72ceea2-e781-4d22-b84f-06f222ec0adc" - ], - "x-ms-client-request-id": [ - "c1d56c31-41c3-4246-a4fc-c4280079e086" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "3f869bf9-14f6-482f-807f-b7fdfcab3b74" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195026Z:3f869bf9-14f6-482f-807f-b7fdfcab3b74" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:50:26 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2734/providers/Microsoft.Cdn/profiles/ps3408?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjczNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczM0MDg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c1d56c31-41c3-4246-a4fc-c4280079e086" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "78" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f65c89c9-c086-4350-b3ec-cce5c0e04d3e" - ], - "x-ms-client-request-id": [ - "c1d56c31-41c3-4246-a4fc-c4280079e086" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2734/providers/Microsoft.Cdn/operationresults/14c8fdc5-3e2b-4436-a4be-0dcc5d1a10c4?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "23" - ], - "x-ms-correlation-request-id": [ - "e24b8524-6805-42de-86b0-21b251247201" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195030Z:e24b8524-6805-42de-86b0-21b251247201" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:50:30 GMT" - ], - "Content-Length": [ - "320" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2734/providers/Microsoft.Cdn/profiles/ps3408\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps3408\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2734/providers/Microsoft.Cdn/operationresults/14c8fdc5-3e2b-4436-a4be-0dcc5d1a10c4?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjczNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzE0YzhmZGM1LTNlMmItNDQzNi1hNGJlLTBkY2M1ZDFhMTBjND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c1d56c31-41c3-4246-a4fc-c4280079e086" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f1a55dc1-93f3-41b2-bcb2-cdae09842601" - ], - "x-ms-client-request-id": [ - "c1d56c31-41c3-4246-a4fc-c4280079e086" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "e472d441-cb82-4b4b-874a-8c38485f39e6" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195041Z:e472d441-cb82-4b4b-874a-8c38485f39e6" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:50:40 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2734/providers/Microsoft.Cdn/operationresults/14c8fdc5-3e2b-4436-a4be-0dcc5d1a10c4?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjczNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzE0YzhmZGM1LTNlMmItNDQzNi1hNGJlLTBkY2M1ZDFhMTBjND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c1d56c31-41c3-4246-a4fc-c4280079e086" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f90f2f70-6387-4ed7-adf8-2ba3b1d9b1b1" - ], - "x-ms-client-request-id": [ - "c1d56c31-41c3-4246-a4fc-c4280079e086" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-correlation-request-id": [ - "9b0e3461-6d34-435a-a697-efc1613931c4" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195051Z:9b0e3461-6d34-435a-a697-efc1613931c4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:50:50 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2734/providers/Microsoft.Cdn/operationresults/14c8fdc5-3e2b-4436-a4be-0dcc5d1a10c4?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjczNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzE0YzhmZGM1LTNlMmItNDQzNi1hNGJlLTBkY2M1ZDFhMTBjND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c1d56c31-41c3-4246-a4fc-c4280079e086" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "eb0e6a9e-a86f-494a-b22b-108b3d8902e0" - ], - "x-ms-client-request-id": [ - "c1d56c31-41c3-4246-a4fc-c4280079e086" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-correlation-request-id": [ - "640df773-fe8e-41e2-98fa-210781c6fa0c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195101Z:640df773-fe8e-41e2-98fa-210781c6fa0c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:51:01 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2734/providers/Microsoft.Cdn/operationresults/14c8fdc5-3e2b-4436-a4be-0dcc5d1a10c4?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjczNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzE0YzhmZGM1LTNlMmItNDQzNi1hNGJlLTBkY2M1ZDFhMTBjND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c1d56c31-41c3-4246-a4fc-c4280079e086" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d89f3f3b-24b7-4b00-aab7-304eba9dda50" - ], - "x-ms-client-request-id": [ - "c1d56c31-41c3-4246-a4fc-c4280079e086" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-correlation-request-id": [ - "4f58cff5-9d5c-404b-a144-6e81966d2375" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195111Z:4f58cff5-9d5c-404b-a144-6e81966d2375" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:51:11 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2734/providers/Microsoft.Cdn/operationresults/14c8fdc5-3e2b-4436-a4be-0dcc5d1a10c4?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjczNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzE0YzhmZGM1LTNlMmItNDQzNi1hNGJlLTBkY2M1ZDFhMTBjND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c1d56c31-41c3-4246-a4fc-c4280079e086" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e5610205-288a-433c-b764-8ecf4ac4f8a4" - ], - "x-ms-client-request-id": [ - "c1d56c31-41c3-4246-a4fc-c4280079e086" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-correlation-request-id": [ - "9862ff1b-1199-49d7-a86b-2026e018ba0f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195121Z:9862ff1b-1199-49d7-a86b-2026e018ba0f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:51:21 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2734/providers/Microsoft.Cdn/profiles/ps3408?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjczNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczM0MDg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c1d56c31-41c3-4246-a4fc-c4280079e086" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c8864eb8-9878-436b-adca-ba6d1a05586f" - ], - "x-ms-client-request-id": [ - "c1d56c31-41c3-4246-a4fc-c4280079e086" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "908c0080-22b7-437b-b03f-97f58a83071f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195121Z:908c0080-22b7-437b-b03f-97f58a83071f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:51:21 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2734/providers/Microsoft.Cdn/profiles/ps3408\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps3408\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps3719\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ac8de4ef-8f6c-4cb3-9cd6-bf95bf11ecb8" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "686978cb-2b53-49c2-a103-0a4b6057e052" - ], - "x-ms-client-request-id": [ - "ac8de4ef-8f6c-4cb3-9cd6-bf95bf11ecb8" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "fa4ba05f-61f6-4345-ae22-c33ab04805c0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195122Z:fa4ba05f-61f6-4345-ae22-c33ab04805c0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:51:22 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2734/providers/Microsoft.Cdn/profiles/ps3408/endpoints/ps3719?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjczNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczM0MDgvZW5kcG9pbnRzL3BzMzcxOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"origins\": [\r\n {\r\n \"name\": \"ps4801\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 80\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ac8de4ef-8f6c-4cb3-9cd6-bf95bf11ecb8" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "229" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2b235a5e-ecd6-4d47-9ca8-49579d6f91f2" - ], - "x-ms-client-request-id": [ - "ac8de4ef-8f6c-4cb3-9cd6-bf95bf11ecb8" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2734/providers/Microsoft.Cdn/operationresults/2baee0bf-7646-49e2-91c6-52f97a0e6210?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "98" - ], - "x-ms-correlation-request-id": [ - "8c53ede7-4b83-4700-9705-e57406874a5b" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195126Z:8c53ede7-4b83-4700-9705-e57406874a5b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:51:26 GMT" - ], - "Content-Length": [ - "1048" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2734/providers/Microsoft.Cdn/profiles/ps3408/endpoints/ps3719\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps3719\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps3719.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps4801\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2734/providers/Microsoft.Cdn/operationresults/2baee0bf-7646-49e2-91c6-52f97a0e6210?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjczNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzJiYWVlMGJmLTc2NDYtNDllMi05MWM2LTUyZjk3YTBlNjIxMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ac8de4ef-8f6c-4cb3-9cd6-bf95bf11ecb8" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "593d91a6-4af4-40ee-a971-0d400aefc4e0" - ], - "x-ms-client-request-id": [ - "ac8de4ef-8f6c-4cb3-9cd6-bf95bf11ecb8" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-correlation-request-id": [ - "67d39b00-8f36-4fd5-a554-26458eecc96c" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195136Z:67d39b00-8f36-4fd5-a554-26458eecc96c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:51:36 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2734/providers/Microsoft.Cdn/operationresults/2baee0bf-7646-49e2-91c6-52f97a0e6210?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjczNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzJiYWVlMGJmLTc2NDYtNDllMi05MWM2LTUyZjk3YTBlNjIxMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ac8de4ef-8f6c-4cb3-9cd6-bf95bf11ecb8" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8f96bae7-7bc9-4386-844a-b3e629c336e4" - ], - "x-ms-client-request-id": [ - "ac8de4ef-8f6c-4cb3-9cd6-bf95bf11ecb8" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11986" - ], - "x-ms-correlation-request-id": [ - "e416e707-f3ca-4563-b9a9-1a02ec9b4379" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195147Z:e416e707-f3ca-4563-b9a9-1a02ec9b4379" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:51:46 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2734/providers/Microsoft.Cdn/profiles/ps3408/endpoints/ps3719?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjczNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczM0MDgvZW5kcG9pbnRzL3BzMzcxOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ac8de4ef-8f6c-4cb3-9cd6-bf95bf11ecb8" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7f020917-1160-451a-95f0-7709a761bc79" - ], - "x-ms-client-request-id": [ - "ac8de4ef-8f6c-4cb3-9cd6-bf95bf11ecb8" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "5d17994a-9650-493e-84aa-516752f43504" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195147Z:5d17994a-9650-493e-84aa-516752f43504" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:51:46 GMT" - ], - "Content-Length": [ - "1046" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2734/providers/Microsoft.Cdn/profiles/ps3408/endpoints/ps3719\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps3719\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps3719.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps4801\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2734/providers/Microsoft.Cdn/profiles/ps3408/endpoints/ps3719/origins/ps4801?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjczNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczM0MDgvZW5kcG9pbnRzL3BzMzcxOS9vcmlnaW5zL3BzNDgwMT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "12928c24-7843-4c67-ab31-ef30f608bb16" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a4a69114-7bcb-43a8-bfcb-71dc637812c7" - ], - "x-ms-client-request-id": [ - "12928c24-7843-4c67-ab31-ef30f608bb16" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11985" - ], - "x-ms-correlation-request-id": [ - "2174bc8c-15ef-4162-986b-73d087db34fd" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195147Z:2174bc8c-15ef-4162-986b-73d087db34fd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:51:46 GMT" - ], - "Content-Length": [ - "566" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2734/providers/Microsoft.Cdn/profiles/ps3408/endpoints/ps3719/origins/ps4801\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/origins\",\r\n \"name\": \"ps4801\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": null,\r\n \"resourceState\": \"Active\",\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2734/providers/Microsoft.Cdn/profiles/ps3408/endpoints/ps3719/origins/thisisnotanoriginname?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjczNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczM0MDgvZW5kcG9pbnRzL3BzMzcxOS9vcmlnaW5zL3RoaXNpc25vdGFub3JpZ2lubmFtZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f33b2d5e-e818-43d5-a7e8-4d29eae7b054" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "84085ac9-bb2e-4ad7-9cb6-ecd831a31e6e" - ], - "x-ms-client-request-id": [ - "f33b2d5e-e818-43d5-a7e8-4d29eae7b054" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11984" - ], - "x-ms-correlation-request-id": [ - "cdd96aee-d3b5-4a30-9759-484d912e9442" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195148Z:cdd96aee-d3b5-4a30-9759-484d912e9442" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:51:47 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/notarg/providers/Microsoft.Cdn/profiles/notaprofile/endpoints/notanendpoint/origins/ps4801?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL25vdGFyZy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9ub3RhcHJvZmlsZS9lbmRwb2ludHMvbm90YW5lbmRwb2ludC9vcmlnaW5zL3BzNDgwMT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 80\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f97324af-770b-45ed-867e-6faf0069c4b5" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "86" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "082cf7dd-d15b-40ca-a0c6-7691742e1758" - ], - "x-ms-correlation-request-id": [ - "082cf7dd-d15b-40ca-a0c6-7691742e1758" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195148Z:082cf7dd-d15b-40ca-a0c6-7691742e1758" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:51:47 GMT" - ], - "Content-Length": [ - "98" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceGroupNotFound\",\r\n \"message\": \"Resource group 'notarg' could not be found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2734?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjczND9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1b7eae83-3bac-4e06-bc04-10a17a6b3c88" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "e4a56264-a464-486d-906c-0cee302ba1f6" - ], - "x-ms-correlation-request-id": [ - "e4a56264-a464-486d-906c-0cee302ba1f6" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195149Z:e4a56264-a464-486d-906c-0cee302ba1f6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:51:48 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM016UXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "b3bf4616-1e05-4cf5-b9a1-f29b83fed3d0" - ], - "x-ms-correlation-request-id": [ - "b3bf4616-1e05-4cf5-b9a1-f29b83fed3d0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195204Z:b3bf4616-1e05-4cf5-b9a1-f29b83fed3d0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:52:03 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM016UXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "accfde68-7a67-4f5e-85db-74b39cd2524a" - ], - "x-ms-correlation-request-id": [ - "accfde68-7a67-4f5e-85db-74b39cd2524a" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195219Z:accfde68-7a67-4f5e-85db-74b39cd2524a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:52:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM016UXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "f6e6f226-e012-4647-b06d-9983c717a1af" - ], - "x-ms-correlation-request-id": [ - "f6e6f226-e012-4647-b06d-9983c717a1af" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195234Z:f6e6f226-e012-4647-b06d-9983c717a1af" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:52:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM016UXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "ba9df861-1c99-41e4-ae77-163d9d0aa940" - ], - "x-ms-correlation-request-id": [ - "ba9df861-1c99-41e4-ae77-163d9d0aa940" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195249Z:ba9df861-1c99-41e4-ae77-163d9d0aa940" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:52:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM016UXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "f7f9fa70-a8c7-4ff2-96ae-cbc1043451ea" - ], - "x-ms-correlation-request-id": [ - "f7f9fa70-a8c7-4ff2-96ae-cbc1043451ea" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195304Z:f7f9fa70-a8c7-4ff2-96ae-cbc1043451ea" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:53:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM016UXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "410022b1-1012-4c60-be70-9c0b0481d8f2" - ], - "x-ms-correlation-request-id": [ - "410022b1-1012-4c60-be70-9c0b0481d8f2" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195319Z:410022b1-1012-4c60-be70-9c0b0481d8f2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:53:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM016UXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "08dfc9f8-56bc-45b0-942e-04aef2b2c5d4" - ], - "x-ms-correlation-request-id": [ - "08dfc9f8-56bc-45b0-942e-04aef2b2c5d4" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195335Z:08dfc9f8-56bc-45b0-942e-04aef2b2c5d4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:53:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM016UXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "9609f403-adb4-47c0-a9cf-3afb14e5c2fd" - ], - "x-ms-correlation-request-id": [ - "9609f403-adb4-47c0-a9cf-3afb14e5c2fd" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195350Z:9609f403-adb4-47c0-a9cf-3afb14e5c2fd" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:53:50 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM016UXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "c942da1f-aca0-4a66-aa89-3be896700146" - ], - "x-ms-correlation-request-id": [ - "c942da1f-aca0-4a66-aa89-3be896700146" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195405Z:c942da1f-aca0-4a66-aa89-3be896700146" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:54:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM016UXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "07009d2a-0ef2-469d-8aae-87f783dec6ac" - ], - "x-ms-correlation-request-id": [ - "07009d2a-0ef2-469d-8aae-87f783dec6ac" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195420Z:07009d2a-0ef2-469d-8aae-87f783dec6ac" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:54:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM016UXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "f46f8af1-409d-4de8-999d-67f895b22b11" - ], - "x-ms-correlation-request-id": [ - "f46f8af1-409d-4de8-999d-67f895b22b11" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195435Z:f46f8af1-409d-4de8-999d-67f895b22b11" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:54:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3MzQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM016UXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "122cda72-9c8b-4230-9d84-67c9f79a514b" - ], - "x-ms-correlation-request-id": [ - "122cda72-9c8b-4230-9d84-67c9f79a514b" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195435Z:122cda72-9c8b-4230-9d84-67c9f79a514b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:54:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-OriginGetSetWhenEndpointDoesnotExist": [ - "ps3408", - "ps2734", - "ps3719", - "ps4801" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginTests/TestOriginGetSetWithRunningEndpoint.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginTests/TestOriginGetSetWithRunningEndpoint.json deleted file mode 100644 index 387473250b54..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginTests/TestOriginGetSetWithRunningEndpoint.json +++ /dev/null @@ -1,1950 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzEzNz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e1b60bd2-b44a-4be0-8574-0a15f775c417" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-request-id": [ - "16d31f41-16e0-4b6d-9bf6-a66f0f5cb472" - ], - "x-ms-correlation-request-id": [ - "16d31f41-16e0-4b6d-9bf6-a66f0f5cb472" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195913Z:16d31f41-16e0-4b6d-9bf6-a66f0f5cb472" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:59:12 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3137\",\r\n \"name\": \"ps3137\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "eafa761b-b477-45b7-afb6-ee2d4391eca0" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5affc8ae-04cb-433d-a103-eec1dabae7f4" - ], - "x-ms-client-request-id": [ - "eafa761b-b477-45b7-afb6-ee2d4391eca0" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "4d0d5a6c-859d-4548-8b3c-9629bc1354f2" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195914Z:4d0d5a6c-859d-4548-8b3c-9629bc1354f2" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:59:14 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3137/providers/Microsoft.Cdn/profiles/ps2960?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzEzNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczI5NjA/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "eafa761b-b477-45b7-afb6-ee2d4391eca0" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "78" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "551490e1-a33e-4a5c-be9d-fd05c367fccd" - ], - "x-ms-client-request-id": [ - "eafa761b-b477-45b7-afb6-ee2d4391eca0" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/operationresults/066011cb-47a6-4282-be72-73c61ecc6202?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "4bb716e9-f3c1-4b49-8d32-19d59bd70e69" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195919Z:4bb716e9-f3c1-4b49-8d32-19d59bd70e69" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:59:18 GMT" - ], - "Content-Length": [ - "320" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/profiles/ps2960\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps2960\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/operationresults/066011cb-47a6-4282-be72-73c61ecc6202?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzEzNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzA2NjAxMWNiLTQ3YTYtNDI4Mi1iZTcyLTczYzYxZWNjNjIwMj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "eafa761b-b477-45b7-afb6-ee2d4391eca0" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7a52137b-dc05-403c-a69b-7cc776286d1e" - ], - "x-ms-client-request-id": [ - "eafa761b-b477-45b7-afb6-ee2d4391eca0" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "2da4193e-0c46-49ae-9ec8-9ae568f1d133" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195929Z:2da4193e-0c46-49ae-9ec8-9ae568f1d133" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:59:28 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/operationresults/066011cb-47a6-4282-be72-73c61ecc6202?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzEzNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzA2NjAxMWNiLTQ3YTYtNDI4Mi1iZTcyLTczYzYxZWNjNjIwMj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "eafa761b-b477-45b7-afb6-ee2d4391eca0" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9092405d-de2e-40c3-b9aa-ee6a2372966b" - ], - "x-ms-client-request-id": [ - "eafa761b-b477-45b7-afb6-ee2d4391eca0" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "0b4955f6-e0fd-42e7-98fc-f4c3b23ea1a8" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195939Z:0b4955f6-e0fd-42e7-98fc-f4c3b23ea1a8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:59:39 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/operationresults/066011cb-47a6-4282-be72-73c61ecc6202?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzEzNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzA2NjAxMWNiLTQ3YTYtNDI4Mi1iZTcyLTczYzYxZWNjNjIwMj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "eafa761b-b477-45b7-afb6-ee2d4391eca0" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "fca1e527-0548-44d6-99b7-00049dbd16d0" - ], - "x-ms-client-request-id": [ - "eafa761b-b477-45b7-afb6-ee2d4391eca0" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "c8c1e906-e545-4302-b554-aecbd35a4380" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195949Z:c8c1e906-e545-4302-b554-aecbd35a4380" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:59:49 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/operationresults/066011cb-47a6-4282-be72-73c61ecc6202?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzEzNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzA2NjAxMWNiLTQ3YTYtNDI4Mi1iZTcyLTczYzYxZWNjNjIwMj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "eafa761b-b477-45b7-afb6-ee2d4391eca0" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "abe1fbdc-8426-4fc3-b9f7-b2f2f9741173" - ], - "x-ms-client-request-id": [ - "eafa761b-b477-45b7-afb6-ee2d4391eca0" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "7aa2a6c5-0dc2-43ef-b39b-f2174a5257e0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T195959Z:7aa2a6c5-0dc2-43ef-b39b-f2174a5257e0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:59:59 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/operationresults/066011cb-47a6-4282-be72-73c61ecc6202?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzEzNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzA2NjAxMWNiLTQ3YTYtNDI4Mi1iZTcyLTczYzYxZWNjNjIwMj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "eafa761b-b477-45b7-afb6-ee2d4391eca0" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "acca65bc-7079-4cd5-9c06-0e531c1d6b58" - ], - "x-ms-client-request-id": [ - "eafa761b-b477-45b7-afb6-ee2d4391eca0" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "c7194fa1-4ebb-472c-9997-307881304686" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200009Z:c7194fa1-4ebb-472c-9997-307881304686" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:00:09 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3137/providers/Microsoft.Cdn/profiles/ps2960?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzEzNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczI5NjA/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "eafa761b-b477-45b7-afb6-ee2d4391eca0" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "aeaeb264-19d1-4dc9-88b6-83bd745c590d" - ], - "x-ms-client-request-id": [ - "eafa761b-b477-45b7-afb6-ee2d4391eca0" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "d7bcdc6c-034c-417f-8551-cd4cd9665beb" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200010Z:d7bcdc6c-034c-417f-8551-cd4cd9665beb" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:00:09 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/profiles/ps2960\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps2960\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps7141\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5194a71d-3616-4c97-88e6-180f3df88d42" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "48530c80-5d2f-42cb-97a6-adfe70209a85" - ], - "x-ms-client-request-id": [ - "5194a71d-3616-4c97-88e6-180f3df88d42" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "c597335a-f7b1-48b6-b64b-77301b5b9996" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200011Z:c597335a-f7b1-48b6-b64b-77301b5b9996" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:00:11 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3137/providers/Microsoft.Cdn/profiles/ps2960/endpoints/ps7141?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzEzNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczI5NjAvZW5kcG9pbnRzL3BzNzE0MT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"origins\": [\r\n {\r\n \"name\": \"ps5730\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 80\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5194a71d-3616-4c97-88e6-180f3df88d42" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "229" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "77a20321-ff79-415f-a57f-a85701ba562e" - ], - "x-ms-client-request-id": [ - "5194a71d-3616-4c97-88e6-180f3df88d42" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/operationresults/e3ac81b6-1f37-4e08-b374-9c94a0480ed6?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "021fda0e-b15d-4940-a70a-bcf33f78a82b" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200016Z:021fda0e-b15d-4940-a70a-bcf33f78a82b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:00:16 GMT" - ], - "Content-Length": [ - "1048" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/profiles/ps2960/endpoints/ps7141\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps7141\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps7141.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps5730\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/operationresults/e3ac81b6-1f37-4e08-b374-9c94a0480ed6?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzEzNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2UzYWM4MWI2LTFmMzctNGUwOC1iMzc0LTljOTRhMDQ4MGVkNj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5194a71d-3616-4c97-88e6-180f3df88d42" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a4302f2e-96b0-4c60-9995-233e712bc0e7" - ], - "x-ms-client-request-id": [ - "5194a71d-3616-4c97-88e6-180f3df88d42" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "ce6cddfe-5f8d-4a6e-9075-9e43efdc85b6" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200027Z:ce6cddfe-5f8d-4a6e-9075-9e43efdc85b6" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:00:26 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/operationresults/e3ac81b6-1f37-4e08-b374-9c94a0480ed6?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzEzNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2UzYWM4MWI2LTFmMzctNGUwOC1iMzc0LTljOTRhMDQ4MGVkNj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5194a71d-3616-4c97-88e6-180f3df88d42" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1b27a29b-e3f0-41b0-a4f9-75360999b52e" - ], - "x-ms-client-request-id": [ - "5194a71d-3616-4c97-88e6-180f3df88d42" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "05ba4822-eca7-411b-be0c-e83f15ce2fee" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200037Z:05ba4822-eca7-411b-be0c-e83f15ce2fee" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:00:36 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3137/providers/Microsoft.Cdn/profiles/ps2960/endpoints/ps7141?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzEzNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczI5NjAvZW5kcG9pbnRzL3BzNzE0MT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5194a71d-3616-4c97-88e6-180f3df88d42" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "912f9f4a-689b-43b4-9e7e-cf02c692cdee" - ], - "x-ms-client-request-id": [ - "5194a71d-3616-4c97-88e6-180f3df88d42" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "22794798-1314-453d-90b0-ca0a02b38298" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200037Z:22794798-1314-453d-90b0-ca0a02b38298" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:00:36 GMT" - ], - "Content-Length": [ - "1046" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/profiles/ps2960/endpoints/ps7141\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps7141\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps7141.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps5730\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3137/providers/Microsoft.Cdn/profiles/ps2960/endpoints/ps7141/origins/ps5730?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzEzNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczI5NjAvZW5kcG9pbnRzL3BzNzE0MS9vcmlnaW5zL3BzNTczMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "34e395d2-b156-4b52-94c0-7a7de36e54dc" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "aab78c8b-08fc-4d2e-b982-f0e966e3fdcf" - ], - "x-ms-client-request-id": [ - "34e395d2-b156-4b52-94c0-7a7de36e54dc" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "a83aae82-758f-4d0e-9d56-3fe7681796d5" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200037Z:a83aae82-758f-4d0e-9d56-3fe7681796d5" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:00:37 GMT" - ], - "Content-Length": [ - "566" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/profiles/ps2960/endpoints/ps7141/origins/ps5730\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/origins\",\r\n \"name\": \"ps5730\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": null,\r\n \"resourceState\": \"Active\",\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3137/providers/Microsoft.Cdn/profiles/ps2960/endpoints/ps7141/origins/ps5730?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzEzNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczI5NjAvZW5kcG9pbnRzL3BzNzE0MS9vcmlnaW5zL3BzNTczMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "747c9219-0db9-4039-be1d-4334196a2705" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5d6d36eb-955a-4eda-ad41-c5a70d229466" - ], - "x-ms-client-request-id": [ - "747c9219-0db9-4039-be1d-4334196a2705" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-correlation-request-id": [ - "92d2d069-8ebd-4cb1-960d-9c7aa084d530" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200049Z:92d2d069-8ebd-4cb1-960d-9c7aa084d530" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:00:49 GMT" - ], - "Content-Length": [ - "562" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/profiles/ps2960/endpoints/ps7141/origins/ps5730\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/origins\",\r\n \"name\": \"ps5730\",\r\n \"properties\": {\r\n \"hostName\": \"www.azure.com\",\r\n \"httpPort\": 789,\r\n \"httpsPort\": 456,\r\n \"resourceState\": \"Active\",\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3137/providers/Microsoft.Cdn/profiles/ps2960/endpoints/ps7141/origins/ps5730?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzEzNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczI5NjAvZW5kcG9pbnRzL3BzNzE0MS9vcmlnaW5zL3BzNTczMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"properties\": {\r\n \"hostName\": \"www.azure.com\",\r\n \"httpPort\": 789,\r\n \"httpsPort\": 456\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "747c9219-0db9-4039-be1d-4334196a2705" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "106" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/operationresults/78c49f36-1050-490e-8efc-bcc3585a0116/profileresults/ps2960/endpointresults/ps7141/originresults/ps5730?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "af8160a1-dbee-4eec-b057-1deb96d51c1b" - ], - "x-ms-client-request-id": [ - "747c9219-0db9-4039-be1d-4334196a2705" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/operationresults/78c49f36-1050-490e-8efc-bcc3585a0116?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "0f010631-54d2-4dd0-9f77-82a5966ee04d" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200039Z:0f010631-54d2-4dd0-9f77-82a5966ee04d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:00:38 GMT" - ], - "Content-Length": [ - "562" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/profiles/ps2960/endpoints/ps7141/origins/ps5730\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/origins\",\r\n \"name\": \"ps5730\",\r\n \"properties\": {\r\n \"hostName\": \"www.azure.com\",\r\n \"httpPort\": 789,\r\n \"httpsPort\": 456,\r\n \"resourceState\": \"Active\",\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137/providers/Microsoft.Cdn/operationresults/78c49f36-1050-490e-8efc-bcc3585a0116?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzEzNy9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzc4YzQ5ZjM2LTEwNTAtNDkwZS04ZWZjLWJjYzM1ODVhMDExNj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "747c9219-0db9-4039-be1d-4334196a2705" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "76dfcbc7-ae78-4bbe-afa3-a5528b77d086" - ], - "x-ms-client-request-id": [ - "747c9219-0db9-4039-be1d-4334196a2705" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-correlation-request-id": [ - "3be5aba8-4c50-45b8-91d9-19b08359f098" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200049Z:3be5aba8-4c50-45b8-91d9-19b08359f098" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:00:48 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3137?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzEzNz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7ea93446-5aec-491a-8a78-b3c2e45cdc02" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" - ], - "x-ms-request-id": [ - "2fdcccec-3df8-42b9-8b23-92c19d9f2588" - ], - "x-ms-correlation-request-id": [ - "2fdcccec-3df8-42b9-8b23-92c19d9f2588" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200050Z:2fdcccec-3df8-42b9-8b23-92c19d9f2588" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:00:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeE16Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "fccbfa34-dad3-4af6-8f07-e00d4c1d00dc" - ], - "x-ms-correlation-request-id": [ - "fccbfa34-dad3-4af6-8f07-e00d4c1d00dc" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200105Z:fccbfa34-dad3-4af6-8f07-e00d4c1d00dc" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:01:05 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeE16Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "0a5b01ef-65e7-4bbc-be82-aaccbe9f41ab" - ], - "x-ms-correlation-request-id": [ - "0a5b01ef-65e7-4bbc-be82-aaccbe9f41ab" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200121Z:0a5b01ef-65e7-4bbc-be82-aaccbe9f41ab" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:01:20 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeE16Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "b8a1be1a-def3-4ba8-9838-6bca73db5dd0" - ], - "x-ms-correlation-request-id": [ - "b8a1be1a-def3-4ba8-9838-6bca73db5dd0" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200136Z:b8a1be1a-def3-4ba8-9838-6bca73db5dd0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:01:36 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeE16Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-request-id": [ - "a8108219-6a0f-4da1-ad5c-c31c3af3cedc" - ], - "x-ms-correlation-request-id": [ - "a8108219-6a0f-4da1-ad5c-c31c3af3cedc" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200151Z:a8108219-6a0f-4da1-ad5c-c31c3af3cedc" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:01:50 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeE16Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11986" - ], - "x-ms-request-id": [ - "d3fe80c3-b216-4591-861c-0a9437c6b1a8" - ], - "x-ms-correlation-request-id": [ - "d3fe80c3-b216-4591-861c-0a9437c6b1a8" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200206Z:d3fe80c3-b216-4591-861c-0a9437c6b1a8" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:02:05 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeE16Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11985" - ], - "x-ms-request-id": [ - "8abb3ac9-3c0d-449f-a091-9d13c32b7123" - ], - "x-ms-correlation-request-id": [ - "8abb3ac9-3c0d-449f-a091-9d13c32b7123" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200221Z:8abb3ac9-3c0d-449f-a091-9d13c32b7123" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:02:20 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeE16Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11984" - ], - "x-ms-request-id": [ - "ba70dca6-19ae-4d3f-80b5-1d9613850666" - ], - "x-ms-correlation-request-id": [ - "ba70dca6-19ae-4d3f-80b5-1d9613850666" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200236Z:ba70dca6-19ae-4d3f-80b5-1d9613850666" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:02:36 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeE16Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11983" - ], - "x-ms-request-id": [ - "c93ea7f8-2440-48b4-8360-2f7180b82713" - ], - "x-ms-correlation-request-id": [ - "c93ea7f8-2440-48b4-8360-2f7180b82713" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200251Z:c93ea7f8-2440-48b4-8360-2f7180b82713" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:02:51 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeE16Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11982" - ], - "x-ms-request-id": [ - "7021727d-f2e3-489b-a40b-3d9fc0a4f20e" - ], - "x-ms-correlation-request-id": [ - "7021727d-f2e3-489b-a40b-3d9fc0a4f20e" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200306Z:7021727d-f2e3-489b-a40b-3d9fc0a4f20e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:03:06 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeE16Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11981" - ], - "x-ms-request-id": [ - "170788a3-956a-4127-bdae-6434e2dca23f" - ], - "x-ms-correlation-request-id": [ - "170788a3-956a-4127-bdae-6434e2dca23f" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200321Z:170788a3-956a-4127-bdae-6434e2dca23f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:03:21 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeE16Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11980" - ], - "x-ms-request-id": [ - "e00a5041-21d0-4cf2-b1fb-6ca73e8c3cb1" - ], - "x-ms-correlation-request-id": [ - "e00a5041-21d0-4cf2-b1fb-6ca73e8c3cb1" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200337Z:e00a5041-21d0-4cf2-b1fb-6ca73e8c3cb1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:03:36 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMxMzctV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNeE16Y3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11979" - ], - "x-ms-request-id": [ - "fd70aeaa-9b8f-4781-adcf-d13adea9d905" - ], - "x-ms-correlation-request-id": [ - "fd70aeaa-9b8f-4781-adcf-d13adea9d905" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T200337Z:fd70aeaa-9b8f-4781-adcf-d13adea9d905" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 20:03:36 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-OriginGetSetWithRunningEndpoint": [ - "ps2960", - "ps3137", - "ps7141", - "ps5730" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginTests/TestOriginGetSetWithStoppedEndpoint.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginTests/TestOriginGetSetWithStoppedEndpoint.json deleted file mode 100644 index 2b459463b681..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginTests/TestOriginGetSetWithStoppedEndpoint.json +++ /dev/null @@ -1,2079 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzU0NT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b7a5e411-167d-496d-91d1-8791a0cd6046" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "fbb61321-a33d-4564-9112-84a99fc59db1" - ], - "x-ms-correlation-request-id": [ - "fbb61321-a33d-4564-9112-84a99fc59db1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195438Z:fbb61321-a33d-4564-9112-84a99fc59db1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:54:37 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3545\",\r\n \"name\": \"ps3545\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c4a89e35-ddf7-4ce4-9e1e-a987465eeb37" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a7a00bdb-a914-43be-a506-37bb679c88e5" - ], - "x-ms-client-request-id": [ - "c4a89e35-ddf7-4ce4-9e1e-a987465eeb37" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "01039848-65f6-4cd8-9b0e-ece28fe4f8d0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195439Z:01039848-65f6-4cd8-9b0e-ece28fe4f8d0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:54:38 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3545/providers/Microsoft.Cdn/profiles/ps6444?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzU0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NDQ/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c4a89e35-ddf7-4ce4-9e1e-a987465eeb37" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "78" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "aad528eb-c8f5-454c-bab4-43ca82ef25f0" - ], - "x-ms-client-request-id": [ - "c4a89e35-ddf7-4ce4-9e1e-a987465eeb37" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/operationresults/013fefce-e63f-4ca6-bece-9d085dec6803?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "c50957a5-4e41-4e85-a88a-82a913b8585c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195442Z:c50957a5-4e41-4e85-a88a-82a913b8585c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:54:42 GMT" - ], - "Content-Length": [ - "320" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/profiles/ps6444\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6444\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/operationresults/013fefce-e63f-4ca6-bece-9d085dec6803?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzU0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzAxM2ZlZmNlLWU2M2YtNGNhNi1iZWNlLTlkMDg1ZGVjNjgwMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c4a89e35-ddf7-4ce4-9e1e-a987465eeb37" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "78925a93-a56a-419a-a4b4-3cbf2c71b86f" - ], - "x-ms-client-request-id": [ - "c4a89e35-ddf7-4ce4-9e1e-a987465eeb37" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "31455ac8-4f46-40fb-9c61-449d62e3c19b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195452Z:31455ac8-4f46-40fb-9c61-449d62e3c19b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:54:52 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/operationresults/013fefce-e63f-4ca6-bece-9d085dec6803?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzU0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzAxM2ZlZmNlLWU2M2YtNGNhNi1iZWNlLTlkMDg1ZGVjNjgwMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c4a89e35-ddf7-4ce4-9e1e-a987465eeb37" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "cf27e856-3777-4ef0-828a-e818d3cf7986" - ], - "x-ms-client-request-id": [ - "c4a89e35-ddf7-4ce4-9e1e-a987465eeb37" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "9def3c4d-0b0a-4fe3-8e40-24ee8654274b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195502Z:9def3c4d-0b0a-4fe3-8e40-24ee8654274b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:55:02 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/operationresults/013fefce-e63f-4ca6-bece-9d085dec6803?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzU0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzAxM2ZlZmNlLWU2M2YtNGNhNi1iZWNlLTlkMDg1ZGVjNjgwMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c4a89e35-ddf7-4ce4-9e1e-a987465eeb37" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "041c2c16-7852-46ff-b17b-288840ce9525" - ], - "x-ms-client-request-id": [ - "c4a89e35-ddf7-4ce4-9e1e-a987465eeb37" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "ed2abd44-9d89-41ec-843a-2add6ac80122" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195512Z:ed2abd44-9d89-41ec-843a-2add6ac80122" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:55:12 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/operationresults/013fefce-e63f-4ca6-bece-9d085dec6803?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzU0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzAxM2ZlZmNlLWU2M2YtNGNhNi1iZWNlLTlkMDg1ZGVjNjgwMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c4a89e35-ddf7-4ce4-9e1e-a987465eeb37" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "231d45ec-43a2-46c5-b41c-800f1736de84" - ], - "x-ms-client-request-id": [ - "c4a89e35-ddf7-4ce4-9e1e-a987465eeb37" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "2ff6a195-060c-4ad2-a4e1-2f76b16f8171" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195522Z:2ff6a195-060c-4ad2-a4e1-2f76b16f8171" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:55:22 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/operationresults/013fefce-e63f-4ca6-bece-9d085dec6803?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzU0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzAxM2ZlZmNlLWU2M2YtNGNhNi1iZWNlLTlkMDg1ZGVjNjgwMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c4a89e35-ddf7-4ce4-9e1e-a987465eeb37" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c23de711-4b1e-47d2-945b-4ddd7270d992" - ], - "x-ms-client-request-id": [ - "c4a89e35-ddf7-4ce4-9e1e-a987465eeb37" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "6db64436-d1a6-46b0-a48e-266819ddbc69" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195533Z:6db64436-d1a6-46b0-a48e-266819ddbc69" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:55:32 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3545/providers/Microsoft.Cdn/profiles/ps6444?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzU0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NDQ/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c4a89e35-ddf7-4ce4-9e1e-a987465eeb37" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5b71f6f8-422e-4afa-aac0-6bf461a7bc10" - ], - "x-ms-client-request-id": [ - "c4a89e35-ddf7-4ce4-9e1e-a987465eeb37" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "629167ee-56df-4bb2-8527-094bfe5e2c18" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195533Z:629167ee-56df-4bb2-8527-094bfe5e2c18" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:55:32 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/profiles/ps6444\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6444\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps4066\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5cd980aa-49c8-4d62-a53d-2fc69c02d9ee" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "30013cbc-5e9d-4e3c-8845-f45c3ef3726b" - ], - "x-ms-client-request-id": [ - "5cd980aa-49c8-4d62-a53d-2fc69c02d9ee" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "23479e51-5ad9-4d26-b156-461fcc9b017a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195534Z:23479e51-5ad9-4d26-b156-461fcc9b017a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:55:33 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3545/providers/Microsoft.Cdn/profiles/ps6444/endpoints/ps4066?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzU0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NDQvZW5kcG9pbnRzL3BzNDA2Nj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"origins\": [\r\n {\r\n \"name\": \"ps1000\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 80\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5cd980aa-49c8-4d62-a53d-2fc69c02d9ee" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "229" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d3d15c9c-504a-48fb-9da7-4b4b60346caa" - ], - "x-ms-client-request-id": [ - "5cd980aa-49c8-4d62-a53d-2fc69c02d9ee" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/operationresults/65ad6c34-d14b-4b38-8e75-d4aefc95431e?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "1d701cdd-b9ff-4b27-9b7c-8943c63f2fa6" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195538Z:1d701cdd-b9ff-4b27-9b7c-8943c63f2fa6" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:55:37 GMT" - ], - "Content-Length": [ - "1048" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/profiles/ps6444/endpoints/ps4066\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps4066\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps4066.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps1000\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/operationresults/65ad6c34-d14b-4b38-8e75-d4aefc95431e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzU0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzY1YWQ2YzM0LWQxNGItNGIzOC04ZTc1LWQ0YWVmYzk1NDMxZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5cd980aa-49c8-4d62-a53d-2fc69c02d9ee" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "99a5913a-b076-4584-81c7-f44bcac851a1" - ], - "x-ms-client-request-id": [ - "5cd980aa-49c8-4d62-a53d-2fc69c02d9ee" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "ed9cfed1-c45c-4175-8f84-de1312b2ac3e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195548Z:ed9cfed1-c45c-4175-8f84-de1312b2ac3e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:55:47 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/operationresults/65ad6c34-d14b-4b38-8e75-d4aefc95431e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzU0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzY1YWQ2YzM0LWQxNGItNGIzOC04ZTc1LWQ0YWVmYzk1NDMxZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5cd980aa-49c8-4d62-a53d-2fc69c02d9ee" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "25c0e694-5acb-4f41-a1ae-bf1425714fa8" - ], - "x-ms-client-request-id": [ - "5cd980aa-49c8-4d62-a53d-2fc69c02d9ee" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "2acec69b-152f-46a8-bf06-f2ac3bc0e932" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195558Z:2acec69b-152f-46a8-bf06-f2ac3bc0e932" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:55:57 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3545/providers/Microsoft.Cdn/profiles/ps6444/endpoints/ps4066?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzU0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NDQvZW5kcG9pbnRzL3BzNDA2Nj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5cd980aa-49c8-4d62-a53d-2fc69c02d9ee" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "73a95dfb-181e-4ec6-a20e-2d73a04d2775" - ], - "x-ms-client-request-id": [ - "5cd980aa-49c8-4d62-a53d-2fc69c02d9ee" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "254f8d49-4558-410e-b8d3-a9e3b0ed74f0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195559Z:254f8d49-4558-410e-b8d3-a9e3b0ed74f0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:55:58 GMT" - ], - "Content-Length": [ - "1046" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/profiles/ps6444/endpoints/ps4066\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps4066\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps4066.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps1000\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3545/providers/Microsoft.Cdn/profiles/ps6444/endpoints/ps4066/stop?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzU0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NDQvZW5kcG9pbnRzL3BzNDA2Ni9zdG9wP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "abf88fa9-0950-4e10-ad54-383693c14673" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/operationresults/04a35ea1-4346-49e6-bc1c-f252f10fcaf9/profileresults/ps6444/endpointresults/ps4066?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6a2d16ac-d8ae-462c-a4b4-2dfd8bf2d385" - ], - "x-ms-client-request-id": [ - "abf88fa9-0950-4e10-ad54-383693c14673" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/operationresults/04a35ea1-4346-49e6-bc1c-f252f10fcaf9?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "6f989b9f-d5f3-47b1-9a30-6c15071e6b64" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195600Z:6f989b9f-d5f3-47b1-9a30-6c15071e6b64" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:55:59 GMT" - ], - "Content-Length": [ - "1047" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/profiles/ps6444/endpoints/ps4066\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps4066\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps4066.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps1000\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Stopping\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/operationresults/04a35ea1-4346-49e6-bc1c-f252f10fcaf9?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzU0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzA0YTM1ZWExLTQzNDYtNDllNi1iYzFjLWYyNTJmMTBmY2FmOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "abf88fa9-0950-4e10-ad54-383693c14673" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d8019511-84dd-4f8c-bca8-368247a33997" - ], - "x-ms-client-request-id": [ - "abf88fa9-0950-4e10-ad54-383693c14673" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "badb7778-48a2-4ea2-a916-52584b63d998" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195610Z:badb7778-48a2-4ea2-a916-52584b63d998" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:56:09 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/operationresults/04a35ea1-4346-49e6-bc1c-f252f10fcaf9?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzU0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzA0YTM1ZWExLTQzNDYtNDllNi1iYzFjLWYyNTJmMTBmY2FmOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "abf88fa9-0950-4e10-ad54-383693c14673" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b334e545-f0b0-4782-8b06-1474f49b4ed4" - ], - "x-ms-client-request-id": [ - "abf88fa9-0950-4e10-ad54-383693c14673" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-correlation-request-id": [ - "9f97ce31-d262-468c-b3cd-1892a2791698" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195620Z:9f97ce31-d262-468c-b3cd-1892a2791698" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:56:19 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/operationresults/04a35ea1-4346-49e6-bc1c-f252f10fcaf9/profileresults/ps6444/endpointresults/ps4066?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzU0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzA0YTM1ZWExLTQzNDYtNDllNi1iYzFjLWYyNTJmMTBmY2FmOS9wcm9maWxlcmVzdWx0cy9wczY0NDQvZW5kcG9pbnRyZXN1bHRzL3BzNDA2Nj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "abf88fa9-0950-4e10-ad54-383693c14673" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "65b014f0-2fe4-4057-ad66-33a5b325a25b" - ], - "x-ms-client-request-id": [ - "abf88fa9-0950-4e10-ad54-383693c14673" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-correlation-request-id": [ - "0377522a-311d-4672-bebc-680d8e85be99" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195620Z:0377522a-311d-4672-bebc-680d8e85be99" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:56:19 GMT" - ], - "Content-Length": [ - "1141" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/operationresults/04a35ea1-4346-49e6-bc1c-f252f10fcaf9/profileresults/ps6444/endpointresults/ps4066\",\r\n \"type\": \"Microsoft.Cdn/operationresults/profileresults/endpointresults\",\r\n \"name\": \"ps4066\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps4066.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps1000\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Stopped\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3545/providers/Microsoft.Cdn/profiles/ps6444/endpoints/ps4066/origins/ps1000?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzU0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NDQvZW5kcG9pbnRzL3BzNDA2Ni9vcmlnaW5zL3BzMTAwMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5fb2bfa0-fcd8-41c0-b2d4-558991099312" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5224c1d4-270f-46e9-b10c-06d349987a9f" - ], - "x-ms-client-request-id": [ - "5fb2bfa0-fcd8-41c0-b2d4-558991099312" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-correlation-request-id": [ - "686065a3-de89-4838-ba9b-b1056541becd" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195621Z:686065a3-de89-4838-ba9b-b1056541becd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:56:20 GMT" - ], - "Content-Length": [ - "566" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/profiles/ps6444/endpoints/ps4066/origins/ps1000\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/origins\",\r\n \"name\": \"ps1000\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": null,\r\n \"resourceState\": \"Active\",\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3545/providers/Microsoft.Cdn/profiles/ps6444/endpoints/ps4066/origins/ps1000?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzU0NS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY0NDQvZW5kcG9pbnRzL3BzNDA2Ni9vcmlnaW5zL3BzMTAwMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"properties\": {\r\n \"hostName\": \"www.azure.com\",\r\n \"httpPort\": 789,\r\n \"httpsPort\": 456\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "78cb5030-751c-4cb0-b716-b1d25f53daf3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "106" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6a272b52-b3f1-482d-8693-2399b356bf54" - ], - "x-ms-client-request-id": [ - "78cb5030-751c-4cb0-b716-b1d25f53daf3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "a9c0e9d8-b267-462f-9d2f-19b162ae673e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195622Z:a9c0e9d8-b267-462f-9d2f-19b162ae673e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:56:21 GMT" - ], - "Content-Length": [ - "562" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545/providers/Microsoft.Cdn/profiles/ps6444/endpoints/ps4066/origins/ps1000\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/origins\",\r\n \"name\": \"ps1000\",\r\n \"properties\": {\r\n \"hostName\": \"www.azure.com\",\r\n \"httpPort\": 789,\r\n \"httpsPort\": 456,\r\n \"resourceState\": \"Active\",\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3545?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzU0NT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "082b6a7a-ab53-45fe-b3f6-7a95009eeed0" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "1dc70af0-b1fb-4e5f-a96e-3f181dc03705" - ], - "x-ms-correlation-request-id": [ - "1dc70af0-b1fb-4e5f-a96e-3f181dc03705" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195622Z:1dc70af0-b1fb-4e5f-a96e-3f181dc03705" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:56:21 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNMU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "1c009238-230e-4a2f-ac9b-a6006c7d1795" - ], - "x-ms-correlation-request-id": [ - "1c009238-230e-4a2f-ac9b-a6006c7d1795" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195637Z:1c009238-230e-4a2f-ac9b-a6006c7d1795" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:56:36 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNMU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "3feb66a7-def8-41e1-87e2-69d3655be87c" - ], - "x-ms-correlation-request-id": [ - "3feb66a7-def8-41e1-87e2-69d3655be87c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195652Z:3feb66a7-def8-41e1-87e2-69d3655be87c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:56:51 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNMU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "304821fa-aa4e-4bfa-853b-f92b71206a88" - ], - "x-ms-correlation-request-id": [ - "304821fa-aa4e-4bfa-853b-f92b71206a88" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195707Z:304821fa-aa4e-4bfa-853b-f92b71206a88" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:57:06 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNMU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "b2f6ad57-17e8-4311-be48-b88508b061fe" - ], - "x-ms-correlation-request-id": [ - "b2f6ad57-17e8-4311-be48-b88508b061fe" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195722Z:b2f6ad57-17e8-4311-be48-b88508b061fe" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:57:22 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNMU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "73867604-ca84-4f51-9a56-7287efa1bba4" - ], - "x-ms-correlation-request-id": [ - "73867604-ca84-4f51-9a56-7287efa1bba4" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195737Z:73867604-ca84-4f51-9a56-7287efa1bba4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:57:37 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNMU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "8d61a533-2fc3-4c4d-949a-dae3f4ab307c" - ], - "x-ms-correlation-request-id": [ - "8d61a533-2fc3-4c4d-949a-dae3f4ab307c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195752Z:8d61a533-2fc3-4c4d-949a-dae3f4ab307c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:57:52 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNMU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "c621f294-b94f-47eb-a794-5e1369ab6bd1" - ], - "x-ms-correlation-request-id": [ - "c621f294-b94f-47eb-a794-5e1369ab6bd1" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195807Z:c621f294-b94f-47eb-a794-5e1369ab6bd1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:58:07 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNMU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "88b69a6d-4163-4c8b-8fd7-ecb0e6f6a715" - ], - "x-ms-correlation-request-id": [ - "88b69a6d-4163-4c8b-8fd7-ecb0e6f6a715" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195822Z:88b69a6d-4163-4c8b-8fd7-ecb0e6f6a715" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:58:22 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNMU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "c8b00f13-a120-4f6a-9e49-7629153e172b" - ], - "x-ms-correlation-request-id": [ - "c8b00f13-a120-4f6a-9e49-7629153e172b" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195837Z:c8b00f13-a120-4f6a-9e49-7629153e172b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:58:37 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNMU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "2c719c0a-50e9-4a55-97e1-022fe87ab3ca" - ], - "x-ms-correlation-request-id": [ - "2c719c0a-50e9-4a55-97e1-022fe87ab3ca" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195853Z:2c719c0a-50e9-4a55-97e1-022fe87ab3ca" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:58:52 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNMU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "c1134393-4d45-4e60-9ce7-a8a097d3a36f" - ], - "x-ms-correlation-request-id": [ - "c1134393-4d45-4e60-9ce7-a8a097d3a36f" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195908Z:c1134393-4d45-4e60-9ce7-a8a097d3a36f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:59:07 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM1NDUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNMU5EVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "b296907f-1d99-4880-b0f9-e17425abca2c" - ], - "x-ms-correlation-request-id": [ - "b296907f-1d99-4880-b0f9-e17425abca2c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195908Z:b296907f-1d99-4880-b0f9-e17425abca2c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:59:07 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-OriginGetSetWithStoppedEndpoint": [ - "ps6444", - "ps3545", - "ps4066", - "ps1000" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginTests/TestSetOriginProperties.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginTests/TestSetOriginProperties.json deleted file mode 100644 index 9d85672e61dd..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.OriginTests/TestSetOriginProperties.json +++ /dev/null @@ -1,1761 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8915?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODkxNT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "29b3318b-d24e-4864-b70d-7b081ea805fa" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "2f47519f-f6d5-4bbd-883a-3a591abc9efd" - ], - "x-ms-correlation-request-id": [ - "2f47519f-f6d5-4bbd-883a-3a591abc9efd" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194632Z:2f47519f-f6d5-4bbd-883a-3a591abc9efd" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:46:31 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8915\",\r\n \"name\": \"ps8915\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "810ebd61-1f1c-4345-85d8-c1216e0871d3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "dd573925-c4f2-4029-9945-c527f6a2e7c0" - ], - "x-ms-client-request-id": [ - "810ebd61-1f1c-4345-85d8-c1216e0871d3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "0055f6de-5ec7-4e85-9ba8-869af36a4a59" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194633Z:0055f6de-5ec7-4e85-9ba8-869af36a4a59" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:46:32 GMT" - ], - "Content-Length": [ - "35328" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/TestPuyu/providers/Microsoft.Cdn/profiles/puyuCdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"puyuCdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-global-testinprod\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rgpuyu/providers/Microsoft.Cdn/profiles/quick-pre-profile-01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"quick-pre-profile-01\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"d3c65b3c-2968-459f-91f2-b0a7376d1b02\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3428/providers/Microsoft.Cdn/profiles/profile3910\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3910\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8915/providers/Microsoft.Cdn/profiles/ps8712?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODkxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg3MTI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "810ebd61-1f1c-4345-85d8-c1216e0871d3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "80" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2bffbaf6-de7f-4d47-87c4-73c559fdb7c9" - ], - "x-ms-client-request-id": [ - "810ebd61-1f1c-4345-85d8-c1216e0871d3" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8915/providers/Microsoft.Cdn/operationresults/7b51a500-82b9-4a18-a584-4bf3d28d0d44?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "e687b163-2b69-4ed5-930f-f73f69dc16c2" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194636Z:e687b163-2b69-4ed5-930f-f73f69dc16c2" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:46:35 GMT" - ], - "Content-Length": [ - "322" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8915/providers/Microsoft.Cdn/profiles/ps8712\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps8712\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8915/providers/Microsoft.Cdn/operationresults/7b51a500-82b9-4a18-a584-4bf3d28d0d44?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODkxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdiNTFhNTAwLTgyYjktNGExOC1hNTg0LTRiZjNkMjhkMGQ0ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "810ebd61-1f1c-4345-85d8-c1216e0871d3" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5de3ebfb-5f9b-4d76-a648-d812862f37b7" - ], - "x-ms-client-request-id": [ - "810ebd61-1f1c-4345-85d8-c1216e0871d3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "ff643706-70cf-4ef1-b580-2a6df4606a69" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194646Z:ff643706-70cf-4ef1-b580-2a6df4606a69" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:46:46 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8915/providers/Microsoft.Cdn/operationresults/7b51a500-82b9-4a18-a584-4bf3d28d0d44?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODkxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzdiNTFhNTAwLTgyYjktNGExOC1hNTg0LTRiZjNkMjhkMGQ0ND9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "810ebd61-1f1c-4345-85d8-c1216e0871d3" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "467bc4c9-01f4-4acd-b130-3167ff89c5af" - ], - "x-ms-client-request-id": [ - "810ebd61-1f1c-4345-85d8-c1216e0871d3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "15e48dc7-9096-46b0-8c7e-9858720ca690" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194656Z:15e48dc7-9096-46b0-8c7e-9858720ca690" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:46:56 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8915/providers/Microsoft.Cdn/profiles/ps8712?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODkxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg3MTI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "810ebd61-1f1c-4345-85d8-c1216e0871d3" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "51b65234-1de8-4731-99cf-d8d47e3a77d1" - ], - "x-ms-client-request-id": [ - "810ebd61-1f1c-4345-85d8-c1216e0871d3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "05a6b622-78fd-4c69-87b7-299b99e106b6" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194657Z:05a6b622-78fd-4c69-87b7-299b99e106b6" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:46:57 GMT" - ], - "Content-Length": [ - "321" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8915/providers/Microsoft.Cdn/profiles/ps8712\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps8712\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps5936\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7e62f30b-93b3-423e-99c3-561eb751169e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1f8f7dc3-e89d-4454-9ad8-f31b88710501" - ], - "x-ms-client-request-id": [ - "7e62f30b-93b3-423e-99c3-561eb751169e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "5c9eabb4-367f-4073-99da-66b1e483b51a" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194657Z:5c9eabb4-367f-4073-99da-66b1e483b51a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:46:57 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8915/providers/Microsoft.Cdn/profiles/ps8712/endpoints/ps5936?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODkxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg3MTIvZW5kcG9pbnRzL3BzNTkzNj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"origins\": [\r\n {\r\n \"name\": \"ps2350\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\"\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"Global\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7e62f30b-93b3-423e-99c3-561eb751169e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "202" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "955840d7-370e-4689-91b2-e119843494a2" - ], - "x-ms-client-request-id": [ - "7e62f30b-93b3-423e-99c3-561eb751169e" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8915/providers/Microsoft.Cdn/operationresults/afef45e1-180d-46a2-9863-754e8dd15bc3?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "a2e57fb0-e442-4438-8173-3e568703a62d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194702Z:a2e57fb0-e442-4438-8173-3e568703a62d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:47:02 GMT" - ], - "Content-Length": [ - "1047" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8915/providers/Microsoft.Cdn/profiles/ps8712/endpoints/ps5936\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps5936\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps5936.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps2350\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8915/providers/Microsoft.Cdn/operationresults/afef45e1-180d-46a2-9863-754e8dd15bc3?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODkxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2FmZWY0NWUxLTE4MGQtNDZhMi05ODYzLTc1NGU4ZGQxNWJjMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7e62f30b-93b3-423e-99c3-561eb751169e" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "fbf6df15-8e46-45cc-b784-be4f366f2992" - ], - "x-ms-client-request-id": [ - "7e62f30b-93b3-423e-99c3-561eb751169e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "71465376-e29f-4a8a-abe2-10f468d50153" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194712Z:71465376-e29f-4a8a-abe2-10f468d50153" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:47:12 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8915/providers/Microsoft.Cdn/operationresults/afef45e1-180d-46a2-9863-754e8dd15bc3?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODkxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2FmZWY0NWUxLTE4MGQtNDZhMi05ODYzLTc1NGU4ZGQxNWJjMz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7e62f30b-93b3-423e-99c3-561eb751169e" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "fd1fb8e2-de63-499c-8378-211970ec301e" - ], - "x-ms-client-request-id": [ - "7e62f30b-93b3-423e-99c3-561eb751169e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "756ac748-1529-4760-b931-59ba95e542fe" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194722Z:756ac748-1529-4760-b931-59ba95e542fe" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:47:22 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8915/providers/Microsoft.Cdn/profiles/ps8712/endpoints/ps5936?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODkxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg3MTIvZW5kcG9pbnRzL3BzNTkzNj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7e62f30b-93b3-423e-99c3-561eb751169e" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4f6b62d9-d4e4-466a-8890-b29147874d37" - ], - "x-ms-client-request-id": [ - "7e62f30b-93b3-423e-99c3-561eb751169e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "9878e7ca-d97b-4a1d-b197-2a51a16e835c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194722Z:9878e7ca-d97b-4a1d-b197-2a51a16e835c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:47:22 GMT" - ], - "Content-Length": [ - "1045" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8915/providers/Microsoft.Cdn/profiles/ps8712/endpoints/ps5936\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps5936\",\r\n \"location\": \"Global\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps5936.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"ps2350\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8915/providers/Microsoft.Cdn/profiles/ps8712/endpoints/ps5936/origins/ps2350?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODkxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg3MTIvZW5kcG9pbnRzL3BzNTkzNi9vcmlnaW5zL3BzMjM1MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4fb6fbed-035d-47f6-a035-748637d7758e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7181fb60-2fcd-47bc-95be-5dedf342d6c7" - ], - "x-ms-client-request-id": [ - "4fb6fbed-035d-47f6-a035-748637d7758e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "83eaa95c-3c86-4f7b-9f44-43733a4eb13e" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194723Z:83eaa95c-3c86-4f7b-9f44-43733a4eb13e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:47:22 GMT" - ], - "Content-Length": [ - "565" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8915/providers/Microsoft.Cdn/profiles/ps8712/endpoints/ps5936/origins/ps2350\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/origins\",\r\n \"name\": \"ps2350\",\r\n \"properties\": {\r\n \"hostName\": \"www.microsoft.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"resourceState\": \"Active\",\r\n \"originHostHeader\": null,\r\n \"priority\": 1,\r\n \"weight\": 1000,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8915/providers/Microsoft.Cdn/profiles/ps8712/endpoints/ps5936/origins/ps2350?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODkxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg3MTIvZW5kcG9pbnRzL3BzNTkzNi9vcmlnaW5zL3BzMjM1MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6a55a7e7-38e3-4da4-9665-d0f111353b65" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c8f929f8-ad32-4add-be16-c1d7de020a18" - ], - "x-ms-client-request-id": [ - "6a55a7e7-38e3-4da4-9665-d0f111353b65" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "86c9eff6-3bbc-4296-b10e-32be8fd871cd" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194736Z:86c9eff6-3bbc-4296-b10e-32be8fd871cd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:47:35 GMT" - ], - "Content-Length": [ - "555" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8915/providers/Microsoft.Cdn/profiles/ps8712/endpoints/ps5936/origins/ps2350\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/origins\",\r\n \"name\": \"ps2350\",\r\n \"properties\": {\r\n \"hostName\": \"contoso.com\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": 443,\r\n \"resourceState\": \"Active\",\r\n \"originHostHeader\": null,\r\n \"priority\": 5,\r\n \"weight\": 500,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps8915/providers/Microsoft.Cdn/profiles/ps8712/endpoints/ps5936/origins/ps2350?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzODkxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczg3MTIvZW5kcG9pbnRzL3BzNTkzNi9vcmlnaW5zL3BzMjM1MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"properties\": {\r\n \"hostName\": \"contoso.com\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": 443,\r\n \"priority\": 5,\r\n \"weight\": 500\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6a55a7e7-38e3-4da4-9665-d0f111353b65" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "143" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8915/providers/Microsoft.Cdn/operationresults/ef2dee92-c670-414b-ba12-f0b862a8807f/profileresults/ps8712/endpointresults/ps5936/originresults/ps2350?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b9e2cd49-9973-4693-8fe5-4af673f06832" - ], - "x-ms-client-request-id": [ - "6a55a7e7-38e3-4da4-9665-d0f111353b65" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8915/providers/Microsoft.Cdn/operationresults/ef2dee92-c670-414b-ba12-f0b862a8807f?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "57a1cb7e-9e51-47bc-a982-f8fdab15578c" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194725Z:57a1cb7e-9e51-47bc-a982-f8fdab15578c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:47:25 GMT" - ], - "Content-Length": [ - "555" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8915/providers/Microsoft.Cdn/profiles/ps8712/endpoints/ps5936/origins/ps2350\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints/origins\",\r\n \"name\": \"ps2350\",\r\n \"properties\": {\r\n \"hostName\": \"contoso.com\",\r\n \"httpPort\": 80,\r\n \"httpsPort\": 443,\r\n \"resourceState\": \"Active\",\r\n \"originHostHeader\": null,\r\n \"priority\": 5,\r\n \"weight\": 500,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null,\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8915/providers/Microsoft.Cdn/operationresults/ef2dee92-c670-414b-ba12-f0b862a8807f?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODkxNS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2VmMmRlZTkyLWM2NzAtNDE0Yi1iYTEyLWYwYjg2MmE4ODA3Zj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6a55a7e7-38e3-4da4-9665-d0f111353b65" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7ce85d03-3252-49b6-a17c-5a369352f975" - ], - "x-ms-client-request-id": [ - "6a55a7e7-38e3-4da4-9665-d0f111353b65" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "fedcdb77-4478-45a7-9b20-61798996ca3d" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194735Z:fedcdb77-4478-45a7-9b20-61798996ca3d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:47:35 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps8915?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzODkxNT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "17ab6c07-57c6-494d-8eac-a9aac8a4e69b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "2f643b6a-d259-41a5-aca8-f438ab542171" - ], - "x-ms-correlation-request-id": [ - "2f643b6a-d259-41a5-aca8-f438ab542171" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194736Z:2f643b6a-d259-41a5-aca8-f438ab542171" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:47:35 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnNU1UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "6b16bb0e-ab7b-4c01-a509-53a874a85815" - ], - "x-ms-correlation-request-id": [ - "6b16bb0e-ab7b-4c01-a509-53a874a85815" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194751Z:6b16bb0e-ab7b-4c01-a509-53a874a85815" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:47:51 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnNU1UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "f2180f78-5f4d-40da-b1e0-ec543e3b9a89" - ], - "x-ms-correlation-request-id": [ - "f2180f78-5f4d-40da-b1e0-ec543e3b9a89" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194806Z:f2180f78-5f4d-40da-b1e0-ec543e3b9a89" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:48:06 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnNU1UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "a4396a80-1403-4a85-aac0-0af0fa3c3710" - ], - "x-ms-correlation-request-id": [ - "a4396a80-1403-4a85-aac0-0af0fa3c3710" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194821Z:a4396a80-1403-4a85-aac0-0af0fa3c3710" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:48:21 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnNU1UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "d5e19539-d96d-413b-8f08-80d2b7ca5cb0" - ], - "x-ms-correlation-request-id": [ - "d5e19539-d96d-413b-8f08-80d2b7ca5cb0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194836Z:d5e19539-d96d-413b-8f08-80d2b7ca5cb0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:48:35 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnNU1UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "d039c258-f75b-4182-8148-c1fc769aac05" - ], - "x-ms-correlation-request-id": [ - "d039c258-f75b-4182-8148-c1fc769aac05" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194851Z:d039c258-f75b-4182-8148-c1fc769aac05" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:48:50 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnNU1UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "2a787bb3-14d2-4c9b-b146-20899d6ac9d0" - ], - "x-ms-correlation-request-id": [ - "2a787bb3-14d2-4c9b-b146-20899d6ac9d0" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194906Z:2a787bb3-14d2-4c9b-b146-20899d6ac9d0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:49:05 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnNU1UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "7e2378dd-5c3b-440e-8576-48e5ff3df99f" - ], - "x-ms-correlation-request-id": [ - "7e2378dd-5c3b-440e-8576-48e5ff3df99f" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194921Z:7e2378dd-5c3b-440e-8576-48e5ff3df99f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:49:20 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnNU1UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "8e950d4b-e6c6-47d4-abde-6e2d8527bb15" - ], - "x-ms-correlation-request-id": [ - "8e950d4b-e6c6-47d4-abde-6e2d8527bb15" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194936Z:8e950d4b-e6c6-47d4-abde-6e2d8527bb15" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:49:36 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnNU1UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "2ce41c0b-a2cf-4a31-ad93-627d9ae20b86" - ], - "x-ms-correlation-request-id": [ - "2ce41c0b-a2cf-4a31-ad93-627d9ae20b86" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T194951Z:2ce41c0b-a2cf-4a31-ad93-627d9ae20b86" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:49:51 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnNU1UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "5ce762f7-e0a2-43a6-96ec-327623f116cc" - ], - "x-ms-correlation-request-id": [ - "5ce762f7-e0a2-43a6-96ec-327623f116cc" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195006Z:5ce762f7-e0a2-43a6-96ec-327623f116cc" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:50:06 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnNU1UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "0946eab5-47f4-43f1-8816-c444c14de1d7" - ], - "x-ms-correlation-request-id": [ - "0946eab5-47f4-43f1-8816-c444c14de1d7" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195021Z:0946eab5-47f4-43f1-8816-c444c14de1d7" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:50:21 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzg5MTUtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpnNU1UVXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.29719.03", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.30" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "c2b583f8-6084-4ba0-a2ff-f7852c524489" - ], - "x-ms-correlation-request-id": [ - "c2b583f8-6084-4ba0-a2ff-f7852c524489" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T195021Z:c2b583f8-6084-4ba0-a2ff-f7852c524489" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 19:50:21 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-SetOriginProperties": [ - "ps8915", - "ps8712", - "ps5936", - "ps2350" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/ProfileGetSupportedOptimizationType.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/ProfileGetSupportedOptimizationType.json deleted file mode 100644 index f663f9464063..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/ProfileGetSupportedOptimizationType.json +++ /dev/null @@ -1,920 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3889?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzg4OT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "29a99b50-a9a8-4654-8fdf-fb30975382aa" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "6ccdd8cb-62fc-49e9-93ff-40b6d610ce31" - ], - "x-ms-correlation-request-id": [ - "6ccdd8cb-62fc-49e9-93ff-40b6d610ce31" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070658Z:6ccdd8cb-62fc-49e9-93ff-40b6d610ce31" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:06:58 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3889\",\r\n \"name\": \"ps3889\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "70083a87-417f-4d43-ae96-551def61b20e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-original-request-ids": [ - "80689956-a488-4382-9e89-b649d12814d9", - "b94004c0-2387-4367-bd4f-c21990ab6098" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-request-id": [ - "e915251c-c0f1-492f-bc18-56e4747aa54d" - ], - "x-ms-correlation-request-id": [ - "e915251c-c0f1-492f-bc18-56e4747aa54d" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070700Z:e915251c-c0f1-492f-bc18-56e4747aa54d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:06:59 GMT" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "70691" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3889/providers/Microsoft.Cdn/profiles/ps5300?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzg4OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczUzMDA/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "70083a87-417f-4d43-ae96-551def61b20e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "77" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7e681d27-a99c-4bd9-9df6-3601e64b6847" - ], - "x-ms-client-request-id": [ - "70083a87-417f-4d43-ae96-551def61b20e" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3889/providers/Microsoft.Cdn/operationresults/a383afdb-2e0e-4ed5-b379-c87224c64506?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "e7e4c3ea-d8e7-4d0e-8fce-8f0e3c90a768" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070707Z:e7e4c3ea-d8e7-4d0e-8fce-8f0e3c90a768" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:07:07 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3889/providers/Microsoft.Cdn/profiles/ps5300\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps5300\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3889/providers/Microsoft.Cdn/operationresults/a383afdb-2e0e-4ed5-b379-c87224c64506?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzg4OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2EzODNhZmRiLTJlMGUtNGVkNS1iMzc5LWM4NzIyNGM2NDUwNj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "70083a87-417f-4d43-ae96-551def61b20e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8f9dc989-11fd-446f-8157-0484c98a4c4a" - ], - "x-ms-client-request-id": [ - "70083a87-417f-4d43-ae96-551def61b20e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "4f92f12f-f6b8-4fcb-9acf-b8ef58aee720" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070717Z:4f92f12f-f6b8-4fcb-9acf-b8ef58aee720" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:07:17 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3889/providers/Microsoft.Cdn/profiles/ps5300?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzg4OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczUzMDA/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "70083a87-417f-4d43-ae96-551def61b20e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3e015e31-80bd-4c43-af58-529e4824d1bd" - ], - "x-ms-client-request-id": [ - "70083a87-417f-4d43-ae96-551def61b20e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "13253fa4-890b-4e1c-85d9-50422f1cc39c" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070718Z:13253fa4-890b-4e1c-85d9-50422f1cc39c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:07:18 GMT" - ], - "Content-Length": [ - "318" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3889/providers/Microsoft.Cdn/profiles/ps5300\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps5300\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3889/providers/Microsoft.Cdn/profiles/ps5300/getSupportedOptimizationTypes?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzg4OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczUzMDAvZ2V0U3VwcG9ydGVkT3B0aW1pemF0aW9uVHlwZXM/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "37081acc-1bb2-4580-b942-357ade4c8887" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "620fe8f8-35cf-46ec-a0ff-3e19fc7cbb1e" - ], - "x-ms-client-request-id": [ - "37081acc-1bb2-4580-b942-357ade4c8887" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "1c0e7d2c-035c-4eff-940b-9ad1fdb31934" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070719Z:1c0e7d2c-035c-4eff-940b-9ad1fdb31934" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:07:19 GMT" - ], - "Content-Length": [ - "153" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"supportedOptimizationTypes\": [\r\n \"GeneralWebDelivery\",\r\n \"GeneralMediaStreaming\",\r\n \"VideoOnDemandMediaStreaming\",\r\n \"LargeFileDownload\",\r\n \"DynamicSiteAcceleration\"\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3889?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzg4OT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "daa755d1-8dab-47c5-b770-a9eea8db64ce" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM4ODktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "d027dea9-f821-4260-8415-422856292063" - ], - "x-ms-correlation-request-id": [ - "d027dea9-f821-4260-8415-422856292063" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070722Z:d027dea9-f821-4260-8415-422856292063" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:07:22 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM4ODktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNE9Ea3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM4ODktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "dd3de661-1f3f-4fff-9d48-f8f128dee1b4" - ], - "x-ms-correlation-request-id": [ - "dd3de661-1f3f-4fff-9d48-f8f128dee1b4" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070738Z:dd3de661-1f3f-4fff-9d48-f8f128dee1b4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:07:37 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM4ODktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNE9Ea3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM4ODktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "ffdacb58-13db-403b-9884-6900df84da14" - ], - "x-ms-correlation-request-id": [ - "ffdacb58-13db-403b-9884-6900df84da14" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070753Z:ffdacb58-13db-403b-9884-6900df84da14" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:07:52 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM4ODktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNE9Ea3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM4ODktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "0fe20c78-b76a-449d-8f56-b6319f6aca15" - ], - "x-ms-correlation-request-id": [ - "0fe20c78-b76a-449d-8f56-b6319f6aca15" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070809Z:0fe20c78-b76a-449d-8f56-b6319f6aca15" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:08:09 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM4ODktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNE9Ea3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM4ODktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "b18c0f8a-31c3-41cc-9c26-49bf902f4027" - ], - "x-ms-correlation-request-id": [ - "b18c0f8a-31c3-41cc-9c26-49bf902f4027" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070824Z:b18c0f8a-31c3-41cc-9c26-49bf902f4027" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:08:24 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM4ODktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNE9Ea3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM4ODktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "c824e1ab-08ae-4c9b-91c2-93fb4d9eb8bc" - ], - "x-ms-correlation-request-id": [ - "c824e1ab-08ae-4c9b-91c2-93fb4d9eb8bc" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070840Z:c824e1ab-08ae-4c9b-91c2-93fb4d9eb8bc" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:08:39 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM4ODktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNE9Ea3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM4ODktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "832ad9c1-db19-44fc-9f45-804a72680b64" - ], - "x-ms-correlation-request-id": [ - "832ad9c1-db19-44fc-9f45-804a72680b64" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070855Z:832ad9c1-db19-44fc-9f45-804a72680b64" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:08:55 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM4ODktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNE9Ea3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-request-id": [ - "1789f38d-85be-421a-b180-4ace0926f73b" - ], - "x-ms-correlation-request-id": [ - "1789f38d-85be-421a-b180-4ace0926f73b" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070911Z:1789f38d-85be-421a-b180-4ace0926f73b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:09:10 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzM4ODktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNNE9Ea3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11986" - ], - "x-ms-request-id": [ - "c305440c-504f-4da2-9c3b-a2913aab275a" - ], - "x-ms-correlation-request-id": [ - "c305440c-504f-4da2-9c3b-a2913aab275a" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070911Z:c305440c-504f-4da2-9c3b-a2913aab275a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:09:10 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-ProfileGetSupportedOptimizationType": [ - "ps5300", - "ps3889" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfileCrud.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfileCrud.json deleted file mode 100644 index cb227e0f8673..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfileCrud.json +++ /dev/null @@ -1,1631 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7459?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzQ1OT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f6954843-24fd-4b6a-a1a9-f7c53dbec022" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "e1e19081-bfae-44da-9d94-8bf4fa7925ac" - ], - "x-ms-correlation-request-id": [ - "e1e19081-bfae-44da-9d94-8bf4fa7925ac" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071406Z:e1e19081-bfae-44da-9d94-8bf4fa7925ac" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:14:06 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7459\",\r\n \"name\": \"ps7459\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-original-request-ids": [ - "bc915271-931f-4da6-9e94-520cf1f734da", - "dda33572-a276-4a73-bee7-2098a29bbd8d" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-request-id": [ - "125dfa52-a2e5-4b67-829e-72eab8e4ab15" - ], - "x-ms-correlation-request-id": [ - "125dfa52-a2e5-4b67-829e-72eab8e4ab15" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071408Z:125dfa52-a2e5-4b67-829e-72eab8e4ab15" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:14:07 GMT" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "70691" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7459/providers/Microsoft.Cdn/profiles/ps1582?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzQ1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE1ODI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"location\": \"EastUS\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "142" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "40923306-7af9-4eb1-b17f-5841a704b3e6" - ], - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7459/providers/Microsoft.Cdn/operationresults/16d88965-de6e-4c5b-9804-8fdb7f59cbcd?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "e4284c35-b10e-42a6-955b-f0392797bf41" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071423Z:e4284c35-b10e-42a6-955b-f0392797bf41" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:14:22 GMT" - ], - "Content-Length": [ - "351" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7459/providers/Microsoft.Cdn/profiles/ps1582\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps1582\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7459/providers/Microsoft.Cdn/operationresults/16d88965-de6e-4c5b-9804-8fdb7f59cbcd?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzQ1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzE2ZDg4OTY1LWRlNmUtNGM1Yi05ODA0LThmZGI3ZjU5Y2JjZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "87dc3e9a-d76b-419b-b12e-98ff043c7a97" - ], - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "f5d65f9a-806f-4b3a-82da-5be8df4ec179" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071433Z:f5d65f9a-806f-4b3a-82da-5be8df4ec179" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:14:32 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7459/providers/Microsoft.Cdn/operationresults/16d88965-de6e-4c5b-9804-8fdb7f59cbcd?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzQ1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzE2ZDg4OTY1LWRlNmUtNGM1Yi05ODA0LThmZGI3ZjU5Y2JjZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8af24900-65cd-4f19-bb59-70d998645754" - ], - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "23484b89-2c59-4d0f-b270-3811d9cfd3b1" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071443Z:23484b89-2c59-4d0f-b270-3811d9cfd3b1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:14:42 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7459/providers/Microsoft.Cdn/operationresults/16d88965-de6e-4c5b-9804-8fdb7f59cbcd?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzQ1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzE2ZDg4OTY1LWRlNmUtNGM1Yi05ODA0LThmZGI3ZjU5Y2JjZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f0b09d28-c16d-4875-8173-be6887e0dea3" - ], - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "d086b287-8d55-4f1c-8e95-1e17ff1a2f16" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071454Z:d086b287-8d55-4f1c-8e95-1e17ff1a2f16" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:14:53 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7459/providers/Microsoft.Cdn/operationresults/16d88965-de6e-4c5b-9804-8fdb7f59cbcd?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzQ1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzE2ZDg4OTY1LWRlNmUtNGM1Yi05ODA0LThmZGI3ZjU5Y2JjZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "423decbf-5996-4681-9766-1c55c17b42af" - ], - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "71aab383-974f-485d-ae0f-022570f90480" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071504Z:71aab383-974f-485d-ae0f-022570f90480" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:15:04 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7459/providers/Microsoft.Cdn/operationresults/16d88965-de6e-4c5b-9804-8fdb7f59cbcd?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzQ1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzE2ZDg4OTY1LWRlNmUtNGM1Yi05ODA0LThmZGI3ZjU5Y2JjZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "64f255e0-2397-467f-9c36-e641eb679e4a" - ], - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "d4740a3e-a5b7-4341-b2dd-b6bfd266d866" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071514Z:d4740a3e-a5b7-4341-b2dd-b6bfd266d866" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:15:14 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7459/providers/Microsoft.Cdn/operationresults/16d88965-de6e-4c5b-9804-8fdb7f59cbcd?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzQ1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzE2ZDg4OTY1LWRlNmUtNGM1Yi05ODA0LThmZGI3ZjU5Y2JjZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "17888ab9-8318-41a9-a78a-dd147f24e7dc" - ], - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "fff4fc9f-a5e6-4977-ad21-da65edca9a69" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071525Z:fff4fc9f-a5e6-4977-ad21-da65edca9a69" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:15:24 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7459/providers/Microsoft.Cdn/operationresults/16d88965-de6e-4c5b-9804-8fdb7f59cbcd?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzQ1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzE2ZDg4OTY1LWRlNmUtNGM1Yi05ODA0LThmZGI3ZjU5Y2JjZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "14df4ba4-a9d2-41c3-bb52-c5b0f5a31cb0" - ], - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "a6436652-bee3-4bf5-8235-61d87f8725e6" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071535Z:a6436652-bee3-4bf5-8235-61d87f8725e6" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:15:35 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7459/providers/Microsoft.Cdn/profiles/ps1582?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzQ1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE1ODI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "fd53e217-b62a-4871-bff7-5f5e0cbe475c" - ], - "x-ms-client-request-id": [ - "6290e0b9-7476-447b-b4bb-4676e2897d9b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "4db92ed2-fc29-41de-a326-ffb7008e0bd7" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071535Z:4db92ed2-fc29-41de-a326-ffb7008e0bd7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:15:35 GMT" - ], - "Content-Length": [ - "350" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7459/providers/Microsoft.Cdn/profiles/ps1582\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps1582\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7459/providers/Microsoft.Cdn/profiles/ps1582?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzQ1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE1ODI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "14eac482-ebf3-45f7-ae2d-3baa481faa5b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "336e6045-c3eb-4402-80a6-ed9fb5458081" - ], - "x-ms-client-request-id": [ - "14eac482-ebf3-45f7-ae2d-3baa481faa5b" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "47" - ], - "x-ms-correlation-request-id": [ - "55e35597-7eb4-4e01-8a3c-cad11be550cd" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071536Z:55e35597-7eb4-4e01-8a3c-cad11be550cd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:15:36 GMT" - ], - "Content-Length": [ - "350" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7459/providers/Microsoft.Cdn/profiles/ps1582\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps1582\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7459/providers/Microsoft.Cdn/profiles/ps1582?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzQ1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE1ODI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5600fce3-8270-4543-800f-d3aef186d87d" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d5641d4c-62ae-456e-9aa3-67bbb3c23518" - ], - "x-ms-client-request-id": [ - "5600fce3-8270-4543-800f-d3aef186d87d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "46" - ], - "x-ms-correlation-request-id": [ - "a7f43d87-832d-46a2-8c48-78a69698b2dd" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071548Z:a7f43d87-832d-46a2-8c48-78a69698b2dd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:15:48 GMT" - ], - "Content-Length": [ - "350" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7459/providers/Microsoft.Cdn/profiles/ps1582\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps1582\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value4\",\r\n \"tag1\": \"value3\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7459/providers/Microsoft.Cdn/profiles/ps1582?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzQ1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE1ODI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f5179be1-dde4-46e0-9740-98b0ffedbd66" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "9418fec1-c02b-4f00-950a-ccef6d921a19" - ], - "x-ms-correlation-request-id": [ - "9418fec1-c02b-4f00-950a-ccef6d921a19" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071743Z:9418fec1-c02b-4f00-950a-ccef6d921a19" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:17:42 GMT" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "98" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceGroupNotFound\",\r\n \"message\": \"Resource group 'ps7459' could not be found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7459/providers/Microsoft.Cdn/profiles/ps1582?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzQ1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE1ODI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"tags\": {\r\n \"tag2\": \"value4\",\r\n \"tag1\": \"value3\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5600fce3-8270-4543-800f-d3aef186d87d" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "67" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7459/providers/Microsoft.Cdn/operationresults/363e5e73-72d1-4d5d-9368-82ce4e774207/profileresults/ps1582?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "276e67e3-d16c-433d-bbe1-dc14b7f09bc9" - ], - "x-ms-client-request-id": [ - "5600fce3-8270-4543-800f-d3aef186d87d" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7459/providers/Microsoft.Cdn/operationresults/363e5e73-72d1-4d5d-9368-82ce4e774207?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "23" - ], - "x-ms-correlation-request-id": [ - "f4e86e01-4314-4dff-86c8-a7a71485734d" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071538Z:f4e86e01-4314-4dff-86c8-a7a71485734d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:15:38 GMT" - ], - "Content-Length": [ - "350" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7459/providers/Microsoft.Cdn/profiles/ps1582\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps1582\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value4\",\r\n \"tag1\": \"value3\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7459/providers/Microsoft.Cdn/operationresults/363e5e73-72d1-4d5d-9368-82ce4e774207?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzQ1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzM2M2U1ZTczLTcyZDEtNGQ1ZC05MzY4LTgyY2U0ZTc3NDIwNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5600fce3-8270-4543-800f-d3aef186d87d" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "fc8f011d-ed5c-4364-9841-a986450580d0" - ], - "x-ms-client-request-id": [ - "5600fce3-8270-4543-800f-d3aef186d87d" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "1c992bf3-517e-4de7-92d4-2f2edf381702" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071548Z:1c992bf3-517e-4de7-92d4-2f2edf381702" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:15:48 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps7459/providers/Microsoft.Cdn/profiles/ps1582/generateSsoUri?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzNzQ1OS9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczE1ODIvZ2VuZXJhdGVTc29Vcmk/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b65336f7-8174-4d2b-8507-f703cc2a5879" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "40f9784d-90f6-4a35-8ee9-632ffb1ae0af" - ], - "x-ms-client-request-id": [ - "b65336f7-8174-4d2b-8507-f703cc2a5879" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "b46ae83b-4f01-47d8-9452-a30940fc7ff5" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071549Z:b46ae83b-4f01-47d8-9452-a30940fc7ff5" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:15:48 GMT" - ], - "Content-Length": [ - "262" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"ssoUriValue\": \"https://cdn.windowsazure.com/account/loginexternal/?token=cZuBESmth%2f%2fSkKUtlGvm1G5Cv9T%2ftCPkA8z%2bvjg5x%2b8%3d×tamp=2021-05-19T07:15:49.2863174Z&cdnAccountId=112470&userCustomId=SSO-2a02e2b4-4cec-474a-ad62-d0125ca86186&restEndpointId=1\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps7459?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzNzQ1OT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f9fba6be-c358-4725-ab0a-0e1fcff9f980" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc0NTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "8e5307d0-9b4a-472c-baa9-e7647a725e04" - ], - "x-ms-correlation-request-id": [ - "8e5307d0-9b4a-472c-baa9-e7647a725e04" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071554Z:8e5307d0-9b4a-472c-baa9-e7647a725e04" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:15:53 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc0NTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjME5Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc0NTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "df931f80-d0b8-4dd6-9e84-e32a5ec8dff8" - ], - "x-ms-correlation-request-id": [ - "df931f80-d0b8-4dd6-9e84-e32a5ec8dff8" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071610Z:df931f80-d0b8-4dd6-9e84-e32a5ec8dff8" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:16:09 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc0NTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjME5Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc0NTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "beb62a5b-4e86-44d4-b976-4aa1d0e7854d" - ], - "x-ms-correlation-request-id": [ - "beb62a5b-4e86-44d4-b976-4aa1d0e7854d" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071625Z:beb62a5b-4e86-44d4-b976-4aa1d0e7854d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:16:25 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc0NTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjME5Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc0NTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "4be0848a-b74f-4057-9e39-f7a7295e1d52" - ], - "x-ms-correlation-request-id": [ - "4be0848a-b74f-4057-9e39-f7a7295e1d52" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071640Z:4be0848a-b74f-4057-9e39-f7a7295e1d52" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:16:40 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc0NTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjME5Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc0NTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "a240f8d5-b7bc-4f70-a9c4-dd14e472d35f" - ], - "x-ms-correlation-request-id": [ - "a240f8d5-b7bc-4f70-a9c4-dd14e472d35f" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071656Z:a240f8d5-b7bc-4f70-a9c4-dd14e472d35f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:16:55 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc0NTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjME5Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc0NTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "dcb304e8-8ffc-4730-916c-19064af69757" - ], - "x-ms-correlation-request-id": [ - "dcb304e8-8ffc-4730-916c-19064af69757" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071711Z:dcb304e8-8ffc-4730-916c-19064af69757" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:17:11 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc0NTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjME5Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc0NTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "c4c2b2f7-83ae-4775-bbe4-779b313e2d91" - ], - "x-ms-correlation-request-id": [ - "c4c2b2f7-83ae-4775-bbe4-779b313e2d91" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071727Z:c4c2b2f7-83ae-4775-bbe4-779b313e2d91" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:17:26 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc0NTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjME5Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "cfdaa5f2-3a7b-45b6-91f3-3487d154019a" - ], - "x-ms-correlation-request-id": [ - "cfdaa5f2-3a7b-45b6-91f3-3487d154019a" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071742Z:cfdaa5f2-3a7b-45b6-91f3-3487d154019a" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:17:41 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzc0NTktV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpjME5Ua3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "e7bf6be5-e6f1-4548-8c7a-8cbe04e7c412" - ], - "x-ms-correlation-request-id": [ - "e7bf6be5-e6f1-4548-8c7a-8cbe04e7c412" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071743Z:e7bf6be5-e6f1-4548-8c7a-8cbe04e7c412" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:17:42 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-ProfileCrud": [ - "ps1582", - "ps7459" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfileCrudWithPiping.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfileCrudWithPiping.json deleted file mode 100644 index 979a839a2828..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfileCrudWithPiping.json +++ /dev/null @@ -1,1421 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2514?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjUxND9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b82f11fd-d830-45de-99be-def888d9ee36" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "88a37a89-006a-4fcf-844c-1a9ee6f1bbf5" - ], - "x-ms-correlation-request-id": [ - "88a37a89-006a-4fcf-844c-1a9ee6f1bbf5" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T065925Z:88a37a89-006a-4fcf-844c-1a9ee6f1bbf5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 06:59:25 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2514\",\r\n \"name\": \"ps2514\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-original-request-ids": [ - "2888983e-3bca-4b07-b7ef-f2818b38f558", - "ab9426be-da2e-4cba-88cb-7888604233e2" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-request-id": [ - "e4d6a1e0-8e60-494e-986e-cd580a91adbf" - ], - "x-ms-correlation-request-id": [ - "e4d6a1e0-8e60-494e-986e-cd580a91adbf" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T065928Z:e4d6a1e0-8e60-494e-986e-cd580a91adbf" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 06:59:27 GMT" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "70691" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2514/providers/Microsoft.Cdn/profiles/ps7887?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjUxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc4ODc/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"location\": \"EastUS\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "142" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "86e4a53b-4529-4a32-99b2-4fa356f55dd3" - ], - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2514/providers/Microsoft.Cdn/operationresults/dd6a1575-c396-4808-8b50-30a913b266c7?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "dcbb1e04-5b2e-4506-afe6-4d775d0ea752" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T065937Z:dcbb1e04-5b2e-4506-afe6-4d775d0ea752" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 06:59:36 GMT" - ], - "Content-Length": [ - "351" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2514/providers/Microsoft.Cdn/profiles/ps7887\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps7887\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2514/providers/Microsoft.Cdn/operationresults/dd6a1575-c396-4808-8b50-30a913b266c7?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjUxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2RkNmExNTc1LWMzOTYtNDgwOC04YjUwLTMwYTkxM2IyNjZjNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "db7748d8-aab3-485c-b8fa-b3d829a34f06" - ], - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "275a314f-d5d6-4ac5-9c4f-52d4ab1078dd" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T065947Z:275a314f-d5d6-4ac5-9c4f-52d4ab1078dd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 06:59:46 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2514/providers/Microsoft.Cdn/operationresults/dd6a1575-c396-4808-8b50-30a913b266c7?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjUxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2RkNmExNTc1LWMzOTYtNDgwOC04YjUwLTMwYTkxM2IyNjZjNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b8633c83-12c8-497a-b8b1-3156e9198cef" - ], - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "55977e49-73d3-4ba4-a198-9fd55441e8e9" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T065957Z:55977e49-73d3-4ba4-a198-9fd55441e8e9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 06:59:57 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2514/providers/Microsoft.Cdn/operationresults/dd6a1575-c396-4808-8b50-30a913b266c7?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjUxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2RkNmExNTc1LWMzOTYtNDgwOC04YjUwLTMwYTkxM2IyNjZjNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b5769485-f6a4-4333-ac9c-03f6d4a24560" - ], - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "5841146a-6805-4f2e-b06c-ec151a2a8d58" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070008Z:5841146a-6805-4f2e-b06c-ec151a2a8d58" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:00:07 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2514/providers/Microsoft.Cdn/operationresults/dd6a1575-c396-4808-8b50-30a913b266c7?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjUxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2RkNmExNTc1LWMzOTYtNDgwOC04YjUwLTMwYTkxM2IyNjZjNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1d4be266-ff34-4595-9fc8-b675918787f9" - ], - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "e439d093-de4f-430f-ad6b-3e7c06a63f77" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070018Z:e439d093-de4f-430f-ad6b-3e7c06a63f77" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:00:17 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2514/providers/Microsoft.Cdn/operationresults/dd6a1575-c396-4808-8b50-30a913b266c7?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjUxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2RkNmExNTc1LWMzOTYtNDgwOC04YjUwLTMwYTkxM2IyNjZjNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4b37d031-be96-49e2-bc41-f562533ecc54" - ], - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "38bc5efa-94ae-43e0-961b-3219e0f55806" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070028Z:38bc5efa-94ae-43e0-961b-3219e0f55806" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:00:28 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2514/providers/Microsoft.Cdn/operationresults/dd6a1575-c396-4808-8b50-30a913b266c7?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjUxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2RkNmExNTc1LWMzOTYtNDgwOC04YjUwLTMwYTkxM2IyNjZjNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e3630539-4de3-4598-a8d7-218f32236eb7" - ], - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "651d2215-66f8-4a6b-b113-ccf38d7d0b5e" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070039Z:651d2215-66f8-4a6b-b113-ccf38d7d0b5e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:00:39 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2514/providers/Microsoft.Cdn/operationresults/dd6a1575-c396-4808-8b50-30a913b266c7?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjUxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2RkNmExNTc1LWMzOTYtNDgwOC04YjUwLTMwYTkxM2IyNjZjNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b4fd08a7-32ee-4adc-9d97-f5d73dc75bd5" - ], - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "cd00ed63-fb42-40f7-ad2c-c71adb55547c" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070049Z:cd00ed63-fb42-40f7-ad2c-c71adb55547c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:00:49 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2514/providers/Microsoft.Cdn/operationresults/dd6a1575-c396-4808-8b50-30a913b266c7?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjUxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2RkNmExNTc1LWMzOTYtNDgwOC04YjUwLTMwYTkxM2IyNjZjNz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f8505bc2-0134-4b9f-999c-c6c544b86fde" - ], - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-correlation-request-id": [ - "d882a4d0-26f2-4f71-9b3b-af06eb28e46a" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070059Z:d882a4d0-26f2-4f71-9b3b-af06eb28e46a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:00:59 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2514/providers/Microsoft.Cdn/profiles/ps7887?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjUxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc4ODc/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6495259c-223c-4fdc-8193-3b899fecd90a" - ], - "x-ms-client-request-id": [ - "41274d21-9b42-4e0e-8a76-d043f5d0994e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "60a653ad-2f98-4093-83f5-62578fa0f7f8" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070100Z:60a653ad-2f98-4093-83f5-62578fa0f7f8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:00:59 GMT" - ], - "Content-Length": [ - "350" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2514/providers/Microsoft.Cdn/profiles/ps7887\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps7887\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2514/providers/Microsoft.Cdn/profiles/ps7887?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjUxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc4ODc/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "343322d7-74e0-4324-91bb-91cc71147d34" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "8b7f4414-f0d0-4e08-8a27-170603381094" - ], - "x-ms-correlation-request-id": [ - "8b7f4414-f0d0-4e08-8a27-170603381094" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070252Z:8b7f4414-f0d0-4e08-8a27-170603381094" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:02:52 GMT" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "98" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceGroupNotFound\",\r\n \"message\": \"Resource group 'ps2514' could not be found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2514/providers/Microsoft.Cdn/profiles/ps7887/generateSsoUri?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjUxNC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc4ODcvZ2VuZXJhdGVTc29Vcmk/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7363ac73-8db4-460b-877d-122898744739" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f1f02856-d57b-43b2-a717-da0906c80de0" - ], - "x-ms-client-request-id": [ - "7363ac73-8db4-460b-877d-122898744739" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "1086b785-0015-40e9-9ca6-3b24ff0e36da" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070100Z:1086b785-0015-40e9-9ca6-3b24ff0e36da" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:01:00 GMT" - ], - "Content-Length": [ - "258" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"ssoUriValue\": \"https://cdn.windowsazure.com/account/loginexternal/?token=nx89GslYsIjp9anLS%2fzlohegkwu%2fV%2funlpo7nPMGbDM%3d×tamp=2021-05-19T07:01:00.4775778Z&cdnAccountId=112462&userCustomId=SSO-299b0e1b-9995-4c1c-b82f-8e4fa7b7db04&restEndpointId=1\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2514?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjUxND9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "354f787b-eeb3-4c8c-8b60-f6990a8ec47f" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI1MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "0323add8-0fee-480f-aad4-891184f75faa" - ], - "x-ms-correlation-request-id": [ - "0323add8-0fee-480f-aad4-891184f75faa" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070104Z:0323add8-0fee-480f-aad4-891184f75faa" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:01:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI1MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJMU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI1MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "cafab1c0-bf3b-4f51-80c1-ff182ac0a3b1" - ], - "x-ms-correlation-request-id": [ - "cafab1c0-bf3b-4f51-80c1-ff182ac0a3b1" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070119Z:cafab1c0-bf3b-4f51-80c1-ff182ac0a3b1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:01:19 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI1MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJMU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI1MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "ae386afa-16ca-412d-8344-2d55787f16da" - ], - "x-ms-correlation-request-id": [ - "ae386afa-16ca-412d-8344-2d55787f16da" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070135Z:ae386afa-16ca-412d-8344-2d55787f16da" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:01:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI1MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJMU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI1MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "399de225-3321-4ac4-9910-c7a167095698" - ], - "x-ms-correlation-request-id": [ - "399de225-3321-4ac4-9910-c7a167095698" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070150Z:399de225-3321-4ac4-9910-c7a167095698" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:01:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI1MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJMU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI1MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "919ad773-d6e3-4544-aaf8-84ded9170268" - ], - "x-ms-correlation-request-id": [ - "919ad773-d6e3-4544-aaf8-84ded9170268" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070205Z:919ad773-d6e3-4544-aaf8-84ded9170268" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:02:05 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI1MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJMU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI1MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "bb71443d-a84f-4f43-a20e-6667d5f7b3cf" - ], - "x-ms-correlation-request-id": [ - "bb71443d-a84f-4f43-a20e-6667d5f7b3cf" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070221Z:bb71443d-a84f-4f43-a20e-6667d5f7b3cf" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:02:20 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI1MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJMU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI1MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "bf6c38bf-888e-4fa1-9be1-b898907a19d1" - ], - "x-ms-correlation-request-id": [ - "bf6c38bf-888e-4fa1-9be1-b898907a19d1" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070236Z:bf6c38bf-888e-4fa1-9be1-b898907a19d1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:02:35 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI1MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJMU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "c903fae9-7e65-41ea-93fd-b6931519c79d" - ], - "x-ms-correlation-request-id": [ - "c903fae9-7e65-41ea-93fd-b6931519c79d" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070252Z:c903fae9-7e65-41ea-93fd-b6931519c79d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:02:51 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI1MTQtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJMU1UUXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "004fcfe0-3ec6-48f0-bb55-3ca4f2dc8074" - ], - "x-ms-correlation-request-id": [ - "004fcfe0-3ec6-48f0-bb55-3ca4f2dc8074" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070252Z:004fcfe0-3ec6-48f0-bb55-3ca4f2dc8074" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:02:51 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-ProfileDeleteAndSsoWithPiping": [ - "ps7887", - "ps2514" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfileDeleteWithEndpoints.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfileDeleteWithEndpoints.json deleted file mode 100644 index b6a5775e500a..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfileDeleteWithEndpoints.json +++ /dev/null @@ -1,1545 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3082?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzA4Mj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "da532a09-b1db-44a0-bffb-e9eb417a534c" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "a756e8b4-229d-4543-be91-676792ed584d" - ], - "x-ms-correlation-request-id": [ - "a756e8b4-229d-4543-be91-676792ed584d" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070259Z:a756e8b4-229d-4543-be91-676792ed584d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:02:58 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3082\",\r\n \"name\": \"ps3082\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3a932a06-3ce6-4dae-a710-f2293a278dc3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-original-request-ids": [ - "9f6fcd6a-85d0-48f5-8116-cb706a8c03a7", - "0598ad68-1341-4cfe-8ac7-677c5e18cef2" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-request-id": [ - "78225568-07b8-461c-831c-4b81fb644903" - ], - "x-ms-correlation-request-id": [ - "78225568-07b8-461c-831c-4b81fb644903" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070301Z:78225568-07b8-461c-831c-4b81fb644903" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:03:01 GMT" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "70691" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3082/providers/Microsoft.Cdn/profiles/ps4880?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzA4Mi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQ4ODA/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3a932a06-3ce6-4dae-a710-f2293a278dc3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "77" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b0a30e08-3cf4-4fd9-b47f-2637207ed8f8" - ], - "x-ms-client-request-id": [ - "3a932a06-3ce6-4dae-a710-f2293a278dc3" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3082/providers/Microsoft.Cdn/operationresults/d71c8028-2d99-49cb-abe9-db5e5e8c585b?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "4e14eca8-dc97-4ae3-b969-a1a2f4ebd097" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070309Z:4e14eca8-dc97-4ae3-b969-a1a2f4ebd097" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:03:09 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3082/providers/Microsoft.Cdn/profiles/ps4880\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps4880\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3082/providers/Microsoft.Cdn/operationresults/d71c8028-2d99-49cb-abe9-db5e5e8c585b?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzA4Mi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q3MWM4MDI4LTJkOTktNDljYi1hYmU5LWRiNWU1ZThjNTg1Yj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3a932a06-3ce6-4dae-a710-f2293a278dc3" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "678b4bd9-c33c-4d75-9e8f-d3ca099d2ccd" - ], - "x-ms-client-request-id": [ - "3a932a06-3ce6-4dae-a710-f2293a278dc3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "4de7ed16-ffa4-4352-9503-38bbdc29fc05" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070319Z:4de7ed16-ffa4-4352-9503-38bbdc29fc05" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:03:19 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3082/providers/Microsoft.Cdn/profiles/ps4880?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzA4Mi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQ4ODA/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3a932a06-3ce6-4dae-a710-f2293a278dc3" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9592ca93-35fa-435c-b08d-ce4bd3074877" - ], - "x-ms-client-request-id": [ - "3a932a06-3ce6-4dae-a710-f2293a278dc3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "6a41ff24-f81f-4f7a-a35a-9c69f51fd3f8" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070320Z:6a41ff24-f81f-4f7a-a35a-9c69f51fd3f8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:03:19 GMT" - ], - "Content-Length": [ - "318" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3082/providers/Microsoft.Cdn/profiles/ps4880\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps4880\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3082/providers/Microsoft.Cdn/profiles/ps4880?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzA4Mi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQ4ODA/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7cef2207-8f61-4629-bd58-a0a262da780b" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-failure-cause": [ - "gateway" - ], - "x-ms-request-id": [ - "dd0f6349-2d09-4728-af26-e40eb48650a5" - ], - "x-ms-correlation-request-id": [ - "dd0f6349-2d09-4728-af26-e40eb48650a5" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070653Z:dd0f6349-2d09-4728-af26-e40eb48650a5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:06:53 GMT" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "98" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceGroupNotFound\",\r\n \"message\": \"Resource group 'ps3082' could not be found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/providers/Microsoft.Cdn/checkNameAvailability?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrTmFtZUF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"ps2101\",\r\n \"type\": \"Microsoft.Cdn/Profiles/Endpoints\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6d8df510-5c49-45a3-b1af-d16ffd144c75" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "71" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "15f16d88-aebf-4306-b9cd-bf9882334f6b" - ], - "x-ms-client-request-id": [ - "6d8df510-5c49-45a3-b1af-d16ffd144c75" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "95028b80-a4f9-417c-848d-73bb9512bd19" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070322Z:95028b80-a4f9-417c-848d-73bb9512bd19" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:03:21 GMT" - ], - "Content-Length": [ - "51" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true,\r\n \"reason\": null,\r\n \"message\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3082/providers/Microsoft.Cdn/profiles/ps4880/endpoints/ps2101?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzA4Mi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQ4ODAvZW5kcG9pbnRzL3BzMjEwMT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"origins\": [\r\n {\r\n \"name\": \"contoso\",\r\n \"properties\": {\r\n \"hostName\": \"www.contoso.com\"\r\n }\r\n }\r\n ]\r\n },\r\n \"location\": \"EastUs\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6d8df510-5c49-45a3-b1af-d16ffd144c75" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "201" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6d2e591c-cd85-4b18-9cd0-db6a5698538a" - ], - "x-ms-client-request-id": [ - "6d8df510-5c49-45a3-b1af-d16ffd144c75" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3082/providers/Microsoft.Cdn/operationresults/33affe6e-44df-4869-a105-a7988b3f5f63?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "99" - ], - "x-ms-correlation-request-id": [ - "27931d48-f1ae-49c1-97be-6e7e5ef651b9" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070328Z:27931d48-f1ae-49c1-97be-6e7e5ef651b9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:03:27 GMT" - ], - "Content-Length": [ - "1049" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3082/providers/Microsoft.Cdn/profiles/ps4880/endpoints/ps2101\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps2101\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps2101.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"contoso\",\r\n \"properties\": {\r\n \"hostName\": \"www.contoso.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": null,\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3082/providers/Microsoft.Cdn/operationresults/33affe6e-44df-4869-a105-a7988b3f5f63?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzA4Mi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzMzYWZmZTZlLTQ0ZGYtNDg2OS1hMTA1LWE3OTg4YjNmNWY2Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6d8df510-5c49-45a3-b1af-d16ffd144c75" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5d0fb145-579e-4c1f-983d-3fb62168b1e1" - ], - "x-ms-client-request-id": [ - "6d8df510-5c49-45a3-b1af-d16ffd144c75" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "33c6b8e4-906b-4091-97b2-8ad96f8a4b95" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070338Z:33c6b8e4-906b-4091-97b2-8ad96f8a4b95" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:03:37 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3082/providers/Microsoft.Cdn/operationresults/33affe6e-44df-4869-a105-a7988b3f5f63?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzA4Mi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzMzYWZmZTZlLTQ0ZGYtNDg2OS1hMTA1LWE3OTg4YjNmNWY2Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6d8df510-5c49-45a3-b1af-d16ffd144c75" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6e2d20e2-396d-448c-b69e-1d0cfb3ae80d" - ], - "x-ms-client-request-id": [ - "6d8df510-5c49-45a3-b1af-d16ffd144c75" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "970cd22d-d35a-42ae-89f8-61b500d4afcb" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070348Z:970cd22d-d35a-42ae-89f8-61b500d4afcb" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:03:48 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3082/providers/Microsoft.Cdn/operationresults/33affe6e-44df-4869-a105-a7988b3f5f63?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzA4Mi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzMzYWZmZTZlLTQ0ZGYtNDg2OS1hMTA1LWE3OTg4YjNmNWY2Mz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6d8df510-5c49-45a3-b1af-d16ffd144c75" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b52bf937-1ce7-46cf-a4d5-739e825f38be" - ], - "x-ms-client-request-id": [ - "6d8df510-5c49-45a3-b1af-d16ffd144c75" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "7f2f9b08-788f-4025-a7cb-4e78d035cd32" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070359Z:7f2f9b08-788f-4025-a7cb-4e78d035cd32" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:03:58 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps3082/providers/Microsoft.Cdn/profiles/ps4880/endpoints/ps2101?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMzA4Mi9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczQ4ODAvZW5kcG9pbnRzL3BzMjEwMT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6d8df510-5c49-45a3-b1af-d16ffd144c75" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d7ab06b0-a319-4a4d-a3c6-2940e2156630" - ], - "x-ms-client-request-id": [ - "6d8df510-5c49-45a3-b1af-d16ffd144c75" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-correlation-request-id": [ - "87666262-723e-48e1-9872-eea22c4b2d36" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070359Z:87666262-723e-48e1-9872-eea22c4b2d36" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:03:58 GMT" - ], - "Content-Length": [ - "1047" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3082/providers/Microsoft.Cdn/profiles/ps4880/endpoints/ps2101\",\r\n \"type\": \"Microsoft.Cdn/profiles/endpoints\",\r\n \"name\": \"ps2101\",\r\n \"location\": \"EastUs\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hostName\": \"ps2101.azureedge.net\",\r\n \"originHostHeader\": null,\r\n \"originPath\": null,\r\n \"contentTypesToCompress\": [],\r\n \"isCompressionEnabled\": false,\r\n \"isHttpAllowed\": true,\r\n \"isHttpsAllowed\": true,\r\n \"queryStringCachingBehavior\": \"IgnoreQueryString\",\r\n \"optimizationType\": null,\r\n \"probePath\": null,\r\n \"origins\": [\r\n {\r\n \"name\": \"contoso\",\r\n \"properties\": {\r\n \"hostName\": \"www.contoso.com\",\r\n \"httpPort\": null,\r\n \"httpsPort\": null,\r\n \"originHostHeader\": null,\r\n \"priority\": null,\r\n \"weight\": null,\r\n \"enabled\": true,\r\n \"privateLinkAlias\": null,\r\n \"privateLinkResourceId\": null,\r\n \"privateLinkLocation\": null,\r\n \"privateEndpointStatus\": null,\r\n \"privateLinkApprovalMessage\": null\r\n }\r\n }\r\n ],\r\n \"originGroups\": [],\r\n \"defaultOriginGroup\": null,\r\n \"customDomains\": [],\r\n \"geoFilters\": [],\r\n \"deliveryPolicy\": null,\r\n \"urlSigningKeys\": [],\r\n \"webApplicationFirewallPolicyLink\": null,\r\n \"resourceState\": \"Running\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps3082?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMzA4Mj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d97a145f-287d-48c4-8d58-591f177ad3c0" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "255ce570-5360-4467-850d-6c14db1b94b6" - ], - "x-ms-correlation-request-id": [ - "255ce570-5360-4467-850d-6c14db1b94b6" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070403Z:255ce570-5360-4467-850d-6c14db1b94b6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:04:02 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNd09ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "89398193-232f-4986-89e3-61ece4d64307" - ], - "x-ms-correlation-request-id": [ - "89398193-232f-4986-89e3-61ece4d64307" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070418Z:89398193-232f-4986-89e3-61ece4d64307" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:04:18 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNd09ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "ed379898-a9d2-49bb-9a1f-afd02ba99417" - ], - "x-ms-correlation-request-id": [ - "ed379898-a9d2-49bb-9a1f-afd02ba99417" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070434Z:ed379898-a9d2-49bb-9a1f-afd02ba99417" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:04:33 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNd09ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "2fdf1451-c5b7-4ecf-8bc9-0a1b298cf9ed" - ], - "x-ms-correlation-request-id": [ - "2fdf1451-c5b7-4ecf-8bc9-0a1b298cf9ed" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070449Z:2fdf1451-c5b7-4ecf-8bc9-0a1b298cf9ed" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:04:49 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNd09ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "0d6142a3-0f58-4d0b-a8a8-6591c26d395d" - ], - "x-ms-correlation-request-id": [ - "0d6142a3-0f58-4d0b-a8a8-6591c26d395d" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070505Z:0d6142a3-0f58-4d0b-a8a8-6591c26d395d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:05:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNd09ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "b70af382-2658-4467-82da-1b91f5eaa67b" - ], - "x-ms-correlation-request-id": [ - "b70af382-2658-4467-82da-1b91f5eaa67b" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070520Z:b70af382-2658-4467-82da-1b91f5eaa67b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:05:20 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNd09ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "783e5c6b-d2f9-424b-9d2e-47a4d21bf64d" - ], - "x-ms-correlation-request-id": [ - "783e5c6b-d2f9-424b-9d2e-47a4d21bf64d" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070536Z:783e5c6b-d2f9-424b-9d2e-47a4d21bf64d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:05:35 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNd09ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "f13e9fa0-2221-4e69-9c21-1257baf75e96" - ], - "x-ms-correlation-request-id": [ - "f13e9fa0-2221-4e69-9c21-1257baf75e96" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070551Z:f13e9fa0-2221-4e69-9c21-1257baf75e96" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:05:50 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNd09ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "2b7bcedc-68e5-46fb-9c4b-e6e61312f7d9" - ], - "x-ms-correlation-request-id": [ - "2b7bcedc-68e5-46fb-9c4b-e6e61312f7d9" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070606Z:2b7bcedc-68e5-46fb-9c4b-e6e61312f7d9" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:06:05 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNd09ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "06445b78-da72-4d5f-8d82-b23e5c565cd6" - ], - "x-ms-correlation-request-id": [ - "06445b78-da72-4d5f-8d82-b23e5c565cd6" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070622Z:06445b78-da72-4d5f-8d82-b23e5c565cd6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:06:22 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNd09ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "38d099a5-bb2b-41e4-a4e5-de19ab400946" - ], - "x-ms-correlation-request-id": [ - "38d099a5-bb2b-41e4-a4e5-de19ab400946" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070637Z:38d099a5-bb2b-41e4-a4e5-de19ab400946" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:06:37 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNd09ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "4ef39330-ce9a-484a-a788-f8b9991d4a68" - ], - "x-ms-correlation-request-id": [ - "4ef39330-ce9a-484a-a788-f8b9991d4a68" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070653Z:4ef39330-ce9a-484a-a788-f8b9991d4a68" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:06:52 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzMwODItV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpNd09ESXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-request-id": [ - "80d97508-3e66-4cd8-bc98-d45cf397eb7e" - ], - "x-ms-correlation-request-id": [ - "80d97508-3e66-4cd8-bc98-d45cf397eb7e" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070653Z:80d97508-3e66-4cd8-bc98-d45cf397eb7e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:06:53 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-ProfileDeleteWithEndpoints": [ - "ps4880", - "ps2101", - "ps3082" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfileGetResourceUsage.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfileGetResourceUsage.json deleted file mode 100644 index 186e3c41eaeb..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfileGetResourceUsage.json +++ /dev/null @@ -1,921 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2748?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjc0OD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0bc8c6a1-6450-45a3-8006-3e839248c88c" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "2e19bdc9-dc10-43a9-bf93-dd2803cc2983" - ], - "x-ms-correlation-request-id": [ - "2e19bdc9-dc10-43a9-bf93-dd2803cc2983" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072516Z:2e19bdc9-dc10-43a9-bf93-dd2803cc2983" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:25:15 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2748\",\r\n \"name\": \"ps2748\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d83f44d9-b4bf-4e6e-97e3-478e7c32a2d3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-original-request-ids": [ - "6b48cdb2-2e92-49f0-8816-92877e3a312b", - "4b3971e8-e7b8-439c-9325-24eb3974a532" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-request-id": [ - "8b30c13c-9eb2-484c-8bf9-97020578f9c5" - ], - "x-ms-correlation-request-id": [ - "8b30c13c-9eb2-484c-8bf9-97020578f9c5" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072518Z:8b30c13c-9eb2-484c-8bf9-97020578f9c5" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:25:17 GMT" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "70691" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2748/providers/Microsoft.Cdn/profiles/ps6558?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjc0OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY1NTg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d83f44d9-b4bf-4e6e-97e3-478e7c32a2d3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "77" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ba3fc505-0fe6-4f89-bdd0-f05189d72ae6" - ], - "x-ms-client-request-id": [ - "d83f44d9-b4bf-4e6e-97e3-478e7c32a2d3" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2748/providers/Microsoft.Cdn/operationresults/996445cd-755f-4844-9385-6bb06211b67d?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "23" - ], - "x-ms-correlation-request-id": [ - "402c86ff-445d-45c4-a734-99af9f5558a1" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072531Z:402c86ff-445d-45c4-a734-99af9f5558a1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:25:30 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2748/providers/Microsoft.Cdn/profiles/ps6558\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6558\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2748/providers/Microsoft.Cdn/operationresults/996445cd-755f-4844-9385-6bb06211b67d?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjc0OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzk5NjQ0NWNkLTc1NWYtNDg0NC05Mzg1LTZiYjA2MjExYjY3ZD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d83f44d9-b4bf-4e6e-97e3-478e7c32a2d3" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "31603a3a-c071-4747-b3b3-d709051dbcac" - ], - "x-ms-client-request-id": [ - "d83f44d9-b4bf-4e6e-97e3-478e7c32a2d3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-correlation-request-id": [ - "343fc96d-645d-491f-9f34-efdc95787137" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072541Z:343fc96d-645d-491f-9f34-efdc95787137" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:25:41 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2748/providers/Microsoft.Cdn/profiles/ps6558?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjc0OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY1NTg/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d83f44d9-b4bf-4e6e-97e3-478e7c32a2d3" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "abf07847-45af-4ad0-8655-f956c99acbf3" - ], - "x-ms-client-request-id": [ - "d83f44d9-b4bf-4e6e-97e3-478e7c32a2d3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "46b9a2e0-29cb-4e15-8537-96c212b161cf" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072542Z:46b9a2e0-29cb-4e15-8537-96c212b161cf" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:25:42 GMT" - ], - "Content-Length": [ - "318" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2748/providers/Microsoft.Cdn/profiles/ps6558\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6558\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2748/providers/Microsoft.Cdn/profiles/ps6558/checkResourceUsage?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjc0OC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY1NTgvY2hlY2tSZXNvdXJjZVVzYWdlP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "20a6f1fd-8204-4b87-9f4e-656e0b6a97a7" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2e34532f-b8a8-410d-9bff-d274f09351bb" - ], - "x-ms-client-request-id": [ - "20a6f1fd-8204-4b87-9f4e-656e0b6a97a7" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "ca803352-1cdf-44a7-ab29-f89c0c840cf2" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072542Z:ca803352-1cdf-44a7-ab29-f89c0c840cf2" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:25:42 GMT" - ], - "Content-Length": [ - "82" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"resourceType\": \"endpoint\",\r\n \"unit\": \"count\",\r\n \"currentValue\": 0,\r\n \"limit\": 25\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2748?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjc0OD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f34b936c-119c-4c07-8d52-96efffea9045" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3NDgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14996" - ], - "x-ms-request-id": [ - "cc6a4aca-2f7d-4e13-8b34-92430230ff0d" - ], - "x-ms-correlation-request-id": [ - "cc6a4aca-2f7d-4e13-8b34-92430230ff0d" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072545Z:cc6a4aca-2f7d-4e13-8b34-92430230ff0d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:25:45 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3NDgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM05EZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3NDgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11967" - ], - "x-ms-request-id": [ - "94ed647a-1189-4cdb-91dd-d9dbd262bcba" - ], - "x-ms-correlation-request-id": [ - "94ed647a-1189-4cdb-91dd-d9dbd262bcba" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072601Z:94ed647a-1189-4cdb-91dd-d9dbd262bcba" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:26:00 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3NDgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM05EZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3NDgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11966" - ], - "x-ms-request-id": [ - "4045fa96-11f1-4572-b1e3-e5254de56702" - ], - "x-ms-correlation-request-id": [ - "4045fa96-11f1-4572-b1e3-e5254de56702" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072616Z:4045fa96-11f1-4572-b1e3-e5254de56702" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:26:16 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3NDgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM05EZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3NDgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11965" - ], - "x-ms-request-id": [ - "fff94ec5-d1e5-4f87-a910-22d9183e6f5c" - ], - "x-ms-correlation-request-id": [ - "fff94ec5-d1e5-4f87-a910-22d9183e6f5c" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072632Z:fff94ec5-d1e5-4f87-a910-22d9183e6f5c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:26:31 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3NDgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM05EZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3NDgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11964" - ], - "x-ms-request-id": [ - "f346b7cb-1366-451f-8605-45f5607f097c" - ], - "x-ms-correlation-request-id": [ - "f346b7cb-1366-451f-8605-45f5607f097c" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072647Z:f346b7cb-1366-451f-8605-45f5607f097c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:26:46 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3NDgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM05EZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3NDgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11963" - ], - "x-ms-request-id": [ - "6889511f-315d-4bd3-9c34-60a8c944bef8" - ], - "x-ms-correlation-request-id": [ - "6889511f-315d-4bd3-9c34-60a8c944bef8" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072702Z:6889511f-315d-4bd3-9c34-60a8c944bef8" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:27:02 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3NDgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM05EZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3NDgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11962" - ], - "x-ms-request-id": [ - "127a7181-1537-48de-aa4d-515b3da384b3" - ], - "x-ms-correlation-request-id": [ - "127a7181-1537-48de-aa4d-515b3da384b3" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072718Z:127a7181-1537-48de-aa4d-515b3da384b3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:27:18 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3NDgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM05EZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11961" - ], - "x-ms-request-id": [ - "138a0e7e-a9b1-46a6-99de-bd3ed9ac7615" - ], - "x-ms-correlation-request-id": [ - "138a0e7e-a9b1-46a6-99de-bd3ed9ac7615" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072733Z:138a0e7e-a9b1-46a6-99de-bd3ed9ac7615" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:27:33 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzI3NDgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJM05EZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11960" - ], - "x-ms-request-id": [ - "ae4cfd0d-e0e4-48e7-8871-f3c41978df57" - ], - "x-ms-correlation-request-id": [ - "ae4cfd0d-e0e4-48e7-8871-f3c41978df57" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072734Z:ae4cfd0d-e0e4-48e7-8871-f3c41978df57" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:27:34 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-ProfileGetResourceUsages": [ - "ps6558", - "ps462", - "ps2748" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfilePipeline.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfilePipeline.json deleted file mode 100644 index 574327dd39be..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestProfilePipeline.json +++ /dev/null @@ -1,2623 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "fbd9167a-59e7-4525-afcd-3dc181069ee5" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "a01b06a0-22da-4732-80e8-232bdee53c79" - ], - "x-ms-correlation-request-id": [ - "a01b06a0-22da-4732-80e8-232bdee53c79" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070916Z:a01b06a0-22da-4732-80e8-232bdee53c79" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:09:16 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2050\",\r\n \"name\": \"ps2050\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-original-request-ids": [ - "35274940-f664-4003-8090-d6355d4b1ea2", - "906cce43-0027-4469-b96c-8f56dc83cda8" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-request-id": [ - "27e9386b-59e4-4910-9e0a-fed00046c18d" - ], - "x-ms-correlation-request-id": [ - "27e9386b-59e4-4910-9e0a-fed00046c18d" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070918Z:27e9386b-59e4-4910-9e0a-fed00046c18d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:09:18 GMT" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "70691" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b9675b1d-5cb8-4f0c-8bc0-e070ae77b1d6" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-original-request-ids": [ - "36e2b449-d08f-47a1-af4c-32d4cef708c9", - "68b952b1-1f88-4a87-9d8c-962d95689ab1" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "47" - ], - "x-ms-request-id": [ - "ad161df7-668c-4b39-ab4c-756caccf505f" - ], - "x-ms-correlation-request-id": [ - "ad161df7-668c-4b39-ab4c-756caccf505f" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071052Z:ad161df7-668c-4b39-ab4c-756caccf505f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:10:52 GMT" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "70691" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2050/providers/Microsoft.Cdn/profiles/ps670?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY3MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"location\": \"EastUS\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "142" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4e40402f-a62f-4810-98ba-dd6fe50f02c2" - ], - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/d7a3f835-cdda-4416-bbc4-f31eec8141c0?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "95ee69d6-3d55-4a94-a5c0-7b42cff3442a" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070927Z:95ee69d6-3d55-4a94-a5c0-7b42cff3442a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:09:27 GMT" - ], - "Content-Length": [ - "349" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/profiles/ps670\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps670\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/d7a3f835-cdda-4416-bbc4-f31eec8141c0?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q3YTNmODM1LWNkZGEtNDQxNi1iYmM0LWYzMWVlYzgxNDFjMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2804d0d5-0c0d-404a-9467-81e44a81d947" - ], - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "5c7886c7-e55f-4341-87b3-2dd9684558b5" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070938Z:5c7886c7-e55f-4341-87b3-2dd9684558b5" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:09:38 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/d7a3f835-cdda-4416-bbc4-f31eec8141c0?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q3YTNmODM1LWNkZGEtNDQxNi1iYmM0LWYzMWVlYzgxNDFjMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b82fe983-da64-4cfc-a433-63b7c6dd05cb" - ], - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-correlation-request-id": [ - "66812413-d4d7-4779-bbe4-0360a227b41c" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070948Z:66812413-d4d7-4779-bbe4-0360a227b41c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:09:48 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/d7a3f835-cdda-4416-bbc4-f31eec8141c0?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q3YTNmODM1LWNkZGEtNDQxNi1iYmM0LWYzMWVlYzgxNDFjMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "41ee0040-45a8-477e-81b6-fe8692064ad0" - ], - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-correlation-request-id": [ - "3ac594e4-bbbb-445a-8c66-83da3b6b4b68" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T070958Z:3ac594e4-bbbb-445a-8c66-83da3b6b4b68" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:09:58 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/d7a3f835-cdda-4416-bbc4-f31eec8141c0?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q3YTNmODM1LWNkZGEtNDQxNi1iYmM0LWYzMWVlYzgxNDFjMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "871672ce-cc95-48b2-9461-055c58c539c7" - ], - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-correlation-request-id": [ - "556457d3-8009-4145-9736-96279f0dde09" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071009Z:556457d3-8009-4145-9736-96279f0dde09" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:10:08 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/d7a3f835-cdda-4416-bbc4-f31eec8141c0?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q3YTNmODM1LWNkZGEtNDQxNi1iYmM0LWYzMWVlYzgxNDFjMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "76a32ec9-147e-4c8a-8e6f-f28c0b8ade71" - ], - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-correlation-request-id": [ - "2e723bb0-f5a6-44ae-b493-9739ab7acc8c" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071019Z:2e723bb0-f5a6-44ae-b493-9739ab7acc8c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:10:18 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/d7a3f835-cdda-4416-bbc4-f31eec8141c0?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q3YTNmODM1LWNkZGEtNDQxNi1iYmM0LWYzMWVlYzgxNDFjMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "bc36ec13-9a42-4801-838f-b8f7ecfcfec1" - ], - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-correlation-request-id": [ - "1b580169-fdd6-4ce2-aef5-7af40596f949" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071029Z:1b580169-fdd6-4ce2-aef5-7af40596f949" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:10:29 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/d7a3f835-cdda-4416-bbc4-f31eec8141c0?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q3YTNmODM1LWNkZGEtNDQxNi1iYmM0LWYzMWVlYzgxNDFjMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3d2b9d3a-9704-42bd-8ce6-618321e8d2d2" - ], - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-correlation-request-id": [ - "7137710e-3fc6-4918-85a2-8a031027f5e1" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071040Z:7137710e-3fc6-4918-85a2-8a031027f5e1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:10:39 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/d7a3f835-cdda-4416-bbc4-f31eec8141c0?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q3YTNmODM1LWNkZGEtNDQxNi1iYmM0LWYzMWVlYzgxNDFjMD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8abffc8e-0c44-43b1-9ad0-aacf1ed3c1e6" - ], - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11986" - ], - "x-ms-correlation-request-id": [ - "cc7adb19-ca52-420f-af56-f21e9cff78de" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071050Z:cc7adb19-ca52-420f-af56-f21e9cff78de" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:10:50 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2050/providers/Microsoft.Cdn/profiles/ps670?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY3MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4d9aaea8-fe74-4ac4-b6d4-dedc5206ce41" - ], - "x-ms-client-request-id": [ - "ed18b21d-eaf3-452d-ba49-971d75140f6e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "00a1fe3f-d731-4d99-915c-c480754e8ca0" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071051Z:00a1fe3f-d731-4d99-915c-c480754e8ca0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:10:50 GMT" - ], - "Content-Length": [ - "348" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/profiles/ps670\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps670\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2050/providers/Microsoft.Cdn/profiles/ps670?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY3MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3c3d8724-6250-4ef0-84c9-11f040d5db85" - ], - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "43" - ], - "x-ms-correlation-request-id": [ - "f774994e-3009-424a-b128-e473474f8e96" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071202Z:f774994e-3009-424a-b128-e473474f8e96" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:12:01 GMT" - ], - "Content-Length": [ - "348" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/profiles/ps670\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps670\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2050/providers/Microsoft.Cdn/profiles/ps7681?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc2ODE/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"location\": \"EastUS\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b9675b1d-5cb8-4f0c-8bc0-e070ae77b1d6" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "142" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "57ceb365-5ea1-40bd-a533-ec9b2c355bbe" - ], - "x-ms-client-request-id": [ - "b9675b1d-5cb8-4f0c-8bc0-e070ae77b1d6" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/6e04a4f2-7634-4b9d-95cd-293e63dc15cb?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "23" - ], - "x-ms-correlation-request-id": [ - "ec0daea6-7111-4a43-9176-3dbcab16819f" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071058Z:ec0daea6-7111-4a43-9176-3dbcab16819f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:10:58 GMT" - ], - "Content-Length": [ - "351" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/profiles/ps7681\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps7681\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/6e04a4f2-7634-4b9d-95cd-293e63dc15cb?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzZlMDRhNGYyLTc2MzQtNGI5ZC05NWNkLTI5M2U2M2RjMTVjYj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b9675b1d-5cb8-4f0c-8bc0-e070ae77b1d6" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "38a9bb31-ab25-44d6-bd77-702dd67d7929" - ], - "x-ms-client-request-id": [ - "b9675b1d-5cb8-4f0c-8bc0-e070ae77b1d6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11984" - ], - "x-ms-correlation-request-id": [ - "9b200086-de70-458f-b7a8-52f689485364" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071109Z:9b200086-de70-458f-b7a8-52f689485364" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:11:08 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/6e04a4f2-7634-4b9d-95cd-293e63dc15cb?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzZlMDRhNGYyLTc2MzQtNGI5ZC05NWNkLTI5M2U2M2RjMTVjYj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b9675b1d-5cb8-4f0c-8bc0-e070ae77b1d6" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7aa4e6ba-637a-4e4a-902e-e27a7605b8fe" - ], - "x-ms-client-request-id": [ - "b9675b1d-5cb8-4f0c-8bc0-e070ae77b1d6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11982" - ], - "x-ms-correlation-request-id": [ - "eb5b3d88-7191-4dae-becc-2c25ab4feaa4" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071119Z:eb5b3d88-7191-4dae-becc-2c25ab4feaa4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:11:19 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/6e04a4f2-7634-4b9d-95cd-293e63dc15cb?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzZlMDRhNGYyLTc2MzQtNGI5ZC05NWNkLTI5M2U2M2RjMTVjYj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b9675b1d-5cb8-4f0c-8bc0-e070ae77b1d6" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "86bdc569-41da-4982-a21f-2b44a53e1364" - ], - "x-ms-client-request-id": [ - "b9675b1d-5cb8-4f0c-8bc0-e070ae77b1d6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11981" - ], - "x-ms-correlation-request-id": [ - "a5f639f7-8e04-4f3a-b247-bfeec9d49be3" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071129Z:a5f639f7-8e04-4f3a-b247-bfeec9d49be3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:11:29 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/6e04a4f2-7634-4b9d-95cd-293e63dc15cb?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzZlMDRhNGYyLTc2MzQtNGI5ZC05NWNkLTI5M2U2M2RjMTVjYj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b9675b1d-5cb8-4f0c-8bc0-e070ae77b1d6" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a05f87f4-fdad-4682-856c-08c6cec84bd6" - ], - "x-ms-client-request-id": [ - "b9675b1d-5cb8-4f0c-8bc0-e070ae77b1d6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11980" - ], - "x-ms-correlation-request-id": [ - "f8a7ba61-5b8e-484c-a50f-4c52df4644e1" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071140Z:f8a7ba61-5b8e-484c-a50f-4c52df4644e1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:11:39 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/6e04a4f2-7634-4b9d-95cd-293e63dc15cb?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzZlMDRhNGYyLTc2MzQtNGI5ZC05NWNkLTI5M2U2M2RjMTVjYj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b9675b1d-5cb8-4f0c-8bc0-e070ae77b1d6" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "db1a398b-4c97-479f-858d-2eb26a900b13" - ], - "x-ms-client-request-id": [ - "b9675b1d-5cb8-4f0c-8bc0-e070ae77b1d6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11979" - ], - "x-ms-correlation-request-id": [ - "c3704632-6fd3-4160-a6a2-b91c75b00426" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071150Z:c3704632-6fd3-4160-a6a2-b91c75b00426" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:11:49 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/6e04a4f2-7634-4b9d-95cd-293e63dc15cb?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzZlMDRhNGYyLTc2MzQtNGI5ZC05NWNkLTI5M2U2M2RjMTVjYj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b9675b1d-5cb8-4f0c-8bc0-e070ae77b1d6" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0bba5512-ce74-4f1b-a57e-35f944681e65" - ], - "x-ms-client-request-id": [ - "b9675b1d-5cb8-4f0c-8bc0-e070ae77b1d6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11978" - ], - "x-ms-correlation-request-id": [ - "b1ac4088-9e22-4dca-8f30-d158fe4a0247" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071200Z:b1ac4088-9e22-4dca-8f30-d158fe4a0247" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:12:00 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2050/providers/Microsoft.Cdn/profiles/ps7681?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc2ODE/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b9675b1d-5cb8-4f0c-8bc0-e070ae77b1d6" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8fdb625a-50df-4c92-b281-2ae868238cfd" - ], - "x-ms-client-request-id": [ - "b9675b1d-5cb8-4f0c-8bc0-e070ae77b1d6" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "46" - ], - "x-ms-correlation-request-id": [ - "a6edd1d9-3cc9-48ff-8982-d315fa4f96f1" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071201Z:a6edd1d9-3cc9-48ff-8982-d315fa4f96f1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:12:00 GMT" - ], - "Content-Length": [ - "350" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/profiles/ps7681\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps7681\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2050/providers/Microsoft.Cdn/profiles/ps7681?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc2ODE/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b699f6d0-5d67-4420-b0c0-30bdfd70cc63" - ], - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "42" - ], - "x-ms-correlation-request-id": [ - "6e778c6d-9ea9-4fed-a7bc-59ad7b4b5ad8" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071236Z:6e778c6d-9ea9-4fed-a7bc-59ad7b4b5ad8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:12:36 GMT" - ], - "Content-Length": [ - "350" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/profiles/ps7681\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps7681\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2050/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "bc871812-e83d-485f-bfc1-7dda16aa203e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5c940287-941c-4f5b-8fd8-aef3c007a742" - ], - "x-ms-client-request-id": [ - "bc871812-e83d-485f-bfc1-7dda16aa203e" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "45" - ], - "x-ms-correlation-request-id": [ - "0ad3dc91-796b-4e5a-8fa2-122930451f85" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071201Z:0ad3dc91-796b-4e5a-8fa2-122930451f85" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:12:00 GMT" - ], - "Content-Length": [ - "711" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/profiles/ps670\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps670\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/profiles/ps7681\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps7681\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2050/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4e813843-afa7-47df-ae24-13e8cc92bb48" - ], - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "44" - ], - "x-ms-correlation-request-id": [ - "3afa20e0-4aca-4ed5-9fab-ec92a4b8f1aa" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071202Z:3afa20e0-4aca-4ed5-9fab-ec92a4b8f1aa" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:12:01 GMT" - ], - "Content-Length": [ - "711" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/profiles/ps670\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps670\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/profiles/ps7681\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps7681\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"tag2\": \"value2\",\r\n \"tag1\": \"value1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2050/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0a67f6ae-535e-4ce8-95ba-747c235ab770" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "41" - ], - "x-ms-request-id": [ - "f10496a2-4b63-42bf-b996-2fa0113fe1ac" - ], - "x-ms-correlation-request-id": [ - "f10496a2-4b63-42bf-b996-2fa0113fe1ac" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071309Z:f10496a2-4b63-42bf-b996-2fa0113fe1ac" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:13:09 GMT" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "12" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2050/providers/Microsoft.Cdn/profiles/ps670?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY3MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/d943e8c4-1b76-4f49-982a-d652a65b3689/profileresults/ps670?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "cfdebaec-7360-4d19-beef-b23f2de2beb0" - ], - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/d943e8c4-1b76-4f49-982a-d652a65b3689?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" - ], - "x-ms-correlation-request-id": [ - "5c86d102-3e10-4e05-a88e-00086a62b437" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071205Z:5c86d102-3e10-4e05-a88e-00086a62b437" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:12:04 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/d943e8c4-1b76-4f49-982a-d652a65b3689?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q5NDNlOGM0LTFiNzYtNGY0OS05ODJhLWQ2NTJhNjViMzY4OT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5b9ce1e4-9e8a-4f53-a723-4c6124ab8b26" - ], - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11977" - ], - "x-ms-correlation-request-id": [ - "610a719b-1076-46e3-ab59-3df61f26f72d" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071215Z:610a719b-1076-46e3-ab59-3df61f26f72d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:12:14 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/d943e8c4-1b76-4f49-982a-d652a65b3689?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q5NDNlOGM0LTFiNzYtNGY0OS05ODJhLWQ2NTJhNjViMzY4OT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e2d194d7-9c7b-43e5-a3b8-f1bf632b9df2" - ], - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11976" - ], - "x-ms-correlation-request-id": [ - "0d89c964-79a1-4a61-a3f8-63f30dcac995" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071225Z:0d89c964-79a1-4a61-a3f8-63f30dcac995" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:12:24 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/d943e8c4-1b76-4f49-982a-d652a65b3689?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q5NDNlOGM0LTFiNzYtNGY0OS05ODJhLWQ2NTJhNjViMzY4OT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0be2e675-78b7-492b-9a5b-8158474e593b" - ], - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11975" - ], - "x-ms-correlation-request-id": [ - "12ca40ab-afaa-499a-9e4b-f4c856fb22dd" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071236Z:12ca40ab-afaa-499a-9e4b-f4c856fb22dd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:12:35 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/d943e8c4-1b76-4f49-982a-d652a65b3689/profileresults/ps670?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2Q5NDNlOGM0LTFiNzYtNGY0OS05ODJhLWQ2NTJhNjViMzY4OS9wcm9maWxlcmVzdWx0cy9wczY3MD9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "af289da3-ce65-43d7-a65f-92a78703fd1d" - ], - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11974" - ], - "x-ms-correlation-request-id": [ - "0688e957-3cb6-4d24-a655-1fae4dc329fe" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071236Z:0688e957-3cb6-4d24-a655-1fae4dc329fe" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:12:36 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps2050/providers/Microsoft.Cdn/profiles/ps7681?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczc2ODE/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/dd8e6a47-7e67-4fd0-af6d-58559f5162c9/profileresults/ps7681?api-version=2020-09-01" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c430068d-9d38-4827-9254-815f117ab60e" - ], - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/dd8e6a47-7e67-4fd0-af6d-58559f5162c9?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14997" - ], - "x-ms-correlation-request-id": [ - "a15e4eca-6aa5-4fa9-9a2e-1fa2da03f406" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071238Z:a15e4eca-6aa5-4fa9-9a2e-1fa2da03f406" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:12:38 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/dd8e6a47-7e67-4fd0-af6d-58559f5162c9?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2RkOGU2YTQ3LTdlNjctNGZkMC1hZjZkLTU4NTU5ZjUxNjJjOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "94e57e71-c4c7-4d8c-ab71-fc373b1671b8" - ], - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11973" - ], - "x-ms-correlation-request-id": [ - "cb8feaa3-f738-4aee-8a0a-6cfaa038bc06" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071248Z:cb8feaa3-f738-4aee-8a0a-6cfaa038bc06" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:12:48 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/dd8e6a47-7e67-4fd0-af6d-58559f5162c9?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2RkOGU2YTQ3LTdlNjctNGZkMC1hZjZkLTU4NTU5ZjUxNjJjOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "dcd1d4eb-400d-4dd2-b759-fdb422f85a98" - ], - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11972" - ], - "x-ms-correlation-request-id": [ - "b45a7f85-ff80-4903-acad-29f72fda1b9e" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071258Z:b45a7f85-ff80-4903-acad-29f72fda1b9e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:12:58 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/dd8e6a47-7e67-4fd0-af6d-58559f5162c9?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2RkOGU2YTQ3LTdlNjctNGZkMC1hZjZkLTU4NTU5ZjUxNjJjOT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4dbf7b6a-4e42-4714-b981-3e515df8b30a" - ], - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11971" - ], - "x-ms-correlation-request-id": [ - "5926536c-da44-4deb-966f-834ecff2b097" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071309Z:5926536c-da44-4deb-966f-834ecff2b097" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:13:08 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050/providers/Microsoft.Cdn/operationresults/dd8e6a47-7e67-4fd0-af6d-58559f5162c9/profileresults/ps7681?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzL2RkOGU2YTQ3LTdlNjctNGZkMC1hZjZkLTU4NTU5ZjUxNjJjOS9wcm9maWxlcmVzdWx0cy9wczc2ODE/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "af86a16b-cb1e-421b-bda9-78878547fcaf" - ], - "x-ms-client-request-id": [ - "a4d3e446-e3ca-46aa-bb4b-f8e9230476db" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11970" - ], - "x-ms-correlation-request-id": [ - "f8373a1e-00c7-44b7-988a-15b0c9af38d5" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071309Z:f8373a1e-00c7-44b7-988a-15b0c9af38d5" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:13:09 GMT" - ], - "Content-Length": [ - "79" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": \"The requested resource was not found.\"\r\n }\r\n}", - "StatusCode": 404 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps2050?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzMjA1MD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "93d277ba-952d-4b34-b5ea-2521ea5f4232" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" - ], - "x-ms-request-id": [ - "6804ed25-cb53-455b-aa5e-ce5fdf9de422" - ], - "x-ms-correlation-request-id": [ - "6804ed25-cb53-455b-aa5e-ce5fdf9de422" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071314Z:6804ed25-cb53-455b-aa5e-ce5fdf9de422" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:13:13 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd05UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "5af64745-ea7e-44ea-85e3-17ae1435c199" - ], - "x-ms-correlation-request-id": [ - "5af64745-ea7e-44ea-85e3-17ae1435c199" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071329Z:5af64745-ea7e-44ea-85e3-17ae1435c199" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:13:29 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd05UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-request-id": [ - "1f14caac-1f8a-4a7b-b113-899de20d6410" - ], - "x-ms-correlation-request-id": [ - "1f14caac-1f8a-4a7b-b113-899de20d6410" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071345Z:1f14caac-1f8a-4a7b-b113-899de20d6410" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:13:44 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd05UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11986" - ], - "x-ms-request-id": [ - "e8d62b56-c563-482e-97f4-0f38398e684b" - ], - "x-ms-correlation-request-id": [ - "e8d62b56-c563-482e-97f4-0f38398e684b" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071400Z:e8d62b56-c563-482e-97f4-0f38398e684b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:13:59 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzIwNTAtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpJd05UQXRWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11985" - ], - "x-ms-request-id": [ - "1e61a82d-fe45-4ea5-a813-4cc2462f421f" - ], - "x-ms-correlation-request-id": [ - "1e61a82d-fe45-4ea5-a813-4cc2462f421f" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071401Z:1e61a82d-fe45-4ea5-a813-4cc2462f421f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:14:00 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-ProfilePipeline": [ - "ps670", - "ps7681", - "ps2050" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestSkuCreate.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestSkuCreate.json deleted file mode 100644 index a81b5d56e9da..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.ProfileTests/TestSkuCreate.json +++ /dev/null @@ -1,3023 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1999f15a-ce72-418c-ad4b-57c56db7414e" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "670329c5-38e6-4293-a433-4759ca4f2d8f" - ], - "x-ms-correlation-request-id": [ - "670329c5-38e6-4293-a433-4759ca4f2d8f" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071750Z:670329c5-38e6-4293-a433-4759ca4f2d8f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:17:49 GMT" - ], - "Content-Length": [ - "165" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9118\",\r\n \"name\": \"ps9118\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "dff0183e-5a93-472d-9cb8-87a71937c9e3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-original-request-ids": [ - "81daac16-cd24-47a5-9b87-3271b91d79e1", - "ebb4c50e-fdaa-4dff-9464-4695176bef8b" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "49" - ], - "x-ms-request-id": [ - "45c97e63-395c-43f7-ba18-34a48dbea607" - ], - "x-ms-correlation-request-id": [ - "45c97e63-395c-43f7-ba18-34a48dbea607" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071752Z:45c97e63-395c-43f7-ba18-34a48dbea607" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:17:52 GMT" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "70691" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0387218c-7141-4093-b853-e7c4060a035a" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-original-request-ids": [ - "ef416e69-1f43-44cd-a556-445451ca829a", - "02922cca-b95e-47b0-ba7b-157b9af634d3" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "47" - ], - "x-ms-request-id": [ - "09cee7e2-c7e6-41ea-a365-e228e790fca2" - ], - "x-ms-correlation-request-id": [ - "09cee7e2-c7e6-41ea-a365-e228e790fca2" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071817Z:09cee7e2-c7e6-41ea-a365-e228e790fca2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:18:16 GMT" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "70691" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-original-request-ids": [ - "84ccde73-f83c-4ced-936a-0cf33840965e", - "a7e7a02f-1b98-4c8b-b5f9-3b26ccf282d1" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "45" - ], - "x-ms-request-id": [ - "7f35e4a7-d681-470d-8539-f71aec555934" - ], - "x-ms-correlation-request-id": [ - "7f35e4a7-d681-470d-8539-f71aec555934" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071915Z:7f35e4a7-d681-470d-8539-f71aec555934" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:19:15 GMT" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "70691" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/profiles?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL3Byb2ZpbGVzP2FwaS12ZXJzaW9uPTIwMjAtMDktMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "924a651e-84c4-47c7-887c-1d356ceb1226" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-original-request-ids": [ - "1b97cd4f-53bb-4a55-b263-148652487029", - "3ffa6304-01ad-414c-ad60-c9adf9351131" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "43" - ], - "x-ms-request-id": [ - "ebda71d4-81cc-4574-8d95-227bfa21de0f" - ], - "x-ms-correlation-request-id": [ - "ebda71d4-81cc-4574-8d95-227bfa21de0f" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072159Z:ebda71d4-81cc-4574-8d95-227bfa21de0f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:21:59 GMT" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "70691" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch/providers/Microsoft.Cdn/profiles/test123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test123\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/jomejia-rg/providers/Microsoft.Cdn/profiles/jomejia-msft-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"jomejia-msft-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sri-URLSigning-CDNProfile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sri-URLSigning-CDNProfile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/RRVz\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"RRVz\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrms2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrms2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/rrahultest/providers/Microsoft.Cdn/profiles/rrvz2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rrvz2\",\r\n \"location\": \"WestCentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/VerizonRev4Test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"VerizonRev4Test\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"Event\": \"NFL\",\r\n \"Quarter\": \"3rd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-temp-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-temp-profile\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/MSCdnProfileRandom123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"MSCdnProfileRandom123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdnsecondprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdnsecondprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaPremiumVerizonBYP1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaPremiumVerizonBYP1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginbugbash/providers/Microsoft.Cdn/profiles/multioriginbugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginbugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakra-multiorigin-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakra-multiorigin-bugbash\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/zhden-rp-test/providers/Microsoft.Cdn/profiles/zhdencdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"zhdencdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriCDNProfile-Akamai\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriCDNProfile-Akamai\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/xujiaStandardVerizonForUpgrade\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"xujiaStandardVerizonForUpgrade\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sindhuricdn\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuricdn\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/SINADELL-TEST-RG/providers/Microsoft.Cdn/profiles/sinallop\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinallop\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ind\": \"sdd\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-westus/providers/Microsoft.Cdn/profiles/test0618-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"test0618-2\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/xujia/providers/Microsoft.Cdn/profiles/CdnProfile100\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"CdnProfile100\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"displayName\": \"CdnProfile100\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/anyresource/providers/Microsoft.Cdn/profiles/testtesttest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"testtesttest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/gubalasu-rg/providers/Microsoft.Cdn/profiles/GuruProdProfile1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"GuruProdProfile1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-MS\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-MS\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CDNQuickstart/providers/Microsoft.Cdn/profiles/cdn-profile-VZ\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdn-profile-VZ\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4013/providers/Microsoft.Cdn/profiles/profile6760\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6760\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/cdntestprofile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"cdntestprofile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3491/providers/Microsoft.Cdn/profiles/profile6061\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6061\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1588/providers/Microsoft.Cdn/profiles/profile5178\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5178\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5601/providers/Microsoft.Cdn/profiles/profile8458\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8458\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3906/providers/Microsoft.Cdn/profiles/profile7988\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7988\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2409/providers/Microsoft.Cdn/profiles/profile4812\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4812\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1192/providers/Microsoft.Cdn/profiles/profile7778\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile7778\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5895/providers/Microsoft.Cdn/profiles/profile5913\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5913\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-test\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/pls-test/providers/Microsoft.Cdn/profiles/pls-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"pls-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/sriTestCDN-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sriTestCDN-profile\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试/providers/Microsoft.Cdn/profiles/tesdddjjj\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tesdddjjj\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUX\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUX\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/newUX/providers/Microsoft.Cdn/profiles/newUXTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"newUXTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup8328/providers/Microsoft.Cdn/profiles/profile3645\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3645\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup4493/providers/Microsoft.Cdn/profiles/profile2440\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2440\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile1794\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1794\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7218/providers/Microsoft.Cdn/profiles/profile9911\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9911\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key3\": \"value3\",\r\n \"key4\": \"value4\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup2709/providers/Microsoft.Cdn/profiles/profile6855\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile6855\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup1001/providers/Microsoft.Cdn/profiles/profile1010\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1010\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-armtemplate-test-verizon\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-armtemplate-test-verizon\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/sindhuri\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sindhuri\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-pls-bugbash/providers/Microsoft.Cdn/profiles/las-pls-bugbash\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-pls-bugbash\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/las-test/providers/Microsoft.Cdn/profiles/las-verizon-arm-test-2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"las-verizon-arm-test-2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"ReportingEnvironment\": \"Production\",\r\n \"ReportingValuestream\": \"VS_Marketing-100\",\r\n \"ReportingComponent\": \"Cdn\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/nachakra-rg-test/providers/Microsoft.Cdn/profiles/nachakrafdv2roxytest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"nachakrafdv2roxytest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/publicpreviewtest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"publicpreviewtest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/multioriginpr/providers/Microsoft.Cdn/profiles/multioriginrelease\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"multioriginrelease\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-CustomDomain-Tests-1-mpac\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/中文测试22/providers/Microsoft.Cdn/profiles/rgchartest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"rgchartest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sinadell123/providers/Microsoft.Cdn/profiles/sinadell123\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"sinadell123\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Test-Std-Msft\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Test-Std-Msft\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindpcdn/providers/Microsoft.Cdn/profiles/ravindptest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindptest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/DefaultResourceGroup-WEU/providers/Microsoft.Cdn/profiles/verizonstd\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"verizonstd\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdn-e2e-test/providers/Microsoft.Cdn/profiles/Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"Cdn-E2e-Endpoint-Tests-3-1\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9001/providers/Microsoft.Cdn/profiles/profile9279\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile9279\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-test-byoc-vzp\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-test-byoc-vzp\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/CdnDemoRG/providers/Microsoft.Cdn/profiles/template-create-test\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"template-create-test\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-test-byoc-rg/providers/Microsoft.Cdn/profiles/lyue-msft-1126\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-msft-1126\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5875/providers/Microsoft.Cdn/profiles/profile3313\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3313\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/critesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"critesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7964/providers/Microsoft.Cdn/profiles/profile3886\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile3886\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/chengll-test/providers/Microsoft.Cdn/profiles/standardVerizonTest\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"standardVerizonTest\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ravindp-afdx/providers/Microsoft.Cdn/profiles/ravindp-1218-1015\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ravindp-1218-1015\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"fe905367-8af8-4c62-8a86-74a0a424a0f1\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTestPreview/providers/Microsoft.Cdn/profiles/AmitTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"tag1\": \"prod\",\r\n \"tag2\": \"previewtest\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"456c6937-a5f3-4a36-91f8-dec05f7c768e\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaoTest1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaoTest1\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"777228bc-5525-4129-8bf4-8fa3c58a5b00\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/varunch-cdn/providers/Microsoft.Cdn/profiles/varunchafdx1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"varunchafdx1\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"name\": \"varunchafdx1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"2bb25076-b696-4641-bb29-e525732d4629\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest2RG/providers/Microsoft.Cdn/profiles/AmitTest2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest2\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e420226d-af27-4930-bbae-20fb9e792456\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AmitTest3RP/providers/Microsoft.Cdn/profiles/AmitTest3\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AmitTest3\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"amit\": \"preview\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"e4d57d21-e6dd-4545-a47a-89817efe0d0f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/guru-p1\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p1\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"09468be3-8081-46ef-b719-ac80419e214c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-bugbash/providers/Microsoft.Cdn/profiles/yuajiaazdns\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"yuajiaazdns\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"36d556f5-d8f6-4933-aa6a-e9df58499b7f\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-profile\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-profile\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"c7ada4ba-9620-41b0-bc85-9eef0f4a2061\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/guru-rg/providers/Microsoft.Cdn/profiles/guru-p2\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"guru-p2\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/sriResourceGroup/providers/Microsoft.Cdn/profiles/localtesting\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"localtesting\",\r\n \"location\": \"Global\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDXPortalBugBash/providers/Microsoft.Cdn/profiles/tyaoafdxtest01\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"tyaoafdxtest01\",\r\n \"location\": \"CentralUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"ed4a7276-51ca-4101-acc2-d07deb7b002c\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup108/providers/Microsoft.Cdn/profiles/profile4884\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4884\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6296/providers/Microsoft.Cdn/profiles/profile4234\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile4234\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup3895/providers/Microsoft.Cdn/profiles/profile2502\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile2502\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/AFDX-Logreport-Bugbash/providers/Microsoft.Cdn/profiles/AFDXReportStage\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"AFDXReportStage\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"3b75cba0-3799-4034-9774-2cb34277975a\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/afdx-demo/providers/Microsoft.Cdn/profiles/afdxdemo\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"afdxdemo\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"7d7d0719-a1bc-4e89-ae96-b0229675d4b6\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup5240/providers/Microsoft.Cdn/profiles/profile8752\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8752\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"44833814-0469-4972-8dd1-1e73f5297cd7\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup7263/providers/Microsoft.Cdn/profiles/profile816\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile816\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"f52c8a00-68ca-4f74-9e2c-f597bcb30861\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/qixiaoAFDxTest/providers/Microsoft.Cdn/profiles/qixiaotest4\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"qixiaotest4\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"8c207b33-a33a-494e-8beb-8a348fe83960\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup6811/providers/Microsoft.Cdn/profiles/profile5522\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile5522\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/lyue-afdx-test/providers/Microsoft.Cdn/profiles/lyue-afdx-test-empty\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"lyue-afdx-test-empty\",\r\n \"location\": \"EastAsia\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"94418d3b-8d34-409f-bea4-257b71260d51\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile1799\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile1799\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"newkey1\": \"newValue1\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cdnResourceGroup9655/providers/Microsoft.Cdn/profiles/profile8856\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"profile8856\",\r\n \"location\": \"WestUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {\r\n \"key\": \"value\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/johsunAfdx/providers/Microsoft.Cdn/profiles/trimension\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"trimension\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"frontdoor\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_AzureFrontDoor\"\r\n },\r\n \"properties\": {\r\n \"frontDoorId\": \"125010b3-c25c-478e-8a57-3f8eb2dfe7b2\",\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9118/providers/Microsoft.Cdn/profiles/ps6625?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY2MjU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "dff0183e-5a93-472d-9cb8-87a71937c9e3" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "80" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "efbda72f-25ed-48ba-85f0-ceae829aff7c" - ], - "x-ms-client-request-id": [ - "dff0183e-5a93-472d-9cb8-87a71937c9e3" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/610f78a7-b2ec-4019-80c2-e9ecb11947e5?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "24" - ], - "x-ms-correlation-request-id": [ - "e988a8c1-43bb-434b-948d-a3d47d8743ad" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071805Z:e988a8c1-43bb-434b-948d-a3d47d8743ad" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:18:05 GMT" - ], - "Content-Length": [ - "322" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/profiles/ps6625\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6625\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/610f78a7-b2ec-4019-80c2-e9ecb11947e5?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzYxMGY3OGE3LWIyZWMtNDAxOS04MGMyLWU5ZWNiMTE5NDdlNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "dff0183e-5a93-472d-9cb8-87a71937c9e3" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f777c7c2-8eeb-4697-a802-959c306b1245" - ], - "x-ms-client-request-id": [ - "dff0183e-5a93-472d-9cb8-87a71937c9e3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "5cc50078-979a-4b4d-b127-0647005f6b57" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071816Z:5cc50078-979a-4b4d-b127-0647005f6b57" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:18:15 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9118/providers/Microsoft.Cdn/profiles/ps6625?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczY2MjU/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "dff0183e-5a93-472d-9cb8-87a71937c9e3" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b81008bc-582c-491c-9ff8-2433c0cd4d1a" - ], - "x-ms-client-request-id": [ - "dff0183e-5a93-472d-9cb8-87a71937c9e3" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "48" - ], - "x-ms-correlation-request-id": [ - "2e117dfb-cae9-415d-bc74-0990b1c2c006" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071816Z:2e117dfb-cae9-415d-bc74-0990b1c2c006" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:18:15 GMT" - ], - "Content-Length": [ - "321" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/profiles/ps6625\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6625\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Microsoft\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9118/providers/Microsoft.Cdn/profiles/ps6037?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczYwMzc/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0387218c-7141-4093-b853-e7c4060a035a" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "78" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "44ac45db-7d26-4ca4-8e8a-408277953286" - ], - "x-ms-client-request-id": [ - "0387218c-7141-4093-b853-e7c4060a035a" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9f70db3d-8c93-49e1-a6db-52346626f415?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "23" - ], - "x-ms-correlation-request-id": [ - "19d52c6d-dc2c-475f-af6f-5c29ee4c3c4f" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071821Z:19d52c6d-dc2c-475f-af6f-5c29ee4c3c4f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:18:21 GMT" - ], - "Content-Length": [ - "320" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/profiles/ps6037\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6037\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9f70db3d-8c93-49e1-a6db-52346626f415?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlmNzBkYjNkLThjOTMtNDllMS1hNmRiLTUyMzQ2NjI2ZjQxNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0387218c-7141-4093-b853-e7c4060a035a" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d953f2ae-055b-464d-b21a-411ac37cb8e0" - ], - "x-ms-client-request-id": [ - "0387218c-7141-4093-b853-e7c4060a035a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "5163274e-4f79-4b99-9542-4fb950a40629" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071832Z:5163274e-4f79-4b99-9542-4fb950a40629" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:18:31 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9f70db3d-8c93-49e1-a6db-52346626f415?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlmNzBkYjNkLThjOTMtNDllMS1hNmRiLTUyMzQ2NjI2ZjQxNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0387218c-7141-4093-b853-e7c4060a035a" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8856b427-8da1-492f-9bcc-37cbd59f437c" - ], - "x-ms-client-request-id": [ - "0387218c-7141-4093-b853-e7c4060a035a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "7d1e6c1a-716f-4c94-9b7d-620cc0df4d83" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071842Z:7d1e6c1a-716f-4c94-9b7d-620cc0df4d83" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:18:42 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9f70db3d-8c93-49e1-a6db-52346626f415?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlmNzBkYjNkLThjOTMtNDllMS1hNmRiLTUyMzQ2NjI2ZjQxNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0387218c-7141-4093-b853-e7c4060a035a" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "901ab9b9-433b-4f13-a7d8-0d9b9f17cb9f" - ], - "x-ms-client-request-id": [ - "0387218c-7141-4093-b853-e7c4060a035a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "1d973172-4ec6-46c0-8ee0-472c3951b57e" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071852Z:1d973172-4ec6-46c0-8ee0-472c3951b57e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:18:52 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9f70db3d-8c93-49e1-a6db-52346626f415?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlmNzBkYjNkLThjOTMtNDllMS1hNmRiLTUyMzQ2NjI2ZjQxNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0387218c-7141-4093-b853-e7c4060a035a" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0de7bf74-78a1-4179-9e1a-eb52207ac323" - ], - "x-ms-client-request-id": [ - "0387218c-7141-4093-b853-e7c4060a035a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-correlation-request-id": [ - "58dc41bb-4e64-4bdc-94c4-3092701781ab" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071903Z:58dc41bb-4e64-4bdc-94c4-3092701781ab" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:19:02 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9f70db3d-8c93-49e1-a6db-52346626f415?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlmNzBkYjNkLThjOTMtNDllMS1hNmRiLTUyMzQ2NjI2ZjQxNT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0387218c-7141-4093-b853-e7c4060a035a" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "cf99c520-84e3-4ad3-846d-b44fed9913de" - ], - "x-ms-client-request-id": [ - "0387218c-7141-4093-b853-e7c4060a035a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-correlation-request-id": [ - "a6776b84-0f7a-4375-8ce3-2dfa9866678c" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071913Z:a6776b84-0f7a-4375-8ce3-2dfa9866678c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:19:13 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9118/providers/Microsoft.Cdn/profiles/ps6037?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczYwMzc/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0387218c-7141-4093-b853-e7c4060a035a" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c3d0c5f0-8970-48fe-aebd-f37b1a12d38e" - ], - "x-ms-client-request-id": [ - "0387218c-7141-4093-b853-e7c4060a035a" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "46" - ], - "x-ms-correlation-request-id": [ - "8fb6b300-5414-499c-b484-938aaddf9c12" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071913Z:8fb6b300-5414-499c-b484-938aaddf9c12" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:19:13 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/profiles/ps6037\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps6037\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9118/providers/Microsoft.Cdn/profiles/ps1172?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczExNzI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "77" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "44298d10-3183-41a7-9633-95f615dae308" - ], - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9a44ca8b-6cbe-4580-9dd2-081caa161c3e?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "22" - ], - "x-ms-correlation-request-id": [ - "fd5708f1-a652-4d37-8599-fa28514bedd0" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071922Z:fd5708f1-a652-4d37-8599-fa28514bedd0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:19:22 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/profiles/ps1172\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps1172\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9a44ca8b-6cbe-4580-9dd2-081caa161c3e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlhNDRjYThiLTZjYmUtNDU4MC05ZGQyLTA4MWNhYTE2MWMzZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4d7dfaf0-bdc7-455a-af83-2160c9056ac8" - ], - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "c1a87e87-1f92-44bb-a60f-9b1b2fa779af" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071933Z:c1a87e87-1f92-44bb-a60f-9b1b2fa779af" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:19:32 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9a44ca8b-6cbe-4580-9dd2-081caa161c3e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlhNDRjYThiLTZjYmUtNDU4MC05ZGQyLTA4MWNhYTE2MWMzZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a5858a80-fbdd-4b98-acc9-1d33bcd67d6c" - ], - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-correlation-request-id": [ - "7b9ba9af-0f18-4bb5-b05e-b550fbd027ff" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071943Z:7b9ba9af-0f18-4bb5-b05e-b550fbd027ff" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:19:42 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9a44ca8b-6cbe-4580-9dd2-081caa161c3e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlhNDRjYThiLTZjYmUtNDU4MC05ZGQyLTA4MWNhYTE2MWMzZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d4027f14-be67-488f-b729-fea5ac427747" - ], - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-correlation-request-id": [ - "168c7f9a-a003-4741-8381-fa4bd60b7ed0" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T071953Z:168c7f9a-a003-4741-8381-fa4bd60b7ed0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:19:52 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9a44ca8b-6cbe-4580-9dd2-081caa161c3e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlhNDRjYThiLTZjYmUtNDU4MC05ZGQyLTA4MWNhYTE2MWMzZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "120c3dd1-a1a1-4785-bd1e-8c81d13adbe8" - ], - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-correlation-request-id": [ - "9e272f0d-a5a7-4d7d-9af0-d38ec0d743aa" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072004Z:9e272f0d-a5a7-4d7d-9af0-d38ec0d743aa" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:20:04 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9a44ca8b-6cbe-4580-9dd2-081caa161c3e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlhNDRjYThiLTZjYmUtNDU4MC05ZGQyLTA4MWNhYTE2MWMzZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3cdc4242-01d4-4518-b755-79364603eec4" - ], - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-correlation-request-id": [ - "37af63b4-0ae5-4cd3-b22b-63589af351f6" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072014Z:37af63b4-0ae5-4cd3-b22b-63589af351f6" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:20:14 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9a44ca8b-6cbe-4580-9dd2-081caa161c3e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlhNDRjYThiLTZjYmUtNDU4MC05ZGQyLTA4MWNhYTE2MWMzZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "27dd54c3-00a0-4477-bd45-232371fe1af3" - ], - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11987" - ], - "x-ms-correlation-request-id": [ - "459037f1-89ac-435f-9001-80f162f51aa4" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072024Z:459037f1-89ac-435f-9001-80f162f51aa4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:20:24 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9a44ca8b-6cbe-4580-9dd2-081caa161c3e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlhNDRjYThiLTZjYmUtNDU4MC05ZGQyLTA4MWNhYTE2MWMzZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a62e92e5-9dba-499b-ab46-70b74755f69a" - ], - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11986" - ], - "x-ms-correlation-request-id": [ - "2233b8ed-08b2-465d-837c-19af4cdb5ba4" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072035Z:2233b8ed-08b2-465d-837c-19af4cdb5ba4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:20:34 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9a44ca8b-6cbe-4580-9dd2-081caa161c3e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlhNDRjYThiLTZjYmUtNDU4MC05ZGQyLTA4MWNhYTE2MWMzZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ca9fa3ca-c8cd-4fef-913c-f94cda22f284" - ], - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11985" - ], - "x-ms-correlation-request-id": [ - "038258d7-06d6-4179-a692-f893ef012079" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072045Z:038258d7-06d6-4179-a692-f893ef012079" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:20:44 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9a44ca8b-6cbe-4580-9dd2-081caa161c3e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlhNDRjYThiLTZjYmUtNDU4MC05ZGQyLTA4MWNhYTE2MWMzZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "fc3d8e9a-24e8-47f1-ab7f-70bea0ecfa06" - ], - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11984" - ], - "x-ms-correlation-request-id": [ - "cf53cb35-3f9b-4808-a288-3b0146aad4d9" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072055Z:cf53cb35-3f9b-4808-a288-3b0146aad4d9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:20:55 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9a44ca8b-6cbe-4580-9dd2-081caa161c3e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlhNDRjYThiLTZjYmUtNDU4MC05ZGQyLTA4MWNhYTE2MWMzZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9a09f94a-a0aa-4aa6-b681-10b770cc8708" - ], - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11983" - ], - "x-ms-correlation-request-id": [ - "4f7fdaa1-8f93-4f92-b089-53edc40a753d" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072106Z:4f7fdaa1-8f93-4f92-b089-53edc40a753d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:21:05 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9a44ca8b-6cbe-4580-9dd2-081caa161c3e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlhNDRjYThiLTZjYmUtNDU4MC05ZGQyLTA4MWNhYTE2MWMzZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7f2df5f6-433e-4af7-a440-95dc36dfa5d1" - ], - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11982" - ], - "x-ms-correlation-request-id": [ - "28305a0a-a38d-4a7a-a3c0-baef5d10e5db" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072116Z:28305a0a-a38d-4a7a-a3c0-baef5d10e5db" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:21:15 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9a44ca8b-6cbe-4580-9dd2-081caa161c3e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlhNDRjYThiLTZjYmUtNDU4MC05ZGQyLTA4MWNhYTE2MWMzZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f1d94ff9-c095-466b-8b28-feb7aac8e1a1" - ], - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11981" - ], - "x-ms-correlation-request-id": [ - "eaf3628b-9e17-4caa-a9c3-23d40533f60d" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072126Z:eaf3628b-9e17-4caa-a9c3-23d40533f60d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:21:25 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9a44ca8b-6cbe-4580-9dd2-081caa161c3e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlhNDRjYThiLTZjYmUtNDU4MC05ZGQyLTA4MWNhYTE2MWMzZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4bbd25fb-d3e6-4ef7-9e75-30f332f6bd6c" - ], - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11980" - ], - "x-ms-correlation-request-id": [ - "71cf5f62-d820-44fd-becf-400333e51bec" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072137Z:71cf5f62-d820-44fd-becf-400333e51bec" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:21:37 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9a44ca8b-6cbe-4580-9dd2-081caa161c3e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlhNDRjYThiLTZjYmUtNDU4MC05ZGQyLTA4MWNhYTE2MWMzZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8a128bc8-4f26-4cd7-9ba9-4ce94350b47e" - ], - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11979" - ], - "x-ms-correlation-request-id": [ - "d2edea01-3bd8-4793-b5f8-4c4b0d0009e1" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072147Z:d2edea01-3bd8-4793-b5f8-4c4b0d0009e1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:21:47 GMT" - ], - "Content-Length": [ - "62" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"InProgress\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/9a44ca8b-6cbe-4580-9dd2-081caa161c3e?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzlhNDRjYThiLTZjYmUtNDU4MC05ZGQyLTA4MWNhYTE2MWMzZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3435bf7c-7342-4fb6-8ebe-2c7cbb2cf27d" - ], - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11978" - ], - "x-ms-correlation-request-id": [ - "1210d4ac-f6f7-48e1-aedd-7fe92d142662" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072157Z:1210d4ac-f6f7-48e1-aedd-7fe92d142662" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:21:57 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9118/providers/Microsoft.Cdn/profiles/ps1172?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczExNzI/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "faf15500-f4d4-4815-836c-622fc10a322f" - ], - "x-ms-client-request-id": [ - "0162b669-a5af-4656-a264-2ee31c08b901" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "44" - ], - "x-ms-correlation-request-id": [ - "09d8fc76-aa27-4dbc-8c06-ac07662a9df7" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072158Z:09d8fc76-aa27-4dbc-8c06-ac07662a9df7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:21:57 GMT" - ], - "Content-Length": [ - "318" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/profiles/ps1172\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps1172\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Premium_Verizon\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9118/providers/Microsoft.Cdn/profiles/ps3301?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMzMDE/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"location\": \"EastUS\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "924a651e-84c4-47c7-887c-1d356ceb1226" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "77" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Retry-After": [ - "10" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "92a70ea2-3be3-4f03-9019-612cacb4c058" - ], - "x-ms-client-request-id": [ - "924a651e-84c4-47c7-887c-1d356ceb1226" - ], - "Azure-AsyncOperation": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/6613c7c1-a6ca-4548-a1b7-145a96938c72?api-version=2020-09-01" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "21" - ], - "x-ms-correlation-request-id": [ - "ee449e70-58db-4c3e-954e-1d0617075c6c" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072206Z:ee449e70-58db-4c3e-954e-1d0617075c6c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:22:06 GMT" - ], - "Content-Length": [ - "319" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/profiles/ps3301\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps3301\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Creating\",\r\n \"provisioningState\": \"Creating\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/operationresults/6613c7c1-a6ca-4548-a1b7-145a96938c72?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9vcGVyYXRpb25yZXN1bHRzLzY2MTNjN2MxLWE2Y2EtNDU0OC1hMWI3LTE0NWE5NjkzOGM3Mj9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "924a651e-84c4-47c7-887c-1d356ceb1226" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "ddc24d7c-3686-44e6-bb45-927f305f4978" - ], - "x-ms-client-request-id": [ - "924a651e-84c4-47c7-887c-1d356ceb1226" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11977" - ], - "x-ms-correlation-request-id": [ - "28630c06-6ab6-4dd8-82a3-8639b66c5ca3" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072216Z:28630c06-6ab6-4dd8-82a3-8639b66c5ca3" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:22:16 GMT" - ], - "Content-Length": [ - "61" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"status\": \"Succeeded\",\r\n \"error\": {\r\n \"code\": \"None\",\r\n \"message\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/ps9118/providers/Microsoft.Cdn/profiles/ps3301?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlR3JvdXBzL3BzOTExOC9wcm92aWRlcnMvTWljcm9zb2Z0LkNkbi9wcm9maWxlcy9wczMzMDE/YXBpLXZlcnNpb249MjAyMC0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "924a651e-84c4-47c7-887c-1d356ceb1226" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b70c7814-ca4f-4fbb-97c1-e0f3378d28a6" - ], - "x-ms-client-request-id": [ - "924a651e-84c4-47c7-887c-1d356ceb1226" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "42" - ], - "x-ms-correlation-request-id": [ - "9cacf6ef-c4ab-4e6a-9fd8-8961cf876717" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072217Z:9cacf6ef-c4ab-4e6a-9fd8-8961cf876717" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:22:16 GMT" - ], - "Content-Length": [ - "318" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118/providers/Microsoft.Cdn/profiles/ps3301\",\r\n \"type\": \"Microsoft.Cdn/profiles\",\r\n \"name\": \"ps3301\",\r\n \"location\": \"EastUs\",\r\n \"kind\": \"cdn\",\r\n \"tags\": {},\r\n \"sku\": {\r\n \"name\": \"Standard_Akamai\"\r\n },\r\n \"properties\": {\r\n \"resourceState\": \"Active\",\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/ps9118?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Jlc291cmNlZ3JvdXBzL3BzOTExOD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "53b44be4-7335-4a39-bd4c-b7bd52bc1f90" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-request-id": [ - "19aa3741-ce79-47f5-80af-6187668d2808" - ], - "x-ms-correlation-request-id": [ - "19aa3741-ce79-47f5-80af-6187668d2808" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072221Z:19aa3741-ce79-47f5-80af-6187668d2808" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:22:21 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpreE1UZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "8882c672-4df4-4095-bcb9-493d8f98ca62" - ], - "x-ms-correlation-request-id": [ - "8882c672-4df4-4095-bcb9-493d8f98ca62" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072237Z:8882c672-4df4-4095-bcb9-493d8f98ca62" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:22:36 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpreE1UZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "9efe8209-e54e-4919-a104-fd478c03d941" - ], - "x-ms-correlation-request-id": [ - "9efe8209-e54e-4919-a104-fd478c03d941" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072252Z:9efe8209-e54e-4919-a104-fd478c03d941" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:22:52 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpreE1UZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "6978a3f1-9ab6-41bf-88b9-e9302129105c" - ], - "x-ms-correlation-request-id": [ - "6978a3f1-9ab6-41bf-88b9-e9302129105c" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072308Z:6978a3f1-9ab6-41bf-88b9-e9302129105c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:23:07 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpreE1UZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "33e82420-24c6-4e66-b905-ef4a9a56a156" - ], - "x-ms-correlation-request-id": [ - "33e82420-24c6-4e66-b905-ef4a9a56a156" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072323Z:33e82420-24c6-4e66-b905-ef4a9a56a156" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:23:22 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpreE1UZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "1b245649-5f50-41d7-8e83-f7b666c56738" - ], - "x-ms-correlation-request-id": [ - "1b245649-5f50-41d7-8e83-f7b666c56738" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072338Z:1b245649-5f50-41d7-8e83-f7b666c56738" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:23:38 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpreE1UZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "f0f52d56-7af4-41e2-af3c-51db1579da28" - ], - "x-ms-correlation-request-id": [ - "f0f52d56-7af4-41e2-af3c-51db1579da28" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072354Z:f0f52d56-7af4-41e2-af3c-51db1579da28" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:23:54 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpreE1UZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11993" - ], - "x-ms-request-id": [ - "69ad685a-7142-4d8e-ae6d-3552a996f78c" - ], - "x-ms-correlation-request-id": [ - "69ad685a-7142-4d8e-ae6d-3552a996f78c" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072409Z:69ad685a-7142-4d8e-ae6d-3552a996f78c" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:24:09 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpreE1UZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-request-id": [ - "77a4a630-5fff-443c-aaa6-8e30b9b53a24" - ], - "x-ms-correlation-request-id": [ - "77a4a630-5fff-443c-aaa6-8e30b9b53a24" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072425Z:77a4a630-5fff-443c-aaa6-8e30b9b53a24" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:24:24 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpreE1UZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-request-id": [ - "5ad1a36d-2463-4dc0-94a2-edfbd1b06d01" - ], - "x-ms-correlation-request-id": [ - "5ad1a36d-2463-4dc0-94a2-edfbd1b06d01" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072440Z:5ad1a36d-2463-4dc0-94a2-edfbd1b06d01" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:24:40 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpreE1UZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Location": [ - "https://management.azure.com/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01" - ], - "Retry-After": [ - "15" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "97885fc6-7b07-4dac-9a31-136b6555e24e" - ], - "x-ms-correlation-request-id": [ - "97885fc6-7b07-4dac-9a31-136b6555e24e" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072456Z:97885fc6-7b07-4dac-9a31-136b6555e24e" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:24:55 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 202 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpreE1UZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11989" - ], - "x-ms-request-id": [ - "512ae5cd-dae6-4353-90f4-d69267ba4a18" - ], - "x-ms-correlation-request-id": [ - "512ae5cd-dae6-4353-90f4-d69267ba4a18" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072511Z:512ae5cd-dae6-4353-90f4-d69267ba4a18" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:25:10 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzkxMTgtV0VTVFVTIiwiam9iTG9jYXRpb24iOiJ3ZXN0dXMifQ?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpreE1UZ3RWMFZUVkZWVElpd2lhbTlpVEc5allYUnBiMjRpT2lKM1pYTjBkWE1pZlE/YXBpLXZlcnNpb249MjAxNi0wOS0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "User-Agent": [ - "FxVersion/4.6.30015.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19043.", - "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.32" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11988" - ], - "x-ms-request-id": [ - "7c9a422c-ac26-4151-b268-80091f77cca8" - ], - "x-ms-correlation-request-id": [ - "7c9a422c-ac26-4151-b268-80091f77cca8" - ], - "x-ms-routing-request-id": [ - "SOUTHEASTASIA:20210519T072511Z:7c9a422c-ac26-4151-b268-80091f77cca8" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Wed, 19 May 2021 07:25:11 GMT" - ], - "Expires": [ - "-1" - ], - "Content-Length": [ - "0" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "Test-SkuCreate": [ - "ps6625", - "ps9118", - "ps6037", - "ps1172", - "ps3301" - ] - }, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.SubscriptionTests/TestSubscriptionEdgeNode.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.SubscriptionTests/TestSubscriptionEdgeNode.json deleted file mode 100644 index 8766cb59e017..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.SubscriptionTests/TestSubscriptionEdgeNode.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/providers/Microsoft.Cdn/edgenodes?api-version=2020-09-01", - "EncodedRequestUri": "L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2VkZ2Vub2Rlcz9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "01d59fe4-8928-442c-8c19-217f81e16378" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "289fdadd-79b5-4a2b-990c-1ac5714df40c" - ], - "x-ms-client-request-id": [ - "01d59fe4-8928-442c-8c19-217f81e16378" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-tenant-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "c1fd0980-9887-4903-b2a9-70cc369eaabc" - ], - "x-ms-routing-request-id": [ - "WESTCENTRALUS:20210309T210524Z:c1fd0980-9887-4903-b2a9-70cc369eaabc" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:05:23 GMT" - ], - "Content-Length": [ - "10331" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/providers/Microsoft.Cdn/edgenodes/Standard_Verizon\",\r\n \"type\": \"Microsoft.Cdn/edgenodes\",\r\n \"name\": \"Standard_Verizon\",\r\n \"properties\": {\r\n \"ipAddressGroups\": [\r\n {\r\n \"deliveryRegion\": \"All\",\r\n \"ipv4Addresses\": [\r\n {\r\n \"baseIpAddress\": \"5.104.64.0\",\r\n \"prefixLength\": 21\r\n },\r\n {\r\n \"baseIpAddress\": \"46.22.64.0\",\r\n \"prefixLength\": 20\r\n },\r\n {\r\n \"baseIpAddress\": \"61.221.181.64\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"68.232.32.0\",\r\n \"prefixLength\": 20\r\n },\r\n {\r\n \"baseIpAddress\": \"72.21.80.0\",\r\n \"prefixLength\": 20\r\n },\r\n {\r\n \"baseIpAddress\": \"88.194.45.128\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"93.184.208.0\",\r\n \"prefixLength\": 20\r\n },\r\n {\r\n \"baseIpAddress\": \"101.226.203.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"108.161.240.0\",\r\n \"prefixLength\": 20\r\n },\r\n {\r\n \"baseIpAddress\": \"110.232.176.0\",\r\n \"prefixLength\": 22\r\n },\r\n {\r\n \"baseIpAddress\": \"117.18.232.0\",\r\n \"prefixLength\": 21\r\n },\r\n {\r\n \"baseIpAddress\": \"117.103.183.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"120.132.137.0\",\r\n \"prefixLength\": 25\r\n },\r\n {\r\n \"baseIpAddress\": \"121.156.59.224\",\r\n \"prefixLength\": 27\r\n },\r\n {\r\n \"baseIpAddress\": \"121.189.46.0\",\r\n \"prefixLength\": 23\r\n },\r\n {\r\n \"baseIpAddress\": \"152.195.0.0\",\r\n \"prefixLength\": 16\r\n },\r\n {\r\n \"baseIpAddress\": \"180.240.184.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"192.16.0.0\",\r\n \"prefixLength\": 18\r\n },\r\n {\r\n \"baseIpAddress\": \"192.30.0.0\",\r\n \"prefixLength\": 19\r\n },\r\n {\r\n \"baseIpAddress\": \"192.229.128.0\",\r\n \"prefixLength\": 17\r\n },\r\n {\r\n \"baseIpAddress\": \"194.255.210.64\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"198.7.16.0\",\r\n \"prefixLength\": 20\r\n },\r\n {\r\n \"baseIpAddress\": \"203.74.4.64\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"213.64.234.0\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"213.65.58.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"68.140.206.0\",\r\n \"prefixLength\": 23\r\n },\r\n {\r\n \"baseIpAddress\": \"68.130.0.0\",\r\n \"prefixLength\": 17\r\n },\r\n {\r\n \"baseIpAddress\": \"152.190.247.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"65.222.137.0\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"65.222.145.128\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"65.198.79.64\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"65.199.146.192\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"65.200.151.160\",\r\n \"prefixLength\": 27\r\n },\r\n {\r\n \"baseIpAddress\": \"65.200.157.192\",\r\n \"prefixLength\": 27\r\n },\r\n {\r\n \"baseIpAddress\": \"68.130.128.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"68.130.136.0\",\r\n \"prefixLength\": 21\r\n },\r\n {\r\n \"baseIpAddress\": \"65.200.46.128\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"213.175.80.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"152.199.0.0\",\r\n \"prefixLength\": 16\r\n },\r\n {\r\n \"baseIpAddress\": \"36.67.255.152\",\r\n \"prefixLength\": 29\r\n },\r\n {\r\n \"baseIpAddress\": \"194.255.242.160\",\r\n \"prefixLength\": 27\r\n },\r\n {\r\n \"baseIpAddress\": \"195.67.219.64\",\r\n \"prefixLength\": 27\r\n },\r\n {\r\n \"baseIpAddress\": \"88.194.47.224\",\r\n \"prefixLength\": 27\r\n },\r\n {\r\n \"baseIpAddress\": \"203.66.205.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"110.164.36.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"119.46.85.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"49.231.126.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"136.228.144.0\",\r\n \"prefixLength\": 24\r\n }\r\n ],\r\n \"ipv6Addresses\": [\r\n {\r\n \"baseIpAddress\": \"2001:2011:c002::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2001:2040:c006::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2001:2060:bffb::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2001:b032:c101::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2405:8f00:edca::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2405:8f00:edcb::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2606:2800::\",\r\n \"prefixLength\": 32\r\n },\r\n {\r\n \"baseIpAddress\": \"2600:40ff:fffb::\",\r\n \"prefixLength\": 56\r\n },\r\n {\r\n \"baseIpAddress\": \"2a02:16d8:103::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2600:40fc::\",\r\n \"prefixLength\": 32\r\n },\r\n {\r\n \"baseIpAddress\": \"2403:6200:ffff:ffa1::\",\r\n \"prefixLength\": 64\r\n },\r\n {\r\n \"baseIpAddress\": \"2001:fb0:109f:8005::\",\r\n \"prefixLength\": 64\r\n },\r\n {\r\n \"baseIpAddress\": \"2405:9800:61:1::\",\r\n \"prefixLength\": 64\r\n },\r\n {\r\n \"baseIpAddress\": \"2404:b300:33:1::\",\r\n \"prefixLength\": 64\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/providers/Microsoft.Cdn/edgenodes/Premium_Verizon\",\r\n \"type\": \"Microsoft.Cdn/edgenodes\",\r\n \"name\": \"Premium_Verizon\",\r\n \"properties\": {\r\n \"ipAddressGroups\": [\r\n {\r\n \"deliveryRegion\": \"All\",\r\n \"ipv4Addresses\": [\r\n {\r\n \"baseIpAddress\": \"5.104.64.0\",\r\n \"prefixLength\": 21\r\n },\r\n {\r\n \"baseIpAddress\": \"46.22.64.0\",\r\n \"prefixLength\": 20\r\n },\r\n {\r\n \"baseIpAddress\": \"61.221.181.64\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"68.232.32.0\",\r\n \"prefixLength\": 20\r\n },\r\n {\r\n \"baseIpAddress\": \"72.21.80.0\",\r\n \"prefixLength\": 20\r\n },\r\n {\r\n \"baseIpAddress\": \"88.194.45.128\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"93.184.208.0\",\r\n \"prefixLength\": 20\r\n },\r\n {\r\n \"baseIpAddress\": \"101.226.203.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"108.161.240.0\",\r\n \"prefixLength\": 20\r\n },\r\n {\r\n \"baseIpAddress\": \"110.232.176.0\",\r\n \"prefixLength\": 22\r\n },\r\n {\r\n \"baseIpAddress\": \"117.18.232.0\",\r\n \"prefixLength\": 21\r\n },\r\n {\r\n \"baseIpAddress\": \"117.103.183.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"120.132.137.0\",\r\n \"prefixLength\": 25\r\n },\r\n {\r\n \"baseIpAddress\": \"121.156.59.224\",\r\n \"prefixLength\": 27\r\n },\r\n {\r\n \"baseIpAddress\": \"121.189.46.0\",\r\n \"prefixLength\": 23\r\n },\r\n {\r\n \"baseIpAddress\": \"152.195.0.0\",\r\n \"prefixLength\": 16\r\n },\r\n {\r\n \"baseIpAddress\": \"180.240.184.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"192.16.0.0\",\r\n \"prefixLength\": 18\r\n },\r\n {\r\n \"baseIpAddress\": \"192.30.0.0\",\r\n \"prefixLength\": 19\r\n },\r\n {\r\n \"baseIpAddress\": \"192.229.128.0\",\r\n \"prefixLength\": 17\r\n },\r\n {\r\n \"baseIpAddress\": \"194.255.210.64\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"198.7.16.0\",\r\n \"prefixLength\": 20\r\n },\r\n {\r\n \"baseIpAddress\": \"203.74.4.64\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"213.64.234.0\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"213.65.58.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"68.140.206.0\",\r\n \"prefixLength\": 23\r\n },\r\n {\r\n \"baseIpAddress\": \"68.130.0.0\",\r\n \"prefixLength\": 17\r\n },\r\n {\r\n \"baseIpAddress\": \"152.190.247.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"65.222.137.0\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"65.222.145.128\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"65.198.79.64\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"65.199.146.192\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"65.200.151.160\",\r\n \"prefixLength\": 27\r\n },\r\n {\r\n \"baseIpAddress\": \"65.200.157.192\",\r\n \"prefixLength\": 27\r\n },\r\n {\r\n \"baseIpAddress\": \"68.130.128.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"68.130.136.0\",\r\n \"prefixLength\": 21\r\n },\r\n {\r\n \"baseIpAddress\": \"65.200.46.128\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"213.175.80.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"152.199.0.0\",\r\n \"prefixLength\": 16\r\n },\r\n {\r\n \"baseIpAddress\": \"36.67.255.152\",\r\n \"prefixLength\": 29\r\n },\r\n {\r\n \"baseIpAddress\": \"194.255.242.160\",\r\n \"prefixLength\": 27\r\n },\r\n {\r\n \"baseIpAddress\": \"195.67.219.64\",\r\n \"prefixLength\": 27\r\n },\r\n {\r\n \"baseIpAddress\": \"88.194.47.224\",\r\n \"prefixLength\": 27\r\n },\r\n {\r\n \"baseIpAddress\": \"203.66.205.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"110.164.36.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"119.46.85.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"49.231.126.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"136.228.144.0\",\r\n \"prefixLength\": 24\r\n }\r\n ],\r\n \"ipv6Addresses\": [\r\n {\r\n \"baseIpAddress\": \"2001:2011:c002::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2001:2040:c006::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2001:2060:bffb::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2001:b032:c101::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2405:8f00:edca::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2405:8f00:edcb::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2606:2800::\",\r\n \"prefixLength\": 32\r\n },\r\n {\r\n \"baseIpAddress\": \"2600:40ff:fffb::\",\r\n \"prefixLength\": 56\r\n },\r\n {\r\n \"baseIpAddress\": \"2a02:16d8:103::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2600:40fc::\",\r\n \"prefixLength\": 32\r\n },\r\n {\r\n \"baseIpAddress\": \"2403:6200:ffff:ffa1::\",\r\n \"prefixLength\": 64\r\n },\r\n {\r\n \"baseIpAddress\": \"2001:fb0:109f:8005::\",\r\n \"prefixLength\": 64\r\n },\r\n {\r\n \"baseIpAddress\": \"2405:9800:61:1::\",\r\n \"prefixLength\": 64\r\n },\r\n {\r\n \"baseIpAddress\": \"2404:b300:33:1::\",\r\n \"prefixLength\": 64\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"id\": \"/providers/Microsoft.Cdn/edgenodes/Custom_Verizon\",\r\n \"type\": \"Microsoft.Cdn/edgenodes\",\r\n \"name\": \"Custom_Verizon\",\r\n \"properties\": {\r\n \"ipAddressGroups\": [\r\n {\r\n \"deliveryRegion\": \"All\",\r\n \"ipv4Addresses\": [\r\n {\r\n \"baseIpAddress\": \"5.104.64.0\",\r\n \"prefixLength\": 21\r\n },\r\n {\r\n \"baseIpAddress\": \"46.22.64.0\",\r\n \"prefixLength\": 20\r\n },\r\n {\r\n \"baseIpAddress\": \"61.221.181.64\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"68.232.32.0\",\r\n \"prefixLength\": 20\r\n },\r\n {\r\n \"baseIpAddress\": \"72.21.80.0\",\r\n \"prefixLength\": 20\r\n },\r\n {\r\n \"baseIpAddress\": \"88.194.45.128\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"93.184.208.0\",\r\n \"prefixLength\": 20\r\n },\r\n {\r\n \"baseIpAddress\": \"101.226.203.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"108.161.240.0\",\r\n \"prefixLength\": 20\r\n },\r\n {\r\n \"baseIpAddress\": \"110.232.176.0\",\r\n \"prefixLength\": 22\r\n },\r\n {\r\n \"baseIpAddress\": \"117.18.232.0\",\r\n \"prefixLength\": 21\r\n },\r\n {\r\n \"baseIpAddress\": \"117.103.183.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"120.132.137.0\",\r\n \"prefixLength\": 25\r\n },\r\n {\r\n \"baseIpAddress\": \"121.156.59.224\",\r\n \"prefixLength\": 27\r\n },\r\n {\r\n \"baseIpAddress\": \"121.189.46.0\",\r\n \"prefixLength\": 23\r\n },\r\n {\r\n \"baseIpAddress\": \"152.195.0.0\",\r\n \"prefixLength\": 16\r\n },\r\n {\r\n \"baseIpAddress\": \"180.240.184.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"192.16.0.0\",\r\n \"prefixLength\": 18\r\n },\r\n {\r\n \"baseIpAddress\": \"192.30.0.0\",\r\n \"prefixLength\": 19\r\n },\r\n {\r\n \"baseIpAddress\": \"192.229.128.0\",\r\n \"prefixLength\": 17\r\n },\r\n {\r\n \"baseIpAddress\": \"194.255.210.64\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"198.7.16.0\",\r\n \"prefixLength\": 20\r\n },\r\n {\r\n \"baseIpAddress\": \"203.74.4.64\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"213.64.234.0\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"213.65.58.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"68.140.206.0\",\r\n \"prefixLength\": 23\r\n },\r\n {\r\n \"baseIpAddress\": \"68.130.0.0\",\r\n \"prefixLength\": 17\r\n },\r\n {\r\n \"baseIpAddress\": \"152.190.247.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"65.222.137.0\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"65.222.145.128\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"65.198.79.64\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"65.199.146.192\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"65.200.151.160\",\r\n \"prefixLength\": 27\r\n },\r\n {\r\n \"baseIpAddress\": \"65.200.157.192\",\r\n \"prefixLength\": 27\r\n },\r\n {\r\n \"baseIpAddress\": \"68.130.128.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"68.130.136.0\",\r\n \"prefixLength\": 21\r\n },\r\n {\r\n \"baseIpAddress\": \"65.200.46.128\",\r\n \"prefixLength\": 26\r\n },\r\n {\r\n \"baseIpAddress\": \"213.175.80.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"152.199.0.0\",\r\n \"prefixLength\": 16\r\n },\r\n {\r\n \"baseIpAddress\": \"36.67.255.152\",\r\n \"prefixLength\": 29\r\n },\r\n {\r\n \"baseIpAddress\": \"194.255.242.160\",\r\n \"prefixLength\": 27\r\n },\r\n {\r\n \"baseIpAddress\": \"195.67.219.64\",\r\n \"prefixLength\": 27\r\n },\r\n {\r\n \"baseIpAddress\": \"88.194.47.224\",\r\n \"prefixLength\": 27\r\n },\r\n {\r\n \"baseIpAddress\": \"203.66.205.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"110.164.36.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"119.46.85.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"49.231.126.0\",\r\n \"prefixLength\": 24\r\n },\r\n {\r\n \"baseIpAddress\": \"136.228.144.0\",\r\n \"prefixLength\": 24\r\n }\r\n ],\r\n \"ipv6Addresses\": [\r\n {\r\n \"baseIpAddress\": \"2001:2011:c002::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2001:2040:c006::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2001:2060:bffb::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2001:b032:c101::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2405:8f00:edca::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2405:8f00:edcb::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2606:2800::\",\r\n \"prefixLength\": 32\r\n },\r\n {\r\n \"baseIpAddress\": \"2600:40ff:fffb::\",\r\n \"prefixLength\": 56\r\n },\r\n {\r\n \"baseIpAddress\": \"2a02:16d8:103::\",\r\n \"prefixLength\": 48\r\n },\r\n {\r\n \"baseIpAddress\": \"2600:40fc::\",\r\n \"prefixLength\": 32\r\n },\r\n {\r\n \"baseIpAddress\": \"2403:6200:ffff:ffa1::\",\r\n \"prefixLength\": 64\r\n },\r\n {\r\n \"baseIpAddress\": \"2001:fb0:109f:8005::\",\r\n \"prefixLength\": 64\r\n },\r\n {\r\n \"baseIpAddress\": \"2405:9800:61:1::\",\r\n \"prefixLength\": 64\r\n },\r\n {\r\n \"baseIpAddress\": \"2404:b300:33:1::\",\r\n \"prefixLength\": 64\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n}", - "StatusCode": 200 - } - ], - "Names": {}, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.SubscriptionTests/TestSubscriptionGetResourceUsage.json b/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.SubscriptionTests/TestSubscriptionGetResourceUsage.json deleted file mode 100644 index 3518a37c1454..000000000000 --- a/src/Cdn/Cdn.Test/SessionRecords/Microsoft.Azure.Commands.Cdn.Test.ScenarioTests.ScenarioTest.SubscriptionTests/TestSubscriptionGetResourceUsage.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/providers/Microsoft.Cdn/checkResourceUsage?api-version=2020-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjdjYWZjYTgtYjlhNC00MjY0LWIzOTktNDVkMGM5Y2NhMWFiL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2RuL2NoZWNrUmVzb3VyY2VVc2FnZT9hcGktdmVyc2lvbj0yMDIwLTA5LTAx", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3ccac472-5b54-4043-9351-8c4120fd5169" - ], - "Accept-Language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.29812.02", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.19042.", - "Microsoft.Azure.Management.Cdn.CdnManagementClient/6.1.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Pragma": [ - "no-cache" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5f609af2-ace2-4f0a-acd8-c7a9436da023" - ], - "x-ms-client-request-id": [ - "3ccac472-5b54-4043-9351-8c4120fd5169" - ], - "Server": [ - "Kestrel" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "9fd1ee6d-d4df-4b0e-9d8a-49aad3fbb9b8" - ], - "x-ms-routing-request-id": [ - "WESTUS:20210309T213759Z:9fd1ee6d-d4df-4b0e-9d8a-49aad3fbb9b8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Date": [ - "Tue, 09 Mar 2021 21:37:59 GMT" - ], - "Content-Length": [ - "83" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"resourceType\": \"profile\",\r\n \"unit\": \"count\",\r\n \"currentValue\": 96,\r\n \"limit\": 200\r\n }\r\n ]\r\n}", - "StatusCode": 200 - } - ], - "Names": {}, - "Variables": { - "SubscriptionId": "27cafca8-b9a4-4264-b399-45d0c9cca1ab" - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn.sln b/src/Cdn/Cdn.sln deleted file mode 100644 index d270eb494475..000000000000 --- a/src/Cdn/Cdn.sln +++ /dev/null @@ -1,67 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27703.2042 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cdn", "Cdn\Cdn.csproj", "{42656543-77AD-4968-BA4B-BE0778705625}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{95C16AED-FD57-42A0-86C3-2CF4300A4817}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cdn.Test", "Cdn.Test\Cdn.Test.csproj", "{5E5BBB82-2D69-4A12-93AA-E5753F87AF03}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{3E016018-D65D-4336-9F64-17DA97783AD0}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ScenarioTest.ResourceManager", "..\..\tools\ScenarioTest.ResourceManager\ScenarioTest.ResourceManager.csproj", "{F83FBA8D-732D-437C-A0E2-02E45B01E123}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestFx", "..\..\tools\TestFx\TestFx.csproj", "{BC80A1D0-FFA4-43D9-AA74-799F5CB54B58}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {42656543-77AD-4968-BA4B-BE0778705625}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {42656543-77AD-4968-BA4B-BE0778705625}.Debug|Any CPU.Build.0 = Debug|Any CPU - {42656543-77AD-4968-BA4B-BE0778705625}.Release|Any CPU.ActiveCfg = Release|Any CPU - {42656543-77AD-4968-BA4B-BE0778705625}.Release|Any CPU.Build.0 = Release|Any CPU - {5E5BBB82-2D69-4A12-93AA-E5753F87AF03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5E5BBB82-2D69-4A12-93AA-E5753F87AF03}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5E5BBB82-2D69-4A12-93AA-E5753F87AF03}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5E5BBB82-2D69-4A12-93AA-E5753F87AF03}.Release|Any CPU.Build.0 = Release|Any CPU - {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.Build.0 = Release|Any CPU - {FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Release|Any CPU.Build.0 = Release|Any CPU - {3E016018-D65D-4336-9F64-17DA97783AD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3E016018-D65D-4336-9F64-17DA97783AD0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3E016018-D65D-4336-9F64-17DA97783AD0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3E016018-D65D-4336-9F64-17DA97783AD0}.Release|Any CPU.Build.0 = Release|Any CPU - {F83FBA8D-732D-437C-A0E2-02E45B01E123}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F83FBA8D-732D-437C-A0E2-02E45B01E123}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F83FBA8D-732D-437C-A0E2-02E45B01E123}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F83FBA8D-732D-437C-A0E2-02E45B01E123}.Release|Any CPU.Build.0 = Release|Any CPU - {BC80A1D0-FFA4-43D9-AA74-799F5CB54B58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BC80A1D0-FFA4-43D9-AA74-799F5CB54B58}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BC80A1D0-FFA4-43D9-AA74-799F5CB54B58}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BC80A1D0-FFA4-43D9-AA74-799F5CB54B58}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {5E5BBB82-2D69-4A12-93AA-E5753F87AF03} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {F9B3D96E-9680-40BE-A917-02EE655D6030} - EndGlobalSection -EndGlobal diff --git a/src/Cdn/Cdn/AfdCustomDomain/GetAzFrontDoorCdnCustomDomain.cs b/src/Cdn/Cdn/AfdCustomDomain/GetAzFrontDoorCdnCustomDomain.cs deleted file mode 100644 index a5742dc009c4..000000000000 --- a/src/Cdn/Cdn/AfdCustomDomain/GetAzFrontDoorCdnCustomDomain.cs +++ /dev/null @@ -1,124 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdCustomDomain -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnCustomDomain", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSAfdCustomDomain))] - public class GetAzFrontDoorCdnCustomDomain : AzureCdnCmdletBase - { - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdCustomDomainName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string CustomDomainName { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdProfileObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNullOrEmpty] - public PSAfdProfile Profile { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - public override void ExecuteCmdlet() - { - try - { - switch (ParameterSetName) - { - case FieldsParameterSet: - this.FieldsParameterSetCmdlet(); - break; - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - - } - - private void FieldsParameterSetCmdlet() - { - if (AfdUtilities.IsValuePresent(this.CustomDomainName)) - { - // all fields are present (mandatory + optional) - - PSAfdCustomDomain psAfdCustomDomain = this.CdnManagementClient.AFDCustomDomains.Get(this.ResourceGroupName, this.ProfileName, this.CustomDomainName).ToPSAfdCustomDomain(); - - WriteObject(psAfdCustomDomain); - } - else - { - // only the mandatory fields are present - - List psAfdCustomDomains = this.CdnManagementClient.AFDCustomDomains.ListByProfile(this.ResourceGroupName, this.ProfileName) - .Select(afdCustomDomain => afdCustomDomain.ToPSAfdCustomDomain()) - .ToList(); - - WriteObject(psAfdCustomDomains); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdProfileResourceId = new ResourceIdentifier(this.Profile.Id); - - this.ProfileName = parsedAfdProfileResourceId.ResourceName; - this.ResourceGroupName = parsedAfdProfileResourceId.ResourceGroupName; - - List psAfdCustomDomains = this.CdnManagementClient.AFDCustomDomains.ListByProfile(this.ResourceGroupName, this.ProfileName) - .Select(afdCustomDomain => afdCustomDomain.ToPSAfdCustomDomain()) - .ToList(); - - WriteObject(psAfdCustomDomains); - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdCustomDomainResourceId = new ResourceIdentifier(this.ResourceId); - - this.CustomDomainName = parsedAfdCustomDomainResourceId.ResourceName; - this.ProfileName = parsedAfdCustomDomainResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdCustomDomainResourceId.ResourceGroupName; - - PSAfdCustomDomain psAfdCustomDomain = this.CdnManagementClient.AFDCustomDomains.Get(this.ResourceGroupName, this.ProfileName, this.CustomDomainName).ToPSAfdCustomDomain(); - - WriteObject(psAfdCustomDomain); - } - } -} diff --git a/src/Cdn/Cdn/AfdCustomDomain/NewAzFrontDoorCdnCustomDomain.cs b/src/Cdn/Cdn/AfdCustomDomain/NewAzFrontDoorCdnCustomDomain.cs deleted file mode 100644 index 53ef660303c7..000000000000 --- a/src/Cdn/Cdn/AfdCustomDomain/NewAzFrontDoorCdnCustomDomain.cs +++ /dev/null @@ -1,96 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdCustomDomain -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnCustomDomain", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSAfdCustomDomain))] - public class NewAzFrontDoorCdnCustomDomain : AzureCdnCmdletBase - { - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdCustomDomainAzureDnsZoneId)] - [ValidateNotNullOrEmpty] - public string AzureDnsZoneId { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdCustomDomainName)] - [ValidateNotNullOrEmpty] - public string CustomDomainName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdCustomDomainHostName)] - [ValidateNotNullOrEmpty] - public string HostName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdCustomDomainMinimumTlsVersion, ParameterSetName = AfdParameterSet.AfdCustomDomainCustomerCertificate)] - [PSArgumentCompleter("TLS10", "TLS12")] - [ValidateNotNullOrEmpty] - public string MinimumTlsVersion { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdCustomDomainSecretId, ParameterSetName = AfdParameterSet.AfdCustomDomainCustomerCertificate)] - [ValidateNotNullOrEmpty] - public string SecretId { get; set; } - - public override void ExecuteCmdlet() - { - ConfirmAction(AfdResourceProcessMessage.AfdCustomDomainCreateMessage, this.CustomDomainName, this.CreateAfdCustomDomain); - } - - private void CreateAfdCustomDomain() - { - try - { - AFDDomain afdCustomDomain = new AFDDomain - { - HostName = this.HostName, - }; - - if (MyInvocation.BoundParameters.ContainsKey("AzureDnsZoneId")) - { - afdCustomDomain.AzureDnsZone = new ResourceReference(this.AzureDnsZoneId); - } - - if (ParameterSetName == AfdParameterSet.AfdCustomDomainCustomerCertificate) - { - afdCustomDomain.TlsSettings = new AFDDomainHttpsParameters - { - CertificateType = "CustomerCertificate", - MinimumTlsVersion = AfdUtilities.CreateMinimumTlsVersion(this.MinimumTlsVersion), - Secret = new ResourceReference(this.SecretId) - }; - } - - PSAfdCustomDomain psAfdCustomDomain = this.CdnManagementClient.AFDCustomDomains.Create(this.ResourceGroupName, this.ProfileName, this.CustomDomainName, afdCustomDomain).ToPSAfdCustomDomain(); - - WriteObject(psAfdCustomDomain); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - } -} diff --git a/src/Cdn/Cdn/AfdCustomDomain/RemoveAzFrontDoorCdnCustomDomain.cs b/src/Cdn/Cdn/AfdCustomDomain/RemoveAzFrontDoorCdnCustomDomain.cs deleted file mode 100644 index 6190ff96f900..000000000000 --- a/src/Cdn/Cdn/AfdCustomDomain/RemoveAzFrontDoorCdnCustomDomain.cs +++ /dev/null @@ -1,101 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdCustomDomain -{ - [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnCustomDomain", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(bool))] - public class RemoveAzFrontDoorCdnCustomDomain : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdCustomDomainName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string CustomDomainName { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdCustomDomainObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNullOrEmpty] - public PSAfdCustomDomain CustomDomain { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - switch (ParameterSetName) - { - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - - ConfirmAction(AfdResourceProcessMessage.AfdCustomDomainDeleteMessage, this.CustomDomainName, this.DeleteAfdCustomDomain); - } - - private void DeleteAfdCustomDomain() - { - try - { - this.CdnManagementClient.AFDCustomDomains.Delete(this.ResourceGroupName, this.ProfileName, this.CustomDomainName); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - - if (this.PassThru.IsPresent) - { - WriteObject(true); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdCustomDomainResourceId = new ResourceIdentifier(this.CustomDomain.Id); - - this.CustomDomainName = parsedAfdCustomDomainResourceId.ResourceName; - this.ProfileName = parsedAfdCustomDomainResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdCustomDomainResourceId.ResourceGroupName; - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdCustomDomainResourceId = new ResourceIdentifier(this.ResourceId); - - this.CustomDomainName = parsedAfdCustomDomainResourceId.ResourceName; - this.ProfileName = parsedAfdCustomDomainResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdCustomDomainResourceId.ResourceGroupName; - } - } -} diff --git a/src/Cdn/Cdn/AfdCustomDomain/SetAzFrontDoorCdnCustomDomain.cs b/src/Cdn/Cdn/AfdCustomDomain/SetAzFrontDoorCdnCustomDomain.cs deleted file mode 100644 index c4a7fb70f9ac..000000000000 --- a/src/Cdn/Cdn/AfdCustomDomain/SetAzFrontDoorCdnCustomDomain.cs +++ /dev/null @@ -1,90 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdCustomDomain -{ - [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnCustomDomain", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSAfdCustomDomain))] - public class SetAzFrontDoorCdnCustomDomain : AzureCdnCmdletBase - { - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdCustomDomainAzureDnsZoneId)] - [ValidateNotNullOrEmpty] - public string AzureDnsZoneId { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdCustomDomainName)] - [ValidateNotNullOrEmpty] - public string CustomDomainName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdCustomDomainMinimumTlsVersion, ParameterSetName = AfdParameterSet.AfdCustomDomainCustomerCertificate)] - [PSArgumentCompleter("TLS10", "TLS12")] - [ValidateNotNullOrEmpty] - public string MinimumTlsVersion { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdCustomDomainSecretId, ParameterSetName = AfdParameterSet.AfdCustomDomainCustomerCertificate)] - [ValidateNotNullOrEmpty] - public string SecretId { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - public override void ExecuteCmdlet() - { - ConfirmAction(AfdResourceProcessMessage.AfdCustomDomainUpdateMessage, this.CustomDomainName, this.UpdateAfdCustomDomain); - } - - private void UpdateAfdCustomDomain() - { - try - { - AFDDomainHttpsParameters tlsSettings = null; - ResourceReference azureDnsZoneId = null; - - if (MyInvocation.BoundParameters.ContainsKey("AzureDnsZoneId")) - { - azureDnsZoneId = new ResourceReference(this.AzureDnsZoneId); - } - - if (ParameterSetName == AfdParameterSet.AfdCustomDomainCustomerCertificate) - { - tlsSettings = new AFDDomainHttpsParameters - { - CertificateType = "CustomerCertificate", - MinimumTlsVersion = AfdUtilities.CreateMinimumTlsVersion(this.MinimumTlsVersion), - Secret = new ResourceReference(this.SecretId) - }; - } - - PSAfdCustomDomain psAfdCustomDomain = this.CdnManagementClient.AFDCustomDomains.Update(this.ResourceGroupName, this.ProfileName, this.CustomDomainName, tlsSettings, azureDnsZoneId).ToPSAfdCustomDomain(); - - WriteObject(psAfdCustomDomain); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - } -} diff --git a/src/Cdn/Cdn/AfdEndpoint/GetAzFrontDoorCdnEndpoint.cs b/src/Cdn/Cdn/AfdEndpoint/GetAzFrontDoorCdnEndpoint.cs deleted file mode 100644 index 15e2e007b897..000000000000 --- a/src/Cdn/Cdn/AfdEndpoint/GetAzFrontDoorCdnEndpoint.cs +++ /dev/null @@ -1,122 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdEndpoint -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnEndpoint", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSAfdEndpoint))] - public class GetAzFrontDoorCdnEndpoint : AzureCdnCmdletBase - { - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdEndpointName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdProfileObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSAfdProfile Profile { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - [ResourceGroupCompleter()] - public string ResourceGroupName {get; set;} - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - public override void ExecuteCmdlet() - { - try - { - switch (ParameterSetName) - { - case FieldsParameterSet: - this.FieldsParameterSetCmdlet(); - break; - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - } - catch (Microsoft.Azure.Management.Cdn.Models.AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - - private void FieldsParameterSetCmdlet() - { - if (AfdUtilities.IsValuePresent(this.EndpointName)) - { - // all fields are present (mandatory + optional) - - PSAfdEndpoint psAfdEndpoint = CdnManagementClient.AFDEndpoints.Get(this.ResourceGroupName, this.ProfileName, this.EndpointName).ToPSAfdEndpoint(); - - WriteObject(psAfdEndpoint); - } - else - { - // only the mandatory fields are present - - List psAfdEndpoints = CdnManagementClient.AFDEndpoints.ListByProfile(this.ResourceGroupName, this.ProfileName) - .Select(afdEndpoint => afdEndpoint.ToPSAfdEndpoint()) - .ToList(); - - WriteObject(psAfdEndpoints); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdProfileResourceId = new ResourceIdentifier(this.Profile.Id); - - this.ProfileName = parsedAfdProfileResourceId.ResourceName; - this.ResourceGroupName = parsedAfdProfileResourceId.ResourceGroupName; - - List psAfdEndpoints = CdnManagementClient.AFDEndpoints.ListByProfile(this.ResourceGroupName, this.ProfileName) - .Select(afdEndpoint => afdEndpoint.ToPSAfdEndpoint()) - .ToList(); - - WriteObject(psAfdEndpoints); - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdEndpointResourceId = new ResourceIdentifier(this.ResourceId); - - this.EndpointName = parsedAfdEndpointResourceId.ResourceName; - this.ProfileName = parsedAfdEndpointResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdEndpointResourceId.ResourceGroupName; - - PSAfdEndpoint psAfdEndpoint = CdnManagementClient.AFDEndpoints.Get(this.ResourceGroupName, this.ProfileName, this.EndpointName).ToPSAfdEndpoint(); - - WriteObject(psAfdEndpoint); - } - } -} diff --git a/src/Cdn/Cdn/AfdEndpoint/NewAzFrontDoorCdnEndpoint.cs b/src/Cdn/Cdn/AfdEndpoint/NewAzFrontDoorCdnEndpoint.cs deleted file mode 100644 index 5522ae13ac77..000000000000 --- a/src/Cdn/Cdn/AfdEndpoint/NewAzFrontDoorCdnEndpoint.cs +++ /dev/null @@ -1,70 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Commands.ResourceManager.Common.Tags; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using System.Collections; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdEndpoint -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnEndpoint", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSAfdEndpoint))] - public class NewAzFrontDoorCdnEndpoint : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdEndpointName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - [ResourceGroupCompleter()] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.TagsDescription, ParameterSetName = FieldsParameterSet)] - public Hashtable Tag { get; set; } - - public override void ExecuteCmdlet() - { - ConfirmAction(AfdResourceProcessMessage.AfdEndpointCreateMessage, this.EndpointName, this.CreateAfdEndpoint); - } - - public void CreateAfdEndpoint() - { - try - { - AFDEndpoint afdEndpoint = new AFDEndpoint - { - Location = AfdResourceConstants.AfdResourceLocation, - Tags = TagsConversionHelper.CreateTagDictionary(this.Tag, true) - }; - - PSAfdEndpoint psAfdEndpoint = this.CdnManagementClient.AFDEndpoints.Create(this.ResourceGroupName, this.ProfileName, this.EndpointName, afdEndpoint).ToPSAfdEndpoint(); - - WriteObject(psAfdEndpoint); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - } -} diff --git a/src/Cdn/Cdn/AfdEndpoint/RemoveAzFrontDoorCdnEndpoint.cs b/src/Cdn/Cdn/AfdEndpoint/RemoveAzFrontDoorCdnEndpoint.cs deleted file mode 100644 index a5c3f2c9daf0..000000000000 --- a/src/Cdn/Cdn/AfdEndpoint/RemoveAzFrontDoorCdnEndpoint.cs +++ /dev/null @@ -1,101 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdEndpoint -{ - [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnEndpoint", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(bool))] - public class RemoveAzFrontDoorCdnEndpoint : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdEndpointObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNullOrEmpty] - public PSAfdEndpoint Endpoint { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdEndpointName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - public string ResourceId { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.PassThruParameter)] - - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - // no case for FieldsParameterSet since required parameters will be present - switch (ParameterSetName) - { - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - - ConfirmAction(AfdResourceProcessMessage.AfdEndpointDeleteMessage, this.EndpointName, this.DeleteAfdEndpoint); - } - - private void DeleteAfdEndpoint() - { - try - { - this.CdnManagementClient.AFDEndpoints.Delete(this.ResourceGroupName, this.ProfileName, this.EndpointName); - } - catch (AfdErrorResponseException errorResponseException) - { - throw new PSArgumentException(errorResponseException.Response.Content); - } - - if (this.PassThru.IsPresent) - { - WriteObject(true); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdEndpointResourceId = new ResourceIdentifier(this.Endpoint.Id); - - this.EndpointName = parsedAfdEndpointResourceId.ResourceName; - this.ProfileName = parsedAfdEndpointResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdEndpointResourceId.ResourceGroupName; - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdEndpointResourceId = new ResourceIdentifier(this.ResourceId); - - this.EndpointName = parsedAfdEndpointResourceId.ResourceName; - this.ProfileName = parsedAfdEndpointResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdEndpointResourceId.ResourceGroupName; - } - } -} diff --git a/src/Cdn/Cdn/AfdEndpoint/SetAzFrontDoorCdnEndpoint.cs b/src/Cdn/Cdn/AfdEndpoint/SetAzFrontDoorCdnEndpoint.cs deleted file mode 100644 index dbe38236c9c1..000000000000 --- a/src/Cdn/Cdn/AfdEndpoint/SetAzFrontDoorCdnEndpoint.cs +++ /dev/null @@ -1,94 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Commands.ResourceManager.Common.Tags; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Collections; -using System.Collections.Generic; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdEndpoint -{ - [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnEndpoint", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSAfdEndpoint))] - public class SetAzFrontDoorCdnEndpoint : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdEndpointObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNullOrEmpty] - public PSAfdEndpoint Endpoint { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdEndpointName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - [ResourceGroupCompleter()] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.TagsDescription, ParameterSetName = FieldsParameterSet)] - public Hashtable Tag { get; set; } - - public override void ExecuteCmdlet() - { - switch (ParameterSetName) - { - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - } - - ConfirmAction(AfdResourceProcessMessage.AfdEndpointUpdateMessage, this.EndpointName, this.UpdateAfdEndpoint); - } - - private void UpdateAfdEndpoint() - { - try - { - AFDEndpointUpdateParameters afdEndpointParameters = new AFDEndpointUpdateParameters(); - - Dictionary afdEndpointTags = TagsConversionHelper.CreateTagDictionary(this.Tag, true); - - afdEndpointParameters.Tags = afdEndpointTags; - - PSAfdEndpoint psAfdEndpoint = this.CdnManagementClient.AFDEndpoints.Update(this.ResourceGroupName, this.ProfileName, this.EndpointName, afdEndpointParameters).ToPSAfdEndpoint(); - - WriteObject(psAfdEndpoint); - } - catch (AfdErrorResponseException errorResponseException) - { - throw new PSArgumentException(errorResponseException.Response.Content); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdEndpointResourceId = new ResourceIdentifier(this.Endpoint.Id); - - this.EndpointName = parsedAfdEndpointResourceId.ResourceName; - this.ProfileName = parsedAfdEndpointResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdEndpointResourceId.ResourceGroupName; - - this.Tag = this.Endpoint.Tags; - } - } -} diff --git a/src/Cdn/Cdn/AfdHelpers/AfdModelExtensions.cs b/src/Cdn/Cdn/AfdHelpers/AfdModelExtensions.cs deleted file mode 100644 index c721af88d2cb..000000000000 --- a/src/Cdn/Cdn/AfdHelpers/AfdModelExtensions.cs +++ /dev/null @@ -1,230 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.ResourceManager.Common.Tags; -using Newtonsoft.Json.Linq; -using Microsoft.Azure.Management.Cdn.Models; -using System.Collections.Generic; - -using SdkAfdCustomDomain = Microsoft.Azure.Management.Cdn.Models.AFDDomain; -using SdkAfdEndpoint = Microsoft.Azure.Management.Cdn.Models.AFDEndpoint; -using SdkAfdOrigin = Microsoft.Azure.Management.Cdn.Models.AFDOrigin; -using SdkAfdOriginGroup = Microsoft.Azure.Management.Cdn.Models.AFDOriginGroup; -using SdkAfdProfile = Microsoft.Azure.Management.Cdn.Models.Profile; -using SdkAfdRoute = Microsoft.Azure.Management.Cdn.Models.Route; -using SdkAfdRule = Microsoft.Azure.Management.Cdn.Models.Rule; -using SdkAfdRuleSet = Microsoft.Azure.Management.Cdn.Models.RuleSet; -using SdkAfdSecret = Microsoft.Azure.Management.Cdn.Models.Secret; -using SdkAfdSecurityPolicy = Microsoft.Azure.Management.Cdn.Models.SecurityPolicy; - -namespace Microsoft.Azure.Commands.Cdn.AfdHelpers -{ - public static class AfdModelExtensions - { - public static PSAfdCustomDomain ToPSAfdCustomDomain(this SdkAfdCustomDomain sdkAfdCustomDomain) - { - return new PSAfdCustomDomain - { - Id = sdkAfdCustomDomain.Id, - Name = sdkAfdCustomDomain.Name, - Type = sdkAfdCustomDomain.Type, - ProvisioningState = sdkAfdCustomDomain.ProvisioningState, - HostName = sdkAfdCustomDomain.HostName, - CertificateType = sdkAfdCustomDomain.TlsSettings?.CertificateType, - MinimumTlsVersion = sdkAfdCustomDomain.TlsSettings?.MinimumTlsVersion.ToString(), - Secret = sdkAfdCustomDomain.TlsSettings?.Secret?.Id, - ValidationToken = sdkAfdCustomDomain.ValidationProperties?.ValidationToken, - ExpirationDate = sdkAfdCustomDomain.ValidationProperties?.ExpirationDate, - AzureDnsZone = sdkAfdCustomDomain.AzureDnsZone?.Id, - DomainValidationState = sdkAfdCustomDomain.DomainValidationState - }; - } - - public static PSAfdEndpoint ToPSAfdEndpoint(this SdkAfdEndpoint sdkAfdEndpoint) - { - return new PSAfdEndpoint - { - Id = sdkAfdEndpoint.Id, - Name = sdkAfdEndpoint.Name, - Type = sdkAfdEndpoint.Type, - ProvisioningState = sdkAfdEndpoint.ProvisioningState, - Location = sdkAfdEndpoint.Location, - Tags = TagsConversionHelper.CreateTagHashtable(sdkAfdEndpoint.Tags), - HostName = sdkAfdEndpoint.HostName, - EnabledState = sdkAfdEndpoint.EnabledState - }; - } - - public static PSAfdOrigin ToPSAfdOrigin(this SdkAfdOrigin sdkOrigin) - { - JObject sharedPrivateLinkResourceJObject = (JObject)sdkOrigin.SharedPrivateLinkResource; - - SharedPrivateLinkResource sharedPrivateLinkResource = null; - - if (sharedPrivateLinkResourceJObject != null) - { - sharedPrivateLinkResource = sharedPrivateLinkResourceJObject.ToObject(); - } - - // origin group name is not present here since it is not provided by the SDK - // we extract the origin group name via the input and utility methods and then add it to the PSAfdOrigin - return new PSAfdOrigin - { - Id = sdkOrigin.Id, - Name = sdkOrigin.Name, - Type = sdkOrigin.Type, - ProvisioningState = sdkOrigin.ProvisioningState, - HostName = sdkOrigin.HostName, - HttpPort = sdkOrigin.HttpPort, - HttpsPort = sdkOrigin.HttpsPort, - OriginHostHeader = sdkOrigin.OriginHostHeader, - Priority = sdkOrigin.Priority, - Weight = sdkOrigin.Weight, - EnabledState = sdkOrigin.EnabledState, - PrivateLinkId = sharedPrivateLinkResource?.PrivateLink?.Id, - //PrivateLinkGroupId = sharedPrivateLinkResource?.GroupId, // confirm this field - PrivateLinkLocation = sharedPrivateLinkResource?.PrivateLinkLocation, - //PrivateLinkStatus = sharedPrivateLinkResource?.Status, // confirm this field - PrivateLinkRequestMessage = sharedPrivateLinkResource?.RequestMessage - }; - } - - public static PSAfdOriginGroup ToPSAfdOriginGroup(this SdkAfdOriginGroup sdkOriginGroup) - { - return new PSAfdOriginGroup - { - Id = sdkOriginGroup.Id, - Name = sdkOriginGroup.Name, - Type = sdkOriginGroup.Type, - ProvisioningState = sdkOriginGroup.ProvisioningState, - SampleSize = sdkOriginGroup.LoadBalancingSettings?.SampleSize, - SuccessfulSamplesRequired = sdkOriginGroup.LoadBalancingSettings?.SuccessfulSamplesRequired, - AdditionalLatencyInMilliseconds = sdkOriginGroup.LoadBalancingSettings?.AdditionalLatencyInMilliseconds, - ProbePath = sdkOriginGroup.HealthProbeSettings?.ProbePath, - ProbeRequestType = sdkOriginGroup.HealthProbeSettings?.ProbeRequestType.ToString(), - ProbeProtocol = sdkOriginGroup.HealthProbeSettings?.ProbeProtocol.ToString(), - ProbeIntervalInSeconds = sdkOriginGroup.HealthProbeSettings?.ProbeIntervalInSeconds, - TrafficRestorationTimeToHealedOrNewEndpointsInMinutes = sdkOriginGroup.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes - }; - } - - public static PSAfdProfile ToPSAfdProfile(this SdkAfdProfile sdkAfdProfile) - { - return new PSAfdProfile - { - Id = sdkAfdProfile.Id, - Name = sdkAfdProfile.Name, - Type = sdkAfdProfile.Type, - ProvisioningState = sdkAfdProfile.ProvisioningState, - Location = sdkAfdProfile.Location, - Tags = TagsConversionHelper.CreateTagHashtable(sdkAfdProfile.Tags), - ResourceState = sdkAfdProfile.ResourceState, - Sku = sdkAfdProfile.Sku.Name - }; - } - - public static PSAfdRoute ToPSAfdRoute(this SdkAfdRoute sdkAfdRoute) - { - return new PSAfdRoute - { - Id = sdkAfdRoute.Id, - Name = sdkAfdRoute.Name, - Type = sdkAfdRoute.Type, - ProvisioningState = sdkAfdRoute.ProvisioningState, - OriginGroupId = sdkAfdRoute.OriginGroup?.Id, - OriginPath = sdkAfdRoute.OriginPath, - CustomDomainIds = (List)sdkAfdRoute.CustomDomains, - RuleSetIds = (List)sdkAfdRoute.RuleSets, - SupportedProtocols = (List)sdkAfdRoute.SupportedProtocols, - PatternsToMatch = (List)sdkAfdRoute.PatternsToMatch, - QueryStringCachingBehavior = sdkAfdRoute.QueryStringCachingBehavior.Value.ToString(), - ForwardingProtocol = sdkAfdRoute.ForwardingProtocol, - HttpsRedirect = sdkAfdRoute.HttpsRedirect, - LinkToDefaultDomain = sdkAfdRoute.LinkToDefaultDomain, - EnabledState = sdkAfdRoute.EnabledState - }; - } - - public static PSAfdRule ToPSAfdRule(this SdkAfdRule sdkAfdRule) - { - return new PSAfdRule - { - Id = sdkAfdRule.Id, - Name = sdkAfdRule.Name, - Type = sdkAfdRule.Type, - ProvisioningState = sdkAfdRule.ProvisioningState, - Order = sdkAfdRule.Order, - Actions = (List)sdkAfdRule.Actions, - Conditions = (List)sdkAfdRule.Conditions, - MatchProcessingBehavior = sdkAfdRule.MatchProcessingBehavior - }; - } - - public static PSAfdRuleSet ToPSAfdRuleSet(this SdkAfdRuleSet sdkAfdRuleSet) - { - return new PSAfdRuleSet - { - Id = sdkAfdRuleSet.Id, - Name = sdkAfdRuleSet.Name, - Type = sdkAfdRuleSet.Type, - ProvisioningState = sdkAfdRuleSet.ProvisioningState - }; - } - - public static PSAfdSecret ToPSAfdSecret(this SdkAfdSecret sdkAfdSecret) - { - if (sdkAfdSecret.Parameters.GetType() == typeof(CustomerCertificateParameters)) - { - CustomerCertificateParameters customerCertificateParameters = (CustomerCertificateParameters)sdkAfdSecret.Parameters; - - return new PSAfdSecret - { - Id = sdkAfdSecret.Id, - Name = sdkAfdSecret.Name, - Type = sdkAfdSecret.Type, - ProvisioningState = sdkAfdSecret.ProvisioningState, - CertificateAuthority = customerCertificateParameters.CertificateAuthority, - SecretSource = customerCertificateParameters.SecretSource?.Id, - SecretVersion = customerCertificateParameters.SecretVersion, - SubjectAlternativeNames = (List)customerCertificateParameters.SubjectAlternativeNames, - UseLatestVersion = customerCertificateParameters.UseLatestVersion - }; - } - - return new PSAfdSecret - { - Id = sdkAfdSecret.Id, - Name = sdkAfdSecret.Name, - Type = sdkAfdSecret.Type, - ProvisioningState = sdkAfdSecret.ProvisioningState - }; - } - - public static PSAfdSecurityPolicy ToPSAfdSecurityPolicy(this SdkAfdSecurityPolicy sdkAfdSecurityPolicy) - { - SecurityPolicyWebApplicationFirewallParameters securityPolicyWafParameters = (SecurityPolicyWebApplicationFirewallParameters)sdkAfdSecurityPolicy.Parameters; - - return new PSAfdSecurityPolicy - { - Id = sdkAfdSecurityPolicy.Id, - Name = sdkAfdSecurityPolicy.Name, - Type = sdkAfdSecurityPolicy.Type, - ProvisioningState = sdkAfdSecurityPolicy.ProvisioningState, - WafPolicyId = securityPolicyWafParameters.WafPolicy?.Id, - Domains = (List)securityPolicyWafParameters?.Associations[0]?.Domains, - PatternsToMatch = (List)securityPolicyWafParameters?.Associations[0]?.PatternsToMatch - }; - } - } -} diff --git a/src/Cdn/Cdn/AfdHelpers/AfdUtilities.cs b/src/Cdn/Cdn/AfdHelpers/AfdUtilities.cs deleted file mode 100644 index 9a8e392eb165..000000000000 --- a/src/Cdn/Cdn/AfdHelpers/AfdUtilities.cs +++ /dev/null @@ -1,235 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System; - -namespace Microsoft.Azure.Commands.Cdn.AfdHelpers -{ - public static class AfdUtilities - { - public static bool IsValuePresent(string value) - { - return !string.IsNullOrWhiteSpace(value); - } - - public static string GetResourceName(this ResourceIdentifier resourceId, string resourceType) - { - string[] splitNames = resourceId.ToString().Split(new[] { '/' }); - - for (int i = 0; i < splitNames.Length; i++) - { - if (splitNames[i].Equals(resourceType, StringComparison.OrdinalIgnoreCase)) - { - return splitNames[i + 1]; - } - } - - return string.Empty; - } - - public static Sku GenerateAfdProfileSku(string sku) - { - string lowercaseSku = sku.ToLower(); - - Sku afdSku = new Sku(); - - switch(lowercaseSku) - { - case "premium_azurefrontdoor": - afdSku.Name = AfdSkuConstants.PremiumAzureFrontDoor; - break; - - case "standard_azurefrontdoor": - afdSku.Name = AfdSkuConstants.StandardAzureFrontDoor; - break; - - default: - afdSku = null; - break; - } - - return afdSku; - } - - public static bool IsAfdProfile(PSAfdProfile psAfdProfile) - { - if (psAfdProfile.Sku == AfdSkuConstants.PremiumAzureFrontDoor || psAfdProfile.Sku == AfdSkuConstants.StandardAzureFrontDoor) - { - return true; - } - - return false; - } - - public static HealthProbeRequestType CreateProbeRequestType(string probeRequestType) - { - string lowercaseProbeRequestType = probeRequestType.ToLower(); - - HealthProbeRequestType healthProbeRequestType; - - switch (lowercaseProbeRequestType) - { - case "get": - healthProbeRequestType = HealthProbeRequestType.GET; - break; - case "head": - healthProbeRequestType = HealthProbeRequestType.HEAD; - break; - case "notset": - healthProbeRequestType = HealthProbeRequestType.NotSet; - break; - default: - throw new Exception($"{probeRequestType} is not a valid probe request type. Please use GET, HEAD, or NotSet."); - } - - return healthProbeRequestType; - } - - public static ProbeProtocol CreateProbeProtocol(string probeProtocol) - { - string lowercaseProbeProtocol = probeProtocol.ToLower(); - - ProbeProtocol probeProtocolEnum; - - switch(lowercaseProbeProtocol) - { - case "http": - probeProtocolEnum = ProbeProtocol.Http; - break; - case "https": - probeProtocolEnum = ProbeProtocol.Https; - break; - case "notset": - probeProtocolEnum = ProbeProtocol.NotSet; - break; - default: - throw new Exception($"{probeProtocol} is not valid probe protocol. Please use Http, Https, or NotSet."); - } - - return probeProtocolEnum; - } - - // determine if needed - public static ResponseBasedDetectedErrorTypes CreateResponseBasedDetectedErrorTypes(string responseBasedDetectedErrorTypes) - { - string lowercaseResponseBasedDetectedErrorTypes = responseBasedDetectedErrorTypes.ToLower(); - - ResponseBasedDetectedErrorTypes responseBasedDetectedErrorTypesEnum; - - switch (lowercaseResponseBasedDetectedErrorTypes) - { - case "tcpandhttperrors": - responseBasedDetectedErrorTypesEnum = ResponseBasedDetectedErrorTypes.TcpAndHttpErrors; - break; - case "tcperrorsonly": - responseBasedDetectedErrorTypesEnum = ResponseBasedDetectedErrorTypes.TcpErrorsOnly; - break; - case "none": - responseBasedDetectedErrorTypesEnum = ResponseBasedDetectedErrorTypes.None; - break; - default: - throw new Exception($"{responseBasedDetectedErrorTypes} is not a valid error type. Please use TcpAndHttpErrors, TcpErrorsOnly, or None."); - } - - return responseBasedDetectedErrorTypesEnum; - } - - public static AfdQueryStringCachingBehavior CreateQueryStringCachingBehavior(string queryStringCachingBehavior) - { - string lowercaseQueryStringCachingBehavior = queryStringCachingBehavior.ToLower(); - - AfdQueryStringCachingBehavior queryStringCachingBehaviorEnum; - - switch (lowercaseQueryStringCachingBehavior) - { - case "ignorequerystring": - queryStringCachingBehaviorEnum = AfdQueryStringCachingBehavior.IgnoreQueryString; - break; - case "usequerystring": - queryStringCachingBehaviorEnum = AfdQueryStringCachingBehavior.UseQueryString; - break; - case "notset": - queryStringCachingBehaviorEnum = AfdQueryStringCachingBehavior.NotSet; - break; - default: - throw new Exception($"{queryStringCachingBehavior} is not a valid query string caching behavior type. Please use NotSet, UseQueryString, or IgnoreQueryString."); - } - - return queryStringCachingBehaviorEnum; - } - - public static string CreateHttpsRedirect(string httpsRedirect) - { - string lowercaseHttpsRedirect = httpsRedirect.ToLower(); - - string httpsRedirectState = String.Empty; - - switch (lowercaseHttpsRedirect) - { - case "enabled": - httpsRedirectState = "Enabled"; - break; - case "disabled": - httpsRedirectState = "Disabled"; - break; - default: - throw new Exception($"{httpsRedirect} is not valid. Please use Enabled or Disbaled."); - } - - return httpsRedirectState; - } - - public static string CreateForwardingProtocol(string forwadingProtocol) - { - string lowercaseForwardingProtocol = forwadingProtocol.ToLower(); - - string forwardingProtocolActual = String.Empty; - - switch (lowercaseForwardingProtocol) - { - case "httponly": - forwardingProtocolActual = "HttpOnly"; - break; - case "httpsonly": - forwardingProtocolActual = "HttpsOnly"; - break; - case "matchrequest": - forwardingProtocolActual = "MatchRequest"; - break; - default: - throw new Exception($"{forwadingProtocol} is not valid. Please use HttpOnly, HttpsOnly, or MatchRequest."); - } - - return forwardingProtocolActual; - } - - public static AfdMinimumTlsVersion CreateMinimumTlsVersion(string tlsVersion) - { - string lowercaseTlsVersion = tlsVersion.ToLower(); - - switch (lowercaseTlsVersion) - { - case "tls10": - return AfdMinimumTlsVersion.TLS10; - case "tls12": - return AfdMinimumTlsVersion.TLS12; - default: - throw new Exception($"The TLS version {tlsVersion} is not valid. Accepted values TLS10 or TLS12."); - } - } - } -} diff --git a/src/Cdn/Cdn/AfdModels/PSAfdCustomDomain.cs b/src/Cdn/Cdn/AfdModels/PSAfdCustomDomain.cs deleted file mode 100644 index f1424fa17d26..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSAfdCustomDomain.cs +++ /dev/null @@ -1,34 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSAfdCustomDomain : PSArmBaseResource - { - public string HostName { get; set; } - - public string CertificateType { get; set; } - - public string MinimumTlsVersion { get; set; } - - public string Secret { get; set; } - - public string ValidationToken { get; set; } - - public string ExpirationDate { get; set; } - - public string AzureDnsZone { get; set; } - - public string DomainValidationState { get; set; } - } -} diff --git a/src/Cdn/Cdn/AfdModels/PSAfdEndpoint.cs b/src/Cdn/Cdn/AfdModels/PSAfdEndpoint.cs deleted file mode 100644 index fc0384a03836..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSAfdEndpoint.cs +++ /dev/null @@ -1,22 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSAfdEndpoint : PSArmTrackedResource - { - public string HostName { get; set; } - - public string EnabledState { get; set; } - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn/AfdModels/PSAfdOrigin.cs b/src/Cdn/Cdn/AfdModels/PSAfdOrigin.cs deleted file mode 100644 index fc90df3a5fb4..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSAfdOrigin.cs +++ /dev/null @@ -1,44 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSAfdOrigin : PSArmBaseResource - { - public string OriginGroupName { get; set; } - - public string HostName { get; set; } - - public int? HttpPort { get; set; } - - public int? HttpsPort { get; set; } - - public string OriginHostHeader { get; set; } - - public int? Priority { get; set; } - - public int? Weight { get; set; } - - public string EnabledState { get; set; } - - public string PrivateLinkId { get; set; } - - // public string PrivateLinkGroupId { get; set; } // confirm this field - - public string PrivateLinkLocation { get; set; } - - // public string PrivateLinkStatus { get; set; } // confirm this field - - public string PrivateLinkRequestMessage { get; set; } - } -} diff --git a/src/Cdn/Cdn/AfdModels/PSAfdOriginGroup.cs b/src/Cdn/Cdn/AfdModels/PSAfdOriginGroup.cs deleted file mode 100644 index 13aff68edebe..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSAfdOriginGroup.cs +++ /dev/null @@ -1,34 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSAfdOriginGroup : PSArmBaseResource - { - public int? SampleSize { get; set; } - - public int? SuccessfulSamplesRequired { get; set; } - - public int? AdditionalLatencyInMilliseconds { get; set; } - - public string ProbePath { get; set; } - - public string ProbeRequestType { get; set; } - - public string ProbeProtocol { get; set; } - - public int? ProbeIntervalInSeconds { get; set; } - - public int? TrafficRestorationTimeToHealedOrNewEndpointsInMinutes { get; set; } // confirm this field - } -} diff --git a/src/Cdn/Cdn/AfdModels/PSAfdProfile.cs b/src/Cdn/Cdn/AfdModels/PSAfdProfile.cs deleted file mode 100644 index 28f484a317ce..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSAfdProfile.cs +++ /dev/null @@ -1,22 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSAfdProfile : PSArmTrackedResource - { - public string ResourceState { get; set; } - - public string Sku { get; set; } - } -} diff --git a/src/Cdn/Cdn/AfdModels/PSAfdRoute.cs b/src/Cdn/Cdn/AfdModels/PSAfdRoute.cs deleted file mode 100644 index c6821193ad6f..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSAfdRoute.cs +++ /dev/null @@ -1,43 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Management.Cdn.Models; -using System.Collections.Generic; - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSAfdRoute : PSArmBaseResource - { - public string OriginGroupId { get; set; } - - public string OriginPath { get; set; } - - public List CustomDomainIds { get; set; } - - public List RuleSetIds { get; set; } - - public List SupportedProtocols { get; set; } - - public List PatternsToMatch { get; set; } - - public string QueryStringCachingBehavior { get; set; } - - public string ForwardingProtocol { get; set; } - - public string HttpsRedirect { get; set; } - - public string LinkToDefaultDomain { get; set; } - - public string EnabledState { get; set; } - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn/AfdModels/PSAfdRule.cs b/src/Cdn/Cdn/AfdModels/PSAfdRule.cs deleted file mode 100644 index fa98978b7d3d..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSAfdRule.cs +++ /dev/null @@ -1,29 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Management.Cdn.Models; -using System.Collections.Generic; - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSAfdRule : PSArmBaseResource - { - public int Order { get; set; } - - public List Actions { get; set; } - - public List Conditions { get; set; } - - public string MatchProcessingBehavior { get; set; } - } -} diff --git a/src/Cdn/Cdn/AfdModels/PSAfdRuleAction.cs b/src/Cdn/Cdn/AfdModels/PSAfdRuleAction.cs deleted file mode 100644 index adb65b673dba..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSAfdRuleAction.cs +++ /dev/null @@ -1,19 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSAfdRuleAction - { - } -} diff --git a/src/Cdn/Cdn/AfdModels/PSAfdRuleCacheExpirationAction.cs b/src/Cdn/Cdn/AfdModels/PSAfdRuleCacheExpirationAction.cs deleted file mode 100644 index 553df50f87af..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSAfdRuleCacheExpirationAction.cs +++ /dev/null @@ -1,22 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSAfdRuleCacheExpirationAction : PSAfdRuleAction - { - public string CacheBehavior { get; set; } - - public string CacheDuration { get; set; } - } -} diff --git a/src/Cdn/Cdn/AfdModels/PSAfdRuleCacheKeyQueryStringAction.cs b/src/Cdn/Cdn/AfdModels/PSAfdRuleCacheKeyQueryStringAction.cs deleted file mode 100644 index 6f77fc388c5a..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSAfdRuleCacheKeyQueryStringAction.cs +++ /dev/null @@ -1,22 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSAfdRuleCacheKeyQueryStringAction : PSAfdRuleAction - { - public string QueryStringBehavior { get; set; } - - public string QueryParameters { get; set; } - } -} diff --git a/src/Cdn/Cdn/AfdModels/PSAfdRuleCondition.cs b/src/Cdn/Cdn/AfdModels/PSAfdRuleCondition.cs deleted file mode 100644 index 606fd4ce4899..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSAfdRuleCondition.cs +++ /dev/null @@ -1,32 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections.Generic; - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSAfdRuleCondition - { - public string MatchVariable { get; set; } - - public string Operator { get; set; } - - public string Selector { get; set; } - - public List MatchValue { get; set; } - - public bool? NegateCondition { get; set; } - - public List Transforms { get; set; } - } -} diff --git a/src/Cdn/Cdn/AfdModels/PSAfdRuleHeaderAction.cs b/src/Cdn/Cdn/AfdModels/PSAfdRuleHeaderAction.cs deleted file mode 100644 index e1635a26a322..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSAfdRuleHeaderAction.cs +++ /dev/null @@ -1,26 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSAfdRuleHeaderAction : PSAfdRuleAction - { - public string HeaderType { get; set; } - - public string HeaderAction { get; set; } - - public string HeaderName { get; set; } - - public string HeaderValue { get; set; } - } -} diff --git a/src/Cdn/Cdn/AfdModels/PSAfdRuleOriginGroupOverrideAction.cs b/src/Cdn/Cdn/AfdModels/PSAfdRuleOriginGroupOverrideAction.cs deleted file mode 100644 index a6e31b8ef650..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSAfdRuleOriginGroupOverrideAction.cs +++ /dev/null @@ -1,20 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSAfdRuleOriginGroupOverrideAction : PSAfdRuleAction - { - public string OriginGroup { get; set; } - } -} diff --git a/src/Cdn/Cdn/AfdModels/PSAfdRuleSet.cs b/src/Cdn/Cdn/AfdModels/PSAfdRuleSet.cs deleted file mode 100644 index 4db0a048f1e2..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSAfdRuleSet.cs +++ /dev/null @@ -1,19 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSAfdRuleSet : PSArmBaseResource - { - } -} diff --git a/src/Cdn/Cdn/AfdModels/PSAfdRuleUrlRedirectAction.cs b/src/Cdn/Cdn/AfdModels/PSAfdRuleUrlRedirectAction.cs deleted file mode 100644 index 3d71a45cae42..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSAfdRuleUrlRedirectAction.cs +++ /dev/null @@ -1,30 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSAfdRuleUrlRedirectAction : PSAfdRuleAction - { - public string RedirectType { get; set; } - - public string DestinationProtocol { get; set; } - - public string CustomQueryString { get; set; } - - public string CustomPath { get; set; } - - public string CustomHostname { get; set; } - - public string CustomFragment { get; set; } - } -} diff --git a/src/Cdn/Cdn/AfdModels/PSAfdRuleUrlRewriteAction.cs b/src/Cdn/Cdn/AfdModels/PSAfdRuleUrlRewriteAction.cs deleted file mode 100644 index d6330cea9c3c..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSAfdRuleUrlRewriteAction.cs +++ /dev/null @@ -1,24 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSAfdRuleUrlRewriteAction : PSAfdRuleAction - { - public string SourcePattern { get; set; } - - public string Destination { get; set; } - - public bool PreservePath { get; set; } - } -} diff --git a/src/Cdn/Cdn/AfdModels/PSAfdSecret.cs b/src/Cdn/Cdn/AfdModels/PSAfdSecret.cs deleted file mode 100644 index 6b6abc4728c1..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSAfdSecret.cs +++ /dev/null @@ -1,30 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections.Generic; - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSAfdSecret : PSArmBaseResource - { - public string CertificateAuthority { get; set; } - - public string SecretSource { get; set; } - - public string SecretVersion { get; set; } - - public List SubjectAlternativeNames { get; set; } - - public bool? UseLatestVersion { get; set; } - } -} diff --git a/src/Cdn/Cdn/AfdModels/PSAfdSecurityPolicy.cs b/src/Cdn/Cdn/AfdModels/PSAfdSecurityPolicy.cs deleted file mode 100644 index f809f7249ff3..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSAfdSecurityPolicy.cs +++ /dev/null @@ -1,27 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Management.Cdn.Models; -using System.Collections.Generic; - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSAfdSecurityPolicy : PSArmBaseResource - { - public string WafPolicyId { get; set; } - - public List Domains {get; set;} - - public List PatternsToMatch { get; set; } - } -} diff --git a/src/Cdn/Cdn/AfdModels/PSArmBaseResource.cs b/src/Cdn/Cdn/AfdModels/PSArmBaseResource.cs deleted file mode 100644 index 5be71e5d1376..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSArmBaseResource.cs +++ /dev/null @@ -1,28 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Rest.Azure; - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSArmBaseResource : IResource - { - public string Id { get; set; } - - public string Name { get; set; } - - public string Type { get; set; } - - public string ProvisioningState { get; set; } - } -} diff --git a/src/Cdn/Cdn/AfdModels/PSArmTrackedResource.cs b/src/Cdn/Cdn/AfdModels/PSArmTrackedResource.cs deleted file mode 100644 index 3fbad09159e1..000000000000 --- a/src/Cdn/Cdn/AfdModels/PSArmTrackedResource.cs +++ /dev/null @@ -1,31 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections; - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class PSArmTrackedResource : PSArmBaseResource - { - /// - /// Gets or sets the Location - /// - public string Location { get; set; } - - /// - /// Gets or sets the Tags - /// - public Hashtable Tags { get; set; } - } -} - diff --git a/src/Cdn/Cdn/AfdModels/SharedPrivateLinkResource.cs b/src/Cdn/Cdn/AfdModels/SharedPrivateLinkResource.cs deleted file mode 100644 index 65dcd9796add..000000000000 --- a/src/Cdn/Cdn/AfdModels/SharedPrivateLinkResource.cs +++ /dev/null @@ -1,33 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.AfdModels -{ - public class SharedPrivateLinkResource - { - public PrivateLinkId PrivateLink { get; set; } - - // public string GroupId { get; set; } // confirm this field - - public string PrivateLinkLocation { get; set; } - - // public string Status { get; set; } // confirm this field - - public string RequestMessage { get; set; } - } - - public class PrivateLinkId - { - public string Id { get; set; } - } -} diff --git a/src/Cdn/Cdn/AfdOrigin/GetAzFrontDoorCdnOrigin.cs b/src/Cdn/Cdn/AfdOrigin/GetAzFrontDoorCdnOrigin.cs deleted file mode 100644 index 771c50edcbe7..000000000000 --- a/src/Cdn/Cdn/AfdOrigin/GetAzFrontDoorCdnOrigin.cs +++ /dev/null @@ -1,152 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdOrigin -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnOrigin", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSAfdOrigin))] - public class GetAzFrontDoorCdnOrigin : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdOriginGroupObject, ParameterSetName = ObjectParameterSet)] - public PSAfdOriginGroup OriginGroup { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdOriginGroupName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginGroupName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - public override void ExecuteCmdlet() - { - try - { - switch (ParameterSetName) - { - case FieldsParameterSet: - this.FieldsParameterSetCmdlet(); - break; - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - - public void FieldsParameterSetCmdlet() - { - if(AfdUtilities.IsValuePresent(this.OriginName)) - { - // all fields are present (mandatory + optional) - - PSAfdOrigin psAfdOrigin = this.CdnManagementClient.AFDOrigins.Get(this.ResourceGroupName, this.ProfileName, this.OriginGroupName, this.OriginName).ToPSAfdOrigin(); - - // add origin group name from the parameter input since its not provided by the SDK - psAfdOrigin.OriginGroupName = this.OriginGroupName; - - WriteObject(psAfdOrigin); - } - else - { - // only the mandatory fields are present - - List psAfdOrigins = this.CdnManagementClient.AFDOrigins.ListByOriginGroup(this.ResourceGroupName, this.ProfileName, this.OriginGroupName) - .Select(afdOrigin => afdOrigin.ToPSAfdOrigin()) - .ToList(); - - // add the origin group name for each of the origins - foreach (PSAfdOrigin psAfdOrigin in psAfdOrigins) - { - psAfdOrigin.OriginGroupName = this.OriginGroupName; - } - - // sdk will not give an error if the origin group is invalid / does not exist - if (psAfdOrigins.Count == 0) - { - WriteObject($"No origins were found in the origin group {this.OriginGroupName}. Please ensure the origin group name is correct and has origins."); - } - - WriteObject(psAfdOrigins); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdOriginGroupResourceId = new ResourceIdentifier(this.OriginGroup.Id); - - this.OriginGroupName = parsedAfdOriginGroupResourceId.ResourceName; - this.ProfileName = parsedAfdOriginGroupResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdOriginGroupResourceId.ResourceGroupName; - - List psAfdOrigins = CdnManagementClient.AFDOrigins.ListByOriginGroup(this.ResourceGroupName, this.ProfileName, this.OriginGroupName) - .Select(afdOrigin => afdOrigin.ToPSAfdOrigin()) - .ToList(); - - // add the origin group name for each of the origins - foreach (PSAfdOrigin psAfdOrigin in psAfdOrigins) - { - psAfdOrigin.OriginGroupName = this.OriginGroupName; - } - - WriteObject(psAfdOrigins); - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdOriginId = new ResourceIdentifier(this.ResourceId); - - this.OriginName = parsedAfdOriginId.ResourceName; - this.OriginGroupName = parsedAfdOriginId.GetResourceName("origingroups"); - this.ProfileName = parsedAfdOriginId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdOriginId.ResourceGroupName; - - PSAfdOrigin psAfdOrigin = CdnManagementClient.AFDOrigins.Get(this.ResourceGroupName, this.ProfileName, this.OriginGroupName, this.OriginName).ToPSAfdOrigin(); - - // add origin group name from the parameter input since its not provided by the SDK - psAfdOrigin.OriginGroupName = this.OriginGroupName; - - WriteObject(psAfdOrigin); - } - } -} diff --git a/src/Cdn/Cdn/AfdOrigin/NewAzFrontDoorCdnOrigin.cs b/src/Cdn/Cdn/AfdOrigin/NewAzFrontDoorCdnOrigin.cs deleted file mode 100644 index ed20b2c78930..000000000000 --- a/src/Cdn/Cdn/AfdOrigin/NewAzFrontDoorCdnOrigin.cs +++ /dev/null @@ -1,152 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdOrigin -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnOrigin", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSAfdOrigin))] - public class NewAzFrontDoorCdnOrigin : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdOriginHostName)] - [ValidateNotNullOrEmpty] - public string HostName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginHttpPort)] - [ValidateNotNullOrEmpty] - public int HttpPort { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginHttpsPort)] - [ValidateNotNullOrEmpty] - public int HttpsPort { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdOriginGroupName)] - [ValidateNotNullOrEmpty] - public string OriginGroupName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginHostHeader)] - [ValidateNotNullOrEmpty] - public string OriginHostHeader { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdOriginName)] - [ValidateNotNullOrEmpty] - public string OriginName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginPriority)] - [ValidateNotNullOrEmpty] - public int Priority { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdOriginPrivateLinkId, ParameterSetName = AfdParameterSet.SharedPrivateLinkResource)] - [ValidateNotNullOrEmpty] - public string PrivateLinkId { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdOriginPrivateLinkLocation, ParameterSetName = AfdParameterSet.SharedPrivateLinkResource)] - [ValidateNotNullOrEmpty] - public string PrivateLinkLocation { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdOriginPrivateLinkRequestMessage, ParameterSetName = AfdParameterSet.SharedPrivateLinkResource)] - [ValidateNotNullOrEmpty] - public string PrivateLinkRequestMessage { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginWeight)] - [ValidateNotNullOrEmpty] - public int Weight { get; set; } - - public override void ExecuteCmdlet() - { - ConfirmAction(AfdResourceProcessMessage.AfdOriginCreateMessage, this.OriginName, this.CreateAfdOrigin); - } - - private void CreateAfdOrigin() - { - try - { - AFDOrigin afdOrigin = new AFDOrigin - { - HostName = this.HostName, - SharedPrivateLinkResource = this.CreateSharedPrivateLinkResource() - }; - - if (this.MyInvocation.BoundParameters.ContainsKey("HttpPort")) - { - afdOrigin.HttpPort = this.HttpPort; - } - - if (this.MyInvocation.BoundParameters.ContainsKey("HttpsPort")) - { - afdOrigin.HttpsPort = this.HttpsPort; - } - - if (this.MyInvocation.BoundParameters.ContainsKey("OriginHostHeader")) - { - afdOrigin.OriginHostHeader = this.OriginHostHeader; - } - - if (this.MyInvocation.BoundParameters.ContainsKey("Priority")) - { - afdOrigin.Priority = this.Priority; - } - - if (this.MyInvocation.BoundParameters.ContainsKey("Weight")) - { - afdOrigin.Weight = this.Weight; - } - - PSAfdOrigin psAfdOrigin = this.CdnManagementClient.AFDOrigins.Create(this.ResourceGroupName, this.ProfileName, this.OriginGroupName, this.OriginName, afdOrigin).ToPSAfdOrigin(); - psAfdOrigin.OriginGroupName = this.OriginGroupName; - - WriteObject(psAfdOrigin); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - - private SharedPrivateLinkResourceProperties CreateSharedPrivateLinkResource() - { - bool isPrivateLinkId = this.MyInvocation.BoundParameters.ContainsKey("PrivateLinkId"); - bool isPrivateLinkLocation = this.MyInvocation.BoundParameters.ContainsKey("PrivateLinkLocation"); - bool isPrivateLinkRequestMessage = this.MyInvocation.BoundParameters.ContainsKey("PrivateLinkRequestMessage"); - - if (!isPrivateLinkId && !isPrivateLinkLocation && !isPrivateLinkRequestMessage) - { - return null; - } - - SharedPrivateLinkResourceProperties sharedPrivateLinkResource = new SharedPrivateLinkResourceProperties - { - PrivateLink = new ResourceReference(this.PrivateLinkId), - PrivateLinkLocation = this.PrivateLinkLocation, - RequestMessage = this.PrivateLinkRequestMessage - }; - - return sharedPrivateLinkResource; - } - } -} diff --git a/src/Cdn/Cdn/AfdOrigin/RemoveAzFrontDoorCdnOrigin.cs b/src/Cdn/Cdn/AfdOrigin/RemoveAzFrontDoorCdnOrigin.cs deleted file mode 100644 index 3e99f02808e8..000000000000 --- a/src/Cdn/Cdn/AfdOrigin/RemoveAzFrontDoorCdnOrigin.cs +++ /dev/null @@ -1,107 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdOrigin -{ - [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnOrigin", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSAfdOrigin))] - public class RemoveAzFrontDoorCdnOrigin : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdOriginGroupName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdOriginName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdOriginObject, ParameterSetName = ObjectParameterSet)] - public PSAfdOrigin Origin { get; set; } - - [Parameter(Mandatory = false)] - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - switch (ParameterSetName) - { - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - - ConfirmAction(AfdResourceProcessMessage.AfdOriginDeleteMessage, this.OriginName, this.DeleteAfdOrigin); - } - - private void DeleteAfdOrigin() - { - try - { - this.CdnManagementClient.AFDOrigins.Delete(this.ResourceGroupName, this.ProfileName, this.OriginGroupName, this.OriginName); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - - if (this.PassThru.IsPresent) - { - WriteObject(true); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdOriginResourceId = new ResourceIdentifier(this.Origin.Id); - - this.OriginName = parsedAfdOriginResourceId.ResourceName; - this.OriginGroupName = parsedAfdOriginResourceId.GetResourceName("origingroups"); - this.ProfileName = parsedAfdOriginResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdOriginResourceId.ResourceGroupName; - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdOriginResourceId = new ResourceIdentifier(this.ResourceId); - - this.OriginName = parsedAfdOriginResourceId.ResourceName; - this.OriginGroupName = parsedAfdOriginResourceId.GetResourceName("origingroups"); - this.ProfileName = parsedAfdOriginResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdOriginResourceId.ResourceGroupName; - } - } -} diff --git a/src/Cdn/Cdn/AfdOrigin/SetAzFrontDoorCdnOrigin.cs b/src/Cdn/Cdn/AfdOrigin/SetAzFrontDoorCdnOrigin.cs deleted file mode 100644 index 28ef0907a583..000000000000 --- a/src/Cdn/Cdn/AfdOrigin/SetAzFrontDoorCdnOrigin.cs +++ /dev/null @@ -1,274 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdOrigin -{ - [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnOrigin", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSAfdOrigin))] - public class SetAzFrontDoorCdnOrigin : AzureCdnCmdletBase - { - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginHostName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string HostName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginHttpPort, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public int HttpPort { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginHttpsPort, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public int HttpsPort { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdOriginObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNullOrEmpty] - public PSAfdOrigin Origin { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdOriginGroupName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginGroupName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginHostHeader, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginHostHeader { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdOriginName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginPriority, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public int Priority { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginPrivateLinkId, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string PrivateLinkId { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginPrivateLinkLocation, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string PrivateLinkLocation { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginPrivateLinkRequestMessage, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string PrivateLinkRequestMessage { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginWeight, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public int Weight { get; set; } - - public override void ExecuteCmdlet() - { - switch (ParameterSetName) - { - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - } - - ConfirmAction(AfdResourceProcessMessage.AfdOriginUpdateMessage, this.OriginName, this.UpdateAfdOrigin); - } - - private void UpdateAfdOrigin() - { - try - { - PSAfdOrigin currentPsAfdOrigin = this.CdnManagementClient.AFDOrigins.Get(this.ResourceGroupName, this.ProfileName, this.OriginGroupName, this.OriginName).ToPSAfdOrigin(); - - AFDOriginUpdateParameters afdOrigin = new AFDOriginUpdateParameters(); - - if (ParameterSetName == ObjectParameterSet) - { - afdOrigin = this.CreateAfdOriginUpdateByObject(currentPsAfdOrigin); - } - if (ParameterSetName == FieldsParameterSet) - { - afdOrigin = this.CreateAfdOriginUpdateByFields(currentPsAfdOrigin); - } - - PSAfdOrigin updatedPsAfdOrigin = this.CdnManagementClient.AFDOrigins.Update(this.ResourceGroupName, this.ProfileName, this.OriginGroupName, this.OriginName, afdOrigin).ToPSAfdOrigin(); - updatedPsAfdOrigin.OriginGroupName = this.OriginGroupName; - - WriteObject(updatedPsAfdOrigin); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdOriginResourceId = new ResourceIdentifier(this.Origin.Id); - - this.OriginName = parsedAfdOriginResourceId.ResourceName; - this.OriginGroupName = parsedAfdOriginResourceId.GetResourceName("origingroups"); - this.ProfileName = parsedAfdOriginResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdOriginResourceId.ResourceGroupName; - } - - private AFDOriginUpdateParameters CreateAfdOriginUpdateByObject(PSAfdOrigin currentPsAfdOrigin) - { - SharedPrivateLinkResourceProperties sharedPrivateLinkResource = new SharedPrivateLinkResourceProperties - { - PrivateLink = new ResourceReference(currentPsAfdOrigin.PrivateLinkId), - PrivateLinkLocation = currentPsAfdOrigin.PrivateLinkLocation, - RequestMessage = currentPsAfdOrigin.PrivateLinkRequestMessage - }; - - AFDOriginUpdateParameters afdOrigin = new AFDOriginUpdateParameters - { - HostName = currentPsAfdOrigin.HostName, - HttpPort = currentPsAfdOrigin.HttpPort, - HttpsPort = currentPsAfdOrigin.HttpsPort, - OriginHostHeader = currentPsAfdOrigin.OriginHostHeader, - Priority = currentPsAfdOrigin.Priority, - Weight = currentPsAfdOrigin.Weight, - SharedPrivateLinkResource = sharedPrivateLinkResource - }; - - if (this.Origin.HostName != currentPsAfdOrigin.HostName) - { - afdOrigin.HostName = this.Origin.HostName; - } - if (this.Origin.HttpPort != currentPsAfdOrigin.HttpPort) - { - afdOrigin.HttpPort = this.Origin.HttpPort; - } - if (this.Origin.HttpsPort != currentPsAfdOrigin.HttpsPort) - { - afdOrigin.HttpsPort = this.Origin.HttpsPort; - } - if (this.Origin.OriginHostHeader != currentPsAfdOrigin.OriginHostHeader) - { - afdOrigin.OriginHostHeader = this.Origin.OriginHostHeader; - } - if (this.Origin.Priority != currentPsAfdOrigin.Priority) - { - afdOrigin.Priority = this.Origin.Priority; - } - if (this.Origin.Weight != currentPsAfdOrigin.Weight) - { - afdOrigin.Weight = this.Origin.Weight; - } - if (this.Origin.PrivateLinkId != currentPsAfdOrigin.PrivateLinkId) - { - sharedPrivateLinkResource.PrivateLink.Id = this.Origin.PrivateLinkId; - afdOrigin.SharedPrivateLinkResource = sharedPrivateLinkResource; - } - if (this.Origin.PrivateLinkLocation != currentPsAfdOrigin.PrivateLinkLocation) - { - sharedPrivateLinkResource.PrivateLinkLocation = this.Origin.PrivateLinkLocation; - afdOrigin.SharedPrivateLinkResource = sharedPrivateLinkResource; - } - if (this.Origin.PrivateLinkRequestMessage != currentPsAfdOrigin.PrivateLinkRequestMessage) - { - sharedPrivateLinkResource.RequestMessage = this.Origin.PrivateLinkRequestMessage; - afdOrigin.SharedPrivateLinkResource = sharedPrivateLinkResource; - } - - return afdOrigin; - } - - private AFDOriginUpdateParameters CreateAfdOriginUpdateByFields(PSAfdOrigin currentPsAfdOrigin) - { - bool isHostName = this.MyInvocation.BoundParameters.ContainsKey("HostName"); - bool isHttpPort = this.MyInvocation.BoundParameters.ContainsKey("HttpPort"); - bool isHttpsPort = this.MyInvocation.BoundParameters.ContainsKey("HttpsPort"); - bool isPriority = this.MyInvocation.BoundParameters.ContainsKey("Priority"); - bool isWeight = this.MyInvocation.BoundParameters.ContainsKey("Weight"); - bool isOriginHostHeader = this.MyInvocation.BoundParameters.ContainsKey("OriginHostHeader"); - bool isPrivateLinkId = this.MyInvocation.BoundParameters.ContainsKey("PrivateLinkId"); - bool isPrivateLinkLocation = this.MyInvocation.BoundParameters.ContainsKey("PrivateLinkLocation"); - bool isPrivateLinkRequestMessage = this.MyInvocation.BoundParameters.ContainsKey("PrivateLinkRequestMessage"); - - AFDOriginUpdateParameters afdOrigin = new AFDOriginUpdateParameters - { - HostName = currentPsAfdOrigin.HostName, - HttpPort = currentPsAfdOrigin.HttpPort, - HttpsPort = currentPsAfdOrigin.HttpsPort, - OriginHostHeader = currentPsAfdOrigin.OriginHostHeader, - Priority = currentPsAfdOrigin.Priority, - Weight = currentPsAfdOrigin.Weight, - }; - - if (isHostName) - { - afdOrigin.HostName = this.HostName; - } - if (isHttpPort) - { - afdOrigin.HttpPort = this.HttpPort; - } - if (isHttpsPort) - { - afdOrigin.HttpsPort = this.HttpsPort; - } - if (isPriority) - { - afdOrigin.Priority = this.Priority; - } - if (isWeight) - { - afdOrigin.Weight = this.Weight; - } - if (isOriginHostHeader) - { - afdOrigin.OriginHostHeader = this.OriginHostHeader; - } - - if (isPrivateLinkId || isPrivateLinkLocation || isPrivateLinkRequestMessage) - { - SharedPrivateLinkResourceProperties sharedPrivateLinkResource = new SharedPrivateLinkResourceProperties - { - PrivateLink = new ResourceReference(currentPsAfdOrigin.PrivateLinkId), - PrivateLinkLocation = currentPsAfdOrigin.PrivateLinkLocation, - RequestMessage = currentPsAfdOrigin.PrivateLinkRequestMessage - }; - - if (isPrivateLinkId) - { - sharedPrivateLinkResource.PrivateLink.Id = this.PrivateLinkId; - afdOrigin.SharedPrivateLinkResource = sharedPrivateLinkResource; - } - if (isPrivateLinkLocation) - { - sharedPrivateLinkResource.PrivateLinkLocation = this.PrivateLinkLocation; - afdOrigin.SharedPrivateLinkResource = sharedPrivateLinkResource; - } - if (isPrivateLinkRequestMessage) - { - sharedPrivateLinkResource.RequestMessage = this.PrivateLinkRequestMessage; - afdOrigin.SharedPrivateLinkResource = sharedPrivateLinkResource; - } - } - - return afdOrigin; - } - } -} diff --git a/src/Cdn/Cdn/AfdOriginGroup/GetAzFrontDoorCdnOriginGroup.cs b/src/Cdn/Cdn/AfdOriginGroup/GetAzFrontDoorCdnOriginGroup.cs deleted file mode 100644 index 777d4f5c1e06..000000000000 --- a/src/Cdn/Cdn/AfdOriginGroup/GetAzFrontDoorCdnOriginGroup.cs +++ /dev/null @@ -1,122 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdOriginGroup -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnOriginGroup", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSAfdOriginGroup))] - public class GetAzFrontDoorCdnOriginGroup : AzureCdnCmdletBase - { - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginGroupName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginGroupName { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdProfileObject, ParameterSetName = ObjectParameterSet)] - public PSAfdProfile Profile { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - public override void ExecuteCmdlet() - { - try - { - switch (ParameterSetName) - { - case FieldsParameterSet: - this.FieldsParameterSetCmdlet(); - break; - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - - private void FieldsParameterSetCmdlet() - { - if (AfdUtilities.IsValuePresent(this.OriginGroupName)) - { - // all fields are present (mandatory + optional) - - PSAfdOriginGroup psAfdOriginGroup = this.CdnManagementClient.AFDOriginGroups.Get(this.ResourceGroupName, this.ProfileName, this.OriginGroupName).ToPSAfdOriginGroup(); - - WriteObject(psAfdOriginGroup); - } - else - { - // only the mandatory fields are present - - List pSAfdOriginGroups = this.CdnManagementClient.AFDOriginGroups.ListByProfile(this.ResourceGroupName, this.ProfileName) - .Select(afdOriginGroup => afdOriginGroup.ToPSAfdOriginGroup()) - .ToList(); - - WriteObject(pSAfdOriginGroups); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdProfileResourceId = new ResourceIdentifier(this.Profile.Id); - - this.ProfileName = parsedAfdProfileResourceId.ResourceName; - this.ResourceGroupName = parsedAfdProfileResourceId.ResourceGroupName; - - List psAfdOriginGroups = this.CdnManagementClient.AFDOriginGroups.ListByProfile(this.ResourceGroupName, this.ProfileName) - .Select(afdOriginGroup => afdOriginGroup.ToPSAfdOriginGroup()) - .ToList(); - - WriteObject(psAfdOriginGroups); - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdOriginGroupResourceId = new ResourceIdentifier(this.ResourceId); - - this.OriginGroupName = parsedAfdOriginGroupResourceId.ResourceName; - this.ProfileName = parsedAfdOriginGroupResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdOriginGroupResourceId.ResourceGroupName; - - PSAfdOriginGroup psAfdOriginGroup = this.CdnManagementClient.AFDOriginGroups.Get(this.ResourceGroupName, this.ProfileName, this.OriginGroupName).ToPSAfdOriginGroup(); - - WriteObject(psAfdOriginGroup); - } - } -} diff --git a/src/Cdn/Cdn/AfdOriginGroup/NewAzFrontDoorCdnOriginGroup.cs b/src/Cdn/Cdn/AfdOriginGroup/NewAzFrontDoorCdnOriginGroup.cs deleted file mode 100644 index 0bfc27e16d79..000000000000 --- a/src/Cdn/Cdn/AfdOriginGroup/NewAzFrontDoorCdnOriginGroup.cs +++ /dev/null @@ -1,141 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdOriginGroup -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnOriginGroup", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSAfdOriginGroup))] - public class NewAzFrontDoorCdnOriginGroup : AzureCdnCmdletBase - { - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginGroupAdditionalLatencyInMilliseconds, ParameterSetName = FieldsParameterSet)] - public int AdditionalLatencyInMillisecond { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdOriginGroupName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginGroupName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginGroupProbeIntervalInSeconds, ParameterSetName = FieldsParameterSet)] - public int ProbeIntervalInSeconds { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginGroupProbePath, ParameterSetName = FieldsParameterSet)] - public string ProbePath { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginGroupProbeProtocol, ParameterSetName = FieldsParameterSet)] - [PSArgumentCompleter("Http", "Https")] - public string ProbeProtocol { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginGroupProbeRequestType, ParameterSetName = FieldsParameterSet)] - [PSArgumentCompleter("GET", "HEAD")] - public string ProbeRequestType { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginGroupSampleSize, ParameterSetName = FieldsParameterSet)] - public int SampleSize { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginGroupSuccessfulSamplesRequired, ParameterSetName = FieldsParameterSet)] - public int SuccessfulSamplesRequired { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginGroupTrafficRestorationTimeToHealedOrNewEndpointsInMinutes, ParameterSetName = FieldsParameterSet)] - public int TrafficRestorationTimeToHealedOrNewEndpointsInMinutes { get; set; } - - public override void ExecuteCmdlet() - { - ConfirmAction(AfdResourceProcessMessage.AfdOriginGroupCreateMessage, this.OriginGroupName, this.CreateAfdOriginGroup); - } - - public void CreateAfdOriginGroup() - { - try - { - // availability of load balancing settings parameters - bool isSampleSize = this.MyInvocation.BoundParameters.ContainsKey("SampleSize"); - bool isSuccessfulSampleRequired = this.MyInvocation.BoundParameters.ContainsKey("SuccessfulSamplesRequired"); - bool isAdditionalLatencyInMilliseconds = this.MyInvocation.BoundParameters.ContainsKey("AdditionalLatencyInMillisecond"); - - // availability of health probe settings parameters - bool isProbePath = this.MyInvocation.BoundParameters.ContainsKey("ProbePath"); - bool isProbeRequestType = this.MyInvocation.BoundParameters.ContainsKey("ProbeRequestType"); - bool isProbeProtocol = this.MyInvocation.BoundParameters.ContainsKey("ProbeProtocol"); - bool isProbeIntervalInSeconds = this.MyInvocation.BoundParameters.ContainsKey("ProbeIntervalInSeconds"); - - // availability of parameters on the origin group - bool isTrafficRestorationTimeToHealedOrNewEndpointsInMinutes = this.MyInvocation.BoundParameters.ContainsKey("TrafficRestorationTimeToHealedOrNewEndpointsInMinutes"); - - AFDOriginGroup afdOriginGroup = new AFDOriginGroup() - { - LoadBalancingSettings = this.CreateLoadBalancingSettings(isSampleSize, isSuccessfulSampleRequired, isAdditionalLatencyInMilliseconds), - HealthProbeSettings = this.CreateHealthProbeSettings(isProbePath, isProbeRequestType, isProbeProtocol, isProbeIntervalInSeconds), - TrafficRestorationTimeToHealedOrNewEndpointsInMinutes = isTrafficRestorationTimeToHealedOrNewEndpointsInMinutes ? this.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes : 10 - }; - - PSAfdOriginGroup psAfdOriginGroup = this.CdnManagementClient.AFDOriginGroups.Create(this.ResourceGroupName, this.ProfileName, this.OriginGroupName, afdOriginGroup).ToPSAfdOriginGroup(); - - WriteObject(psAfdOriginGroup); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - - private LoadBalancingSettingsParameters CreateLoadBalancingSettings(bool isSampleSize, bool isSuccessfulSampleRequired, bool isAdditionalLatencyInMilliseconds) - { - if (!isSampleSize && !isSuccessfulSampleRequired && !isAdditionalLatencyInMilliseconds) - { - return null; - } - - LoadBalancingSettingsParameters loadBalancingSettings = new LoadBalancingSettingsParameters - { - SampleSize = isSampleSize ? this.SampleSize : 4, - SuccessfulSamplesRequired = isSuccessfulSampleRequired ? this.SuccessfulSamplesRequired : 2, - AdditionalLatencyInMilliseconds = isAdditionalLatencyInMilliseconds ? this.AdditionalLatencyInMillisecond : 0 - }; - - return loadBalancingSettings; - } - - private HealthProbeParameters CreateHealthProbeSettings(bool isProbePath, bool isProbeRequestType, bool isProbeProtocol, bool isProbeIntervalInSeconds) - { - if (!isProbePath && !isProbeRequestType && !isProbeProtocol && !isProbeIntervalInSeconds) - { - return null; - } - - HealthProbeParameters healthProbeSettings = new HealthProbeParameters - { - ProbePath = isProbePath ? this.ProbePath : "/", - ProbeRequestType = isProbeRequestType ? AfdUtilities.CreateProbeRequestType(this.ProbeRequestType) : HealthProbeRequestType.HEAD, - ProbeProtocol = isProbeProtocol ? AfdUtilities.CreateProbeProtocol(this.ProbeProtocol) : Management.Cdn.Models.ProbeProtocol.Http, - ProbeIntervalInSeconds = isProbeIntervalInSeconds ? this.ProbeIntervalInSeconds : 240 - }; - - return healthProbeSettings; - } - } -} diff --git a/src/Cdn/Cdn/AfdOriginGroup/RemoveAzFrontDoorCdnOriginGroup.cs b/src/Cdn/Cdn/AfdOriginGroup/RemoveAzFrontDoorCdnOriginGroup.cs deleted file mode 100644 index 732c83ded066..000000000000 --- a/src/Cdn/Cdn/AfdOriginGroup/RemoveAzFrontDoorCdnOriginGroup.cs +++ /dev/null @@ -1,103 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdOriginGroup -{ - [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnOriginGroup", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(bool))] - public class RemoveAzFrontDoorCdnOriginGroup : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdOriginGroupObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNullOrEmpty] - public PSAfdOriginGroup OriginGroup { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdOriginGroupName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - [Parameter(Mandatory = false)] - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - // no case for FieldsParameterSet since required parameters will be present - switch (ParameterSetName) - { - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - - ConfirmAction(AfdResourceProcessMessage.AfdOriginGroupDeleteMessage, this.OriginGroupName, this.DeleteAfdOriginGroup); - } - - private void DeleteAfdOriginGroup() - { - try - { - this.CdnManagementClient.AFDOriginGroups.Delete(this.ResourceGroupName, this.ProfileName, this.OriginGroupName); - } - catch (AfdErrorResponseException errorResponseException) - { - throw new PSArgumentException(errorResponseException.Response.Content); - } - - if (this.PassThru.IsPresent) - { - WriteObject(true); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdOriginGroupResourceId = new ResourceIdentifier(this.OriginGroup.Id); - - this.OriginGroupName = parsedAfdOriginGroupResourceId.ResourceName; - this.ProfileName = parsedAfdOriginGroupResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdOriginGroupResourceId.ResourceGroupName; - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdOriginGroupResouceId = new ResourceIdentifier(this.ResourceId); - - this.OriginGroupName = parsedAfdOriginGroupResouceId.ResourceName; - this.ProfileName = parsedAfdOriginGroupResouceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdOriginGroupResouceId.ResourceGroupName; - } - } -} diff --git a/src/Cdn/Cdn/AfdOriginGroup/SetAzFrontDoorCdnOriginGroup.cs b/src/Cdn/Cdn/AfdOriginGroup/SetAzFrontDoorCdnOriginGroup.cs deleted file mode 100644 index a04e597ffbf3..000000000000 --- a/src/Cdn/Cdn/AfdOriginGroup/SetAzFrontDoorCdnOriginGroup.cs +++ /dev/null @@ -1,272 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdOriginGroup -{ - [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnOriginGroup", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSAfdOriginGroup))] - public class SetAzFrontDoorCdnOriginGroup : AzureCdnCmdletBase - { - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginGroupAdditionalLatencyInMilliseconds, ParameterSetName = FieldsParameterSet)] - public int AdditionalLatencyInMillisecond { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdOriginGroupObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNullOrEmpty] - public PSAfdOriginGroup OriginGroup { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdOriginGroupName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginGroupName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginGroupProbeIntervalInSeconds, ParameterSetName = FieldsParameterSet)] - public int ProbeIntervalInSeconds { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginGroupProbePath, ParameterSetName = FieldsParameterSet)] - public string ProbePath { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginGroupProbeProtocol, ParameterSetName = FieldsParameterSet)] - [PSArgumentCompleter("Http", "Https")] - public string ProbeProtocol { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginGroupProbeRequestType, ParameterSetName = FieldsParameterSet)] - [PSArgumentCompleter("GET", "HEAD")] - public string ProbeRequestType { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginGroupSampleSize, ParameterSetName = FieldsParameterSet)] - public int SampleSize { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginGroupSuccessfulSamplesRequired, ParameterSetName = FieldsParameterSet)] - public int SuccessfulSamplesRequired { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginGroupTrafficRestorationTimeToHealedOrNewEndpointsInMinutes, ParameterSetName = FieldsParameterSet)] - public int TrafficRestorationTimeToHealedOrNewEndpointsInMinutes { get; set; } - - public override void ExecuteCmdlet() - { - switch (ParameterSetName) - { - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - } - - ConfirmAction(AfdResourceProcessMessage.AfdOriginGroupUpdateMessage, this.OriginGroupName, this.UpdateAfdOriginGroup); - } - - private void UpdateAfdOriginGroup() - { - try - { - PSAfdOriginGroup currentPsAfdOriginGroup = this.CdnManagementClient.AFDOriginGroups.Get(this.ResourceGroupName, this.ProfileName, this.OriginGroupName).ToPSAfdOriginGroup(); - - AFDOriginGroupUpdateParameters afdOriginGroupParameters = new AFDOriginGroupUpdateParameters(); - - if (ParameterSetName == ObjectParameterSet) - { - afdOriginGroupParameters.LoadBalancingSettings = this.CreateLoadBalancingSettingsByObject(currentPsAfdOriginGroup, this.OriginGroup); - afdOriginGroupParameters.HealthProbeSettings = this.CreateHealthProbeSettingsByObject(currentPsAfdOriginGroup, this.OriginGroup); - } - else - { - // availability of load balancing settings parameters - bool isSampleSize = this.MyInvocation.BoundParameters.ContainsKey("SampleSize"); - bool isSuccessfulSampleRequired = this.MyInvocation.BoundParameters.ContainsKey("SuccessfulSamplesRequired"); - bool isAdditionalLatencyInMilliseconds = this.MyInvocation.BoundParameters.ContainsKey("AdditionalLatencyInMillisecond"); - - // availability of health probe settings parameters - bool isProbePath = this.MyInvocation.BoundParameters.ContainsKey("ProbePath"); - bool isProbeRequestType = this.MyInvocation.BoundParameters.ContainsKey("ProbeRequestType"); - bool isProbeProtocol = this.MyInvocation.BoundParameters.ContainsKey("ProbeProtocol"); - bool isProbeIntervalInSeconds = this.MyInvocation.BoundParameters.ContainsKey("ProbeIntervalInSeconds"); - - // availability of parameters on the origin group - bool isTrafficRestorationTimeToHealedOrNewEndpointsInMinutes = this.MyInvocation.BoundParameters.ContainsKey("TrafficRestorationTimeToHealedOrNewEndpointsInMinutes"); - - afdOriginGroupParameters.LoadBalancingSettings = this.CreateLoadBalancingSettingsByFields(currentPsAfdOriginGroup, isSampleSize, isSuccessfulSampleRequired, isAdditionalLatencyInMilliseconds); - afdOriginGroupParameters.HealthProbeSettings = this.CreateHealthProbeSettingsByFields(currentPsAfdOriginGroup, isProbePath, isProbeRequestType, isProbeProtocol, isProbeIntervalInSeconds); - - if (isTrafficRestorationTimeToHealedOrNewEndpointsInMinutes) - { - afdOriginGroupParameters.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes = this.TrafficRestorationTimeToHealedOrNewEndpointsInMinutes; - } - } - - PSAfdOriginGroup updatedPsAfdOriginGroup = this.CdnManagementClient.AFDOriginGroups.Update(this.ResourceGroupName, this.ProfileName, this.OriginGroupName, afdOriginGroupParameters).ToPSAfdOriginGroup(); - - WriteObject(updatedPsAfdOriginGroup); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdOriginGroupResourceId = new ResourceIdentifier(this.OriginGroup.Id); - - this.OriginGroupName = parsedAfdOriginGroupResourceId.ResourceName; - this.ProfileName = parsedAfdOriginGroupResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdOriginGroupResourceId.ResourceGroupName; - } - - private LoadBalancingSettingsParameters CreateLoadBalancingSettingsByObject(PSAfdOriginGroup currentPsAfdOriginGroup, PSAfdOriginGroup proposedPsAfdOriginGroup) - { - // keep current values and only change them if they differ from the input object aka this.OriginGroup - LoadBalancingSettingsParameters loadBalancingSettings = new LoadBalancingSettingsParameters - { - SampleSize = currentPsAfdOriginGroup.SampleSize, - SuccessfulSamplesRequired = currentPsAfdOriginGroup.SuccessfulSamplesRequired, - AdditionalLatencyInMilliseconds = currentPsAfdOriginGroup.AdditionalLatencyInMilliseconds - }; - - if (proposedPsAfdOriginGroup.SampleSize != currentPsAfdOriginGroup.SampleSize) - { - loadBalancingSettings.SampleSize = proposedPsAfdOriginGroup.SampleSize; - } - - if (proposedPsAfdOriginGroup.SuccessfulSamplesRequired != currentPsAfdOriginGroup.SuccessfulSamplesRequired) - { - loadBalancingSettings.SuccessfulSamplesRequired = proposedPsAfdOriginGroup.SuccessfulSamplesRequired; - } - - if (proposedPsAfdOriginGroup.AdditionalLatencyInMilliseconds != currentPsAfdOriginGroup.AdditionalLatencyInMilliseconds) - { - loadBalancingSettings.AdditionalLatencyInMilliseconds = proposedPsAfdOriginGroup.AdditionalLatencyInMilliseconds; - } - - return loadBalancingSettings; - } - - private LoadBalancingSettingsParameters CreateLoadBalancingSettingsByFields(PSAfdOriginGroup currentPsAfdOriginGroup, bool isSampleSize, bool isSuccessfulSampleRequired, bool isAdditionalLatencyInMilliseconds) - { - if (!isSampleSize && !isSuccessfulSampleRequired && !isAdditionalLatencyInMilliseconds) - { - return null; - } - - // keep the current values and only change them if they differ from the paramters aka this.SampleSize, this.SuccessfulSamplesRequired, this.AdditionalLatencyInMilliseconds - LoadBalancingSettingsParameters loadBalancingSettings = new LoadBalancingSettingsParameters - { - SampleSize = currentPsAfdOriginGroup.SampleSize, - SuccessfulSamplesRequired = currentPsAfdOriginGroup.SuccessfulSamplesRequired, - AdditionalLatencyInMilliseconds = currentPsAfdOriginGroup.AdditionalLatencyInMilliseconds - }; - - if (isSampleSize) - { - loadBalancingSettings.SampleSize = this.SampleSize; - } - - if (isSuccessfulSampleRequired) - { - loadBalancingSettings.SuccessfulSamplesRequired = this.SuccessfulSamplesRequired; - } - - if (isAdditionalLatencyInMilliseconds) - { - loadBalancingSettings.AdditionalLatencyInMilliseconds = this.AdditionalLatencyInMillisecond; - } - - return loadBalancingSettings; - } - - private HealthProbeParameters CreateHealthProbeSettingsByObject(PSAfdOriginGroup currentPsAfdOriginGroup, PSAfdOriginGroup proposedPsAfdOriginGroup) - { - HealthProbeParameters healthProbeSettings = new HealthProbeParameters - { - ProbeIntervalInSeconds = currentPsAfdOriginGroup.ProbeIntervalInSeconds, - ProbePath = currentPsAfdOriginGroup.ProbePath, - ProbeProtocol = AfdUtilities.CreateProbeProtocol(currentPsAfdOriginGroup.ProbeProtocol), - ProbeRequestType = AfdUtilities.CreateProbeRequestType(currentPsAfdOriginGroup.ProbeRequestType) - }; - - if (proposedPsAfdOriginGroup.ProbeIntervalInSeconds != currentPsAfdOriginGroup.ProbeIntervalInSeconds) - { - healthProbeSettings.ProbeIntervalInSeconds = proposedPsAfdOriginGroup.ProbeIntervalInSeconds; - } - - if (proposedPsAfdOriginGroup.ProbePath != currentPsAfdOriginGroup.ProbePath) - { - healthProbeSettings.ProbePath = proposedPsAfdOriginGroup.ProbePath; - } - - if (proposedPsAfdOriginGroup.ProbeProtocol != currentPsAfdOriginGroup.ProbeProtocol) - { - healthProbeSettings.ProbeProtocol = AfdUtilities.CreateProbeProtocol(proposedPsAfdOriginGroup.ProbeProtocol); - } - - if (proposedPsAfdOriginGroup.ProbeRequestType != currentPsAfdOriginGroup.ProbeRequestType) - { - healthProbeSettings.ProbeRequestType = AfdUtilities.CreateProbeRequestType(proposedPsAfdOriginGroup.ProbeRequestType); - } - - return healthProbeSettings; - } - - private HealthProbeParameters CreateHealthProbeSettingsByFields(PSAfdOriginGroup currentPsAfdOriginGroup, bool isProbePath, bool isProbeRequestType, bool isProbeProtocol, bool isProbeIntervalInSeconds) - { - if (!isProbePath && !isProbeRequestType && !isProbeProtocol && !isProbeIntervalInSeconds) - { - return null; - } - - HealthProbeParameters healthProbeSettings = new HealthProbeParameters - { - ProbeIntervalInSeconds = currentPsAfdOriginGroup.ProbeIntervalInSeconds, - ProbePath = currentPsAfdOriginGroup.ProbePath, - ProbeProtocol = AfdUtilities.CreateProbeProtocol(currentPsAfdOriginGroup.ProbeProtocol), - ProbeRequestType = AfdUtilities.CreateProbeRequestType(currentPsAfdOriginGroup.ProbeRequestType) - }; - - if (isProbePath) - { - healthProbeSettings.ProbePath = this.ProbePath; - } - - if (isProbeRequestType) - { - healthProbeSettings.ProbeRequestType = AfdUtilities.CreateProbeRequestType(this.ProbeRequestType); - } - - if (isProbeProtocol) - { - healthProbeSettings.ProbeProtocol = AfdUtilities.CreateProbeProtocol(this.ProbeProtocol); - } - - if (isProbeIntervalInSeconds) - { - healthProbeSettings.ProbeIntervalInSeconds = this.ProbeIntervalInSeconds; - } - - return healthProbeSettings; - } - } -} diff --git a/src/Cdn/Cdn/AfdProfile/GetAzFrontDoorCdnProfile.cs b/src/Cdn/Cdn/AfdProfile/GetAzFrontDoorCdnProfile.cs deleted file mode 100644 index a5b0f057b1ec..000000000000 --- a/src/Cdn/Cdn/AfdProfile/GetAzFrontDoorCdnProfile.cs +++ /dev/null @@ -1,114 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdProfile -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnProfile", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSAfdProfile))] - public class GetAzFrontDoorCdnProfile : AzureCdnCmdletBase - { - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - public string ResourceId { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter] - public string ResourceGroupName { get; set; } - - public override void ExecuteCmdlet() - { - try - { - switch (ParameterSetName) - { - case FieldsParameterSet: - this.FieldsParameterSetCmdlet(); - break; - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - } - catch (Microsoft.Azure.Management.Cdn.Models.AfdErrorResponseException errorResponseException) - { - throw new PSArgumentException(errorResponseException.Response.Content); - } - } - - private void FieldsParameterSetCmdlet() - { - if (AfdUtilities.IsValuePresent(this.ResourceGroupName) && AfdUtilities.IsValuePresent(this.ProfileName)) - { - PSAfdProfile psAfdProfile = CdnManagementClient.Profiles.Get(this.ResourceGroupName, this.ProfileName).ToPSAfdProfile(); - WriteObject(psAfdProfile); - } - else if (AfdUtilities.IsValuePresent(this.ResourceGroupName) && this.ProfileName == null) - { - List psAfdProfiles = CdnManagementClient.Profiles.ListByResourceGroup(this.ResourceGroupName) - .Where(afdProfile => (afdProfile.Sku.Name == AfdSkuConstants.PremiumAzureFrontDoor || afdProfile.Sku.Name == AfdSkuConstants.StandardAzureFrontDoor)) - .Select(afdProfile => afdProfile.ToPSAfdProfile()) - .ToList(); - WriteObject(psAfdProfiles); - } - else if (this.ResourceGroupName == null && AfdUtilities.IsValuePresent(this.ProfileName)) - { - // not all profiles are delivered by the payload, limitation somewhere in the RP? - - List psAfdProfiles = CdnManagementClient.Profiles.List() - .Where(afdProfile => afdProfile.Name == this.ProfileName) - .Select(afdProfile => afdProfile.ToPSAfdProfile()) - .ToList(); - - PSAfdProfile psAfdProfile = psAfdProfiles.Count > 0 ? psAfdProfiles.First() : null; - - WriteObject(psAfdProfile); - } - else - { - // both resource group and profile name are null - // show all profiles in the subscription - // not all profiles are delivered by the payload, limitation somewhere in the RP? - - List psAfdProfiles = CdnManagementClient.Profiles.List() - .Where(afdProfile => (afdProfile.Sku.Name == AfdSkuConstants.PremiumAzureFrontDoor || afdProfile.Sku.Name == AfdSkuConstants.StandardAzureFrontDoor)) - .Select(afdProfile => afdProfile.ToPSAfdProfile()) - .ToList(); - - WriteObject(psAfdProfiles); - } - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdProfileResourceId = new ResourceIdentifier(this.ResourceId); - - this.ProfileName = parsedAfdProfileResourceId.ResourceName; - this.ResourceGroupName = parsedAfdProfileResourceId.ResourceGroupName; - - PSAfdProfile psAfdProfile = CdnManagementClient.Profiles.Get(this.ResourceGroupName, this.ProfileName).ToPSAfdProfile(); - - WriteObject(psAfdProfile); - } - } -} diff --git a/src/Cdn/Cdn/AfdProfile/NewAzFrontDoorCdnProfile.cs b/src/Cdn/Cdn/AfdProfile/NewAzFrontDoorCdnProfile.cs deleted file mode 100644 index 34e22c02e482..000000000000 --- a/src/Cdn/Cdn/AfdProfile/NewAzFrontDoorCdnProfile.cs +++ /dev/null @@ -1,76 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Commands.ResourceManager.Common.Tags; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using System.Collections; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdProfile -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnProfile", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSAfdProfile))] - public class NewAzFrontDoorCdnProfile : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileSku, ParameterSetName = FieldsParameterSet)] - [PSArgumentCompleter(AfdSkuConstants.PremiumAzureFrontDoor, AfdSkuConstants.StandardAzureFrontDoor)] - public string Sku { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.TagsDescription, ParameterSetName = FieldsParameterSet)] - public Hashtable Tag { get; set; } - - public override void ExecuteCmdlet() - { - ConfirmAction(AfdResourceProcessMessage.AfdProfileCreateMessage, this.ProfileName, this.CreateAfdProfile); - } - - private void CreateAfdProfile() - { - try - { - Sku afdSku = AfdUtilities.GenerateAfdProfileSku(this.Sku); - - if (afdSku == null) - { - throw new PSArgumentException($"{this.Sku} is not a valid SKU. Please use {AfdSkuConstants.PremiumAzureFrontDoor} or {AfdSkuConstants.StandardAzureFrontDoor}."); - } - - Management.Cdn.Models.Profile afdProfile = new Management.Cdn.Models.Profile - { - Location = AfdResourceConstants.AfdResourceLocation, - Sku = afdSku, - Tags = TagsConversionHelper.CreateTagDictionary(this.Tag, true) - }; - - PSAfdProfile psAfdProfile = this.CdnManagementClient.Profiles.Create(this.ResourceGroupName, this.ProfileName, afdProfile).ToPSAfdProfile(); - - WriteObject(psAfdProfile); - } - catch (AfdErrorResponseException errorResponseException) - { - throw new PSArgumentException(errorResponseException.Response.Content); - } - } - } -} diff --git a/src/Cdn/Cdn/AfdProfile/RemoveAzFrontDoorCdnProfile.cs b/src/Cdn/Cdn/AfdProfile/RemoveAzFrontDoorCdnProfile.cs deleted file mode 100644 index 32bb0744c54a..000000000000 --- a/src/Cdn/Cdn/AfdProfile/RemoveAzFrontDoorCdnProfile.cs +++ /dev/null @@ -1,101 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdProfile -{ - [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnProfile", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(bool))] - public class RemoveAzFrontDoorCdnProfile : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdProfileObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSAfdProfile Profile { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - public string ResourceId { get; set; } - - [Parameter(Mandatory = false)] - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - // when using FieldsParameterSet, this.ProfileName and this.ResourceGroupName are provided - // Hence no need for a FieldsParamterSet case - switch(ParameterSetName) - { - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - - ConfirmAction(AfdResourceProcessMessage.AfdProfileDeleteMessage, this.ProfileName, this.DeleteAfdProfile); - } - - private void DeleteAfdProfile() - { - try - { - PSAfdProfile profile = this.CdnManagementClient.Profiles.Get(this.ResourceGroupName, this.ProfileName).ToPSAfdProfile(); - - if (!AfdUtilities.IsAfdProfile(profile)) - { - throw new PSArgumentException($"You are attempting to delete a {profile.Sku} profile. Please use Remove-AzCdnProfile instead."); - } - - this.CdnManagementClient.Profiles.Delete(this.ResourceGroupName, this.ProfileName); - } - catch (Microsoft.Azure.Management.Cdn.Models.AfdErrorResponseException errorResponseException) - { - throw new PSArgumentException(errorResponseException.Response.Content); - } - - if(this.PassThru.IsPresent) - { - WriteObject(true); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdProfileResourceId = new ResourceIdentifier(this.Profile.Id); - - this.ProfileName = parsedAfdProfileResourceId.ResourceName; - this.ResourceGroupName = parsedAfdProfileResourceId.ResourceGroupName; - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdProfileResourceId = new ResourceIdentifier(this.ResourceId); - - this.ProfileName = parsedAfdProfileResourceId.ResourceName; - this.ResourceGroupName = parsedAfdProfileResourceId.ResourceGroupName; - } - } -} diff --git a/src/Cdn/Cdn/AfdProfile/SetAzFrontDoorCdnProfile.cs b/src/Cdn/Cdn/AfdProfile/SetAzFrontDoorCdnProfile.cs deleted file mode 100644 index 0be3d5da4cbb..000000000000 --- a/src/Cdn/Cdn/AfdProfile/SetAzFrontDoorCdnProfile.cs +++ /dev/null @@ -1,84 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Commands.ResourceManager.Common.Tags; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Collections; -using System.Collections.Generic; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdProfile -{ - [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnProfile", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSAfdProfile))] - - public class SetAzFrontDoorCdnProfile : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdProfileObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSAfdProfile Profile { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - public string ProfileName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.TagsDescription, ParameterSetName = FieldsParameterSet)] - public Hashtable Tag { get; set; } - - public override void ExecuteCmdlet() - { - // when using FieldsParameterSet, this.ProfileName and this.ResourceGroupName are provided - // Hence no need for a FieldsParamterSet case - switch (ParameterSetName) - { - case ObjectParameterSet: - ObjectParameterSetCmdlet(); - break; - } - - ConfirmAction(AfdResourceProcessMessage.AfdProfileUpdateMessage, this.ProfileName, this.UpdateAfdProfile); - } - - private void UpdateAfdProfile() - { - PSAfdProfile profile = CdnManagementClient.Profiles.Get(this.ResourceGroupName, this.ProfileName).ToPSAfdProfile(); - - if (!AfdUtilities.IsAfdProfile(profile)) - { - throw new PSArgumentException($"You are attempting to update a {profile.Sku} profile. Please use Set-AzCdnProfile instead."); - } - - Dictionary afdProfileTags = TagsConversionHelper.CreateTagDictionary(this.Tag, true); - - PSAfdProfile psAfdProfile = this.CdnManagementClient.Profiles.Update(this.ResourceGroupName, this.ProfileName, afdProfileTags).ToPSAfdProfile(); - - WriteObject(psAfdProfile); - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdProfileResourceId = new ResourceIdentifier(this.Profile.Id); - - this.ProfileName = parsedAfdProfileResourceId.ResourceName; - this.ResourceGroupName = parsedAfdProfileResourceId.ResourceGroupName; - this.Tag = this.Profile.Tags; - } - } -} diff --git a/src/Cdn/Cdn/AfdRoute/GetAzFrontDoorCdnRoute.cs b/src/Cdn/Cdn/AfdRoute/GetAzFrontDoorCdnRoute.cs deleted file mode 100644 index 7624a677c6ec..000000000000 --- a/src/Cdn/Cdn/AfdRoute/GetAzFrontDoorCdnRoute.cs +++ /dev/null @@ -1,125 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdRoute -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnRoute", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSAfdRoute))] - public class GetAzFrontDoorCdnRoute : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdEndpointObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNullOrEmpty] - public PSAfdEndpoint Endpoint { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdEndpointName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRouteName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string RouteName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - public override void ExecuteCmdlet() - { - try - { - switch (ParameterSetName) - { - case FieldsParameterSet: - this.FieldsParameterSetCmdlet(); - break; - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - - private void FieldsParameterSetCmdlet() - { - if (this.MyInvocation.BoundParameters.ContainsKey("RouteName")) - { - PSAfdRoute psAfdRoute = this.CdnManagementClient.Routes.Get(this.ResourceGroupName, this.ProfileName, this.EndpointName, this.RouteName).ToPSAfdRoute(); - - WriteObject(psAfdRoute); - } - else - { - List psAfdRouteList = this.CdnManagementClient.Routes.ListByEndpoint(this.ResourceGroupName, this.ProfileName, this.EndpointName) - .Select(afdRoute => afdRoute.ToPSAfdRoute()) - .ToList(); - - WriteObject(psAfdRouteList); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdEndpointResourceId = new ResourceIdentifier(this.Endpoint.Id); - - this.EndpointName = parsedAfdEndpointResourceId.ResourceName; - this.ProfileName = parsedAfdEndpointResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdEndpointResourceId.ResourceGroupName; - - List psAfdRouteList = this.CdnManagementClient.Routes.ListByEndpoint(this.ResourceGroupName, this.ProfileName, this.EndpointName) - .Select(afdRoute => afdRoute.ToPSAfdRoute()) - .ToList(); - - WriteObject(psAfdRouteList); - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdRouteResourceId = new ResourceIdentifier(this.ResourceId); - - this.RouteName = parsedAfdRouteResourceId.ResourceName; - this.EndpointName = parsedAfdRouteResourceId.GetResourceName("afdendpoints"); - this.ProfileName = parsedAfdRouteResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdRouteResourceId.ResourceGroupName; - - PSAfdRoute psAfdRoute = this.CdnManagementClient.Routes.Get(this.ResourceGroupName, this.ProfileName, this.EndpointName, this.RouteName).ToPSAfdRoute(); - - WriteObject(psAfdRoute); - } - } -} diff --git a/src/Cdn/Cdn/AfdRoute/NewAzFrontDoorCdnRoute.cs b/src/Cdn/Cdn/AfdRoute/NewAzFrontDoorCdnRoute.cs deleted file mode 100644 index f89fca406e44..000000000000 --- a/src/Cdn/Cdn/AfdRoute/NewAzFrontDoorCdnRoute.cs +++ /dev/null @@ -1,85 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using System.Collections.Generic; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdRoute -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnRoute", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSAfdRoute))] - public class NewAzFrontDoorCdnRoute : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdCustomDomainIds, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public List CustomDomainId { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdEndpointName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdOriginGroupId, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginGroupId { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRouteName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string RouteName { get; set; } - - public override void ExecuteCmdlet() - { - ConfirmAction(AfdResourceProcessMessage.AfdRouteCreateMessage, this.RouteName, this.CreateAfdRoute); - } - - private void CreateAfdRoute() - { - try - { - List afdCustomDomainIdList = new List(); - - foreach(string afdCustomDomain in this.CustomDomainId) - { - afdCustomDomainIdList.Add(new ResourceReference(afdCustomDomain)); - } - - Route afdRoute = new Route - { - OriginGroup = new ResourceReference(this.OriginGroupId), - CustomDomains = afdCustomDomainIdList - }; - - PSAfdRoute psAfdRoute = this.CdnManagementClient.Routes.Create(this.ResourceGroupName, this.ProfileName, this.EndpointName, this.RouteName, afdRoute).ToPSAfdRoute(); - - WriteObject(psAfdRoute); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - } -} diff --git a/src/Cdn/Cdn/AfdRoute/RemoveAzFrontDoorCdnRoute.cs b/src/Cdn/Cdn/AfdRoute/RemoveAzFrontDoorCdnRoute.cs deleted file mode 100644 index 05caeec7907d..000000000000 --- a/src/Cdn/Cdn/AfdRoute/RemoveAzFrontDoorCdnRoute.cs +++ /dev/null @@ -1,109 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdRoute -{ - [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnRoute", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(bool))] - public class RemoveAzFrontDoorCdnRoute : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdEndpointName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdRouteObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNullOrEmpty] - public PSAfdRoute Route { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRouteName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string RouteName { get; set; } - - [Parameter(Mandatory = false)] - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - switch (ParameterSetName) - { - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - - ConfirmAction(AfdResourceProcessMessage.AfdRouteDeleteMessage, this.RouteName, this.DeleteAfdRoute); - } - - private void DeleteAfdRoute() - { - try - { - this.CdnManagementClient.Routes.Delete(this.ResourceGroupName, this.ProfileName, this.EndpointName, this.RouteName); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - - if (this.PassThru.IsPresent) - { - WriteObject(true); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdRouteResourceId = new ResourceIdentifier(this.Route.Id); - - this.RouteName = parsedAfdRouteResourceId.ResourceName; - this.EndpointName = parsedAfdRouteResourceId.GetResourceName("afdendpoints"); - this.ProfileName = parsedAfdRouteResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdRouteResourceId.ResourceGroupName; - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdRouteResourceId = new ResourceIdentifier(this.ResourceId); - - this.RouteName = parsedAfdRouteResourceId.ResourceName; - this.EndpointName = parsedAfdRouteResourceId.GetResourceName("afdendpoints"); - this.ProfileName = parsedAfdRouteResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdRouteResourceId.ResourceGroupName; - } - } -} diff --git a/src/Cdn/Cdn/AfdRoute/SetAzFrontDoorCdnRoute.cs b/src/Cdn/Cdn/AfdRoute/SetAzFrontDoorCdnRoute.cs deleted file mode 100644 index e859ba678f81..000000000000 --- a/src/Cdn/Cdn/AfdRoute/SetAzFrontDoorCdnRoute.cs +++ /dev/null @@ -1,179 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using System.Collections.Generic; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdRoute -{ - [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnRoute", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSAfdRoute))] - public class SetAzFrontDoorCdnRoute : AzureCdnCmdletBase - { - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdCustomDomainIds, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public List CustomDomainId { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRouteHttpsRedirect, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string HttpsRedirect { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdEndpointName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRouteForwardingProtocol, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ForwardingProtocol { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdOriginGroupId, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginGroupId { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRouteQueryStringCachingBehavior, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string QueryStringCachingBehavior { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRouteOriginPath, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginPath { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdRouteObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNullOrEmpty] - public PSAfdRoute Route { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRouteName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string RouteName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRuleSetIds, ParameterSetName = FieldsParameterSet)] - public List RuleSetId { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRouteSupportedProtocols, ParameterSetName = FieldsParameterSet)] - public List SupportedProtocol { get; set; } - - public override void ExecuteCmdlet() - { - ConfirmAction(AfdResourceProcessMessage.AfdRouteUpdateMessage, this.RouteName, this.UpdateAfdRoute); - } - - private void UpdateAfdRoute() - { - try - { - PSAfdRoute currentPsAfdRoute = this.CdnManagementClient.Routes.Get(this.ResourceGroupName, this.ProfileName, this.EndpointName, this.RouteName).ToPSAfdRoute(); - - RouteUpdateParameters afdRouteUpdateParameters = new RouteUpdateParameters(); - - if (ParameterSetName == FieldsParameterSet) - { - afdRouteUpdateParameters = this.CreateAfdRouteUpdateByFields(currentPsAfdRoute); - } - - PSAfdRoute updatedPsAfdRoute = this.CdnManagementClient.Routes.Update(this.ResourceGroupName, this.ProfileName, this.EndpointName, this.RouteName, afdRouteUpdateParameters).ToPSAfdRoute(); - - WriteObject(updatedPsAfdRoute); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - - private RouteUpdateParameters CreateAfdRouteUpdateByFields(PSAfdRoute currentPsAfdRoute) - { - bool isCustomDomainId = this.MyInvocation.BoundParameters.ContainsKey("CustomDomainId"); - bool isSupportedProtocols = this.MyInvocation.BoundParameters.ContainsKey("SupportedProtocol"); - bool isHttpsRedirect = this.MyInvocation.BoundParameters.ContainsKey("HttpsRedirect"); - bool isOriginGroupId = this.MyInvocation.BoundParameters.ContainsKey("OriginGroupId"); - bool isOriginPath = this.MyInvocation.BoundParameters.ContainsKey("OriginPath"); - bool isForwardingProtocol = this.MyInvocation.BoundParameters.ContainsKey("ForwardingProtocol"); - bool isQueryStringCachingBehavior = this.MyInvocation.BoundParameters.ContainsKey("QueryStringCachingBehavior"); - bool isRuleSetIds = this.MyInvocation.BoundParameters.ContainsKey("RuleSetId"); - - RouteUpdateParameters afdRouteUpdateParameters = new RouteUpdateParameters - { - CustomDomains = currentPsAfdRoute.CustomDomainIds, - SupportedProtocols = currentPsAfdRoute.SupportedProtocols, - HttpsRedirect = currentPsAfdRoute.HttpsRedirect, - OriginGroup = new ResourceReference(currentPsAfdRoute.OriginGroupId), - OriginPath = currentPsAfdRoute.OriginPath, - ForwardingProtocol = currentPsAfdRoute.ForwardingProtocol, - RuleSets = currentPsAfdRoute.RuleSetIds, - QueryStringCachingBehavior = AfdUtilities.CreateQueryStringCachingBehavior(currentPsAfdRoute.QueryStringCachingBehavior) - }; - - if (isCustomDomainId) - { - foreach (string customDomainId in this.CustomDomainId) - { - afdRouteUpdateParameters.CustomDomains.Add(new ResourceReference(customDomainId)); - } - } - - if (isSupportedProtocols) - { - afdRouteUpdateParameters.SupportedProtocols = this.SupportedProtocol; - } - - if (isHttpsRedirect) - { - afdRouteUpdateParameters.HttpsRedirect = AfdUtilities.CreateHttpsRedirect(this.HttpsRedirect); - } - - if (isOriginGroupId) - { - afdRouteUpdateParameters.OriginGroup = new ResourceReference(this.OriginGroupId); - } - - if (isOriginPath) - { - afdRouteUpdateParameters.OriginPath = this.OriginPath; - } - - if (isForwardingProtocol) - { - afdRouteUpdateParameters.ForwardingProtocol = AfdUtilities.CreateForwardingProtocol(this.ForwardingProtocol); - } - - if (isQueryStringCachingBehavior) - { - afdRouteUpdateParameters.QueryStringCachingBehavior = AfdUtilities.CreateQueryStringCachingBehavior(this.QueryStringCachingBehavior); - } - - if (isRuleSetIds) - { - foreach (string ruleSetId in this.RuleSetId) - { - afdRouteUpdateParameters.RuleSets.Add(new ResourceReference(ruleSetId)); - } - } - - return afdRouteUpdateParameters; - } - } -} diff --git a/src/Cdn/Cdn/AfdRule/GetAzFrontDoorCdnRule.cs b/src/Cdn/Cdn/AfdRule/GetAzFrontDoorCdnRule.cs deleted file mode 100644 index ee2c92136866..000000000000 --- a/src/Cdn/Cdn/AfdRule/GetAzFrontDoorCdnRule.cs +++ /dev/null @@ -1,128 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdRule -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnRule", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSAfdRule))] - public class GetAzFrontDoorCdnRule : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdRuleSetObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNullOrEmpty] - public PSAfdRuleSet RuleSet { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleSetName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string RuleSetName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRuleName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string RuleName { get; set; } - - public override void ExecuteCmdlet() - { - try - { - switch (ParameterSetName) - { - case FieldsParameterSet: - this.FieldsParameterSetCmdlet(); - break; - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - - private void FieldsParameterSetCmdlet() - { - bool isRuleName = MyInvocation.BoundParameters.ContainsKey("RuleName"); - - if (isRuleName) - { - PSAfdRule psAfdRule = this.CdnManagementClient.Rules.Get(this.ResourceGroupName, this.ProfileName, this.RuleSetName, this.RuleName).ToPSAfdRule(); - WriteObject(psAfdRule); - } - else - { - List psAfdRuleList = this.CdnManagementClient.Rules.ListByRuleSet(this.ResourceGroupName, this.ProfileName, this.RuleSetName) - .Select(afdRule => afdRule.ToPSAfdRule()) - .ToList(); - - WriteObject(psAfdRuleList); - } - - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdRuleSetResourceId = new ResourceIdentifier(this.RuleSet.Id); - - this.ProfileName = parsedAfdRuleSetResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdRuleSetResourceId.ResourceGroupName; - this.RuleSetName = parsedAfdRuleSetResourceId.ResourceName; - - List psAfdRuleList = this.CdnManagementClient.Rules.ListByRuleSet(this.ResourceGroupName, this.ProfileName, this.RuleSetName) - .Select(afdRule => afdRule.ToPSAfdRule()) - .ToList(); - - WriteObject(psAfdRuleList); - - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdRuleResourceId = new ResourceIdentifier(this.ResourceId); - - this.ProfileName = parsedAfdRuleResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdRuleResourceId.ResourceGroupName; - this.RuleName = parsedAfdRuleResourceId.ResourceName; - this.RuleSetName = parsedAfdRuleResourceId.GetResourceName("rulesets"); - - PSAfdRule psAfdRule = this.CdnManagementClient.Rules.Get(this.ResourceGroupName, this.ProfileName, this.RuleSetName, this.RuleName).ToPSAfdRule(); - - WriteObject(psAfdRule); - } - } -} diff --git a/src/Cdn/Cdn/AfdRule/NewAzFrontDoorCdnRule.cs b/src/Cdn/Cdn/AfdRule/NewAzFrontDoorCdnRule.cs deleted file mode 100644 index 55d040adbd34..000000000000 --- a/src/Cdn/Cdn/AfdRule/NewAzFrontDoorCdnRule.cs +++ /dev/null @@ -1,427 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using System.Collections.Generic; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdRule -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnRule", SupportsShouldProcess = true), OutputType(typeof(PSAfdRule))] - public class NewAzFrontDoorCdnRule : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleActions)] - public List Action { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRuleConditions)] - public List Condition { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleSetName)] - [ValidateNotNullOrEmpty] - public string RuleSetName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleName)] - [ValidateNotNullOrEmpty] - public string RuleName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleOrder)] - [ValidateNotNullOrEmpty] - public int Order { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRuleMatchProcessingBehavior)] - [PSArgumentCompleter("Continue", "Stop")] - [ValidateNotNullOrEmpty] - public string MatchProcessingBehavior { get; set; } - - public override void ExecuteCmdlet() - { - ConfirmAction(AfdResourceProcessMessage.AfdRuleCreateMessage, this.RuleName, this.CreateAfdRule); - } - - private void CreateAfdRule() - { - try - { - Rule afdRule = new Rule - { - Order = this.Order, - Actions = this.CreateAfdRuleActions(), - Conditions = this.CreateAfdRuleConditions() - }; - - if (MyInvocation.BoundParameters.ContainsKey("MatchProcessingBehavior")) - { - afdRule.MatchProcessingBehavior = this.MatchProcessingBehavior; - } - - PSAfdRule psAfdRule = this.CdnManagementClient.Rules.Create(this.ResourceGroupName, this.ProfileName, this.RuleSetName, this.RuleName, afdRule).ToPSAfdRule(); - - WriteObject(psAfdRule); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - - private List CreateAfdRuleActions() - { - List afdRuleActions = new List(); - - foreach (PSAfdRuleAction afdAction in this.Action) - { - if (afdAction is PSAfdRuleCacheExpirationAction) - { - PSAfdRuleCacheExpirationAction psCacheExpirationAction = (PSAfdRuleCacheExpirationAction)afdAction; - - DeliveryRuleCacheExpirationAction cacheExpirationAction = new DeliveryRuleCacheExpirationAction - { - Parameters = new CacheExpirationActionParameters - { - CacheBehavior = psCacheExpirationAction.CacheBehavior, - CacheDuration = psCacheExpirationAction.CacheDuration - } - }; - - afdRuleActions.Add(cacheExpirationAction); - } - - if (afdAction is PSAfdRuleHeaderAction) - { - PSAfdRuleHeaderAction psHeaderAction = (PSAfdRuleHeaderAction)afdAction; - - if (psHeaderAction.HeaderType == "ModifyRequestHeader") - { - DeliveryRuleRequestHeaderAction requestHeaderAction = new DeliveryRuleRequestHeaderAction - { - Parameters = new HeaderActionParameters - { - HeaderAction = psHeaderAction.HeaderAction, - HeaderName = psHeaderAction.HeaderName, - Value = psHeaderAction.HeaderValue - } - }; - afdRuleActions.Add(requestHeaderAction); - } - else if (psHeaderAction.HeaderType == "ModifyResponseHeader") - { - DeliveryRuleResponseHeaderAction responseHeaderAction = new DeliveryRuleResponseHeaderAction - { - Parameters = new HeaderActionParameters - { - HeaderAction = psHeaderAction.HeaderAction, - HeaderName = psHeaderAction.HeaderName, - Value = psHeaderAction.HeaderValue - } - }; - afdRuleActions.Add(responseHeaderAction); - } - } - - if (afdAction is PSAfdRuleCacheKeyQueryStringAction) - { - PSAfdRuleCacheKeyQueryStringAction psCacheKeyQueryString = (PSAfdRuleCacheKeyQueryStringAction)afdAction; - - DeliveryRuleCacheKeyQueryStringAction cacheKeyQueryStringAction = new DeliveryRuleCacheKeyQueryStringAction - { - Parameters = new CacheKeyQueryStringActionParameters - { - QueryParameters = psCacheKeyQueryString.QueryParameters, - QueryStringBehavior = psCacheKeyQueryString.QueryStringBehavior - } - }; - - afdRuleActions.Add(cacheKeyQueryStringAction); - } - - if (afdAction is PSAfdRuleUrlRedirectAction) - { - PSAfdRuleUrlRedirectAction psUrlRedirectAction = (PSAfdRuleUrlRedirectAction)afdAction; - - UrlRedirectAction urlRedirectAction = new UrlRedirectAction - { - Parameters = new UrlRedirectActionParameters - { - CustomFragment = psUrlRedirectAction.CustomFragment, - CustomHostname = psUrlRedirectAction.CustomHostname, - CustomPath = psUrlRedirectAction.CustomPath, - CustomQueryString = psUrlRedirectAction.CustomQueryString, - DestinationProtocol = psUrlRedirectAction.DestinationProtocol, - RedirectType = psUrlRedirectAction.RedirectType - } - }; - - afdRuleActions.Add(urlRedirectAction); - } - - if (afdAction is PSAfdRuleUrlRewriteAction) - { - PSAfdRuleUrlRewriteAction psUrlRewriteAction = (PSAfdRuleUrlRewriteAction)afdAction; - - UrlRewriteAction urlRewriteAction = new UrlRewriteAction - { - Parameters = new UrlRewriteActionParameters - { - SourcePattern = psUrlRewriteAction.SourcePattern, - Destination = psUrlRewriteAction.Destination, - PreserveUnmatchedPath = psUrlRewriteAction.PreservePath - } - }; - - afdRuleActions.Add(urlRewriteAction); - } - - if (afdAction is PSAfdRuleOriginGroupOverrideAction) - { - PSAfdRuleOriginGroupOverrideAction psOriginGroupOverrideAction = (PSAfdRuleOriginGroupOverrideAction)afdAction; - - OriginGroupOverrideAction originGroupOverrideAction = new OriginGroupOverrideAction - { - Parameters = new OriginGroupOverrideActionParameters - { - OriginGroup = new ResourceReference(psOriginGroupOverrideAction.OriginGroup) - } - }; - - afdRuleActions.Add(originGroupOverrideAction); - } - } - - return afdRuleActions; - } - - private List CreateAfdRuleConditions() - { - List afdRuleConditions = new List(); - - if (!MyInvocation.BoundParameters.ContainsKey("Condition")) - { - return afdRuleConditions; - } - - foreach (PSAfdRuleCondition afdRuleCondition in this.Condition) - { - switch (afdRuleCondition.MatchVariable) - { - case "Cookies": - DeliveryRuleCookiesCondition cookieCondition = new DeliveryRuleCookiesCondition - { - Parameters = new CookiesMatchConditionParameters - { - MatchValues = afdRuleCondition.MatchValue, - NegateCondition = afdRuleCondition.NegateCondition, - OperatorProperty = afdRuleCondition.Operator, - Selector = afdRuleCondition.Selector, - Transforms = afdRuleCondition.Transforms - } - }; - afdRuleConditions.Add(cookieCondition); - break; - - case "RemoteAddress": - DeliveryRuleRemoteAddressCondition remoteAddressCondition = new DeliveryRuleRemoteAddressCondition - { - Parameters = new RemoteAddressMatchConditionParameters - { - MatchValues = afdRuleCondition.MatchValue, - NegateCondition = afdRuleCondition.NegateCondition, - OperatorProperty = afdRuleCondition.Operator, - Transforms = afdRuleCondition.Transforms - } - }; - afdRuleConditions.Add(remoteAddressCondition); - break; - - case "RequestMethod": - DeliveryRuleRequestMethodCondition requestMethodCondition = new DeliveryRuleRequestMethodCondition - { - Parameters = new RequestMethodMatchConditionParameters - { - MatchValues = afdRuleCondition.MatchValue, - NegateCondition = afdRuleCondition.NegateCondition - } - }; - afdRuleConditions.Add(requestMethodCondition); - break; - - case "QueryString": - DeliveryRuleQueryStringCondition queryStringCondition = new DeliveryRuleQueryStringCondition - { - Parameters = new QueryStringMatchConditionParameters - { - MatchValues = afdRuleCondition.MatchValue, - NegateCondition = afdRuleCondition.NegateCondition, - OperatorProperty = afdRuleCondition.Operator, - Transforms = afdRuleCondition.Transforms - } - }; - afdRuleConditions.Add(queryStringCondition); - break; - - case "PostArgs": - DeliveryRulePostArgsCondition postArgsCondition = new DeliveryRulePostArgsCondition - { - Parameters = new PostArgsMatchConditionParameters - { - MatchValues = afdRuleCondition.MatchValue, - NegateCondition = afdRuleCondition.NegateCondition, - OperatorProperty = afdRuleCondition.Operator, - Selector = afdRuleCondition.Selector, - Transforms = afdRuleCondition.Transforms - } - }; - afdRuleConditions.Add(postArgsCondition); - break; - - case "RequestUri": - DeliveryRuleRequestUriCondition requestUriCondition = new DeliveryRuleRequestUriCondition - { - Parameters = new RequestUriMatchConditionParameters - { - MatchValues = afdRuleCondition.MatchValue, - NegateCondition = afdRuleCondition.NegateCondition, - OperatorProperty = afdRuleCondition.Operator, - Transforms = afdRuleCondition.Transforms - } - }; - afdRuleConditions.Add(requestUriCondition); - break; - - case "RequestHeader": - DeliveryRuleRequestHeaderCondition requestHeaderCondition = new DeliveryRuleRequestHeaderCondition - { - Parameters = new RequestHeaderMatchConditionParameters - { - MatchValues = afdRuleCondition.MatchValue, - NegateCondition = afdRuleCondition.NegateCondition, - OperatorProperty = afdRuleCondition.Operator, - Selector = afdRuleCondition.Selector, - Transforms = afdRuleCondition.Transforms - } - }; - afdRuleConditions.Add(requestHeaderCondition); - break; - - case "RequestBody": - DeliveryRuleRequestBodyCondition requestBodyCondition = new DeliveryRuleRequestBodyCondition - { - Parameters = new RequestBodyMatchConditionParameters - { - MatchValues = afdRuleCondition.MatchValue, - NegateCondition = afdRuleCondition.NegateCondition, - OperatorProperty = afdRuleCondition.Operator, - Transforms = afdRuleCondition.Transforms - } - }; - afdRuleConditions.Add(requestBodyCondition); - break; - - case "RequestScheme": - DeliveryRuleRequestSchemeCondition requestSchemeCondition = new DeliveryRuleRequestSchemeCondition - { - Parameters = new RequestSchemeMatchConditionParameters - { - MatchValues = afdRuleCondition.MatchValue, - NegateCondition = afdRuleCondition.NegateCondition - } - }; - afdRuleConditions.Add(requestSchemeCondition); - break; - - case "UrlPath": - DeliveryRuleUrlPathCondition urlPathCondition = new DeliveryRuleUrlPathCondition - { - Parameters = new UrlPathMatchConditionParameters - { - MatchValues = afdRuleCondition.MatchValue, - NegateCondition = afdRuleCondition.NegateCondition, - OperatorProperty = afdRuleCondition.Operator, - Transforms = afdRuleCondition.Transforms - } - }; - afdRuleConditions.Add(urlPathCondition); - break; - - case "UrlFileExtension": - DeliveryRuleUrlFileExtensionCondition urlFileExtensionCondition = new DeliveryRuleUrlFileExtensionCondition - { - Parameters = new UrlFileExtensionMatchConditionParameters - { - MatchValues = afdRuleCondition.MatchValue, - NegateCondition = afdRuleCondition.NegateCondition, - OperatorProperty = afdRuleCondition.Operator, - Transforms = afdRuleCondition.Transforms - } - }; - afdRuleConditions.Add(urlFileExtensionCondition); - break; - - case "UrlFilename": - DeliveryRuleUrlFileNameCondition urlFileNameCondition = new DeliveryRuleUrlFileNameCondition - { - Parameters = new UrlFileNameMatchConditionParameters - { - MatchValues = afdRuleCondition.MatchValue, - NegateCondition = afdRuleCondition.NegateCondition, - OperatorProperty = afdRuleCondition.Operator, - Transforms = afdRuleCondition.Transforms - } - }; - afdRuleConditions.Add(urlFileNameCondition); - break; - - case "HttpVersion": - DeliveryRuleHttpVersionCondition httpVersionCondition = new DeliveryRuleHttpVersionCondition - { - Parameters = new HttpVersionMatchConditionParameters - { - MatchValues = afdRuleCondition.MatchValue, - NegateCondition = afdRuleCondition.NegateCondition, - } - }; - afdRuleConditions.Add(httpVersionCondition); - break; - - case "IsDevice": - DeliveryRuleIsDeviceCondition isDeviceCondition = new DeliveryRuleIsDeviceCondition - { - Parameters = new IsDeviceMatchConditionParameters - { - MatchValues = afdRuleCondition.MatchValue, - NegateCondition = afdRuleCondition.NegateCondition, - Transforms = afdRuleCondition.Transforms - } - }; - afdRuleConditions.Add(isDeviceCondition); - break; - } - } - - return afdRuleConditions; - } - } -} diff --git a/src/Cdn/Cdn/AfdRule/NewAzFrontDoorCdnRuleAction.cs b/src/Cdn/Cdn/AfdRule/NewAzFrontDoorCdnRuleAction.cs deleted file mode 100644 index c6a2804383dc..000000000000 --- a/src/Cdn/Cdn/AfdRule/NewAzFrontDoorCdnRuleAction.cs +++ /dev/null @@ -1,159 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdRule -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnRuleAction", DefaultParameterSetName = AfdParameterSet.AfdRuleCacheExpirationAction), OutputType(typeof(PSAfdRuleAction))] - public class NewAzFrontDoorCdnRuleAction : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleCachingBehavior, ParameterSetName = AfdParameterSet.AfdRuleCacheExpirationAction)] - [PSArgumentCompleter("BypassCache", "SetIfMissing", "Override")] - [ValidateNotNullOrEmpty] - public string CacheBehavior { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRuleCacheDuration, ParameterSetName = AfdParameterSet.AfdRuleCacheExpirationAction)] - [PSArgumentCompleter("[d.]hh:mm:ss")] - [ValidateNotNullOrEmpty] - public string CacheDuration { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleHeaderType, ParameterSetName = AfdParameterSet.AfdRuleHeaderTypeAction)] - [PSArgumentCompleter("ModifyRequestHeader", "ModifyResponseHeader")] - public string HeaderType { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleHeaderAction, ParameterSetName = AfdParameterSet.AfdRuleHeaderTypeAction)] - [PSArgumentCompleter("Append", "Overwrite", "Delete")] - [ValidateNotNullOrEmpty] - public string HeaderAction { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleHeaderName, ParameterSetName = AfdParameterSet.AfdRuleHeaderTypeAction)] - [ValidateNotNullOrEmpty] - public string HeaderName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRuleHeaderValue, ParameterSetName = AfdParameterSet.AfdRuleHeaderTypeAction)] - [ValidateNotNullOrEmpty] - public string HeaderValue { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleQueryStringBehavior, ParameterSetName = AfdParameterSet.AfdRuleCacheKeyQueryStringAction)] - [ValidateNotNullOrEmpty] - [PSArgumentCompleter("Include", "IncludeAll", "Exclude", "ExcludeAll")] - public string QueryStringBehavior { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleQueryParameters, ParameterSetName = AfdParameterSet.AfdRuleCacheKeyQueryStringAction)] - [ValidateNotNullOrEmpty] - public string QueryParameter { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleRedirectType, ParameterSetName = AfdParameterSet.AfdRuleUrlRedirectAction)] - [PSArgumentCompleter("Moved", "Found", "TemporaryRedirect", "PermanentRedirect")] - public string RedirectType { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRuleDestinationProtocol, ParameterSetName = AfdParameterSet.AfdRuleUrlRedirectAction)] - [PSArgumentCompleter("MatchRequest", "Http", "Https")] - [ValidateNotNullOrEmpty] - public string DestinationProtocol { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRuleCustomPath, ParameterSetName = AfdParameterSet.AfdRuleUrlRedirectAction)] - [ValidateNotNullOrEmpty] - public string CustomPath { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRuleCustomHostname, ParameterSetName = AfdParameterSet.AfdRuleUrlRedirectAction)] - [ValidateNotNullOrEmpty] - public string CustomHostname { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRuleCustomQueryString, ParameterSetName = AfdParameterSet.AfdRuleUrlRedirectAction)] - [ValidateNotNullOrEmpty] - public string CustomQueryString { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRuleCustomFragment, ParameterSetName = AfdParameterSet.AfdRuleUrlRedirectAction)] - [ValidateNotNullOrEmpty] - public string CustomFragment { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleSourcePattern, ParameterSetName = AfdParameterSet.AfdRuleUrlRewriteAction)] - public string SourcePattern { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleDestination, ParameterSetName = AfdParameterSet.AfdRuleUrlRewriteAction)] - public string Destination { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRulePreservePath, ParameterSetName = AfdParameterSet.AfdRuleUrlRewriteAction)] - public SwitchParameter PreservePath { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleOriginGroupOverride, ParameterSetName = AfdParameterSet.AfdRuleOriginGroupOverrideAction)] - public string OriginGroupOverride { get; set; } - - public override void ExecuteCmdlet() - { - PSAfdRuleAction afdRuleAction = new PSAfdRuleAction(); - - if (ParameterSetName == AfdParameterSet.AfdRuleCacheExpirationAction) - { - afdRuleAction = new PSAfdRuleCacheExpirationAction - { - CacheBehavior = this.CacheBehavior, - CacheDuration = this.CacheDuration - }; - } - else if (ParameterSetName == AfdParameterSet.AfdRuleHeaderTypeAction) - { - afdRuleAction = new PSAfdRuleHeaderAction - { - HeaderType = this.HeaderType, - HeaderAction = this.HeaderAction, - HeaderName = this.HeaderName, - HeaderValue = this.HeaderValue - }; - } - else if (ParameterSetName == AfdParameterSet.AfdRuleCacheKeyQueryStringAction) - { - afdRuleAction = new PSAfdRuleCacheKeyQueryStringAction - { - QueryParameters = this.QueryParameter, - QueryStringBehavior = this.QueryStringBehavior - }; - } - else if (ParameterSetName == AfdParameterSet.AfdRuleUrlRedirectAction) - { - afdRuleAction = new PSAfdRuleUrlRedirectAction - { - CustomFragment = this.CustomFragment, - CustomHostname = this.CustomHostname, - CustomPath = this.CustomPath, - CustomQueryString = this.CustomQueryString, - DestinationProtocol = this.DestinationProtocol, - RedirectType = this.RedirectType - }; - } - else if (ParameterSetName == AfdParameterSet.AfdRuleUrlRewriteAction) - { - afdRuleAction = new PSAfdRuleUrlRewriteAction - { - SourcePattern = this.SourcePattern, - Destination = this.Destination, - PreservePath = this.PreservePath - }; - } - else if (ParameterSetName == AfdParameterSet.AfdRuleOriginGroupOverrideAction) - { - afdRuleAction = new PSAfdRuleOriginGroupOverrideAction - { - OriginGroup = this.OriginGroupOverride - }; - } - - WriteObject(afdRuleAction); - } - } -} diff --git a/src/Cdn/Cdn/AfdRule/NewAzFrontDoorCdnRuleCondition.cs b/src/Cdn/Cdn/AfdRule/NewAzFrontDoorCdnRuleCondition.cs deleted file mode 100644 index 7a55f70ec8ad..000000000000 --- a/src/Cdn/Cdn/AfdRule/NewAzFrontDoorCdnRuleCondition.cs +++ /dev/null @@ -1,64 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using System.Collections.Generic; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdRule -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnRuleCondition"), OutputType(typeof(PSAfdRuleCondition))] - public class NewAzFrontDoorCdnRuleCondition : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleMatchVariable)] - [ValidateNotNullOrEmpty] - [PSArgumentCompleter("RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", - "RequestHeader", "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFilename", "HttpVersion", "Cookies", "IsDevice")] - public string MatchVariable { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleMatchValue)] - public List MatchValue { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRuleOperator)] - [ValidateNotNullOrEmpty] - [PSArgumentCompleter("Any", "Equal", "Contains", "LessThan", "GreaterThan", "LessThanOrEqual", "GreaterThanOrEqual", - "BeginsWith", "EndsWith", "RegEx", "IPMatch", "GeoMatch")] - public string Operator { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRuleSelector)] - public string Selector { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRuleTransform)] - [PSArgumentCompleter("Uppercase", "Lowercase")] - public List Transform { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRuleNegateCondition)] - public SwitchParameter NegateCondition { get; set; } - - public override void ExecuteCmdlet() - { - PSAfdRuleCondition afdRuleCondition = new PSAfdRuleCondition - { - MatchVariable = this.MatchVariable, - MatchValue = this.MatchValue, - Operator = this.Operator, - Selector = this.Selector, - Transforms = this.Transform - }; - - WriteObject(afdRuleCondition); - } - } -} diff --git a/src/Cdn/Cdn/AfdRule/RemoveAzFrontDoorCdnRule.cs b/src/Cdn/Cdn/AfdRule/RemoveAzFrontDoorCdnRule.cs deleted file mode 100644 index fa33be36f95a..000000000000 --- a/src/Cdn/Cdn/AfdRule/RemoveAzFrontDoorCdnRule.cs +++ /dev/null @@ -1,108 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdRule -{ - [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnRule", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(bool))] - public class RemoveAzFrontDoorCdnRule : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdRuleObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNullOrEmpty] - public PSAfdRule Rule { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string RuleName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleSetName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string RuleSetName { get; set; } - - [Parameter(Mandatory = false)] - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - switch (ParameterSetName) - { - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - - ConfirmAction(AfdResourceProcessMessage.AfdRuleDeleteMessage, this.RuleName, this.DeleteAfdRule); - } - - private void DeleteAfdRule() - { - try - { - this.CdnManagementClient.Rules.Delete(this.ResourceGroupName, this.ProfileName, this.RuleSetName, this.RuleName); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - - if (this.PassThru.IsPresent) - { - WriteObject(true); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdRuleResourceId = new ResourceIdentifier(this.Rule.Id); - - this.ProfileName = parsedAfdRuleResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdRuleResourceId.ResourceGroupName; - this.RuleName = parsedAfdRuleResourceId.ResourceName; - this.RuleSetName = parsedAfdRuleResourceId.GetResourceName("rulesets"); - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdRuleResourceId = new ResourceIdentifier(this.ResourceId); - - this.ProfileName = parsedAfdRuleResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdRuleResourceId.ResourceGroupName; - this.RuleName = parsedAfdRuleResourceId.ResourceName; - this.RuleSetName = parsedAfdRuleResourceId.GetResourceName("rulesets"); - } - } -} diff --git a/src/Cdn/Cdn/AfdRuleSet/GetAzFrontDoorCdnRuleSet.cs b/src/Cdn/Cdn/AfdRuleSet/GetAzFrontDoorCdnRuleSet.cs deleted file mode 100644 index 6d786cff0fc8..000000000000 --- a/src/Cdn/Cdn/AfdRuleSet/GetAzFrontDoorCdnRuleSet.cs +++ /dev/null @@ -1,121 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdRuleSet -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnRuleSet", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSAfdRuleSet))] - public class GetAzFrontDoorCdnRuleSet : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdProfileObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSAfdProfile Profile { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdRuleSetName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string RuleSetName { get; set; } - - public override void ExecuteCmdlet() - { - try - { - switch (ParameterSetName) - { - case FieldsParameterSet: - this.FieldsParameterSetCmdlet(); - break; - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - case ResourceIdParameterSet: - this.ResourceIdSetCmdlet(); - break; - } - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - - private void FieldsParameterSetCmdlet() - { - bool isRuleSetName = this.MyInvocation.BoundParameters.ContainsKey("RuleSetName"); - - if (isRuleSetName) - { - PSAfdRuleSet psAfdRuleSet = this.CdnManagementClient.RuleSets.Get(this.ResourceGroupName, this.ProfileName, this.RuleSetName).ToPSAfdRuleSet(); - - WriteObject(psAfdRuleSet); - } - else - { - List psAfdRuleSetList = this.CdnManagementClient.RuleSets.ListByProfile(this.ResourceGroupName, this.ProfileName) - .Select(afdRuleSet => afdRuleSet.ToPSAfdRuleSet()) - .ToList(); - - WriteObject(psAfdRuleSetList); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdProfileResourceId = new ResourceIdentifier(this.Profile.Id); - - this.ProfileName = parsedAfdProfileResourceId.ResourceName; - this.ResourceGroupName = parsedAfdProfileResourceId.ResourceGroupName; - - List psAfdRuleSetList = this.CdnManagementClient.RuleSets.ListByProfile(this.ResourceGroupName, this.ProfileName) - .Select(afdRuleSet => afdRuleSet.ToPSAfdRuleSet()) - .ToList(); - - WriteObject(psAfdRuleSetList); - } - - private void ResourceIdSetCmdlet() - { - ResourceIdentifier parsedAfdRuleSetResourceId = new ResourceIdentifier(this.ResourceId); - - this.ProfileName = parsedAfdRuleSetResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdRuleSetResourceId.ResourceGroupName; - this.RuleSetName = parsedAfdRuleSetResourceId.ResourceName; - - PSAfdRuleSet psAfdRuleSet = this.CdnManagementClient.RuleSets.Get(this.ResourceGroupName, this.ProfileName, this.RuleSetName).ToPSAfdRuleSet(); - - WriteObject(psAfdRuleSet); - } - } -} diff --git a/src/Cdn/Cdn/AfdRuleSet/NewAzFrontDoorCdnRuleSet.cs b/src/Cdn/Cdn/AfdRuleSet/NewAzFrontDoorCdnRuleSet.cs deleted file mode 100644 index 1c7387ee9249..000000000000 --- a/src/Cdn/Cdn/AfdRuleSet/NewAzFrontDoorCdnRuleSet.cs +++ /dev/null @@ -1,59 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdRuleSet -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnRuleSet", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSAfdRuleSet))] - public class NewAzFrontDoorCdnRuleSet : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleSetName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string RuleSetName { get; set; } - - public override void ExecuteCmdlet() - { - ConfirmAction(AfdResourceProcessMessage.AfdRuleSetCreateMessage, this.RuleSetName, this.CreateAfdRuleSet); - } - - private void CreateAfdRuleSet() - { - try - { - PSAfdRuleSet psAfdRuleSet = this.CdnManagementClient.RuleSets.Create(this.ResourceGroupName, this.ProfileName, this.RuleSetName).ToPSAfdRuleSet(); - - WriteObject(psAfdRuleSet); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - } -} diff --git a/src/Cdn/Cdn/AfdRuleSet/RemoveAzFrontDoorCdnRuleSet.cs b/src/Cdn/Cdn/AfdRuleSet/RemoveAzFrontDoorCdnRuleSet.cs deleted file mode 100644 index 2dc74d3bc3c7..000000000000 --- a/src/Cdn/Cdn/AfdRuleSet/RemoveAzFrontDoorCdnRuleSet.cs +++ /dev/null @@ -1,102 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdRuleSet -{ - [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnRuleSet", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(bool))] - public class RemoveAzFrontDoorCdnRuleSet : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdRuleSetObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSAfdRuleSet RuleSet { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdRuleSetName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string RuleSetName { get; set; } - - [Parameter(Mandatory = false)] - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - switch (ParameterSetName) - { - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - - ConfirmAction(AfdResourceProcessMessage.AfdRuleSetDeleteMessage, this.RuleSetName, this.DeleteAfdRuleSet); - } - - private void DeleteAfdRuleSet() - { - try - { - this.CdnManagementClient.RuleSets.Delete(this.ResourceGroupName, this.ProfileName, this.RuleSetName); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - - if (this.PassThru.IsPresent) - { - WriteObject(true); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdRuleSetResourceId = new ResourceIdentifier(this.RuleSet.Id); - - this.ProfileName = parsedAfdRuleSetResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdRuleSetResourceId.ResourceGroupName; - this.RuleSetName = parsedAfdRuleSetResourceId.ResourceName; - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdRuleSetResourceId = new ResourceIdentifier(this.ResourceId); - - this.ProfileName = parsedAfdRuleSetResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdRuleSetResourceId.ResourceGroupName; - this.RuleSetName = parsedAfdRuleSetResourceId.ResourceName; - } - } -} diff --git a/src/Cdn/Cdn/AfdSecret/GetAzFrontDoorCdnSecret.cs b/src/Cdn/Cdn/AfdSecret/GetAzFrontDoorCdnSecret.cs deleted file mode 100644 index 284d3f3079b8..000000000000 --- a/src/Cdn/Cdn/AfdSecret/GetAzFrontDoorCdnSecret.cs +++ /dev/null @@ -1,121 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdSecret -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnSecret", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSAfdSecret))] - public class GetAzFrontDoorCdnSecret : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdProfileObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSAfdProfile Profile { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdSecretName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string SecretName { get; set; } - - public override void ExecuteCmdlet() - { - try - { - switch (ParameterSetName) - { - case FieldsParameterSet: - this.FieldsParameterSetCmdlet(); - break; - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - - private void FieldsParameterSetCmdlet() - { - if (this.MyInvocation.BoundParameters.ContainsKey("SecretName")) - { - PSAfdSecret psAfdSecret = this.CdnManagementClient.Secrets.Get(this.ResourceGroupName, this.ProfileName, this.SecretName).ToPSAfdSecret(); - - WriteObject(psAfdSecret); - } - else - { - List psAfdSecretList = this.CdnManagementClient.Secrets.ListByProfile(this.ResourceGroupName, this.ProfileName) - .Select(afdSecret => afdSecret.ToPSAfdSecret()) - .ToList(); - - WriteObject(psAfdSecretList); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdProfileResourceId = new ResourceIdentifier(this.Profile.Id); - - this.ProfileName = parsedAfdProfileResourceId.ResourceName; - this.ResourceGroupName = parsedAfdProfileResourceId.ResourceGroupName; - - List psAfdSecretList = this.CdnManagementClient.Secrets.ListByProfile(this.ResourceGroupName, this.ProfileName) - .Select(afdSecret => afdSecret.ToPSAfdSecret()) - .ToList(); - - WriteObject(psAfdSecretList); - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdSecretResourceId = new ResourceIdentifier(this.ResourceId); - - this.ProfileName = parsedAfdSecretResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdSecretResourceId.ResourceGroupName; - this.SecretName = parsedAfdSecretResourceId.ResourceName; - - PSAfdSecret psAfdSecret = this.CdnManagementClient.Secrets.Get(this.ResourceGroupName, this.ProfileName, this.SecretName).ToPSAfdSecret(); - - WriteObject(psAfdSecret); - } - } - - -} diff --git a/src/Cdn/Cdn/AfdSecret/NewAzFrontDoorCdnSecret.cs b/src/Cdn/Cdn/AfdSecret/NewAzFrontDoorCdnSecret.cs deleted file mode 100644 index 21583cd2c61e..000000000000 --- a/src/Cdn/Cdn/AfdSecret/NewAzFrontDoorCdnSecret.cs +++ /dev/null @@ -1,87 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using System.Collections.Generic; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdSecret -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnSecret", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSAfdSecret))] - public class NewAzFrontDoorCdnSecret : AzureCdnCmdletBase - { - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdSecretCertificateAuthority, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string CertificateAuthority { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdSecretName, ParameterSetName = FieldsParameterSet)] - public string SecretName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdSecretSource, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string SecretSource { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdSecretVersion, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string SecretVersion { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdSecretSubjectAlternativeNames, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public List SubjectAlternativeName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdSecretUseLatestVersion, ParameterSetName = FieldsParameterSet)] - public SwitchParameter UseLatestVersion { get; set; } - - public override void ExecuteCmdlet() - { - ConfirmAction(AfdResourceProcessMessage.AfdSecretCreateMessage, this.SecretName, this.CreateAfdSecret); - } - - private void CreateAfdSecret() - { - try - { - CustomerCertificateParameters afdCustomerCertificate = new CustomerCertificateParameters - { - SecretSource = new ResourceReference(this.SecretSource), - SecretVersion = this.SecretVersion, - CertificateAuthority = this.CertificateAuthority, - UseLatestVersion = this.UseLatestVersion.IsPresent? true : false, - SubjectAlternativeNames = this.SubjectAlternativeName - }; - - PSAfdSecret psAfdSecret = this.CdnManagementClient.Secrets.Create(this.ResourceGroupName, this.ProfileName, this.SecretName, afdCustomerCertificate).ToPSAfdSecret(); - - WriteObject(psAfdSecret); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - } -} diff --git a/src/Cdn/Cdn/AfdSecret/RemoveAzFrontDoorCdnSecret.cs b/src/Cdn/Cdn/AfdSecret/RemoveAzFrontDoorCdnSecret.cs deleted file mode 100644 index 6b6c4cc494b3..000000000000 --- a/src/Cdn/Cdn/AfdSecret/RemoveAzFrontDoorCdnSecret.cs +++ /dev/null @@ -1,103 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdSecret -{ - [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnSecret", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(bool))] - public class RemoveAzFrontDoorCdnSecret : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdSecretObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNullOrEmpty] - public PSAfdSecret Secret { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdSecretName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string SecretName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.PassThruParameter)] - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - switch (ParameterSetName) - { - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - - ConfirmAction(AfdResourceProcessMessage.AfdSecretDeleteMessage, this.SecretName, this.DeleteAfdSecret); - } - - private void DeleteAfdSecret() - { - try - { - this.CdnManagementClient.Secrets.Delete(this.ResourceGroupName, this.ProfileName, this.SecretName); - } - catch (AfdErrorResponseException errorResponseException) - { - throw new PSArgumentException(errorResponseException.Response.Content); - } - - if (this.PassThru.IsPresent) - { - WriteObject(true); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdSecretResourceId = new ResourceIdentifier(this.Secret.Id); - - this.ProfileName = parsedAfdSecretResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdSecretResourceId.ResourceGroupName; - this.SecretName = parsedAfdSecretResourceId.ResourceName; - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdSecretResourceId = new ResourceIdentifier(this.ResourceId); - - this.ProfileName = parsedAfdSecretResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdSecretResourceId.ResourceGroupName; - this.SecretName = parsedAfdSecretResourceId.ResourceName; - } - } -} diff --git a/src/Cdn/Cdn/AfdSecret/SetAzFrontDoorCdnSecret.cs b/src/Cdn/Cdn/AfdSecret/SetAzFrontDoorCdnSecret.cs deleted file mode 100644 index 1ad8ecea884a..000000000000 --- a/src/Cdn/Cdn/AfdSecret/SetAzFrontDoorCdnSecret.cs +++ /dev/null @@ -1,86 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using System.Collections.Generic; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdSecret -{ - [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnSecret", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSAfdSecret))] - public class SetAzFrontDoorCdnSecret : AzureCdnCmdletBase - { - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdSecretCertificateAuthority, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string CertificateAuthority { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdSecretName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string SecretName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdSecretSource, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string SecretSource { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdSecretVersion, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string SecretVersion { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdSecretSubjectAlternativeNames, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public List SubjectAlternativeName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdSecretUseLatestVersion, ParameterSetName = FieldsParameterSet)] - public SwitchParameter UseLatestVersion { get; set; } - - public override void ExecuteCmdlet() - { - ConfirmAction(AfdResourceProcessMessage.AfdSecretUpdateMessage, this.SecretName, this.UpdateAfdSecret); - } - - private void UpdateAfdSecret() - { - try - { - CustomerCertificateParameters afdCustomerCertificate = new CustomerCertificateParameters - { - SecretSource = new ResourceReference(this.SecretSource), - SecretVersion = this.SecretVersion, - CertificateAuthority = this.CertificateAuthority, - UseLatestVersion = this.UseLatestVersion.IsPresent ? true : false, - SubjectAlternativeNames = this.SubjectAlternativeName - }; - - this.CdnManagementClient.Secrets.Update(this.ResourceGroupName, this.ProfileName, this.SecretName, afdCustomerCertificate); - } - catch (AfdErrorResponseException errorResponseException) - { - throw new PSArgumentException(errorResponseException.Response.Content); - } - } - } -} diff --git a/src/Cdn/Cdn/AfdSecurityPolicy/GetAzFrontDoorCdnSecurityPolicy.cs b/src/Cdn/Cdn/AfdSecurityPolicy/GetAzFrontDoorCdnSecurityPolicy.cs deleted file mode 100644 index e465133ebda4..000000000000 --- a/src/Cdn/Cdn/AfdSecurityPolicy/GetAzFrontDoorCdnSecurityPolicy.cs +++ /dev/null @@ -1,120 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdSecurityPolicy -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnSecurityPolicy", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSAfdSecurityPolicy))] - public class GetAzFrontDoorCdnSecurityPolicy : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdProfileObject, ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSAfdProfile Profile { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - [ResourceGroupCompleter()] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdSecurityPolicyName, ParameterSetName = FieldsParameterSet)] - public string SecurityPolicyName { get; set; } - - public override void ExecuteCmdlet() - { - try - { - switch (ParameterSetName) - { - case FieldsParameterSet: - this.FieldsParameterSetCmdlet(); - break; - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - - private void FieldsParameterSetCmdlet() - { - bool isSecurityPolicyName = this.MyInvocation.BoundParameters.ContainsKey("SecurityPolicyName"); - - if (isSecurityPolicyName) - { - PSAfdSecurityPolicy psAfdSecurityPolicy = this.CdnManagementClient.SecurityPolicies.Get(this.ResourceGroupName, this.ProfileName, this.SecurityPolicyName).ToPSAfdSecurityPolicy(); - - WriteObject(psAfdSecurityPolicy); - } - else - { - List psAfdSecurityPolicyList = this.CdnManagementClient.SecurityPolicies.ListByProfile(this.ResourceGroupName, this.ProfileName) - .Select(afdSecurityPolicy => afdSecurityPolicy.ToPSAfdSecurityPolicy()) - .ToList(); - - WriteObject(psAfdSecurityPolicyList); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdProfileResourceId = new ResourceIdentifier(this.Profile.Id); - - this.ProfileName = parsedAfdProfileResourceId.ResourceName; - this.ResourceGroupName = parsedAfdProfileResourceId.ResourceGroupName; - - List psAfdSecurityPolicyList = this.CdnManagementClient.SecurityPolicies.ListByProfile(this.ResourceGroupName, this.ProfileName) - .Select(afdSecurityPolicy => afdSecurityPolicy.ToPSAfdSecurityPolicy()) - .ToList(); - - WriteObject(psAfdSecurityPolicyList); - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdSecurityPolicyResourceId = new ResourceIdentifier(this.ResourceId); - - this.ProfileName = parsedAfdSecurityPolicyResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdSecurityPolicyResourceId.ResourceGroupName; - this.SecurityPolicyName = parsedAfdSecurityPolicyResourceId.ResourceName; - - PSAfdSecurityPolicy psAfdSecurityPolicy = this.CdnManagementClient.SecurityPolicies.Get(this.ResourceGroupName, this.ProfileName, this.SecurityPolicyName).ToPSAfdSecurityPolicy(); - - WriteObject(psAfdSecurityPolicy); - } - } -} diff --git a/src/Cdn/Cdn/AfdSecurityPolicy/NewAzFrontDoorCdnSecurityPolicy.cs b/src/Cdn/Cdn/AfdSecurityPolicy/NewAzFrontDoorCdnSecurityPolicy.cs deleted file mode 100644 index 67d7223016a6..000000000000 --- a/src/Cdn/Cdn/AfdSecurityPolicy/NewAzFrontDoorCdnSecurityPolicy.cs +++ /dev/null @@ -1,84 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using System.Collections.Generic; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdSecurityPolicy -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnSecurityPolicy", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSAfdSecurityPolicy))] - public class NewAzFrontDoorCdnSecurityPolicy : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - [ResourceGroupCompleter()] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdSecurityPolicyName, ParameterSetName = FieldsParameterSet)] - public string SecurityPolicyName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdSecurityPolicyWafPolicyId, ParameterSetName = FieldsParameterSet)] - public string WafPolicyId { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdSecurityPolicyDomainIds, ParameterSetName = FieldsParameterSet)] - public List DomainId { get; set; } - - public override void ExecuteCmdlet() - { - ConfirmAction(AfdResourceProcessMessage.AfdSecurityPolicyCreateMessage, this.SecurityPolicyName, this.CreateAfdSecurityPolicy); - } - - private void CreateAfdSecurityPolicy() - { - try - { - SecurityPolicyWebApplicationFirewallParameters securityPolicyParameters = new SecurityPolicyWebApplicationFirewallParameters(); - securityPolicyParameters.WafPolicy = new ResourceReference(this.WafPolicyId); - securityPolicyParameters.Associations = new List(); - - SecurityPolicyWebApplicationFirewallAssociation securityPolicyWebApplicationFirewallAssociation = new SecurityPolicyWebApplicationFirewallAssociation(); - securityPolicyWebApplicationFirewallAssociation.Domains = new List(); - securityPolicyWebApplicationFirewallAssociation.PatternsToMatch = new List - { - "/*", - }; - - foreach (string domainId in this.DomainId) - { - ResourceReference resourceReference = new ResourceReference(domainId); - securityPolicyWebApplicationFirewallAssociation.Domains.Add(resourceReference); - } - - securityPolicyParameters.Associations.Add(securityPolicyWebApplicationFirewallAssociation); - - PSAfdSecurityPolicy psAfdSecurityPolicy = this.CdnManagementClient.SecurityPolicies.Create(this.ResourceGroupName, this.ProfileName, this.SecurityPolicyName, securityPolicyParameters).ToPSAfdSecurityPolicy(); - - WriteObject(psAfdSecurityPolicy); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - } -} diff --git a/src/Cdn/Cdn/AfdSecurityPolicy/RemoveAzFrontDoorCdnSecurityPolicy.cs b/src/Cdn/Cdn/AfdSecurityPolicy/RemoveAzFrontDoorCdnSecurityPolicy.cs deleted file mode 100644 index 52cc204656c0..000000000000 --- a/src/Cdn/Cdn/AfdSecurityPolicy/RemoveAzFrontDoorCdnSecurityPolicy.cs +++ /dev/null @@ -1,100 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdSecurityPolicy -{ - [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnSecurityPolicy", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(bool))] - public class RemoveAzFrontDoorCdnSecurityPolicy : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - [ResourceGroupCompleter()] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceId, ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdSecurityPolicyObject, ParameterSetName = ObjectParameterSet)] - public PSAfdSecurityPolicy SecurityPolicy { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdSecurityPolicyName, ParameterSetName = FieldsParameterSet)] - public string SecurityPolicyName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.PassThruParameter)] - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - switch (ParameterSetName) - { - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - case ResourceIdParameterSet: - this.ResourceIdParameterSetCmdlet(); - break; - } - - ConfirmAction(AfdResourceProcessMessage.AfdSecurityPolicyDeleteMessage, this.SecurityPolicyName, this.DeleteAfdSecurityPolicy); - } - - private void DeleteAfdSecurityPolicy() - { - try - { - this.CdnManagementClient.SecurityPolicies.Delete(this.ResourceGroupName, this.ProfileName, this.SecurityPolicyName); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - - if (this.PassThru.IsPresent) - { - WriteObject(true); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdSecurityPolicyResourceId = new ResourceIdentifier(this.SecurityPolicy.Id); - - this.ProfileName = parsedAfdSecurityPolicyResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdSecurityPolicyResourceId.ResourceGroupName; - this.SecurityPolicyName = parsedAfdSecurityPolicyResourceId.ResourceName; - } - - private void ResourceIdParameterSetCmdlet() - { - ResourceIdentifier parsedAfdSecurityPolicyResourceId = new ResourceIdentifier(this.ResourceId); - - this.ProfileName = parsedAfdSecurityPolicyResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdSecurityPolicyResourceId.ResourceGroupName; - this.SecurityPolicyName = parsedAfdSecurityPolicyResourceId.ResourceName; - } - } -} diff --git a/src/Cdn/Cdn/AfdSecurityPolicy/SetAzFrontDoorCdnSecurityPolicy.cs b/src/Cdn/Cdn/AfdSecurityPolicy/SetAzFrontDoorCdnSecurityPolicy.cs deleted file mode 100644 index c93745ffe5fd..000000000000 --- a/src/Cdn/Cdn/AfdSecurityPolicy/SetAzFrontDoorCdnSecurityPolicy.cs +++ /dev/null @@ -1,156 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Commands.Cdn.AfdHelpers; -using Microsoft.Azure.Commands.Cdn.AfdModels; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using System.Collections.Generic; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.AfdSecurityPolicy -{ - [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FrontDoorCdnSecurityPolicy", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSAfdSecurityPolicy))] - public class SetAzFrontDoorCdnSecurityPolicy : AzureCdnCmdletBase - { - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdSecurityPolicyDomainIds, ParameterSetName = FieldsParameterSet)] - public List DomainId { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdProfileName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.ResourceGroupName, ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - [ResourceGroupCompleter()] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = HelpMessageConstants.AfdSecurityPolicyObject, ParameterSetName = ObjectParameterSet)] - public PSAfdSecurityPolicy SecurityPolicy { get; set; } - - [Parameter(Mandatory = true, HelpMessage = HelpMessageConstants.AfdSecurityPolicyName, ParameterSetName = FieldsParameterSet)] - public string SecurityPolicyName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = HelpMessageConstants.AfdSecurityPolicyWafPolicyId, ParameterSetName = FieldsParameterSet)] - public string WafPolicyId { get; set; } - - public override void ExecuteCmdlet() - { - switch (ParameterSetName) - { - case ObjectParameterSet: - this.ObjectParameterSetCmdlet(); - break; - } - - ConfirmAction(AfdResourceProcessMessage.AfdSecurityPolicyUpdateMessage, this.SecurityPolicyName, this.UpdateAfdSecurityPolicy); - } - - private void UpdateAfdSecurityPolicy() - { - try - { - PSAfdSecurityPolicy currentPsAfdSecurityPolicy = this.CdnManagementClient.SecurityPolicies.Get(this.ResourceGroupName, this.ProfileName, this.SecurityPolicyName).ToPSAfdSecurityPolicy(); - - SecurityPolicyWebApplicationFirewallParameters securityPolicyWafParameters = new SecurityPolicyWebApplicationFirewallParameters(); - - if (ParameterSetName == ObjectParameterSet) - { - securityPolicyWafParameters = this.CreateSecurityPolicyWafParametersByObject(currentPsAfdSecurityPolicy); - } - - if (ParameterSetName == FieldsParameterSet) - { - securityPolicyWafParameters = this.CreateSecurityPolicyWafParametersByFields(currentPsAfdSecurityPolicy); - } - - this.CdnManagementClient.SecurityPolicies.Patch(this.ResourceGroupName, this.ProfileName, this.SecurityPolicyName, securityPolicyWafParameters); - } - catch (AfdErrorResponseException errorResponse) - { - throw new PSArgumentException(errorResponse.Response.Content); - } - } - - private void ObjectParameterSetCmdlet() - { - ResourceIdentifier parsedAfdSecurityPolicyResourceId = new ResourceIdentifier(this.SecurityPolicy.Id); - - this.ProfileName = parsedAfdSecurityPolicyResourceId.GetResourceName("profiles"); - this.ResourceGroupName = parsedAfdSecurityPolicyResourceId.ResourceGroupName; - this.SecurityPolicyName = parsedAfdSecurityPolicyResourceId.ResourceName; - } - - private SecurityPolicyWebApplicationFirewallParameters CreateSecurityPolicyWafParametersByObject(PSAfdSecurityPolicy currentSecurityPolicy) - { - SecurityPolicyWebApplicationFirewallParameters securityPolicyWafParameters = new SecurityPolicyWebApplicationFirewallParameters - { - WafPolicy = new ResourceReference(currentSecurityPolicy.WafPolicyId), - Associations = new List() - }; - - SecurityPolicyWebApplicationFirewallAssociation securityPolicyWafAssociation = new SecurityPolicyWebApplicationFirewallAssociation(); - securityPolicyWafAssociation.Domains = currentSecurityPolicy.Domains; - securityPolicyWafAssociation.PatternsToMatch = currentSecurityPolicy.PatternsToMatch; - - securityPolicyWafParameters.Associations.Add(securityPolicyWafAssociation); - - if (currentSecurityPolicy.WafPolicyId != this.SecurityPolicy.WafPolicyId) - { - securityPolicyWafParameters.WafPolicy = new ResourceReference(this.SecurityPolicy.WafPolicyId); - } - - return securityPolicyWafParameters; - } - - private SecurityPolicyWebApplicationFirewallParameters CreateSecurityPolicyWafParametersByFields(PSAfdSecurityPolicy currentSecurityPolicy) - { - bool isWafPolicy = this.MyInvocation.BoundParameters.ContainsKey("WafPolicyId"); - bool isDomainIds = this.MyInvocation.BoundParameters.ContainsKey("DomainId"); - - SecurityPolicyWebApplicationFirewallParameters securityPolicyWafParameters = new SecurityPolicyWebApplicationFirewallParameters - { - WafPolicy = new ResourceReference(currentSecurityPolicy.WafPolicyId), - Associations = new List() - }; - - SecurityPolicyWebApplicationFirewallAssociation securityPolicyWafAssociation = new SecurityPolicyWebApplicationFirewallAssociation(); - securityPolicyWafAssociation.Domains = currentSecurityPolicy.Domains; - securityPolicyWafAssociation.PatternsToMatch = currentSecurityPolicy.PatternsToMatch; - - securityPolicyWafParameters.Associations.Add(securityPolicyWafAssociation); - - if (isWafPolicy) - { - securityPolicyWafParameters.WafPolicy = new ResourceReference(this.WafPolicyId); - } - - if (isDomainIds) - { - securityPolicyWafAssociation.Domains = new List(); - - foreach (string domainId in this.DomainId) - { - securityPolicyWafAssociation.Domains.Add(new ResourceReference(domainId)); - } - - //securityPolicyWafParameters.Associations = securityPolicyWafAssociation; - } - - return securityPolicyWafParameters; - } - } -} diff --git a/src/Cdn/Cdn/Az.Cdn.psd1 b/src/Cdn/Cdn/Az.Cdn.psd1 deleted file mode 100644 index 8d976c131aae..000000000000 --- a/src/Cdn/Cdn/Az.Cdn.psd1 +++ /dev/null @@ -1,173 +0,0 @@ -# -# Module manifest for module 'Az.Cdn' -# -# Generated by: Microsoft Corporation -# -# Generated on: 4/15/2022 -# - -@{ - -# Script module or binary module file associated with this manifest. -# RootModule = '' - -# Version number of this module. -ModuleVersion = '1.8.3' - -# Supported PSEditions -CompatiblePSEditions = 'Core', 'Desktop' - -# ID used to uniquely identify this module -GUID = '91832aaa-dc11-4583-8239-bce5fd531604' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = 'Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Microsoft Azure PowerShell - CDN service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. - -For more information on Cdn, please visit the following: https://docs.microsoft.com/azure/cdn/' - -# Minimum version of the PowerShell engine required by this module -PowerShellVersion = '5.1' - -# Name of the PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -DotNetFrameworkVersion = '4.7.2' - -# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -# ClrVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.7.5'; }) - -# Assemblies that must be loaded prior to importing this module -RequiredAssemblies = 'Microsoft.Azure.Management.Cdn.dll' - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -# FormatsToProcess = @() - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -NestedModules = @('Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll') - -# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. -FunctionsToExport = @() - -# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. -CmdletsToExport = 'Get-AzCdnProfile', 'Get-AzCdnProfileSsoUrl', 'New-AzCdnProfile', - 'Remove-AzCdnProfile', 'Set-AzCdnProfile', 'Get-AzCdnOrigin', - 'Set-AzCdnOrigin', 'Get-AzCdnEndpointNameAvailability', - 'Get-AzCdnEndpoint', 'Publish-AzCdnEndpointContent', - 'New-AzCdnEndpoint', 'Unpublish-AzCdnEndpointContent', - 'Remove-AzCdnEndpoint', 'Set-AzCdnEndpoint', 'Start-AzCdnEndpoint', - 'Stop-AzCdnEndpoint', 'Test-AzCdnCustomDomain', - 'Get-AzCdnCustomDomain', 'New-AzCdnCustomDomain', - 'Remove-AzCdnCustomDomain', 'Enable-AzCdnCustomDomain', - 'Disable-AzCdnCustomDomain', 'Enable-AzCdnCustomDomainHttps', - 'Disable-AzCdnCustomDomainHttps', 'Get-AzCdnProfileResourceUsage', - 'Confirm-AzCdnEndpointProbeUrl', 'Get-AzCdnEndpointResourceUsage', - 'Get-AzCdnProfileSupportedOptimizationType', - 'Get-AzCdnSubscriptionResourceUsage', 'Get-AzCdnEdgeNode', - 'New-AzCdnDeliveryRule', 'New-AzCdnDeliveryRuleCondition', - 'New-AzCdnDeliveryRuleAction', 'New-AzCdnDeliveryPolicy', - 'New-AzCdnOrigin', 'Remove-AzCdnOrigin', 'New-AzCdnOriginGroup', - 'Get-AzCdnOriginGroup', 'Remove-AzCdnOriginGroup', - 'Set-AzCdnOriginGroup', 'Get-AzFrontDoorCdnCustomDomain', - 'Get-AzFrontDoorCdnEndpoint', 'Get-AzFrontDoorCdnOrigin', - 'Get-AzFrontDoorCdnOriginGroup', 'Get-AzFrontDoorCdnProfile', - 'Get-AzFrontDoorCdnRoute', 'Get-AzFrontDoorCdnRuleSet', - 'Get-AzFrontDoorCdnRule', 'Get-AzFrontDoorCdnSecret', - 'Get-AzFrontDoorCdnSecurityPolicy', - 'New-AzFrontDoorCdnCustomDomain', 'New-AzFrontDoorCdnEndpoint', - 'New-AzFrontDoorCdnOrigin', 'New-AzFrontDoorCdnOriginGroup', - 'New-AzFrontDoorCdnProfile', 'New-AzFrontDoorCdnRoute', - 'New-AzFrontDoorCdnRule', 'New-AzFrontDoorCdnRuleAction', - 'New-AzFrontDoorCdnRuleCondition', 'New-AzFrontDoorCdnRuleSet', - 'New-AzFrontDoorCdnSecret', 'New-AzFrontDoorCdnSecurityPolicy', - 'Remove-AzFrontDoorCdnCustomDomain', - 'Remove-AzFrontDoorCdnEndpoint', 'Remove-AzFrontDoorCdnOriginGroup', - 'Remove-AzFrontDoorCdnOrigin', 'Remove-AzFrontDoorCdnProfile', - 'Remove-AzFrontDoorCdnRoute', 'Remove-AzFrontDoorCdnRule', - 'Remove-AzFrontDoorCdnRuleSet', 'Remove-AzFrontDoorCdnSecret', - 'Remove-AzFrontDoorCdnSecurityPolicy', - 'Set-AzFrontDoorCdnCustomDomain', 'Set-AzFrontDoorCdnEndpoint', - 'Set-AzFrontDoorCdnOriginGroup', 'Set-AzFrontDoorCdnOrigin', - 'Set-AzFrontDoorCdnProfile', 'Set-AzFrontDoorCdnRoute', - 'Set-AzFrontDoorCdnSecret', 'Set-AzFrontDoorCdnSecurityPolicy' - -# Variables to export from this module -# VariablesToExport = @() - -# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. -AliasesToExport = 'Validate-AzCdnCustomDomain', 'Get-AzCdnEdgeNodes' - -# DSC resources to export from this module -# DscResourcesToExport = @() - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','CDN' - - # A URL to the license for this module. - LicenseUri = 'https://aka.ms/azps-license' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/Azure/azure-powershell' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Added breaking change messages for all cmdlets in Az.CDN module' - - # Prerelease string of this module - # Prerelease = '' - - # Flag to indicate whether the module requires explicit user acceptance for install/update/save - # RequireLicenseAcceptance = $false - - # External dependent modules of this module - # ExternalModuleDependencies = @() - - } # End of PSData hashtable - - } # End of PrivateData hashtable - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - -} - diff --git a/src/Cdn/Cdn/Cdn.csproj b/src/Cdn/Cdn/Cdn.csproj deleted file mode 100644 index e03cfaf94453..000000000000 --- a/src/Cdn/Cdn/Cdn.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - Cdn - - - - - - $(LegacyAssemblyPrefix)$(PsModuleName) - - - - false - x64 - NU1605 - - - - - - - \ No newline at end of file diff --git a/src/Cdn/Cdn/ChangeLog.md b/src/Cdn/Cdn/ChangeLog.md deleted file mode 100644 index 559c449437ee..000000000000 --- a/src/Cdn/Cdn/ChangeLog.md +++ /dev/null @@ -1,77 +0,0 @@ - - -## Upcoming Release - -## Version 1.8.3 -* Added breaking change messages for all cmdlets in Az.CDN module - -## Version 1.8.2 -* Added breaking change messages for upcoming breaking change release of version 2.0.0 - -## Version 1.8.1 -* Fixed null reference exception and typos in `New-AzFrontDoorCdnRule` cmdlet - -## Version 1.8.0 -* Fixed mandatory parameters issue in `Get-AzCdnEndpointResourceUsage` cmdlet - -## Version 1.7.1 -* Fixed profile missing issue in `Remove-AzCdnProfile` cmdlet - -## Version 1.7.0 -* Added cmdlets to support new AFD Premium / Standard SKUs - -## Version 1.6.0 -* Added cmdlets to support multi-origin and private link functionality - -## Version 1.4.3 -* Fixed ChinaCDN related pricing SKU display - -## Version 1.4.2 -* Display error response detail in New-AzCdnEndpoint cmdlet - -## Version 1.4.1 -* Update references in .psd1 to use relative path - -## Version 1.4.0 -* Introduced UrlRewriteAction and CacheKeyQueryStringAction to RulesEngine. -* Fixed several bugs like missing "Selector" Input in New-AzDeliveryRuleCondition cmdlet. - -Fixed enabling CDN custom domain HTTPS for Microsoft and Akamai SKU's - -## Version 1.3.1 -* Fixed miscellaneous typos across module -* Fixed a typo in CDN module conversion helper - -## Version 1.3.0 -* Updated cmdlets to support rulesEngine feature based on API version 2019-04-15. - -## Version 1.2.0 -* Updated cmdlets with plural nouns to singular, and deprecated plural names. - -## Version 1.1.0 -* Added new Powershell cmdlets for Enable/Disable Custom Domain Https and deprecated the old ones - -## Version 1.0.1 -* Update incorrect online help URLs - -## Version 1.0.0 -* General availability of `Az.Cdn` module - diff --git a/src/Cdn/Cdn/Common/AfdConstants.cs b/src/Cdn/Cdn/Common/AfdConstants.cs deleted file mode 100644 index 784272d31563..000000000000 --- a/src/Cdn/Cdn/Common/AfdConstants.cs +++ /dev/null @@ -1,163 +0,0 @@ -// ---------------------------------------------------------------------------------- -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Common -{ - public static class AfdResourceConstants - { - public const string AfdResourceLocation = "Global"; - } - - public static class AfdResourceProcessMessage - { - public const string AfdCustomDomainCreateMessage = "Creating the Azure Front Door custom domain."; - public const string AfdCustomDomainDeleteMessage = "Deleting the Azure Front Door custom domain."; - public const string AfdCustomDomainUpdateMessage = "Updating the Azure Front Door custom domain."; - public const string AfdEndpointCreateMessage = "Creating the Azure Front Door endpoint."; - public const string AfdEndpointDeleteMessage = "Deleting the Azure Front Door endpoint"; - public const string AfdEndpointUpdateMessage = "Updating the Azure Front Door endpoint."; - public const string AfdOriginCreateMessage = "Creating the Azure Front Door origin."; - public const string AfdOriginDeleteMessage = "Deleting the Azure Front Door origin."; - public const string AfdOriginUpdateMessage = "Updating the Azure Front Door origin."; - public const string AfdOriginGroupCreateMessage = "Creating the Azure Front Door origin group."; - public const string AfdOriginGroupDeleteMessage = "Deleting the Azure Front Door origin group."; - public const string AfdOriginGroupUpdateMessage = "Updating the Azure Front Door origin group."; - public const string AfdProfileCreateMessage = "Creating the Azure Front Door profile."; - public const string AfdProfileDeleteMessage = "Deleting the Azure Front Door profile."; - public const string AfdProfileUpdateMessage = "Updating the Azure Front Door profile."; - public const string AfdRouteCreateMessage = "Creating the Azure Front Door route."; - public const string AfdRouteDeleteMessage = "Deleting the Azure Front Door route."; - public const string AfdRouteUpdateMessage = "Updating the Azure Front Door route."; - public const string AfdRuleCreateMessage = "Creating the Azure Front Door rule."; - public const string AfdRuleDeleteMessage = "Deleting the Azure Front Door rule."; - public const string AfdRuleSetCreateMessage = "Creating the Azure Front Door rule set."; - public const string AfdRuleSetDeleteMessage = "Deleting the Azure Front Door rule set."; - public const string AfdSecretCreateMessage = "Creating the Azure Front Door secret."; - public const string AfdSecretDeleteMessage = "Deleteing the Azure Front Door secret."; - public const string AfdSecretUpdateMessage = "Updating the Azure Front Door secret."; - public const string AfdSecurityPolicyCreateMessage = "Creating the Azure Front Door security policy."; - public const string AfdSecurityPolicyDeleteMessage = "Deleting the Azure Front Door security policy."; - public const string AfdSecurityPolicyUpdateMessage = "Updating the Azure Front Door security policy."; - } - - public static class AfdSkuConstants - { - public const string PremiumAzureFrontDoor = "Premium_AzureFrontDoor"; - public const string StandardAzureFrontDoor = "Standard_AzureFrontDoor"; - } - - public static class HelpMessageConstants - { - public const string AfdCustomDomainAzureDnsZoneId = "The resource reference to the Azure DNS zone."; - public const string AfdCustomDomainHostName = "The host name of the domain. Must be a domain name."; - public const string AfdCustomDomainIds = "The resource ids of the Azure Front Door custom domains."; - public const string AfdCustomDomainMinimumTlsVersion = "TLS protocol version that will be used for Https"; - public const string AfdCustomDomainName = "The Azure Front Door custom domain name."; - public const string AfdCustomDomainObject = "The Azure Front Door custom domain object."; - public const string AfdCustomDomainSecretId = "The resource reference to the secret."; - public const string AfdEndpointObject = "The Azure Front Door endpoint object."; - public const string AfdEndpointName = "The Azure Front Door endpoint name."; - public const string AfdOriginGroupAdditionalLatencyInMilliseconds = "The additional latency in milliseconds for probes to fall into the lowest latency bucket."; - public const string AfdOriginHostHeader = "The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value."; - public const string AfdOriginHostName = "The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint."; - public const string AfdOriginHttpPort = "The value of the HTTP port. Must be between 1 and 65535."; - public const string AfdOriginHttpsPort = "The value of the HTTPS port. Must be between 1 and 65535."; - public const string AfdOriginGroupId = "The resource id of the Azure Front Door origin group."; - public const string AfdOriginGroupName = "The Azure Front Door origin group name."; - public const string AfdOriginGroupObject = "The Azure Front Door origin group object."; - public const string AfdOriginGroupProbeIntervalInSeconds = "The number of seconds between health probes."; - public const string AfdOriginGroupProbePath = "The path relative to the origin that is used to determine the health of the origin."; - public const string AfdOriginGroupProbeProtocol = "Protocol to use for health probe."; - public const string AfdOriginGroupProbeRequestType = "The type of health probe request that is made."; - public const string AfdOriginGroupSampleSize = "The number of samples to consider for load balancing decisions."; - public const string AfdOriginGroupSuccessfulSamplesRequired = "The number of samples within the sample period that must succeed."; - public const string AfdOriginGroupTrafficRestorationTimeToHealedOrNewEndpointsInMinutes = "Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added."; - public const string AfdOriginName = "The Azure Front Door origin name."; - public const string AfdOriginObject = "The Azure Front Door origin object."; - public const string AfdOriginPriority = "Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy."; - public const string AfdOriginPrivateLinkId = "The Azure resource id of the shared private link resource."; - public const string AfdOriginPrivateLinkLocation = "The location of the shared private link resource."; - public const string AfdOriginPrivateLinkRequestMessage = "The request message for requesting approval of the shared private link resource."; - public const string AfdOriginWeight = "Weight of the origin in given origin group for load balancing."; - public const string AfdProfileName = "The Azure Front Door profile name."; - public const string AfdProfileSku = "The Azure Front Door profile SKU."; - public const string AfdProfileObject = "The Azure Front Door profile object."; - public const string AfdRouteForwardingProtocol = "Protocol this rule will use when forwarding traffic to backends."; - public const string AfdRouteHttpsRedirect = "Whether to automatically redirect HTTP traffic to HTTPS traffic."; - public const string AfdRouteName = "The Azure Front Door route name."; - public const string AfdRouteObject = "The Azure Front Door route object."; - public const string AfdRouteOriginPath = "A directory path on the origin that Azure Front Door can use to retrieve content from, e.g. contoso.cloudapp.net/originpath."; - public const string AfdRouteQueryStringCachingBehavior = "Defines how Azure Front Door caches requests that include query strings."; - public const string AfdRouteSupportedProtocols = "List of supported protocols for this route."; - public const string AfdRuleActions = "The set of actions for the delivery rule."; - public const string AfdRuleCachingBehavior = "Caching behavior for the action."; - public const string AfdRuleCacheDuration = "The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss"; - public const string AfdRuleConditions = "The set of conditions for the delivery rule."; - public const string AfdRuleCustomFragment = "Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #."; - public const string AfdRuleCustomHostname = "Host to redirect. Leave empty to use the incoming host as the destination host."; - public const string AfdRuleCustomPath = "The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path."; - public const string AfdRuleCustomQueryString = "The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query string. Query string must be in = format. ? and & will be added automatically so do not include them."; - public const string AfdRuleDestination = "Define the relative URL to which the above requests will be rewritten by."; - public const string AfdRuleDestinationProtocol = "Protocol to use for the redirect. The default value is MatchRequest."; - public const string AfdRuleHeaderAction = "Action to perform."; - public const string AfdRuleHeaderName = "Name of the header to modify."; - public const string AfdRuleHeaderType = "Whether to modify request header or response header."; - public const string AfdRuleHeaderValue = "Value for the specified action."; - public const string AfdRuleMatchProcessingBehavior = "If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue."; - public const string AfdRuleMatchValue = "Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the variable with the given operator this match condition is considered a match."; - public const string AfdRuleMatchVariable = "A list of conditions that must be matched for the actions to be executed."; - public const string AfdRuleName = "The Azure Front Door rule name."; - public const string AfdRuleNegateCondition = "Describes if the result of this condition should be negated."; - public const string AfdRuleObject = "The Azure Front Door rule object."; - public const string AfdRuleOperator = "Describes operator to be matched."; - public const string AfdRuleOrder = "The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order."; - public const string AfdRuleOriginGroupOverride = "Defines the origin group override action for the delivery rule."; - public const string AfdRulePreservePath = "Whether to preserve unmatched path."; - public const string AfdRuleQueryParameters = "Query parameters to include or exclude (comma separated)."; - public const string AfdRuleQueryStringBehavior = "Defines the parameters for the cache-key query string action. Accepted values : Include, IncludeAll, Exclude, ExcludeAll"; - public const string AfdRuleRedirectType = "The redirect type the rule will use when redirecting traffic."; - public const string AfdRuleSelector = "Name of Selector to be matched."; - public const string AfdRuleSetIds = "The resource ids of the Azure Front Door rule sets."; - public const string AfdRuleSetName = "The Azure Front Door rule set name."; - public const string AfdRuleSetObject = "The Azure Front Door rule set object."; - public const string AfdRuleSourcePattern = "Define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched."; - public const string AfdRuleTransform = "Transform to apply before matching. Possible values are Lowercase and Uppercase."; - public const string AfdSecretCertificateAuthority = "The certificate issuing authority."; - public const string AfdSecretName = "The Azure Front Door secret name."; - public const string AfdSecretObject = "The Azure Front Door secret object."; - public const string AfdSecretSubjectAlternativeNames = "The list of the subject alternative names."; - public const string AfdSecretSource = "The resource reference to the Azure Key Vault secret."; - public const string AfdSecretUseLatestVersion = "Whether to use the latest version for the certificate."; - public const string AfdSecretVersion = "The version of the secret to be used"; - public const string AfdSecurityPolicyDomainIds = "The resource ids of the domains which will be linked to the Azure Front Door web application firewall."; - public const string AfdSecurityPolicyObject = "The Azure Front Door security policy object."; - public const string AfdSecurityPolicyName = "The Azure Front Door security policy name."; - public const string AfdSecurityPolicyWafPolicyId = "The resource id of the Azure Front Door web application firewall."; - public const string PassThruParameter = "Set by the user to signal that they would like to receive output from a cmdlet which does not return anything."; - public const string ResourceId = "The Azure resource id."; - public const string ResourceGroupName = "The Azure resource group name."; - public const string TagsDescription = "The tags associated to the Azure resource."; - } - - public static class AfdParameterSet - { - public const string AfdRuleCacheExpirationAction = "AfdRuleCacheExpirationAction"; - public const string AfdRuleCacheKeyQueryStringAction = "AfdRuleCacheKeyQueryStringAction"; - public const string AfdRuleHeaderTypeAction = "AfdRuleHeaderTypeAction"; - public const string AfdRuleOriginGroupOverrideAction = "AfdRuleOriginGroupOverrideAction"; - public const string AfdRuleUrlRedirectAction = "AfdRuleUrlRedirectAction"; - public const string AfdRuleUrlRewriteAction = "AfdRuleUrlRewriteAction"; - public const string AfdCustomDomainCustomerCertificate = "AfdCustomDomainCustomerCertificate"; - public const string SharedPrivateLinkResource = "SharedPrivateLinkResource"; - } -} diff --git a/src/Cdn/Cdn/Common/AzureCdnCmdletBase.cs b/src/Cdn/Cdn/Common/AzureCdnCmdletBase.cs deleted file mode 100644 index 60783679798a..000000000000 --- a/src/Cdn/Cdn/Common/AzureCdnCmdletBase.cs +++ /dev/null @@ -1,93 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Collections.Generic; -using System.Globalization; - -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Commands.Common.Authentication.Abstractions; -using Microsoft.Azure.Commands.ResourceManager.Common; -using Microsoft.Azure.Management.Cdn; -using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; - -namespace Microsoft.Azure.Commands.Cdn.Common -{ - /// - /// Base class of Azure Cdn Cmdlet. - /// - public class AzureCdnCmdletBase : AzureRMCmdlet - { - private ICdnManagementClient _cdnManagementClient; - - private Dictionary> _defaultRequestHeaders; - - public const string ObjectParameterSet = "ByObjectParameterSet"; - public const string FieldsParameterSet = "ByFieldsParameterSet"; - public const string ResourceIdParameterSet = "ByResourceIdParameterSet"; - public const string CacheExpirationActionParameterSet = "CacheExpirationActionParameterSet"; - public const string HeaderActionParameterSet = "HeaderActionParameterSet"; - public const string UrlRedirectActionParameterSet = "UrlRedirectActionParameterSet"; - public const string CacheKeyQueryStringActionParameterSet = "CacheKeyQueryStringActionParameterSet"; - public const string UrlRewriteActionParameterSet = "UrlRewriteActionParameterSet"; - public const string ByFieldsPrivateLinkParameterSet = "ByFieldsPrivateLinkParameterSet"; - - - /// - /// Gets or sets the Cdn management client. - /// - public ICdnManagementClient CdnManagementClient - { - get - { - return _cdnManagementClient ?? - (_cdnManagementClient = - AzureSession.Instance.ClientFactory.CreateArmClient(DefaultProfile.DefaultContext, - AzureEnvironment.Endpoint.ResourceManager)); - } - set { _cdnManagementClient = value; } - } - - /// - /// Gets or sets the default headers send with rest requests. - /// - public Dictionary> DefaultRequestHeaders - { - get - { - return _defaultRequestHeaders ?? - (_defaultRequestHeaders = - new Dictionary> { { "UserAgent", new List { "PowerShell" } } }); - } - set { _defaultRequestHeaders = value; } - } - - public void ConfirmAction(bool force, string actionMessage, Action action) - { - if (force || ShouldContinue(actionMessage, "")) - { - action(); - } - } - - protected override void BeginProcessing() - { - CdnMessageHelper.WriteMessage(this, - $"Breaking changes in the cmdlet: { MyInvocation.InvocationName}" + Environment.NewLine + - "- When you bump up Az.CDN module version, there will be changes to parameters and output, please use the new version: 2.0.0"); - base.BeginProcessing(); - } - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn/Common/Constants.cs b/src/Cdn/Cdn/Common/Constants.cs deleted file mode 100644 index e71201285eeb..000000000000 --- a/src/Cdn/Cdn/Common/Constants.cs +++ /dev/null @@ -1,22 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Common -{ - public class Constants - { - public const int PurgeLoadMinimumCollectionCount = 1; - public const int PurgeLoadMaximumCollectionCount = 50; - } -} diff --git a/src/Cdn/Cdn/CustomDomain/DisableAzureRmCdnCustomDomain.cs b/src/Cdn/Cdn/CustomDomain/DisableAzureRmCdnCustomDomain.cs deleted file mode 100644 index 5ef5a28fb2e0..000000000000 --- a/src/Cdn/Cdn/CustomDomain/DisableAzureRmCdnCustomDomain.cs +++ /dev/null @@ -1,83 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.CustomDomain; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using System.Linq; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; - -namespace Microsoft.Azure.Commands.Cdn.CustomDomain -{ - [CmdletDeprecation(ReplacementCmdletName = "Disable-AzCdnCustomDomainHttps")] - [Cmdlet("Disable", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnCustomDomain", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(bool))] - public class DisableAzureRmCdnCustomDomain : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN custom domain display name.")] - [ValidateNotNullOrEmpty] - public string CustomDomainName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN endpoint name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN profile name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource group of the Azure CDN profile.", ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The custom domain object.", ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSCustomDomain InputObject { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Return object (if specified).")] - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - EndpointName = InputObject.EndpointName; - ProfileName = InputObject.ProfileName; - ResourceGroupName = InputObject.ResourceGroupName; - CustomDomainName = InputObject.Name; - } - - ConfirmAction(MyInvocation.InvocationName, - CustomDomainName, - () => CdnManagementClient.CustomDomains.DisableCustomHttps( - ResourceGroupName, - ProfileName, - EndpointName, - CustomDomainName - ) - ); - - WriteVerbose(Resources.Success); - if (PassThru) - { - WriteObject(true); - } - } - } -} diff --git a/src/Cdn/Cdn/CustomDomain/DisableAzureRmCdnCustomDomainHttps.cs b/src/Cdn/Cdn/CustomDomain/DisableAzureRmCdnCustomDomainHttps.cs deleted file mode 100644 index e03bd8584ec5..000000000000 --- a/src/Cdn/Cdn/CustomDomain/DisableAzureRmCdnCustomDomainHttps.cs +++ /dev/null @@ -1,108 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Linq; -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.CustomDomain; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; - -namespace Microsoft.Azure.Commands.Cdn.CustomDomain -{ - [Cmdlet("Disable", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnCustomDomainHttps", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(bool))] - public class DisableAzureRmCdnCustomDomainHttps : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "The resource group of the Azure CDN profile")] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN profile name.")] - [ResourceNameCompleter("Microsoft.Cdn/profiles", nameof(ResourceGroupName))] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN endpoint name.")] - [ResourceNameCompleter("Microsoft.Cdn/profiles/endpoints", nameof(ResourceGroupName), nameof(ProfileName))] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN custom domain display name.")] - [ResourceNameCompleter("Microsoft.Cdn/profiles/endpoints/customdomains", nameof(ResourceGroupName), nameof(ProfileName), nameof(EndpointName))] - [ValidateNotNullOrEmpty] - public string CustomDomainName { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The custom domain object.", ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSCustomDomain InputObject { get; set; } - - [Parameter(ParameterSetName = ResourceIdParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "ResourceId of the Custom Domain")] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Return object if specified.")] - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName.Equals(ObjectParameterSet, StringComparison.OrdinalIgnoreCase)) - { - EndpointName = InputObject.EndpointName; - ProfileName = InputObject.ProfileName; - ResourceGroupName = InputObject.ResourceGroupName; - CustomDomainName = InputObject.Name; - } - - if (ParameterSetName.Equals(ResourceIdParameterSet, StringComparison.OrdinalIgnoreCase)) - { - var parsedResourceId = new ResourceIdentifier(ResourceId); - ResourceGroupName = parsedResourceId.ResourceGroupName; - ProfileName = parsedResourceId.GetProfileName(); - EndpointName = parsedResourceId.GetEndpointName(); - CustomDomainName = parsedResourceId.ResourceName; - } - - var existingCustomDomain = CdnManagementClient.CustomDomains - .ListByEndpoint(ResourceGroupName, ProfileName, EndpointName) - .FirstOrDefault(cd => cd.Name.ToLower() == CustomDomainName.ToLower()); - - if (existingCustomDomain == null) - { - throw new PSArgumentException(string.Format(Resources.Error_NonExistingCustomDomain, - CustomDomainName, - EndpointName, - ProfileName, - ResourceGroupName)); - } - - ConfirmAction(MyInvocation.InvocationName, - String.Format("{0} ({1})", existingCustomDomain.Name, existingCustomDomain.HostName), - () => CdnManagementClient.CustomDomains.DisableCustomHttps( - ResourceGroupName, - ProfileName, - EndpointName, - CustomDomainName)); - - if (PassThru) - { - WriteObject(true); - } - } - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn/CustomDomain/EnableAzureRmCdnCustomDomain.cs b/src/Cdn/Cdn/CustomDomain/EnableAzureRmCdnCustomDomain.cs deleted file mode 100644 index 36fa89138d5f..000000000000 --- a/src/Cdn/Cdn/CustomDomain/EnableAzureRmCdnCustomDomain.cs +++ /dev/null @@ -1,81 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.CustomDomain; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using System.Linq; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; - -namespace Microsoft.Azure.Commands.Cdn.CustomDomain -{ - [CmdletDeprecation(ReplacementCmdletName = "Enable-AzCdnCustomDomainHttps")] - [Cmdlet("Enable", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnCustomDomain", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(bool))] - public class EnableAzureRmCdnCustomDomain : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN custom domain display name.")] - [ValidateNotNullOrEmpty] - public string CustomDomainName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN endpoint name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN profile name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource group of the Azure CDN profile.", ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The custom domain object.", ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSCustomDomain InputObject { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Return object (if specified).")] - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - EndpointName = InputObject.EndpointName; - ProfileName = InputObject.ProfileName; - ResourceGroupName = InputObject.ResourceGroupName; - CustomDomainName = InputObject.Name; - } - - ConfirmAction(MyInvocation.InvocationName, - CustomDomainName, - () => CdnManagementClient.CustomDomains.EnableCustomHttps( - ResourceGroupName, - ProfileName, - EndpointName, - CustomDomainName)); - - WriteVerbose(Resources.Success); - if (PassThru) - { - WriteObject(true); - } - } - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn/CustomDomain/EnableAzureRmCdnCustomDomainHttps.cs b/src/Cdn/Cdn/CustomDomain/EnableAzureRmCdnCustomDomainHttps.cs deleted file mode 100644 index 994175d41867..000000000000 --- a/src/Cdn/Cdn/CustomDomain/EnableAzureRmCdnCustomDomainHttps.cs +++ /dev/null @@ -1,144 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Linq; -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.CustomDomain; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; - -namespace Microsoft.Azure.Commands.Cdn.CustomDomain -{ - [Cmdlet("Enable", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnCustomDomainHttps", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(bool))] - public class EnableAzureRmCdnCustomDomainHttps : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "The resource group of the Azure CDN profile")] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN profile name.")] - [ResourceNameCompleter("Microsoft.Cdn/profiles", nameof(ResourceGroupName))] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN endpoint name.")] - [ResourceNameCompleter("Microsoft.Cdn/profiles/endpoints", nameof(ResourceGroupName), nameof(ProfileName))] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN custom domain display name.")] - [ResourceNameCompleter("Microsoft.Cdn/profiles/endpoints/customdomains", nameof(ResourceGroupName), nameof(ProfileName), nameof(EndpointName))] - [ValidateNotNullOrEmpty] - public string CustomDomainName { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The custom domain object.", ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSCustomDomain InputObject { get; set; } - - [Parameter(ParameterSetName = ResourceIdParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "ResourceId of the Custom Domain")] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Return object if specified.")] - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName.Equals(ObjectParameterSet, StringComparison.OrdinalIgnoreCase)) - { - EndpointName = InputObject.EndpointName; - ProfileName = InputObject.ProfileName; - ResourceGroupName = InputObject.ResourceGroupName; - CustomDomainName = InputObject.Name; - } - - if (ParameterSetName.Equals(ResourceIdParameterSet, StringComparison.OrdinalIgnoreCase)) - { - var parsedResourceId = new ResourceIdentifier(ResourceId); - ResourceGroupName = parsedResourceId.ResourceGroupName; - ProfileName = parsedResourceId.GetProfileName(); - EndpointName = parsedResourceId.GetEndpointName(); - CustomDomainName = parsedResourceId.ResourceName; - } - - var existingCustomDomain = CdnManagementClient.CustomDomains - .ListByEndpoint(ResourceGroupName, ProfileName, EndpointName) - .FirstOrDefault(cd => cd.Name.ToLower() == CustomDomainName.ToLower()); - - if (existingCustomDomain == null) - { - throw new PSArgumentException(string.Format(Resources.Error_NonExistingCustomDomain, - CustomDomainName, - EndpointName, - ProfileName, - ResourceGroupName)); - } - - // Get the Profile so we can lookup its Sku. - var profile = CdnManagementClient.Profiles.Get(ResourceGroupName, ProfileName); - - // Setup the request parameters according to the profile Sku. - Management.Cdn.Models.CdnManagedHttpsParameters parameters; - switch (profile.Sku.Name) - { - case Management.Cdn.Models.SkuName.StandardMicrosoft: - // Microsoft - parameters = new Management.Cdn.Models.CdnManagedHttpsParameters - { - ProtocolType = Management.Cdn.Models.ProtocolType.ServerNameIndication, - CertificateSourceParameters = new Management.Cdn.Models.CdnCertificateSourceParameters { CertificateType = "Dedicated" } - }; - break; - case Management.Cdn.Models.SkuName.StandardAkamai: - // Akamai - parameters = new Management.Cdn.Models.CdnManagedHttpsParameters - { - ProtocolType = Management.Cdn.Models.ProtocolType.ServerNameIndication, - CertificateSourceParameters = new Management.Cdn.Models.CdnCertificateSourceParameters { CertificateType = "Shared" } - }; - - break; - default: - // Verizon - parameters = new Management.Cdn.Models.CdnManagedHttpsParameters - { - ProtocolType = Management.Cdn.Models.ProtocolType.IPBased, - CertificateSourceParameters = new Management.Cdn.Models.CdnCertificateSourceParameters { CertificateType = "Shared" } - }; - break; - } - - ConfirmAction(MyInvocation.InvocationName, - String.Format("{0} ({1})", existingCustomDomain.Name, existingCustomDomain.HostName), - () => CdnManagementClient.CustomDomains.EnableCustomHttps( - ResourceGroupName, - ProfileName, - EndpointName, - CustomDomainName, - parameters - )); - - if (PassThru) - { - WriteObject(true); - } - } - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn/CustomDomain/GetAzureRmCdnCustomDomain.cs b/src/Cdn/Cdn/CustomDomain/GetAzureRmCdnCustomDomain.cs deleted file mode 100644 index ba85f9382843..000000000000 --- a/src/Cdn/Cdn/CustomDomain/GetAzureRmCdnCustomDomain.cs +++ /dev/null @@ -1,80 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.CustomDomain; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using System.Linq; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.CustomDomain -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnCustomDomain", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSCustomDomain))] - public class GetAzureRmCdnCustomDomain : AzureCdnCmdletBase - { - [Parameter(Mandatory = false, HelpMessage = "Azure CDN custom domain name.")] - [ValidateNotNullOrEmpty] - public string CustomDomainName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN endpoint name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN profile name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource group of the Azure CDN profile.", ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The CDN endpoint object.", ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSEndpoint CdnEndpoint { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - ResourceGroupName = CdnEndpoint.ResourceGroupName; - ProfileName = CdnEndpoint.ProfileName; - EndpointName = CdnEndpoint.Name; - } - - if (CustomDomainName == null) - { - //List all custom domains on this endpoint - var customDomains = CdnManagementClient.CustomDomains.ListByEndpoint(ResourceGroupName, ProfileName, EndpointName).Select(c => c.ToPsCustomDomain()); - WriteVerbose(Resources.Success); - WriteObject(customDomains, true); - } - else - { - var customDomain = CdnManagementClient.CustomDomains.Get( - ResourceGroupName, - ProfileName, - EndpointName, - CustomDomainName); - - WriteVerbose(Resources.Success); - WriteObject(customDomain.ToPsCustomDomain()); - } - } - } -} diff --git a/src/Cdn/Cdn/CustomDomain/NewAzureRmCdnCustomDomain.cs b/src/Cdn/Cdn/CustomDomain/NewAzureRmCdnCustomDomain.cs deleted file mode 100644 index f6b9b70d4511..000000000000 --- a/src/Cdn/Cdn/CustomDomain/NewAzureRmCdnCustomDomain.cs +++ /dev/null @@ -1,105 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.IO; -using System.Management.Automation; -using System.Net; -using System.Reflection; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.CustomDomain; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Commands.Common.Authentication; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using System.Linq; -using Microsoft.WindowsAzure.Commands.Common; -using Microsoft.Azure.Commands.Common.Authentication.Abstractions; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.CustomDomain -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnCustomDomain", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(PSCustomDomain))] - public class NewAzureRmCdnCustomDomain : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = "Host name (address) of the Azure CDN custom domain name.")] - [ValidateNotNullOrEmpty] - public string HostName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN custom domain display name.")] - [ValidateNotNullOrEmpty] - public string CustomDomainName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN endpoint name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN profile name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource group of the Azure CDN profile.", ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The CDN endpoint object.", ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSEndpoint CdnEndpoint { get; set; } - - public override void ExecuteCmdlet() - { - - if (ParameterSetName == ObjectParameterSet) - { - ResourceGroupName = CdnEndpoint.ResourceGroupName; - ProfileName = CdnEndpoint.ProfileName; - EndpointName = CdnEndpoint.Name; - } - - var existingCustomDomain = CdnManagementClient.CustomDomains - .ListByEndpoint(ResourceGroupName, ProfileName, EndpointName) - .FirstOrDefault(cd => cd.Name.ToLower() == CustomDomainName.ToLower()); - - if (existingCustomDomain != null) - { - throw new PSArgumentException(string.Format( - Resources.Error_CreateExistingCustomDomain, - CustomDomainName, - EndpointName, - ProfileName, - ResourceGroupName)); - } - - ConfirmAction(MyInvocation.InvocationName, - HostName, - NewCustomDomain); - } - - private void NewCustomDomain() - { - var customDomain = CdnManagementClient.CustomDomains.Create( - ResourceGroupName, - ProfileName, - EndpointName, - CustomDomainName, - HostName); - - WriteVerbose(Resources.Success); - WriteObject(customDomain.ToPsCustomDomain()); - } - } -} diff --git a/src/Cdn/Cdn/CustomDomain/RemoveAzureRmCdnCustomDomain.cs b/src/Cdn/Cdn/CustomDomain/RemoveAzureRmCdnCustomDomain.cs deleted file mode 100644 index a1984a9b82a3..000000000000 --- a/src/Cdn/Cdn/CustomDomain/RemoveAzureRmCdnCustomDomain.cs +++ /dev/null @@ -1,93 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Management.Automation; -using System.Net; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Models.CustomDomain; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using System.Linq; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.CustomDomain -{ - [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnCustomDomain",DefaultParameterSetName = FieldsParameterSet,SupportsShouldProcess = true),OutputType(typeof(bool))] - public class RemoveAzureRmCdnCustomDomain : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN custom domain display name.")] - [ValidateNotNullOrEmpty] - public string CustomDomainName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN endpoint name.")] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN profile name.")] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "The resource group of the Azure CDN profile")] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The custom domain object.", ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSCustomDomain CdnCustomDomain { get; set; } - - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Return object if specified.")] - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - EndpointName = CdnCustomDomain.EndpointName; - ProfileName = CdnCustomDomain.ProfileName; - ResourceGroupName = CdnCustomDomain.ResourceGroupName; - CustomDomainName = CdnCustomDomain.Name; - } - - - var existingCustomDomain = CdnManagementClient.CustomDomains - .ListByEndpoint(ResourceGroupName, ProfileName, EndpointName) - .FirstOrDefault(cd => cd.Name.ToLower() == CustomDomainName.ToLower()); - - if (existingCustomDomain == null) - { - throw new PSArgumentException(string.Format(Resources.Error_NonExistingCustomDomain, - CustomDomainName, - EndpointName, - ProfileName, - ResourceGroupName)); - } - - ConfirmAction(MyInvocation.InvocationName, - String.Format("{0} ({1})", existingCustomDomain.Name, existingCustomDomain.HostName), - () => CdnManagementClient.CustomDomains.Delete( - ResourceGroupName, - ProfileName, - EndpointName, - CustomDomainName)); - - if (PassThru) - { - WriteObject(true); - } - } - } -} diff --git a/src/Cdn/Cdn/EdgeNodes/PSCIDRIpAddress.cs b/src/Cdn/Cdn/EdgeNodes/PSCIDRIpAddress.cs deleted file mode 100644 index 1162c43da73e..000000000000 --- a/src/Cdn/Cdn/EdgeNodes/PSCIDRIpAddress.cs +++ /dev/null @@ -1,29 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.EdgeNodes -{ - public class PSCIDRIpAddress - { - /// - /// The base ip address - /// - public string BaseIpAddress { get; set; } - - /// - /// The prefix length - /// - public int PrefixLength { get; set; } - } -} diff --git a/src/Cdn/Cdn/EdgeNodes/PSEdgeNode.cs b/src/Cdn/Cdn/EdgeNodes/PSEdgeNode.cs deleted file mode 100644 index 4ff003b5f9d5..000000000000 --- a/src/Cdn/Cdn/EdgeNodes/PSEdgeNode.cs +++ /dev/null @@ -1,27 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - - -using System.Collections.Generic; - -namespace Microsoft.Azure.Commands.Cdn.EdgeNodes -{ - public class PSEdgeNode - { - /// - /// A collection of edge nodes - /// - public ICollection IpAddressGroups { get; set; } - } -} diff --git a/src/Cdn/Cdn/EdgeNodes/PSIpAddressGroup.cs b/src/Cdn/Cdn/EdgeNodes/PSIpAddressGroup.cs deleted file mode 100644 index 3c2ddf5255e7..000000000000 --- a/src/Cdn/Cdn/EdgeNodes/PSIpAddressGroup.cs +++ /dev/null @@ -1,36 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections.Generic; - -namespace Microsoft.Azure.Commands.Cdn.EdgeNodes -{ - public class PSIpAddressGroup - { - /// - /// The delivery region of the ip addresses. - /// - public string DeliveryRegion { get; set; } - - /// - /// The ipv4 addresses. - /// - public ICollection Ipv4Addresses { get; set; } - - /// - /// The ipv6 addresses. - /// - public ICollection Ipv6Addresses { get; set; } - } -} diff --git a/src/Cdn/Cdn/Endpoint/ConfirmAzureRmCdnEndpointProbeUrl.cs b/src/Cdn/Cdn/Endpoint/ConfirmAzureRmCdnEndpointProbeUrl.cs deleted file mode 100644 index 41323c042326..000000000000 --- a/src/Cdn/Cdn/Endpoint/ConfirmAzureRmCdnEndpointProbeUrl.cs +++ /dev/null @@ -1,40 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; - -namespace Microsoft.Azure.Commands.Cdn.Endpoint -{ - [Cmdlet("Confirm", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnEndpointProbeURL"), OutputType(typeof(PSValidateProbeOutput))] - public class ConfirmAzureRmCdnEndpointProbeUrl : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = "Proposed probe URL name to validate.")] - [ValidateNotNullOrEmpty] - public string ProbeUrl { get; set; } - - public override void ExecuteCmdlet() - { - var result = CdnManagementClient.ValidateProbe(ProbeUrl); - - WriteVerbose(Resources.Success); - WriteObject(result.ToPsValideProbeOutput()); - } - } -} diff --git a/src/Cdn/Cdn/Endpoint/GetAzureRmCdnEndpoint.cs b/src/Cdn/Cdn/Endpoint/GetAzureRmCdnEndpoint.cs deleted file mode 100644 index 090ad3a812fe..000000000000 --- a/src/Cdn/Cdn/Endpoint/GetAzureRmCdnEndpoint.cs +++ /dev/null @@ -1,69 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using System.Linq; -using Microsoft.Azure.Commands.Cdn.Models.Profile; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Endpoint -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnEndpoint", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSEndpoint))] - public class GetAzureRmCdnEndpoint : AzureCdnCmdletBase - { - [Parameter(Mandatory = false, HelpMessage = "Azure CDN endpoint name.")] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN profile name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource group of the Azure CDN Profile.", ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "Azure CDN profile object.", ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSProfile CdnProfile { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - ProfileName = CdnProfile.Name; - ResourceGroupName = CdnProfile.ResourceGroupName; - } - - if (EndpointName != null) - { - var endpoint = CdnManagementClient.Endpoints.Get(ResourceGroupName, ProfileName, EndpointName); - WriteVerbose(Resources.Success); - WriteObject(endpoint.ToPsEndpoint()); - } - else - { - var endpoints = CdnManagementClient.Endpoints.ListByProfile(ResourceGroupName, ProfileName).Select(e => e.ToPsEndpoint()); - WriteVerbose(Resources.Success); - WriteObject(endpoints, true); - } - } - } -} diff --git a/src/Cdn/Cdn/Endpoint/GetAzureRmCdnEndpointNameAvailability.cs b/src/Cdn/Cdn/Endpoint/GetAzureRmCdnEndpointNameAvailability.cs deleted file mode 100644 index 937b5f006ed3..000000000000 --- a/src/Cdn/Cdn/Endpoint/GetAzureRmCdnEndpointNameAvailability.cs +++ /dev/null @@ -1,40 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; - -namespace Microsoft.Azure.Commands.Cdn.Endpoint -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnEndpointNameAvailability"), OutputType(typeof(PSCheckNameAvailabilityOutput))] - public class GetAzureRmCdnEndpointNameAvailability : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = "Proposed Azure CDN endpoint name to check.")] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - public override void ExecuteCmdlet() - { - var result = CdnManagementClient.CheckNameAvailability(EndpointName); - - WriteVerbose(Resources.Success); - WriteObject(result.ToPsCheckNameAvailabilityOutput()); - } - } -} diff --git a/src/Cdn/Cdn/Endpoint/GetAzureRmCdnEndpointResourceUsage.cs b/src/Cdn/Cdn/Endpoint/GetAzureRmCdnEndpointResourceUsage.cs deleted file mode 100644 index 38b31427e54b..000000000000 --- a/src/Cdn/Cdn/Endpoint/GetAzureRmCdnEndpointResourceUsage.cs +++ /dev/null @@ -1,64 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using System.Linq; -using Microsoft.Azure.Commands.Cdn.Models; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; - -namespace Microsoft.Azure.Commands.Cdn.Endpoint -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnEndpointResourceUsage", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSResourceUsage))] - public class GetAzureRmCdnEndpointResourceUsage : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = "Azure CDN endpoint name.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = false, HelpMessage = "Azure CDN endpoint name.", ParameterSetName = ObjectParameterSet)] - [CmdletParameterBreakingChange("EndpointName", ChangeDescription = "Parameter is being deprecated in ByObjectParameterSet without being replaced")] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN profile name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource group of the Azure CDN Profile.", ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = ObjectParameterSet, ValueFromPipeline = true, HelpMessage = "The CDN endpoint object.")] - [ValidateNotNull] - public PSEndpoint CdnEndpoint { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - ResourceGroupName = CdnEndpoint.ResourceGroupName; - ProfileName = CdnEndpoint.ProfileName; - EndpointName = CdnEndpoint.Name; - } - - var endpointUsages = CdnManagementClient.Endpoints.ListResourceUsage(ResourceGroupName, ProfileName, EndpointName).Select(r => r.ToPsResourceUsage()); - WriteVerbose(Resources.Success); - WriteObject(endpointUsages, true); - } - } -} diff --git a/src/Cdn/Cdn/Endpoint/NewAzCdnDdliveryRuleCondition.cs b/src/Cdn/Cdn/Endpoint/NewAzCdnDdliveryRuleCondition.cs deleted file mode 100644 index f0a5af964a88..000000000000 --- a/src/Cdn/Cdn/Endpoint/NewAzCdnDdliveryRuleCondition.cs +++ /dev/null @@ -1,75 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; -using System.Net; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Endpoint -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnDeliveryRuleCondition"), OutputType(typeof(PSDeliveryRuleCondition))] - public class NewAzCdnDeliveryRuleCondition : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = "Match variable of the condition.")] - [ValidateNotNullOrEmpty] - [PSArgumentCompleter("RemoteAddress", "RequestMethod", "QueryString", "PostArgs", "RequestUri", - "RequestHeader", "RequestBody", "RequestScheme", "UrlPath", "UrlFileExtension", "UrlFileName", "IsDevice", "Cookies", "HttpVersion")] - public string MatchVariable { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Describes operator to be matched")] - [ValidateNotNullOrEmpty] - [PSArgumentCompleter("Any", "IPMatch", "GeoMatch", "Equal", "Contains","LessThan", "GreaterThan", - "LessThanOrEqual", "GreaterThanOrEqual", "BeginsWith", "EndsWith", "Wildcard")] - public string Operator { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Name of Selector to be matched")] - public string Selector { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "List of possible match values.")] - public string[] MatchValue { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Transform to apply before matching. Possible values are Lowercase and Uppercase")] - [PSArgumentCompleter("Uppercase", "Lowercase")] - public string Transform { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Describes if the result of this condition should be negated.")] - public SwitchParameter NegateCondition { get; set; } - - public override void ExecuteCmdlet() - { - var deliveryRuleCondition = new PSDeliveryRuleCondition - { - MatchVariable = MatchVariable, - Operator = Operator, - Selector = Selector, - MatchValue = MatchValue, - NegateCondition = NegateCondition, - Transfroms = Transform == null? null : new List { Transform } - }; - - deliveryRuleCondition.ValidateDeliveryRuleCondition(); - WriteObject(deliveryRuleCondition); - } - } -} diff --git a/src/Cdn/Cdn/Endpoint/NewAzCdnDeliveryPolicy.cs b/src/Cdn/Cdn/Endpoint/NewAzCdnDeliveryPolicy.cs deleted file mode 100644 index b983e9e75642..000000000000 --- a/src/Cdn/Cdn/Endpoint/NewAzCdnDeliveryPolicy.cs +++ /dev/null @@ -1,60 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; -using System.Net; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Endpoint -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnDeliveryRule"), OutputType(typeof(PSDeliveryRule))] - public class NewAzCdnDeliveryRule : AzureCdnCmdletBase - { - [Parameter(Mandatory = false, HelpMessage = "Name of the rule")] - public string Name { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Order of the rule")] - public int Order { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "A list of conditions that must be matched for the actions to be executed.")] - public PSDeliveryRuleCondition[] Condition { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "A list of actions that are executed when all the conditions of a rule are satisfied.")] - [ValidateNotNullOrEmpty] - public PSDeliveryRuleAction[] Action { get; set; } - - public override void ExecuteCmdlet() - { - var deliveryRule = new PSDeliveryRule - { - Name = Name, - Order = Order, - Conditions = Condition, - Actions = Action - }; - - WriteObject(deliveryRule); - } - } -} diff --git a/src/Cdn/Cdn/Endpoint/NewAzCdnDeliveryRule.cs b/src/Cdn/Cdn/Endpoint/NewAzCdnDeliveryRule.cs deleted file mode 100644 index a3a786e8ba61..000000000000 --- a/src/Cdn/Cdn/Endpoint/NewAzCdnDeliveryRule.cs +++ /dev/null @@ -1,51 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; -using System.Net; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Endpoint -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnDeliveryPolicy"), OutputType(typeof(PSDeliveryPolicy))] - public class NewAzCdnDeliveryPolicy : AzureCdnCmdletBase - { - [Parameter(Mandatory = false, HelpMessage = "Description of the policy")] - public string Description { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "A list of deliveryRules.")] - public PSDeliveryRule[] Rule { get; set; } - - public override void ExecuteCmdlet() - { - var deliveryPolicy = new PSDeliveryPolicy - { - Description = Description, - Rules = Rule - }; - - WriteObject(deliveryPolicy); - } - } -} diff --git a/src/Cdn/Cdn/Endpoint/NewAzCdnDeliveryRuleAction.cs b/src/Cdn/Cdn/Endpoint/NewAzCdnDeliveryRuleAction.cs deleted file mode 100644 index 00780db61252..000000000000 --- a/src/Cdn/Cdn/Endpoint/NewAzCdnDeliveryRuleAction.cs +++ /dev/null @@ -1,172 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; -using System.Net; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Endpoint -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnDeliveryRuleAction", DefaultParameterSetName = CacheExpirationActionParameterSet), OutputType(typeof(PSDeliveryRuleAction))] - public class NewAzCdnDeliveryRuleAction : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = "Caching behavior for the action", ParameterSetName = CacheExpirationActionParameterSet)] - [PSArgumentCompleter("BypassCache", "SetIfMissing", "Override")] - [ValidateNotNullOrEmpty] - public string CacheBehavior { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss", ParameterSetName = CacheExpirationActionParameterSet)] - [PSArgumentCompleter("[d.]hh:mm:ss")] - [ValidateNotNullOrEmpty] - public string CacheDuration { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Whether to modify request header or response header", ParameterSetName = HeaderActionParameterSet)] - [PSArgumentCompleter("ModifyRequestHeader", "ModifyResponseHeader")] - public string HeaderActionType { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Action to perform.", ParameterSetName = HeaderActionParameterSet)] - [PSArgumentCompleter("Append", "Overwrite", "Delete")] - [ValidateNotNullOrEmpty] - public string Action { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Name of the header to modify.", ParameterSetName = HeaderActionParameterSet)] - [ValidateNotNullOrEmpty] - public string HeaderName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Value for the specified action.", ParameterSetName = HeaderActionParameterSet)] - [ValidateNotNullOrEmpty] - public string Value { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The redirect type the rule will use when redirecting traffic", ParameterSetName = UrlRedirectActionParameterSet)] - [PSArgumentCompleter("Moved", "Found", "TemporaryRedirect", "PermanentRedirect")] - public string RedirectType { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Protocol to use for the redirect. The default value is MatchRequest.", ParameterSetName = UrlRedirectActionParameterSet)] - [PSArgumentCompleter("MatchRequest", "Http", "Https")] - [ValidateNotNullOrEmpty] - public string DestinationProtocol { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path.", ParameterSetName = UrlRedirectActionParameterSet)] - [ValidateNotNullOrEmpty] - public string CustomPath { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Host to redirect. Leave empty to use the incoming host as the destination host.", ParameterSetName = UrlRedirectActionParameterSet)] - [ValidateNotNullOrEmpty] - public string CustomHostname { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query string. Query string must be in = format. ? and & will be added automatically so do not include them.", ParameterSetName = UrlRedirectActionParameterSet)] - [ValidateNotNullOrEmpty] - public string CustomQueryString { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #.", ParameterSetName = UrlRedirectActionParameterSet)] - [ValidateNotNullOrEmpty] - public string CustomFragment { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "QueryString behavior for the requests", ParameterSetName = CacheKeyQueryStringActionParameterSet)] - [PSArgumentCompleter("Include", "IncludeAll", "Exclude", "ExcludeAll")] - [ValidateNotNullOrEmpty] - public string QueryStringBehavior { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Query parameters to include or exclude (comma separated).", ParameterSetName = CacheKeyQueryStringActionParameterSet)] - public string[] QueryParameter { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched.", ParameterSetName = UrlRewriteActionParameterSet)] - public string SourcePattern { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Define the relative URL to which the above requests will be rewritten by.", ParameterSetName = UrlRewriteActionParameterSet)] - public string Destination { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Whether to preserve unmatched path.", ParameterSetName = UrlRewriteActionParameterSet)] - public SwitchParameter PreservePath { get; set; } - - public override void ExecuteCmdlet() - { - PSDeliveryRuleAction deliveryRuleAction; - if (ParameterSetName == CacheExpirationActionParameterSet) - { - deliveryRuleAction = new PSDeliveryRuleCacheExpirationAction - { - Parameters = new PSCacheExpirationActionParameters - { - CacheBehavior = CacheBehavior, - CacheDuration = CacheDuration - } - }; - } - else if (ParameterSetName == HeaderActionParameterSet) - { - deliveryRuleAction = new PSDeliveryRuleHeaderAction - { - HeaderActionType = HeaderActionType, - Action = Action, - HeaderName = HeaderName, - Value = Value - }; - } - else if (ParameterSetName == UrlRedirectActionParameterSet) - { - deliveryRuleAction = new PSDeliveryRuleUrlRedirectAction - { - RedirectType = RedirectType, - DestinationProtocol = DestinationProtocol, - CustomPath = CustomPath, - CustomHostname = CustomHostname, - CustomQueryString = CustomQueryString, - CustomFragment = CustomFragment - }; - } - else if (ParameterSetName == CacheKeyQueryStringActionParameterSet) - { - if ((QueryStringBehavior == "Exclude" || QueryStringBehavior == "Include") && QueryParameter == null) - { - throw new PSArgumentException("QueryParameter cannot be empty when QueryStringBehavior is {0}", QueryStringBehavior); - } - else if (QueryStringBehavior == "ExcludeAll" || QueryStringBehavior == "IncludeAll") - { - QueryParameter = null; - } - - deliveryRuleAction = new PSDeliveryRuleCacheKeyQueryStringAction - { - QueryStringBehavior = QueryStringBehavior, - QueryParameter = QueryParameter == null? string.Empty : string.Join(",", QueryParameter) - }; - } - else if (ParameterSetName == UrlRewriteActionParameterSet) - { - deliveryRuleAction = new PSDeliveryRuleUrlRewriteAction - { - SourcePattern = SourcePattern, - Destination = Destination, - PreservePath = PreservePath - }; - } - else - { - deliveryRuleAction = new PSDeliveryRuleAction(); - } - WriteObject(deliveryRuleAction); - } - } -} diff --git a/src/Cdn/Cdn/Endpoint/NewAzureRmCdnEndpoint.cs b/src/Cdn/Cdn/Endpoint/NewAzureRmCdnEndpoint.cs deleted file mode 100644 index fe6167c3da33..000000000000 --- a/src/Cdn/Cdn/Endpoint/NewAzureRmCdnEndpoint.cs +++ /dev/null @@ -1,291 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; -using System.Net; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Commands.Cdn.Models.Profile; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Endpoint -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnEndpoint", SupportsShouldProcess = true, DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSEndpoint))] - public class NewAzureRmCdnEndpoint : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = "Azure CDN endpoint name.")] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN profile name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource group of the Azure CDN Profile.", ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "Azure CDN profile object.", ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSProfile CdnProfile { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The location of the CDN endpoint.", ParameterSetName = FieldsParameterSet)] - [LocationCompleter("Microsoft.Cdn/profiles/endpoints")] - [ValidateNotNullOrEmpty] - public string Location { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The origin host header of the Azure CDN endpoint.")] - public string OriginHostHeader { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The origin path Azure CDN endpoint.")] - public string OriginPath { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The list of MIME types that need to be compressed by CDN edge nodes.")] - public string[] ContentTypesToCompress { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Indiciates if compression should be enabled for this endpoint.")] - public bool? IsCompressionEnabled { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Indicates if HTTP should be enabled for this endpoint.")] - public bool? IsHttpAllowed { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Indicates if HTTPS should be enabled for this endpoint.")] - public bool? IsHttpsAllowed { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Determines caching behavior for requests with query string. Valid values are IgnoreQueryString, BypassCaching, and UseQueryString.")] - public PSQueryStringCachingBehavior? QueryStringCachingBehavior { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The name of the origin. For display only.")] - public string OriginName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The host name (address) of the origin.")] - public string OriginHostName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The port used for HTTP traffic on the origin server.")] - public int? HttpPort { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The port used for HTTPS traffic on the origin server.")] - public int? HttpsPort { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Specifies any optimization this endpoint has.")] - public string OptimizationType { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Specifies the probe path for Dynamic Site Acceleration")] - public string ProbePath { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The list of geo filters that applies to this endpoint.")] - public PSGeoFilter[] GeoFilters { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The delivery policy for this endpoint.")] - public PSDeliveryPolicy DeliveryPolicy { get; set; } - - [Parameter(Mandatory = false, - HelpMessage = "The tags to associate with the Azure CDN endpoint.")] - public Hashtable Tag { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The default origin group.")] - [ValidateNotNullOrEmpty] - public string DefaultOriginGroup { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Azure CDN origin priority.")] - [ValidateNotNullOrEmpty] - public int? Priority { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Azure CDN origin weight.")] - [ValidateNotNullOrEmpty] - public int? Weight { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "A custom message to be included in the approval request to connect to the Private Link.")] - [ValidateNotNullOrEmpty] - public string PrivateLinkApprovalMessage { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Azure CDN origin private link location.")] - [ValidateNotNullOrEmpty] - public string PrivateLinkLocation { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Azure CDN origin private link resource id.")] - [ValidateNotNullOrEmpty] - public string PrivateLinkResourceId { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Azure CDN origin group ids.")] - [ValidateNotNullOrEmpty] - public List OriginId { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The name of the origin group.")] - public string OriginGroupName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The number of seconds between health probes.")] - [ValidateNotNullOrEmpty] - public int OriginGroupProbeIntervalInSeconds { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The path relative to the origin that is used to determine the health of the origin.")] - [ValidateNotNullOrEmpty] - public string OriginGroupProbePath { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Protocol to use for health probe.")] - [ValidateNotNullOrEmpty] - [PSArgumentCompleter("Http", "Https")] - public string OriginGroupProbeProtocol { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The type of health probe request that is made.")] - [ValidateNotNullOrEmpty] - [PSArgumentCompleter("GET", "HEAD")] - public string OriginGroupProbeRequestType { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - ProfileName = CdnProfile.Name; - ResourceGroupName = CdnProfile.ResourceGroupName; - Location = CdnProfile.Location; - } - - var checkExists = CdnManagementClient.CheckNameAvailability(EndpointName); - - if (!checkExists.NameAvailable.Value) - { - throw new PSArgumentException(string.Format( - Resources.Error_CreateExistingEndpoint, - EndpointName)); - } - - ConfirmAction(MyInvocation.InvocationName, - EndpointName, - () => NewEndpoint()); - - } - - private void NewEndpoint() - { - try - { - Management.Cdn.Models.Endpoint endpoint = new Management.Cdn.Models.Endpoint(); - endpoint.ContentTypesToCompress = ContentTypesToCompress; - endpoint.IsCompressionEnabled = IsCompressionEnabled; - endpoint.IsHttpAllowed = IsHttpAllowed; - endpoint.IsHttpsAllowed = IsHttpsAllowed; - endpoint.Location = Location; - endpoint.OriginHostHeader = OriginHostHeader; - endpoint.OriginPath = OriginPath; - endpoint.OptimizationType = OptimizationType; - endpoint.ProbePath = ProbePath; - endpoint.DeliveryPolicy = DeliveryPolicy?.ToSdkDeliveryPolicy(); - endpoint.GeoFilters = GeoFilters?.Select(g => g.ToSdkGeoFilter()).ToList(); - endpoint.Tags = Tag.ToDictionaryTags(); - - endpoint.Origins = new List(); - endpoint.Origins.Add(CreateOrigin()); - - if (!String.IsNullOrWhiteSpace(OriginGroupName)) - { - endpoint.OriginGroups = new List(); - endpoint.OriginGroups.Add(CreateOriginGroup()); - } - - if (QueryStringCachingBehavior != null) - { - endpoint.QueryStringCachingBehavior = QueryStringCachingBehavior.Value.CastEnum(); - } - else - { - endpoint.QueryStringCachingBehavior = (QueryStringCachingBehavior?)null; - } - - if(!String.IsNullOrWhiteSpace(DefaultOriginGroup)) - { - endpoint.DefaultOriginGroup = new ResourceReference(DefaultOriginGroup); - } - - - var createdEndpoint = CdnManagementClient.Endpoints.Create(ResourceGroupName, ProfileName, EndpointName, endpoint); - - WriteVerbose(Resources.Success); - WriteObject(createdEndpoint.ToPsEndpoint()); - } - catch (ErrorResponseException e) - { - throw new PSArgumentException(string.Format("Error response received.Error Message: '{0}'", - e.Response.Content)); - } - } - - private DeepCreatedOrigin CreateOrigin() - { - DeepCreatedOrigin origin = new DeepCreatedOrigin(); - origin.Name = OriginName; - origin.HostName = OriginHostName; - origin.HttpPort = HttpPort; - origin.HttpsPort = HttpsPort; - origin.Priority = Priority; - origin.Weight = Weight; - origin.PrivateLinkApprovalMessage = PrivateLinkApprovalMessage; - origin.PrivateLinkLocation = PrivateLinkLocation; - origin.PrivateLinkResourceId = PrivateLinkResourceId; - - return origin; - } - - private DeepCreatedOriginGroup CreateOriginGroup() - { - DeepCreatedOriginGroup originGroup = new DeepCreatedOriginGroup(); - - originGroup.Name = OriginGroupName; - - originGroup.Origins = new List(); - - if (OriginId != null) - { - // OriginId refers to the list of origin ids, needed to be singular name per PS guidelines - foreach (string originId in OriginId) - { - ResourceReference originIdResourceReference = new ResourceReference(originId); - originGroup.Origins.Add(originIdResourceReference); - } - } - - bool isProbeIntervalInSecondsNotZero = OriginGroupProbeIntervalInSeconds != 0 ? true : false; - - if (isProbeIntervalInSecondsNotZero || !String.IsNullOrWhiteSpace(OriginGroupProbePath) || !String.IsNullOrWhiteSpace(OriginGroupProbeProtocol) || !String.IsNullOrWhiteSpace(OriginGroupProbeRequestType)) - { - int probeIntervalCopy = OriginGroupProbeIntervalInSeconds; - - // when probe interval is 0 or not specified, set the probe interval to the default value - if (!isProbeIntervalInSecondsNotZero) - { - probeIntervalCopy = 240; - } - - originGroup.HealthProbeSettings = new HealthProbeParameters - { - ProbeIntervalInSeconds = probeIntervalCopy, - ProbePath = OriginGroupProbePath, - ProbeProtocol = OriginGroupUtilities.NormalizeProbeProtocol(OriginGroupProbeProtocol), - ProbeRequestType = OriginGroupUtilities.NormalizeProbeRequestType(OriginGroupProbeRequestType) - }; - } - - return originGroup; - } - } -} diff --git a/src/Cdn/Cdn/Endpoint/PublishAzureRmCdnEndpointContent.cs b/src/Cdn/Cdn/Endpoint/PublishAzureRmCdnEndpointContent.cs deleted file mode 100644 index 78eddc178c76..000000000000 --- a/src/Cdn/Cdn/Endpoint/PublishAzureRmCdnEndpointContent.cs +++ /dev/null @@ -1,69 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Endpoint -{ - [Cmdlet("Publish", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnEndpointContent", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(bool))] - public class PublishAzureRmCdnEndpointContent : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN endpoint name.")] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN profile name.")] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "The resource group of the Azure CDN profile.")] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The Azure CDN endpoint.", ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSEndpoint CdnEndpoint { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource group of the Azure CDN profile.")] - [ValidateCount(Constants.PurgeLoadMinimumCollectionCount, Constants.PurgeLoadMaximumCollectionCount)] - public string[] LoadContent { get; set; } - - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Return object (if specified).")] - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - ResourceGroupName = CdnEndpoint.ResourceGroupName; - ProfileName = CdnEndpoint.ProfileName; - EndpointName = CdnEndpoint.Name; - } - - CdnManagementClient.Endpoints.LoadContent(ResourceGroupName, ProfileName, EndpointName, LoadContent); - WriteVerbose(Resources.Success); - - if (PassThru) - { - WriteObject(true); - } - } - } -} diff --git a/src/Cdn/Cdn/Endpoint/RemoveAzureRmCdnEndnpoint.cs b/src/Cdn/Cdn/Endpoint/RemoveAzureRmCdnEndnpoint.cs deleted file mode 100644 index 4833c4dfe18a..000000000000 --- a/src/Cdn/Cdn/Endpoint/RemoveAzureRmCdnEndnpoint.cs +++ /dev/null @@ -1,89 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Management.Automation; -using System.Net; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using System.Linq; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Endpoint -{ - [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnEndpoint", SupportsShouldProcess = true), OutputType(typeof(bool))] - public class RemoveAzureCdnEndpoint : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN endpoint name.")] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN profile name.")] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "The resource group of the Azure CDN profile")] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = ObjectParameterSet, ValueFromPipeline = true, HelpMessage = "The CDN endpoint object.")] - [ValidateNotNull] - public PSEndpoint CdnEndpoint { get; set; } - - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Return object (if specified).")] - public SwitchParameter PassThru { get; set; } - - [Parameter()] - public SwitchParameter Force { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - ResourceGroupName = CdnEndpoint.ResourceGroupName; - ProfileName = CdnEndpoint.ProfileName; - EndpointName = CdnEndpoint.Name; - } - - var existingEndpoint = CdnManagementClient.Endpoints - .ListByProfile(ResourceGroupName, ProfileName) - .FirstOrDefault(e => e.Name.ToLower() == EndpointName.ToLower()); - - if(existingEndpoint == null) - { - throw new PSArgumentException(string.Format( - Resources.Error_DeleteNonExistingEndpoint, - EndpointName, - ProfileName, - ResourceGroupName)); - } - - ConfirmAction(Force, - string.Format(Resources.Confirm_RemoveEndpoint, EndpointName, ProfileName, ResourceGroupName), - this.MyInvocation.InvocationName, - EndpointName, - () => CdnManagementClient.Endpoints.Delete(ResourceGroupName, ProfileName, EndpointName)); - - if (PassThru) - { - WriteObject(true); - } - } - - } -} diff --git a/src/Cdn/Cdn/Endpoint/SetAzureRmCdnEndpoint.cs b/src/Cdn/Cdn/Endpoint/SetAzureRmCdnEndpoint.cs deleted file mode 100644 index 8c4cb27ab81f..000000000000 --- a/src/Cdn/Cdn/Endpoint/SetAzureRmCdnEndpoint.cs +++ /dev/null @@ -1,75 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Linq; -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; - -namespace Microsoft.Azure.Commands.Cdn.Endpoint -{ - [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnEndpoint", SupportsShouldProcess = true), OutputType(typeof(PSEndpoint))] - public class SetAzureRmCdnEndpoint : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The CDN endpoint object.")] - [ValidateNotNull] - public PSEndpoint CdnEndpoint { get; set; } - - public override void ExecuteCmdlet() - { - ConfirmAction(MyInvocation.InvocationName, - CdnEndpoint.Name, - SetEndpoint); - } - - private void SetEndpoint() - { - var resourceGroupName = CdnEndpoint.ResourceGroupName; - var profileName = CdnEndpoint.ProfileName; - - try - { - EndpointUpdateParameters updatedEndpoint = new EndpointUpdateParameters(); - updatedEndpoint.Tags = CdnEndpoint.Tags.ToDictionaryTags(); - updatedEndpoint.OriginPath = CdnEndpoint.OriginPath; - updatedEndpoint.ContentTypesToCompress = CdnEndpoint.ContentTypesToCompress.ToList(); - updatedEndpoint.OriginHostHeader = CdnEndpoint.OriginHostHeader; - updatedEndpoint.IsCompressionEnabled = CdnEndpoint.IsCompressionEnabled; - updatedEndpoint.IsHttpAllowed = CdnEndpoint.IsHttpAllowed; - updatedEndpoint.IsHttpsAllowed = CdnEndpoint.IsHttpsAllowed; - updatedEndpoint.QueryStringCachingBehavior = (QueryStringCachingBehavior)Enum.Parse(typeof(QueryStringCachingBehavior), CdnEndpoint.QueryStringCachingBehavior.ToString()); - updatedEndpoint.OptimizationType = CdnEndpoint.OptimizationType; - updatedEndpoint.ProbePath = CdnEndpoint.ProbePath; - updatedEndpoint.GeoFilters = CdnEndpoint.GeoFilters.Select(g => g.ToSdkGeoFilter()).ToList(); - updatedEndpoint.DeliveryPolicy = CdnEndpoint.DeliveryPolicy?.ToSdkDeliveryPolicy(); - updatedEndpoint.DefaultOriginGroup = CdnEndpoint.DefaultOriginGroup; - - var endpoint = CdnManagementClient.Endpoints.Update(resourceGroupName, profileName, CdnEndpoint.Name, updatedEndpoint); - - WriteVerbose(Resources.Success); - WriteObject(endpoint.ToPsEndpoint()); - } - catch (ErrorResponseException e) - { - throw new PSArgumentException(string.Format("Error response received.Error Message: '{0}'", - e.Response.Content)); - } - } - } -} diff --git a/src/Cdn/Cdn/Endpoint/StartAzureRmCdnEndpoint.cs b/src/Cdn/Cdn/Endpoint/StartAzureRmCdnEndpoint.cs deleted file mode 100644 index 34ed0b0759c5..000000000000 --- a/src/Cdn/Cdn/Endpoint/StartAzureRmCdnEndpoint.cs +++ /dev/null @@ -1,69 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Endpoint -{ - [Cmdlet("Start", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnEndpoint", DefaultParameterSetName = FieldsParameterSet, SupportsShouldProcess = true), OutputType(typeof(bool))] - public class StartAzureRmCdnEndpoint : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN endpoint name.")] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN profile name.")] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "The resource group of the Azure CDN profile.")] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = ObjectParameterSet, ValueFromPipeline = true, HelpMessage = "The Azure CDN endpoint.")] - [ValidateNotNull] - public PSEndpoint CdnEndpoint { get; set; } - - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Return object (if specified).")] - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - ResourceGroupName = CdnEndpoint.ResourceGroupName; - ProfileName = CdnEndpoint.ProfileName; - EndpointName = CdnEndpoint.Name; - } - - ConfirmAction(MyInvocation.InvocationName, - EndpointName, - () => CdnManagementClient.Endpoints.Start(ResourceGroupName, ProfileName, EndpointName)); - - WriteVerbose(Resources.Success); - WriteVerbose(string.Format(Resources.Success_StartEndpoint, EndpointName, ProfileName, ResourceGroupName)); - - if (PassThru) - { - WriteObject(true); - } - } - } -} diff --git a/src/Cdn/Cdn/Endpoint/StopAzureRmCdnEndpoint.cs b/src/Cdn/Cdn/Endpoint/StopAzureRmCdnEndpoint.cs deleted file mode 100644 index 5fec2bc63d06..000000000000 --- a/src/Cdn/Cdn/Endpoint/StopAzureRmCdnEndpoint.cs +++ /dev/null @@ -1,66 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Endpoint -{ - [Cmdlet("Stop", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnEndpoint", SupportsShouldProcess = true, DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(bool))] - public class StopAzureRmCdnEndpoint : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN endpoint name.")] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN profile name.")] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "The resource group of the Azure CDN profile")] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = ObjectParameterSet, ValueFromPipeline = true, HelpMessage = "The CDN endpoint object.")] - [ValidateNotNull] - public PSEndpoint CdnEndpoint { get; set; } - - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Return object (if specified).")] - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - ResourceGroupName = CdnEndpoint.ResourceGroupName; - ProfileName = CdnEndpoint.ProfileName; - EndpointName = CdnEndpoint.Name; - } - - ConfirmAction(MyInvocation.InvocationName, - EndpointName, - () => CdnManagementClient.Endpoints.Stop(ResourceGroupName, ProfileName, EndpointName)); - - if (PassThru) - { - WriteObject(true); - } - } - } -} diff --git a/src/Cdn/Cdn/Endpoint/TestAzureRmCdnCustomDomain.cs b/src/Cdn/Cdn/Endpoint/TestAzureRmCdnCustomDomain.cs deleted file mode 100644 index 05308cbc0a66..000000000000 --- a/src/Cdn/Cdn/Endpoint/TestAzureRmCdnCustomDomain.cs +++ /dev/null @@ -1,70 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Endpoint -{ - [Cmdlet("Test", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnCustomDomain", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSValidateCustomDomainOutput))] - [Alias("Validate-" + ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnCustomDomain")] - public class TestAzureRmCdnCustomDomain : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN endpoint name.")] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN profile name.")] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "The resource group of the Azure CDN profile")] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = ObjectParameterSet, ValueFromPipeline = true, HelpMessage = "The CDN endpoint object.")] - [ValidateNotNull] - public PSEndpoint CdnEndpoint { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource group of the Azure CDN profile")] - [ValidateNotNullOrEmpty] - public string CustomDomainHostName { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - ResourceGroupName = CdnEndpoint.ResourceGroupName; - ProfileName = CdnEndpoint.ProfileName; - EndpointName = CdnEndpoint.Name; - } - - var validateCustomDomainOutput = CdnManagementClient.Endpoints.ValidateCustomDomain( - ResourceGroupName, - ProfileName, - EndpointName, - CustomDomainHostName); - - WriteVerbose(Resources.Success); - WriteVerbose(string.Format(Resources.Success_StopEndpoint, EndpointName, ProfileName, ResourceGroupName)); - WriteObject(validateCustomDomainOutput.ToPsValidateCustomDomainOutput()); - } - } -} diff --git a/src/Cdn/Cdn/Endpoint/UnpublishAzureRmCdnEndpointContent.cs b/src/Cdn/Cdn/Endpoint/UnpublishAzureRmCdnEndpointContent.cs deleted file mode 100644 index 3a8c0d8ccfcd..000000000000 --- a/src/Cdn/Cdn/Endpoint/UnpublishAzureRmCdnEndpointContent.cs +++ /dev/null @@ -1,72 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Endpoint -{ - [Cmdlet("Unpublish", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnEndpointContent", SupportsShouldProcess = true, DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(bool))] - public class UnpublishAzureRmCdnEndpointContent : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN endpoint name.")] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "Azure CDN profile name.")] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "The resource group of the Azure CDN profile")] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The CDN endpoint object.", ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSEndpoint CdnEndpoint { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource group of the Azure CDN profile")] - [ValidateCount(Constants.PurgeLoadMinimumCollectionCount, Constants.PurgeLoadMaximumCollectionCount)] - public string[] PurgeContent { get; set; } - - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Return object (if specified).")] - public SwitchParameter PassThru { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - ResourceGroupName = CdnEndpoint.ResourceGroupName; - ProfileName = CdnEndpoint.ProfileName; - EndpointName = CdnEndpoint.Name; - } - - ConfirmAction(MyInvocation.InvocationName, - EndpointName, - () => CdnManagementClient.Endpoints.PurgeContent(ResourceGroupName, ProfileName, EndpointName, PurgeContent)); - - WriteVerbose(Resources.Success); - - if (PassThru) - { - WriteObject(true); - } - } - } -} diff --git a/src/Cdn/Cdn/Helpers/CdnMessageHelper.cs b/src/Cdn/Cdn/Helpers/CdnMessageHelper.cs deleted file mode 100644 index 1d17aabf8ac3..000000000000 --- a/src/Cdn/Cdn/Helpers/CdnMessageHelper.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; - -using System; -using System.Collections.Generic; -using System.Management.Automation; -using System.Text; - -namespace Microsoft.Azure.Commands.Cdn.Helpers -{ - internal static class CdnMessageHelper - { - private const string SuppressEnvVar = BreakingChangeAttributeHelper.SUPPRESS_ERROR_OR_WARNING_MESSAGE_ENV_VARIABLE_NAME; - - private static bool IsMessageSuppressed => - bool.TryParse(Environment.GetEnvironmentVariable(SuppressEnvVar), out bool result) && result; - - internal static void WriteMessage(Cmdlet cmdlet, string message) - { - if (!IsMessageSuppressed) - { - cmdlet.WriteWarning(message); - } - } - } -} diff --git a/src/Cdn/Cdn/Helpers/ModelExtensions.cs b/src/Cdn/Cdn/Helpers/ModelExtensions.cs deleted file mode 100644 index bdfbc1b6105f..000000000000 --- a/src/Cdn/Cdn/Helpers/ModelExtensions.cs +++ /dev/null @@ -1,943 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Security.Permissions; -using Microsoft.Azure.Commands.Cdn.Models; -using Microsoft.Azure.Commands.Cdn.Models.CustomDomain; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.Cdn.Models.Origin; -using Microsoft.Azure.Commands.Cdn.Models.Profile; -using Microsoft.Azure.Commands.Cdn.Models.OriginGroup; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using SdkProfile = Microsoft.Azure.Management.Cdn.Models.Profile; -using SdkSkuName = Microsoft.Azure.Management.Cdn.Models.SkuName; -using SdkSku = Microsoft.Azure.Management.Cdn.Models.Sku; -using SdkProfileResourceState = Microsoft.Azure.Management.Cdn.Models.ProfileResourceState; -using SdkEndpointResourceState = Microsoft.Azure.Management.Cdn.Models.EndpointResourceState; -using SdkOriginResourceState = Microsoft.Azure.Management.Cdn.Models.OriginResourceState; -using SdkCustomDomainResourceState = Microsoft.Azure.Management.Cdn.Models.CustomDomainResourceState; -using SdkDeepCreatedOrigin = Microsoft.Azure.Management.Cdn.Models.DeepCreatedOrigin; -using SdkEndpoint = Microsoft.Azure.Management.Cdn.Models.Endpoint; -using SdkQueryStringCachingBehavior = Microsoft.Azure.Management.Cdn.Models.QueryStringCachingBehavior; -using SdkOrigin = Microsoft.Azure.Management.Cdn.Models.Origin; -using SdkOriginGroup = Microsoft.Azure.Management.Cdn.Models.OriginGroup; -using SdkCustomDomain = Microsoft.Azure.Management.Cdn.Models.CustomDomain; -using SdkGeoFilter = Microsoft.Azure.Management.Cdn.Models.GeoFilter; -using SdkGeoFilterAction = Microsoft.Azure.Management.Cdn.Models.GeoFilterActions; -using SdkDeliveryPolicy = Microsoft.Azure.Management.Cdn.Models.EndpointPropertiesUpdateParametersDeliveryPolicy; -using Microsoft.Azure.Commands.Cdn.EdgeNodes; -using System.Management.Automation; - -namespace Microsoft.Azure.Commands.Cdn.Helpers -{ - public static class ModelExtensions - { - public static TToEnum CastEnum(this TFromEnum fromEnum) - { - return (TToEnum)Enum.Parse(typeof(TToEnum), fromEnum.ToString()); - } - - public static SdkSku ToSdkSku(this PSSku psSku) - { - return new SdkSku(psSku.Name.ToString()); - } - - public static PSSku ToPsSku(this SdkSku sdkSku) - { - return new PSSku { Name = (PSSkuName)Enum.Parse(typeof(PSSkuName), sdkSku.Name) }; - } - - public static SdkProfile ToSdkProfile(this PSProfile psProfile) - { - return new SdkProfile( - psProfile.Location, - psProfile.Sku.ToSdkSku(), - psProfile.Id, - psProfile.Name, - psProfile.Type, - null, - psProfile.Tags.ToDictionaryTags(), - psProfile.ResourceState.ToString(), - psProfile.ProvisioningState.ToString()); - } - - public static SdkDeepCreatedOrigin ToSdkDeepCreatedOrigin(this PSDeepCreatedOrigin psDeepCreatedOrigin) - { - return new SdkDeepCreatedOrigin( - psDeepCreatedOrigin.Name, - psDeepCreatedOrigin.HostName, - psDeepCreatedOrigin.HttpPort, - psDeepCreatedOrigin.HttpsPort); - } - - public static PSDeepCreatedOrigin ToPsDeepCreatedOrigin(this SdkDeepCreatedOrigin sdkDeepCreatedOrigin) - { - return new PSDeepCreatedOrigin - { - Name = sdkDeepCreatedOrigin.Name, - HostName = sdkDeepCreatedOrigin.HostName, - HttpPort = sdkDeepCreatedOrigin.HttpPort, - HttpsPort = sdkDeepCreatedOrigin.HttpsPort - }; - } - - public static PSProfile ToPsProfile(this SdkProfile sdkProfile) - { - Debug.Assert(sdkProfile.ProvisioningState != null, "sdkProfile.ProvisioningState != null"); - Debug.Assert(sdkProfile.ResourceState != null, "sdkProfile.ResourceState != null"); - - return new PSProfile - { - Id = sdkProfile.Id, - Name = sdkProfile.Name, - Type = sdkProfile.Type, - ProvisioningState = (PSProvisioningState)Enum.Parse(typeof(PSProvisioningState), sdkProfile.ProvisioningState), - Tags = sdkProfile.Tags.ToHashTableTags(), - Location = sdkProfile.Location, - ResourceState = (PSProfileResourceState)Enum.Parse(typeof(PSProfileResourceState), sdkProfile.ResourceState), - - // Entity specific properties - Sku = sdkProfile.Sku.ToPsSku() - }; - } - - public static PSEndpoint ToPsEndpoint(this SdkEndpoint sdkEndpoint) - { - Debug.Assert(sdkEndpoint.ProvisioningState != null, "sdkEndpoint.ProvisioningState != null"); - Debug.Assert(sdkEndpoint.ResourceState != null, "sdkEndpoint.ResourceState != null"); - Debug.Assert(sdkEndpoint.IsCompressionEnabled != null, "sdkEndpoint.IsCompressionEnabled != null"); - Debug.Assert(sdkEndpoint.IsHttpAllowed != null, "sdkEndpoint.IsHttpAllowed != null"); - Debug.Assert(sdkEndpoint.IsHttpsAllowed != null, "sdkEndpoint.IsHttpsAllowed != null"); - Debug.Assert(sdkEndpoint.QueryStringCachingBehavior != null, "sdkEndpoint.QueryStringCachingBehavior != null"); - - return new PSEndpoint - { - Id = sdkEndpoint.Id, - Name = sdkEndpoint.Name, - Type = sdkEndpoint.Type, - ProvisioningState = (PSProvisioningState)Enum.Parse(typeof(PSProvisioningState), sdkEndpoint.ProvisioningState), - Tags = sdkEndpoint.Tags.ToHashTableTags(), - Location = sdkEndpoint.Location, - ResourceState = (PSEndpointResourceState)Enum.Parse(typeof(PSEndpointResourceState), sdkEndpoint.ResourceState), - - // Entity specific properties - HostName = sdkEndpoint.HostName, - OriginHostHeader = sdkEndpoint.OriginHostHeader, - OriginPath = sdkEndpoint.OriginPath, - ContentTypesToCompress = sdkEndpoint.ContentTypesToCompress.ToArray(), - IsCompressionEnabled = sdkEndpoint.IsCompressionEnabled.Value, - IsHttpAllowed = sdkEndpoint.IsHttpAllowed.Value, - IsHttpsAllowed = sdkEndpoint.IsHttpsAllowed.Value, - QueryStringCachingBehavior = sdkEndpoint.QueryStringCachingBehavior.Value.CastEnum(), - Origins = sdkEndpoint.Origins.Select(o => o.ToPsDeepCreatedOrigin()).ToList(), - OptimizationType = sdkEndpoint.OptimizationType, - ProbePath = sdkEndpoint.ProbePath, - GeoFilters = sdkEndpoint.GeoFilters.Select(ToPsGeoFilter).ToList(), - DeliveryPolicy = sdkEndpoint.DeliveryPolicy?.ToPsDeliveryPolicy(), - DefaultOriginGroup = sdkEndpoint.DefaultOriginGroup - }; - } - - public static PSGeoFilter ToPsGeoFilter(this SdkGeoFilter sdkGeoFilter) - { - Debug.Assert(sdkGeoFilter.RelativePath != null, "sdkGeoFilter.RelativePath != null"); - Debug.Assert(sdkGeoFilter.CountryCodes != null, "sdkGeoFilter.CountryCodes != null"); - - return new PSGeoFilter - { - RelativePath = sdkGeoFilter.RelativePath, - Action = (PSGeoFilterAction)Enum.Parse(typeof(PSGeoFilterAction), sdkGeoFilter.Action.ToString()), - CountryCodes = sdkGeoFilter.CountryCodes.ToArray() - }; - } - - public static PSDeliveryRuleAction ToPsDeliveryRuleAction(this DeliveryRuleAction deliveryRuleAction) - { - - if (deliveryRuleAction is DeliveryRuleRequestHeaderAction requestHeaderAction) - { - return new PSDeliveryRuleHeaderAction - { - HeaderActionType = "ModifyRequestHeader", - Action = requestHeaderAction.Parameters.HeaderAction, - HeaderName = requestHeaderAction.Parameters.HeaderName, - Value = requestHeaderAction.Parameters.Value - }; - } - else if (deliveryRuleAction is DeliveryRuleResponseHeaderAction responseHeaderAction) - { - return new PSDeliveryRuleHeaderAction - { - HeaderActionType = "ModifyResponseHeader", - Action = responseHeaderAction.Parameters.HeaderAction, - HeaderName = responseHeaderAction.Parameters.HeaderName, - Value = responseHeaderAction.Parameters.Value - }; - } - else if (deliveryRuleAction is DeliveryRuleCacheExpirationAction cacheExpirationAction) - { - return new PSDeliveryRuleCacheExpirationAction - { - Parameters = new PSCacheExpirationActionParameters - { - CacheBehavior = cacheExpirationAction.Parameters.CacheBehavior, - CacheDuration = cacheExpirationAction.Parameters.CacheDuration - } - }; - } - else if (deliveryRuleAction is UrlRedirectAction urlRedirectAction) - { - return new PSDeliveryRuleUrlRedirectAction - { - RedirectType = urlRedirectAction.Parameters.RedirectType, - DestinationProtocol = urlRedirectAction.Parameters.DestinationProtocol, - CustomHostname = urlRedirectAction.Parameters.CustomHostname, - CustomPath = urlRedirectAction.Parameters.CustomPath, - CustomFragment = urlRedirectAction.Parameters.CustomFragment, - CustomQueryString = urlRedirectAction.Parameters.CustomQueryString - }; - } - else if (deliveryRuleAction is UrlRewriteAction urlRewriteAction) - { - return new PSDeliveryRuleUrlRewriteAction - { - SourcePattern = urlRewriteAction.Parameters.SourcePattern, - Destination = urlRewriteAction.Parameters.Destination, - PreservePath = urlRewriteAction.Parameters.PreserveUnmatchedPath ?? true - }; - } - else if (deliveryRuleAction is DeliveryRuleCacheKeyQueryStringAction deliveryRuleCacheKeyQueryStringAction) - { - return new PSDeliveryRuleCacheKeyQueryStringAction - { - QueryStringBehavior = deliveryRuleCacheKeyQueryStringAction.Parameters.QueryStringBehavior, - QueryParameter = deliveryRuleCacheKeyQueryStringAction.Parameters.QueryParameters - }; - } - else - { - return new PSDeliveryRuleAction(); - } - } - - public static PSDeliveryRuleCondition ToPsDeliveryRuleCondition(this DeliveryRuleCondition deliveryRuleCondition) - { - if (deliveryRuleCondition is DeliveryRuleRemoteAddressCondition deliveryRuleRemoteAddressCondition) - { - return new PSDeliveryRuleCondition - { - MatchVariable = "RemoteAddress", - Operator = deliveryRuleRemoteAddressCondition.Parameters.OperatorProperty, - NegateCondition = deliveryRuleRemoteAddressCondition.Parameters.NegateCondition, - MatchValue = deliveryRuleRemoteAddressCondition.Parameters.MatchValues, - Transfroms = deliveryRuleRemoteAddressCondition.Parameters.Transforms - }; - } - else if (deliveryRuleCondition is DeliveryRuleRequestMethodCondition deliveryRuleRequestMethodCondition) - { - return new PSDeliveryRuleCondition - { - MatchVariable = "RequestMethod", - Operator = "Equal", - NegateCondition = deliveryRuleRequestMethodCondition.Parameters.NegateCondition, - MatchValue = deliveryRuleRequestMethodCondition.Parameters.MatchValues - }; - } - else if (deliveryRuleCondition is DeliveryRuleQueryStringCondition deliveryRuleQueryStringCondition) - { - return new PSDeliveryRuleCondition - { - MatchVariable = "QueryString", - Operator = deliveryRuleQueryStringCondition.Parameters.OperatorProperty, - NegateCondition = deliveryRuleQueryStringCondition.Parameters.NegateCondition, - MatchValue = deliveryRuleQueryStringCondition.Parameters.MatchValues, - Transfroms = deliveryRuleQueryStringCondition.Parameters.Transforms - }; - } - else if (deliveryRuleCondition is DeliveryRulePostArgsCondition deliveryRulePostArgsCondition) - { - return new PSDeliveryRuleCondition - { - MatchVariable = "PostArgs", - Operator = deliveryRulePostArgsCondition.Parameters.OperatorProperty, - Selector = deliveryRulePostArgsCondition.Parameters.Selector, - NegateCondition = deliveryRulePostArgsCondition.Parameters.NegateCondition, - MatchValue = deliveryRulePostArgsCondition.Parameters.MatchValues, - Transfroms = deliveryRulePostArgsCondition.Parameters.Transforms - }; - } - else if (deliveryRuleCondition is DeliveryRuleRemoteAddressCondition deliveryRuleRequestUriCondition) - { - return new PSDeliveryRuleCondition - { - MatchVariable = "RequestUri", - Operator = deliveryRuleRequestUriCondition.Parameters.OperatorProperty, - NegateCondition = deliveryRuleRequestUriCondition.Parameters.NegateCondition, - MatchValue = deliveryRuleRequestUriCondition.Parameters.MatchValues, - Transfroms = deliveryRuleRequestUriCondition.Parameters.Transforms - }; - } - else if (deliveryRuleCondition is DeliveryRuleRequestHeaderCondition deliveryRuleRequestHeaderCondition) - { - return new PSDeliveryRuleCondition - { - MatchVariable = "RequestHeader", - Operator = deliveryRuleRequestHeaderCondition.Parameters.OperatorProperty, - NegateCondition = deliveryRuleRequestHeaderCondition.Parameters.NegateCondition, - Selector = deliveryRuleRequestHeaderCondition.Parameters.Selector, - MatchValue = deliveryRuleRequestHeaderCondition.Parameters.MatchValues, - Transfroms = deliveryRuleRequestHeaderCondition.Parameters.Transforms - }; - } - else if (deliveryRuleCondition is DeliveryRuleRequestBodyCondition deliveryRuleRequestBodyCondition) - { - return new PSDeliveryRuleCondition - { - MatchVariable = "RequestBody", - Operator = deliveryRuleRequestBodyCondition.Parameters.OperatorProperty, - NegateCondition = deliveryRuleRequestBodyCondition.Parameters.NegateCondition, - MatchValue = deliveryRuleRequestBodyCondition.Parameters.MatchValues, - Transfroms = deliveryRuleRequestBodyCondition.Parameters.Transforms - }; - } - else if (deliveryRuleCondition is DeliveryRuleRequestSchemeCondition deliveryRuleRequestSchemeCondition) - { - return new PSDeliveryRuleCondition - { - MatchVariable = "RequestScheme", - NegateCondition = deliveryRuleRequestSchemeCondition.Parameters.NegateCondition, - MatchValue = deliveryRuleRequestSchemeCondition.Parameters.MatchValues - }; - } - else if (deliveryRuleCondition is DeliveryRuleUrlPathCondition deliveryRuleUrlPathCondition) - { - return new PSDeliveryRuleCondition - { - MatchVariable = "UrlPath", - Operator = deliveryRuleUrlPathCondition.Parameters.OperatorProperty, - NegateCondition = deliveryRuleUrlPathCondition.Parameters.NegateCondition, - MatchValue = deliveryRuleUrlPathCondition.Parameters.MatchValues, - Transfroms = deliveryRuleUrlPathCondition.Parameters.Transforms - }; - } - else if (deliveryRuleCondition is DeliveryRuleUrlFileExtensionCondition deliveryRuleUrlFileExtensionCondition) - { - return new PSDeliveryRuleCondition - { - MatchVariable = "UrlFileExtension", - Operator = deliveryRuleUrlFileExtensionCondition.Parameters.OperatorProperty, - NegateCondition = deliveryRuleUrlFileExtensionCondition.Parameters.NegateCondition, - MatchValue = deliveryRuleUrlFileExtensionCondition.Parameters.MatchValues, - Transfroms = deliveryRuleUrlFileExtensionCondition.Parameters.Transforms - }; - } - else if (deliveryRuleCondition is DeliveryRuleUrlFileNameCondition deliveryRuleUrlFileNameCondition) - { - return new PSDeliveryRuleCondition - { - MatchVariable = "UrlFileName", - Operator = deliveryRuleUrlFileNameCondition.Parameters.OperatorProperty, - NegateCondition = deliveryRuleUrlFileNameCondition.Parameters.NegateCondition, - MatchValue = deliveryRuleUrlFileNameCondition.Parameters.MatchValues, - Transfroms = deliveryRuleUrlFileNameCondition.Parameters.Transforms - }; - } - else if (deliveryRuleCondition is DeliveryRuleIsDeviceCondition deliveryRuleIsDeviceCondition) - { - return new PSDeliveryRuleCondition - { - MatchVariable = "IsDevice", - NegateCondition = deliveryRuleIsDeviceCondition.Parameters.NegateCondition, - MatchValue = deliveryRuleIsDeviceCondition.Parameters.MatchValues - }; - } - else if (deliveryRuleCondition is DeliveryRuleHttpVersionCondition deliveryRuleHttpVersionCondition) - { - return new PSDeliveryRuleCondition - { - MatchVariable = "HttpVersion", - NegateCondition = deliveryRuleHttpVersionCondition.Parameters.NegateCondition, - MatchValue = deliveryRuleHttpVersionCondition.Parameters.MatchValues - }; - } - else if (deliveryRuleCondition is DeliveryRuleCookiesCondition deliveryRuleCookiesCondition) - { - return new PSDeliveryRuleCondition - { - MatchVariable = "Cookies", - NegateCondition = deliveryRuleCookiesCondition.Parameters.NegateCondition, - Selector = deliveryRuleCookiesCondition.Parameters.Selector, - MatchValue = deliveryRuleCookiesCondition.Parameters.MatchValues, - Transfroms = deliveryRuleCookiesCondition.Parameters.Transforms - }; - } - else - { - return new PSDeliveryRuleCondition(); - } - } - - public static PSDeliveryRule ToPsDeliveryRule(this DeliveryRule deliveryRule) - { - - return new PSDeliveryRule - { - Name = deliveryRule.Name, - Order = deliveryRule.Order, - Actions = deliveryRule.Actions.Select(action => action.ToPsDeliveryRuleAction()).ToList(), - Conditions = deliveryRule.Conditions.Select(condition => condition.ToPsDeliveryRuleCondition()).ToList() - }; - } - - public static PSDeliveryPolicy ToPsDeliveryPolicy(this SdkDeliveryPolicy sdkDeliveryPolicy) - { - Debug.Assert(sdkDeliveryPolicy.Rules != null, "sdkDeliveryPolicy.Rules != null"); - - return new PSDeliveryPolicy - { - Description = sdkDeliveryPolicy.Description, - Rules = sdkDeliveryPolicy.Rules.Select(rule => rule.ToPsDeliveryRule()).ToList() - }; - } - - - public static SdkGeoFilter ToSdkGeoFilter(this PSGeoFilter psGeoFilter) - { - Debug.Assert(psGeoFilter.RelativePath != null, "psGeoFilter.RelativePath != null"); - Debug.Assert(psGeoFilter.CountryCodes != null, "psGeoFilter.CountryCodes != null"); - - return new SdkGeoFilter - { - RelativePath = psGeoFilter.RelativePath, - Action = (SdkGeoFilterAction)Enum.Parse(typeof(SdkGeoFilterAction), psGeoFilter.Action.ToString()), - CountryCodes = psGeoFilter.CountryCodes.ToList() - }; - } - - public static DeliveryRuleCondition ToDeliveryRuleCondition( - this PSDeliveryRuleCondition psDeliveryRuleCondition) - { - switch (psDeliveryRuleCondition.MatchVariable) - { - case "RemoteAddress": - return new DeliveryRuleRemoteAddressCondition - { - Parameters = new RemoteAddressMatchConditionParameters - { - OperatorProperty = psDeliveryRuleCondition.Operator, - MatchValues = psDeliveryRuleCondition.MatchValue, - NegateCondition = psDeliveryRuleCondition.NegateCondition, - Transforms = psDeliveryRuleCondition.Transfroms - } - }; - case "RequestMethod": - return new DeliveryRuleRequestMethodCondition - { - Parameters = new RequestMethodMatchConditionParameters - { - MatchValues = psDeliveryRuleCondition.MatchValue, - NegateCondition = psDeliveryRuleCondition.NegateCondition - } - }; - case "QueryString": - return new DeliveryRuleQueryStringCondition - { - Parameters = new QueryStringMatchConditionParameters - { - OperatorProperty = psDeliveryRuleCondition.Operator, - MatchValues = psDeliveryRuleCondition.MatchValue, - NegateCondition = psDeliveryRuleCondition.NegateCondition, - Transforms = psDeliveryRuleCondition.Transfroms - } - }; - case "PostArgs": - return new DeliveryRulePostArgsCondition - { - Parameters = new PostArgsMatchConditionParameters - { - OperatorProperty = psDeliveryRuleCondition.Operator, - MatchValues = psDeliveryRuleCondition.MatchValue, - Selector = psDeliveryRuleCondition.Selector, - NegateCondition = psDeliveryRuleCondition.NegateCondition, - Transforms = psDeliveryRuleCondition.Transfroms - } - }; - case "RequestUri": - return new DeliveryRuleRequestUriCondition - { - Parameters = new RequestUriMatchConditionParameters - { - OperatorProperty = psDeliveryRuleCondition.Operator, - MatchValues = psDeliveryRuleCondition.MatchValue, - NegateCondition = psDeliveryRuleCondition.NegateCondition, - Transforms = psDeliveryRuleCondition.Transfroms - } - }; - case "RequestHeader": - return new DeliveryRuleRequestHeaderCondition - { - Parameters = new RequestHeaderMatchConditionParameters - { - OperatorProperty = psDeliveryRuleCondition.Operator, - MatchValues = psDeliveryRuleCondition.MatchValue, - Selector = psDeliveryRuleCondition.Selector, - NegateCondition = psDeliveryRuleCondition.NegateCondition, - Transforms = psDeliveryRuleCondition.Transfroms - } - }; - case "RequestBody": - return new DeliveryRuleRequestBodyCondition - { - Parameters = new RequestBodyMatchConditionParameters - { - OperatorProperty = psDeliveryRuleCondition.Operator, - MatchValues = psDeliveryRuleCondition.MatchValue, - NegateCondition = psDeliveryRuleCondition.NegateCondition, - Transforms = psDeliveryRuleCondition.Transfroms - } - }; - case "RequestScheme": - return new DeliveryRuleRequestSchemeCondition - { - Parameters = new RequestSchemeMatchConditionParameters - { - MatchValues = psDeliveryRuleCondition.MatchValue, - NegateCondition = psDeliveryRuleCondition.NegateCondition, - } - }; - case "UrlPath": - return new DeliveryRuleUrlPathCondition - { - Parameters = new UrlPathMatchConditionParameters - { - OperatorProperty = psDeliveryRuleCondition.Operator, - MatchValues = psDeliveryRuleCondition.MatchValue, - NegateCondition = psDeliveryRuleCondition.NegateCondition, - Transforms = psDeliveryRuleCondition.Transfroms - } - }; - case "UrlFileExtension": - return new DeliveryRuleUrlFileExtensionCondition - { - Parameters = new UrlFileExtensionMatchConditionParameters - { - OperatorProperty = psDeliveryRuleCondition.Operator, - MatchValues = psDeliveryRuleCondition.MatchValue, - NegateCondition = psDeliveryRuleCondition.NegateCondition, - Transforms = psDeliveryRuleCondition.Transfroms - } - }; - case "UrlFileName": - return new DeliveryRuleUrlFileNameCondition - { - Parameters = new UrlFileNameMatchConditionParameters - { - OperatorProperty = psDeliveryRuleCondition.Operator, - MatchValues = psDeliveryRuleCondition.MatchValue, - NegateCondition = psDeliveryRuleCondition.NegateCondition, - Transforms = psDeliveryRuleCondition.Transfroms - } - }; - case "IsDevice": - return new DeliveryRuleIsDeviceCondition - { - Parameters = new IsDeviceMatchConditionParameters - { - MatchValues = psDeliveryRuleCondition.MatchValue, - NegateCondition = psDeliveryRuleCondition.NegateCondition, - Transforms = psDeliveryRuleCondition.Transfroms - } - }; - case "HttpVersion": - return new DeliveryRuleHttpVersionCondition - { - Parameters = new HttpVersionMatchConditionParameters - { - MatchValues = psDeliveryRuleCondition.MatchValue, - NegateCondition = psDeliveryRuleCondition.NegateCondition - } - }; - case "Cookies": - return new DeliveryRuleCookiesCondition - { - Parameters = new CookiesMatchConditionParameters - { - MatchValues = psDeliveryRuleCondition.MatchValue, - NegateCondition = psDeliveryRuleCondition.NegateCondition, - OperatorProperty = psDeliveryRuleCondition.Operator, - Selector = psDeliveryRuleCondition.Selector, - Transforms = psDeliveryRuleCondition.Transfroms - } - }; - default: - return new DeliveryRuleCondition(); - } - } - - public static DeliveryRuleAction ToDeliveryRuleAction(this PSDeliveryRuleAction psDeliveryRuleAction) - { - if (psDeliveryRuleAction is PSDeliveryRuleCacheExpirationAction psDeliveryRuleCacheExpirationAction) - { - return new DeliveryRuleCacheExpirationAction - { - Parameters = new CacheExpirationActionParameters - { - CacheBehavior = psDeliveryRuleCacheExpirationAction.Parameters.CacheBehavior, - CacheDuration = psDeliveryRuleCacheExpirationAction.Parameters.CacheDuration - } - }; - } - else if (psDeliveryRuleAction is PSDeliveryRuleHeaderAction psDeliveryRuleHeaderAction) - { - if (psDeliveryRuleHeaderAction.HeaderActionType == "ModifyRequestHeader") - { - return new DeliveryRuleRequestHeaderAction - { - Parameters = new HeaderActionParameters - { - HeaderAction = psDeliveryRuleHeaderAction.Action, - HeaderName = psDeliveryRuleHeaderAction.HeaderName, - Value = psDeliveryRuleHeaderAction.Value - } - }; - } - else if (psDeliveryRuleHeaderAction.HeaderActionType == "ModifyResponseHeader") - { - return new DeliveryRuleResponseHeaderAction - { - Parameters = new HeaderActionParameters - { - HeaderAction = psDeliveryRuleHeaderAction.Action, - HeaderName = psDeliveryRuleHeaderAction.HeaderName, - Value = psDeliveryRuleHeaderAction.Value - } - }; - } - } - else if (psDeliveryRuleAction is PSDeliveryRuleUrlRedirectAction psDeliveryRuleUrlRedirectAction) - { - return new UrlRedirectAction - { - Parameters = new UrlRedirectActionParameters - { - RedirectType = psDeliveryRuleUrlRedirectAction.RedirectType, - DestinationProtocol = psDeliveryRuleUrlRedirectAction.DestinationProtocol, - CustomPath = psDeliveryRuleUrlRedirectAction.CustomPath, - CustomHostname = psDeliveryRuleUrlRedirectAction.CustomHostname, - CustomQueryString = psDeliveryRuleUrlRedirectAction.CustomQueryString, - CustomFragment = psDeliveryRuleUrlRedirectAction.CustomFragment - } - }; - } - else if (psDeliveryRuleAction is PSDeliveryRuleCacheKeyQueryStringAction psDeliveryRuleCacheKeyQueryStringAction) - { - return new DeliveryRuleCacheKeyQueryStringAction - { - Parameters = new CacheKeyQueryStringActionParameters - { - QueryStringBehavior = psDeliveryRuleCacheKeyQueryStringAction.QueryStringBehavior, - QueryParameters = psDeliveryRuleCacheKeyQueryStringAction.QueryParameter - } - }; - } - else if (psDeliveryRuleAction is PSDeliveryRuleUrlRewriteAction psDeliveryRuleUrlRewriteAction) - { - return new UrlRewriteAction - { - Parameters = new UrlRewriteActionParameters - { - SourcePattern = psDeliveryRuleUrlRewriteAction.SourcePattern, - Destination = psDeliveryRuleUrlRewriteAction.Destination, - PreserveUnmatchedPath = psDeliveryRuleUrlRewriteAction.PreservePath - } - }; - } - return new DeliveryRuleAction(); - } - - public static DeliveryRule ToDeliveryRule(this PSDeliveryRule psDeliveryRule) - { - return new DeliveryRule - { - Name = psDeliveryRule.Name, - Order = psDeliveryRule.Order, - Actions = psDeliveryRule.Actions.Select(action => action.ToDeliveryRuleAction()).ToList(), - Conditions = psDeliveryRule.Conditions?.Select(condition => condition.ToDeliveryRuleCondition()).ToList() - }; - } - - public static SdkDeliveryPolicy ToSdkDeliveryPolicy(this PSDeliveryPolicy psDeliveryPolicy) - { - return new SdkDeliveryPolicy - { - Description = psDeliveryPolicy.Description, - Rules = psDeliveryPolicy.Rules.Select(rule => rule.ToDeliveryRule()).ToList() - }; - } - - public static PSValidateCustomDomainOutput ToPsValidateCustomDomainOutput( - this ValidateCustomDomainOutput validateCustomDomainOutput) - { - Debug.Assert(validateCustomDomainOutput.CustomDomainValidated != null, "validateCustomDomainOutput.CustomDomainValidated != null"); - - return new PSValidateCustomDomainOutput - { - CustomDomainValidated = validateCustomDomainOutput.CustomDomainValidated.Value, - Message = validateCustomDomainOutput.Message, - Reason = validateCustomDomainOutput.Reason, - }; - } - - public static PSOrigin ToPsOrigin(this SdkOrigin origin) - { - Debug.Assert(origin.ProvisioningState != null, "origin.ProvisioningState != null"); - Debug.Assert(origin.ResourceState != null, "origin.ResourceState != null"); - - return new PSOrigin - { - Id = origin.Id, - Name = origin.Name, - Type = origin.Type, - ProvisioningState = (PSProvisioningState)Enum.Parse(typeof(PSProvisioningState), origin.ProvisioningState), - ResourceState = (PSOriginResourceState)Enum.Parse(typeof(PSOriginResourceState), origin.ResourceState), - - // origin specifc properties - HostName = origin.HostName, - HttpPort = origin.HttpPort, - HttpsPort = origin.HttpsPort, - OriginHostHeader = origin.OriginHostHeader, - Priority = origin.Priority, - PrivateLinkApprovalMessage = origin.PrivateLinkApprovalMessage, - PrivateLinkLocation = origin.PrivateLinkLocation, - PrivateLinkResourceId = origin.PrivateLinkResourceId, - Weight = origin.Weight - }; - } - - public static PSOriginGroup ToPsOriginGroup(this SdkOriginGroup originGroup) - { - Debug.Assert(originGroup.ProvisioningState != null, "originGroup.ProvisioningState != null"); - Debug.Assert(originGroup.ResourceState != null, "originGroup.ResourceState != null"); - - int? probeIntervalInSeconds = null; - string probePath = null; - string probeProtocol = null; - string probeRequestType = null; - - if (originGroup.HealthProbeSettings != null) - { - probeIntervalInSeconds = originGroup.HealthProbeSettings.ProbeIntervalInSeconds; - probePath = originGroup.HealthProbeSettings.ProbePath; - probeProtocol = originGroup.HealthProbeSettings.ProbeProtocol.Value.ToString(); - probeRequestType = originGroup.HealthProbeSettings.ProbeRequestType.Value.ToString(); - } - - int probeIntervalInSecondsInteger; - - if (probeIntervalInSeconds == null) - { - probeIntervalInSecondsInteger = 0; - } - else - { - probeIntervalInSecondsInteger = probeIntervalInSeconds.Value; - } - - return new PSOriginGroup - { - Id = originGroup.Id, - Name = originGroup.Name, - Type = originGroup.Type, - ProvisioningState = (PSProvisioningState)Enum.Parse(typeof(PSProvisioningState), originGroup.ProvisioningState), - ResourceState = (PSOriginGroupResourceState)Enum.Parse(typeof(PSOriginGroupResourceState), originGroup.ResourceState), - - // origin group specific properties - Origins = originGroup.Origins, - ProbeIntervalInSeconds = probeIntervalInSecondsInteger, - ProbePath = probePath, - ProbeProtocol = probeProtocol, - ProbeRequestType = probeRequestType - }; - } - - public static PSCustomDomain ToPsCustomDomain(this SdkCustomDomain customDomain) - { - Debug.Assert(customDomain.ProvisioningState != null, "customDomain.ProvisioningState != null"); - Debug.Assert(customDomain.ResourceState != null, "customDomain.ResourceState != null"); - - return new PSCustomDomain - { - Id = customDomain.Id, - Name = customDomain.Name, - Type = customDomain.Type, - ProvisioningState = (PSProvisioningState)Enum.Parse(typeof(PSProvisioningState), customDomain.ProvisioningState), - CustomHttpsProvisioningState = (PSCustomHttpsProvisioningState)Enum.Parse(typeof(PSCustomHttpsProvisioningState), customDomain.CustomHttpsProvisioningState), - CustomHttpsProvisioningSubstate = (PSCustomHttpsProvisioningSubstate)Enum.Parse(typeof(PSCustomHttpsProvisioningSubstate), customDomain.CustomHttpsProvisioningSubstate), - ResourceState = (PSCustomDomainResourceState)Enum.Parse(typeof(PSCustomDomainResourceState), customDomain.ResourceState), - HostName = customDomain.HostName, - ValidationData = customDomain.ValidationData - }; - } - - public static IDictionary ToDictionaryTags(this Hashtable table) - { - return table?.Cast() - .ToDictionary(kvp => (string)kvp.Key, kvp => (string)kvp.Value); - } - - public static Hashtable ToHashTableTags(this IDictionary tags) - { - if (tags == null) - { - return null; - } - - var tagsInHashTable = new Hashtable(); - tags.Keys.ForEach(key => tagsInHashTable.Add(key, tags[key])); - return tagsInHashTable; - } - - public static PSCheckNameAvailabilityOutput ToPsCheckNameAvailabilityOutput( - this CheckNameAvailabilityOutput output) - { - Debug.Assert(output.NameAvailable != null, "output.NameAvailable != null"); - - return new PSCheckNameAvailabilityOutput - { - Message = output.Message, - NameAvailable = output.NameAvailable.Value, - Reason = output.Reason - }; - } - - public static PSValidateProbeOutput ToPsValideProbeOutput( - this ValidateProbeOutput output) - { - - return new PSValidateProbeOutput - { - Message = output.Message, - ErrorCode = output.ErrorCode, - IsValid = output.IsValid - }; - } - - public static PSEdgeNode ToPsEdgeNode(this EdgeNode edgeNode) - { - return new PSEdgeNode - { - IpAddressGroups = edgeNode.IpAddressGroups.Select(i => i.ToPsIpAddressGroup()).ToList() - }; - } - - public static PSIpAddressGroup ToPsIpAddressGroup(this IpAddressGroup ipAddressGroup) - { - return new PSIpAddressGroup - { - DeliveryRegion = ipAddressGroup.DeliveryRegion, - Ipv4Addresses = ipAddressGroup.Ipv4Addresses.Select(i => i.ToPsCIDIRIpAddress()).ToList(), - Ipv6Addresses = ipAddressGroup.Ipv6Addresses.Select(i => i.ToPsCIDIRIpAddress()).ToList() - }; - } - - public static PSCIDRIpAddress ToPsCIDIRIpAddress(this CidrIpAddress cidrIpAddress) - { - return new PSCIDRIpAddress - { - BaseIpAddress = cidrIpAddress.BaseIpAddress, - PrefixLength = cidrIpAddress.PrefixLength.Value - }; - } - - - public static PSResourceUsage ToPsResourceUsage(this ResourceUsage resourceUsage) - { - - return new PSResourceUsage - { - ResourceType = resourceUsage.ResourceType, - Unit = resourceUsage.Unit, - CurrentValue = resourceUsage.CurrentValue.Value, - Limit = resourceUsage.Limit.Value - }; - } - - public static void ValidateDeliveryRuleCondition(this PSDeliveryRuleCondition condition) - { - switch (condition.MatchVariable) - { - case "RemoteAddress": - if (condition.Operator != "Any" && condition.Operator != "IPMatch" && condition.Operator != "GeoMatch") - { - throw new PSArgumentException(string.Format( - "Invalid Operator {0} found for {1} match variable. Valid operators are IPMatch, Any, GeoMatch", condition.Operator, condition.MatchVariable - )); - } - break; - case "QueryString": - case "RequestUri": - case "RequestBody": - case "UrlPath": - case "UrlFileExtension": - case "UrlFileName": - if (condition.Operator != "Any" && condition.Operator != "Equal" && condition.Operator != "Contains" && - condition.Operator != "BeginsWith" && condition.Operator != "EndsWith" && condition.Operator != "LessThan" && - condition.Operator != "LessThanOrEqual" && condition.Operator != "GreaterThan" && condition.Operator != "GreaterThanOrEqual") - { - throw new PSArgumentException(string.Format( - "Invalid Operator {0} found for {1} match condition. Valid operators are Any, Equal, Contains, BeginsWith, EndsWith, LessThan, LessThanOrEqual, GreaterThan, GreaterThanOrEqual.", condition.Operator, condition.MatchVariable - )); - } - break; - case "RequestHeader": - case "PostArgs": - case "Cookies": - if (condition.Selector == null) - { - throw new PSArgumentException(string.Format( - "Selector is requried for {0} match condition", condition.MatchVariable - )); - } - if (condition.Operator != "Any" && condition.Operator != "Equal" && condition.Operator != "Contains" && - condition.Operator != "BeginsWith" && condition.Operator != "EndsWith" && condition.Operator != "LessThan" && - condition.Operator != "LessThanOrEqual" && condition.Operator != "GreaterThan" && condition.Operator != "GreaterThanOrEqual") - { - throw new PSArgumentException(string.Format( - "Invalid Operator {0} found for {1} match condition. Valid operators are Any, Equal, Contains, BeginsWith, EndsWith, LessThan, LessThanOrEqual, GreaterThan, GreaterThanOrEqual.", - condition.Operator, condition.MatchVariable)); - } - break; - case "RequestScheme": - case "IsDevice": - case "RequestMethod": - case "HttpVersion": - if (condition.Operator !="Equal") - { - throw new PSArgumentException(string.Format( - "Invalid Operator {0} found for {1} match condition. Valid operator is Equal", condition.Operator, condition.MatchVariable - )); - } - break; - default: - break; - } - } - } -} diff --git a/src/Cdn/Cdn/Helpers/OriginGroupUtilities.cs b/src/Cdn/Cdn/Helpers/OriginGroupUtilities.cs deleted file mode 100644 index 7fcd6d978996..000000000000 --- a/src/Cdn/Cdn/Helpers/OriginGroupUtilities.cs +++ /dev/null @@ -1,65 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; - -namespace Microsoft.Azure.Commands.Cdn.Helpers -{ - public static class OriginGroupUtilities - { - public static Management.Cdn.Models.ProbeProtocol NormalizeProbeProtocol(string probeProtocol) - { - if (String.IsNullOrWhiteSpace(probeProtocol)) - { - return Management.Cdn.Models.ProbeProtocol.NotSet; - } - else - { - string normalizedProbeProtocol = probeProtocol.ToLower(); - - switch (normalizedProbeProtocol) - { - case "http": - return Management.Cdn.Models.ProbeProtocol.Http; - case "https": - return Management.Cdn.Models.ProbeProtocol.Https; - default: - throw new Exception($"{probeProtocol} is not a valid protocol. Only Http or Https are allowed."); - } - } - } - - public static Management.Cdn.Models.HealthProbeRequestType NormalizeProbeRequestType(string probeRequestType) - { - if (String.IsNullOrWhiteSpace(probeRequestType)) - { - return Management.Cdn.Models.HealthProbeRequestType.NotSet; - } - else - { - string normalizedProbeRequestType = probeRequestType.ToLower(); - - switch (normalizedProbeRequestType) - { - case "get": - return Management.Cdn.Models.HealthProbeRequestType.GET; - case "head": - return Management.Cdn.Models.HealthProbeRequestType.HEAD; - default: - throw new Exception($"{probeRequestType} is not a valid request type. Only GET or HEAD are allowed."); - } - } - } - } -} diff --git a/src/Cdn/Cdn/Helpers/ResourceIdentifierExtensions.cs b/src/Cdn/Cdn/Helpers/ResourceIdentifierExtensions.cs deleted file mode 100644 index 5c1941d9d1f6..000000000000 --- a/src/Cdn/Cdn/Helpers/ResourceIdentifierExtensions.cs +++ /dev/null @@ -1,51 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; - -namespace Microsoft.Azure.Commands.Cdn.Helpers -{ - public static class ResourceIdentifierExtensions - { - private const string Profiles = "profiles"; - private const string Endpoints = "endpoints"; - private const string CustomDomains = "customdomains"; - - public static string GetProfileName(this ResourceIdentifier resourceId) - { - return GetChildResourceName(resourceId, Profiles); - } - - public static string GetEndpointName(this ResourceIdentifier resourceId) - { - return GetChildResourceName(resourceId, Endpoints); - } - - private static string GetChildResourceName(this ResourceIdentifier resourceId, string resourceType) - { - var parentResource = resourceId.ParentResource.Split(new[] { '/' }); - - for (int idx = 0; idx < parentResource.Length; idx++) - { - if (parentResource[idx].Equals(resourceType, StringComparison.OrdinalIgnoreCase)) - { - return parentResource[idx + 1]; - } - } - - return null; - } - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn/Models/CustomDomain/PSCustomDomain.cs b/src/Cdn/Cdn/Models/CustomDomain/PSCustomDomain.cs deleted file mode 100644 index 5bf60a738258..000000000000 --- a/src/Cdn/Cdn/Models/CustomDomain/PSCustomDomain.cs +++ /dev/null @@ -1,83 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Text.RegularExpressions; - -namespace Microsoft.Azure.Commands.Cdn.Models.CustomDomain -{ - public class PSCustomDomain : PSResource - { - private const string CustomDomainKeyPatternFormat = - @"\/subscriptions\/(?<{0}>.*)\/resourcegroups\/(?<{1}>.*)\/providers\/Microsoft\.Cdn\/profiles\/(?<{2}>.*)\/endpoints\/(?<{3}>.*)\/customdomains\/(?<{4}>.*)"; - - private const string SubscriptionIdGroupKey = "subscriptionId"; - private const string ResourceGroupGroupKey = "resourceGroup"; - private const string ProfileNameGroupKey = "profileName"; - private const string EndpointNameGroupKey = "endpointName"; - private const string CustomDomainNameGroupKey = "customDomainName"; - - public string HostName { get; set; } - - public string ValidationData { get; set; } - - public PSCustomDomainResourceState ResourceState { get; set; } - - public PSCustomHttpsProvisioningState CustomHttpsProvisioningState { get; set; } - - public PSCustomHttpsProvisioningSubstate CustomHttpsProvisioningSubstate { get; set; } - - - public string ResourceGroupName - { - get - { - return Regex.Match(Id, - string.Format(CustomDomainKeyPatternFormat, - SubscriptionIdGroupKey, - ResourceGroupGroupKey, - ProfileNameGroupKey, - EndpointNameGroupKey, - CustomDomainNameGroupKey), RegexOptions.IgnoreCase).Groups[ResourceGroupGroupKey].Value; - } - } - - public string ProfileName - { - get - { - return Regex.Match(Id, - string.Format(CustomDomainKeyPatternFormat, - SubscriptionIdGroupKey, - ResourceGroupGroupKey, - ProfileNameGroupKey, - EndpointNameGroupKey, - CustomDomainNameGroupKey), RegexOptions.IgnoreCase).Groups[ProfileNameGroupKey].Value; - } - } - - public string EndpointName - { - get - { - return Regex.Match(Id, - string.Format(CustomDomainKeyPatternFormat, - SubscriptionIdGroupKey, - ResourceGroupGroupKey, - ProfileNameGroupKey, - EndpointNameGroupKey, - CustomDomainNameGroupKey), RegexOptions.IgnoreCase).Groups[EndpointNameGroupKey].Value; - } - } - } -} diff --git a/src/Cdn/Cdn/Models/CustomDomain/PSCustomDomainResourceState.cs b/src/Cdn/Cdn/Models/CustomDomain/PSCustomDomainResourceState.cs deleted file mode 100644 index 272b67aaaff3..000000000000 --- a/src/Cdn/Cdn/Models/CustomDomain/PSCustomDomainResourceState.cs +++ /dev/null @@ -1,23 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Models.CustomDomain -{ - public enum PSCustomDomainResourceState - { - Creating, - Active, - Deleting - } -} diff --git a/src/Cdn/Cdn/Models/CustomDomain/PSCustomHttpsProvisioningState.cs b/src/Cdn/Cdn/Models/CustomDomain/PSCustomHttpsProvisioningState.cs deleted file mode 100644 index 0b32fca9520a..000000000000 --- a/src/Cdn/Cdn/Models/CustomDomain/PSCustomHttpsProvisioningState.cs +++ /dev/null @@ -1,44 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Models.CustomDomain -{ - public enum PSCustomHttpsProvisioningState - { - /// - /// Enabling the custom https - /// - Enabling, - - /// - /// Custom https is enabled - /// - Enabled, - - /// - /// Disabling the custom https - /// - Disabling, - - /// - /// Custom https is disabled - /// - Disabled, - - /// - /// Custom https enabling/disabling failed - /// - Failed - } -} diff --git a/src/Cdn/Cdn/Models/CustomDomain/PSCustomHttpsProvisioningSubstate.cs b/src/Cdn/Cdn/Models/CustomDomain/PSCustomHttpsProvisioningSubstate.cs deleted file mode 100644 index ea01b0d1076b..000000000000 --- a/src/Cdn/Cdn/Models/CustomDomain/PSCustomHttpsProvisioningSubstate.cs +++ /dev/null @@ -1,87 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Models.CustomDomain -{ - public enum PSCustomHttpsProvisioningSubstate - { - /// - /// Unset. - /// - None, - - /// - /// The substate is unknown. - /// This is a generic substate that can be used for cases where certificate provisioning workflow fails unexpectedly. - /// This should never happen unless there is an unhandled failure case. - /// - Unknown, - - /// - /// The DCV request is being submitted to the CA. - /// - SubmittingDomainControlValidationRequest, - - /// - /// The DCV request is pending for the domain owner approval. - /// - PendingDomainControlValidationRequestApproval, - - /// - /// The DCV request is approved by the domain owner. - /// - DomainControlValidationRequestApproved, - - /// - /// The DCV request is rejected by the domain owner. - /// - DomainControlValidationRequestRejected, - - /// - /// The DCV request is timed out. - /// - DomainControlValidationRequestTimedOut, - - /// - /// Issuing the certificate from the CA. - /// - IssuingCertificate, - - /// - /// Deploying the certificate to the CDN network. - /// - DeployingCertificate, - - /// - /// The certificate has been deployed to the CDN network. - /// - CertificateDeployed, - - /// - /// Deleting the certificate from the CDN network. - /// - DeletingCertificate, - - /// - /// The certificate has been deleted from the CDN network. - /// - CertificateDeleted, - - /// - /// The certificate is being imported from an external source specified by the user. - /// Example: Azure Key Vault - /// - ImportingUserProvidedCertificate - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSCacheExpirationActionParameters.cs b/src/Cdn/Cdn/Models/Endpoint/PSCacheExpirationActionParameters.cs deleted file mode 100644 index 42e937e38634..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSCacheExpirationActionParameters.cs +++ /dev/null @@ -1,29 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections; -using System.Collections.Generic; -using System.Text.RegularExpressions; - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSCacheExpirationActionParameters - { - - public string CacheBehavior { get; set; } - public string Odatatype { get; private set; } - public string CacheDuration { get; set; } - public string CacheType { get; private set; } - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn/Models/Endpoint/PSCheckNameAvailabilityOutput.cs b/src/Cdn/Cdn/Models/Endpoint/PSCheckNameAvailabilityOutput.cs deleted file mode 100644 index 439837b4684a..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSCheckNameAvailabilityOutput.cs +++ /dev/null @@ -1,25 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSCheckNameAvailabilityOutput - { - public bool NameAvailable { get; set; } - - public string Reason { get; set; } - - public string Message { get; set; } - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSCustomDomainInvalidReason.cs b/src/Cdn/Cdn/Models/Endpoint/PSCustomDomainInvalidReason.cs deleted file mode 100644 index 037442259cf3..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSCustomDomainInvalidReason.cs +++ /dev/null @@ -1,22 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public enum PSCustomDomainInvalidReason - { - InvalidFormat, - IncorrectMapping, - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSDeepCreatedOrigin.cs b/src/Cdn/Cdn/Models/Endpoint/PSDeepCreatedOrigin.cs deleted file mode 100644 index be1a302c7ccc..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSDeepCreatedOrigin.cs +++ /dev/null @@ -1,27 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSDeepCreatedOrigin - { - public string Name { get; set; } - - public string HostName { get; set; } - - public int? HttpPort { get; set; } - - public int? HttpsPort { get; set; } - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSDeliveryPolicy.cs b/src/Cdn/Cdn/Models/Endpoint/PSDeliveryPolicy.cs deleted file mode 100644 index c4c6659ea605..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSDeliveryPolicy.cs +++ /dev/null @@ -1,26 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections; -using System.Collections.Generic; -using System.Text.RegularExpressions; - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSDeliveryPolicy - { - public string Description { get; set; } - public IList Rules { get; set; } - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRule.cs b/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRule.cs deleted file mode 100644 index 8e026252d7fd..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRule.cs +++ /dev/null @@ -1,32 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections; -using System.Collections.Generic; -using System.Text.RegularExpressions; - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSDeliveryRule - { - public string Name{ get; set; } - - public int Order { get; set; } - - public IList Actions { get; set; } - - public IList Conditions { get; set; } - - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleAction.cs b/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleAction.cs deleted file mode 100644 index 419f9a32bcd0..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleAction.cs +++ /dev/null @@ -1,24 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections; -using System.Collections.Generic; -using System.Text.RegularExpressions; - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSDeliveryRuleAction - { - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleCacheExpirationAction.cs b/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleCacheExpirationAction.cs deleted file mode 100644 index 537a17506894..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleCacheExpirationAction.cs +++ /dev/null @@ -1,25 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections; -using System.Collections.Generic; -using System.Text.RegularExpressions; - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSDeliveryRuleCacheExpirationAction: PSDeliveryRuleAction - { - public PSCacheExpirationActionParameters Parameters { get; set; } - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleCacheKeyQueryStringAction.cs b/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleCacheKeyQueryStringAction.cs deleted file mode 100644 index 640750e80716..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleCacheKeyQueryStringAction.cs +++ /dev/null @@ -1,27 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections; -using System.Collections.Generic; -using System.Text.RegularExpressions; - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSDeliveryRuleCacheKeyQueryStringAction: PSDeliveryRuleAction - { - public string QueryStringBehavior { get; set; } - - public string QueryParameter { get; set; } - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleCondition.cs b/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleCondition.cs deleted file mode 100644 index 1484982c2128..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleCondition.cs +++ /dev/null @@ -1,35 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections; -using System.Collections.Generic; -using System.Text.RegularExpressions; - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSDeliveryRuleCondition - { - public string MatchVariable { get; set; } - - public string Operator { get; set; } - - public string Selector { get; set; } - - public IList MatchValue { get; set; } - - public bool? NegateCondition { get; set; } - - public IList Transfroms { get; set; } - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleHeaderAction.cs b/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleHeaderAction.cs deleted file mode 100644 index 21e076721bc8..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleHeaderAction.cs +++ /dev/null @@ -1,31 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections; -using System.Collections.Generic; -using System.Text.RegularExpressions; - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSDeliveryRuleHeaderAction: PSDeliveryRuleAction - { - public string HeaderActionType { get; set; } - - public string Action { get; set; } - - public string HeaderName { get; set; } - - public string Value { get; set; } - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleUrlRedirectAction.cs b/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleUrlRedirectAction.cs deleted file mode 100644 index 3482d2d00001..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleUrlRedirectAction.cs +++ /dev/null @@ -1,35 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections; -using System.Collections.Generic; -using System.Text.RegularExpressions; - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSDeliveryRuleUrlRedirectAction: PSDeliveryRuleAction - { - public string RedirectType { get; set; } - - public string DestinationProtocol { get; set; } - - public string CustomPath { get; set; } - - public string CustomHostname { get; set; } - - public string CustomQueryString { get; set; } - - public string CustomFragment { get; set; } - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleUrlRewriteAction.cs b/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleUrlRewriteAction.cs deleted file mode 100644 index 5f38a9ec438a..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSDeliveryRuleUrlRewriteAction.cs +++ /dev/null @@ -1,29 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections; -using System.Collections.Generic; -using System.Text.RegularExpressions; - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSDeliveryRuleUrlRewriteAction: PSDeliveryRuleAction - { - public string SourcePattern { get; set; } - - public string Destination { get; set; } - - public bool PreservePath { get; set; } - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSEndpoint.cs b/src/Cdn/Cdn/Models/Endpoint/PSEndpoint.cs deleted file mode 100644 index 19c376d4a4bc..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSEndpoint.cs +++ /dev/null @@ -1,91 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections.Generic; -using System.Text.RegularExpressions; -using Microsoft.Azure.Management.Cdn.Models; - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSEndpoint : PSTrackedResource - { - private const string EndpointKeyPatternFormat = - @"\/subscriptions\/(?<{0}>.*)\/resourcegroups\/(?<{1}>.*)\/providers\/Microsoft\.Cdn\/profiles\/(?<{2}>.*)\/endpoints\/(?<{3}>.*)"; - - private const string SubscriptionIdGroupKey = "subscriptionId"; - private const string ResourceGroupGroupKey = "resourceGroup"; - private const string ProfileNameGroupKey = "profileName"; - private const string EndpointNameGroupKey = "endpointName"; - - public string HostName { get; set; } - - public string OriginHostHeader { get; set; } - - public string OriginPath { get; set; } - - public string[] ContentTypesToCompress { get; set; } - - public bool IsCompressionEnabled { get; set; } - - public bool IsHttpAllowed { get; set; } - - public bool IsHttpsAllowed { get; set; } - - public PSQueryStringCachingBehavior QueryStringCachingBehavior { get; set; } - - public ICollection Origins { get; set; } - - public string OptimizationType { get; set; } - - public string ProbePath { get; set; } - - public ICollection GeoFilters { get; set; } - - public PSDeliveryPolicy DeliveryPolicy { get; set; } - - public PSEndpointResourceState ResourceState { get; set; } - - public ResourceReference DefaultOriginGroup { get; set; } - - public string ResourceGroupName - { - get - { - var match = Regex.Match(Id, - string.Format(EndpointKeyPatternFormat, - SubscriptionIdGroupKey, - ResourceGroupGroupKey, - ProfileNameGroupKey, - EndpointNameGroupKey), RegexOptions.IgnoreCase); - - return match.Groups[ResourceGroupGroupKey].Value; - } - } - - public string ProfileName - { - get - { - var match = Regex.Match(Id, - string.Format(EndpointKeyPatternFormat, - SubscriptionIdGroupKey, - ResourceGroupGroupKey, - ProfileNameGroupKey, - EndpointNameGroupKey), RegexOptions.IgnoreCase); - - return match.Groups[ProfileNameGroupKey].Value; - } - } - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSEndpointResourceState.cs b/src/Cdn/Cdn/Models/Endpoint/PSEndpointResourceState.cs deleted file mode 100644 index 7f525b8e8907..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSEndpointResourceState.cs +++ /dev/null @@ -1,26 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public enum PSEndpointResourceState - { - Creating, - Deleting, - Running, - Starting, - Stopped, - Stopping - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSGeoFilter.cs b/src/Cdn/Cdn/Models/Endpoint/PSGeoFilter.cs deleted file mode 100644 index 2da65da24816..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSGeoFilter.cs +++ /dev/null @@ -1,27 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections.Generic; - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSGeoFilter - { - public string RelativePath { get; set; } - - public PSGeoFilterAction Action { get; set; } - - public string[] CountryCodes { get; set; } - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSGeoFilterAction.cs b/src/Cdn/Cdn/Models/Endpoint/PSGeoFilterAction.cs deleted file mode 100644 index 59e98a2c7099..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSGeoFilterAction.cs +++ /dev/null @@ -1,23 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public enum PSGeoFilterAction - { - Allow, - Block - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSLoadInput.cs b/src/Cdn/Cdn/Models/Endpoint/PSLoadInput.cs deleted file mode 100644 index 9c7e5271469d..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSLoadInput.cs +++ /dev/null @@ -1,23 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections.Generic; - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSLoadInput - { - public ICollection ContentPaths { get; set; } - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSPurgeInput.cs b/src/Cdn/Cdn/Models/Endpoint/PSPurgeInput.cs deleted file mode 100644 index 2caded3c3013..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSPurgeInput.cs +++ /dev/null @@ -1,23 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections.Generic; - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSPurgeInput - { - public ICollection ContentPaths { get; set; } - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSQueryStringCachingBehavior.cs b/src/Cdn/Cdn/Models/Endpoint/PSQueryStringCachingBehavior.cs deleted file mode 100644 index 306fa437f6e6..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSQueryStringCachingBehavior.cs +++ /dev/null @@ -1,24 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public enum PSQueryStringCachingBehavior - { - IgnoreQueryString, - BypassCaching, - UseQueryString, - NotSet - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn/Models/Endpoint/PSValidateCustomDomainInput.cs b/src/Cdn/Cdn/Models/Endpoint/PSValidateCustomDomainInput.cs deleted file mode 100644 index e63105e61ad8..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSValidateCustomDomainInput.cs +++ /dev/null @@ -1,21 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSValidateCustomDomainInput - { - public string HostName { get; set; } - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSValidateCustomDomainOutput.cs b/src/Cdn/Cdn/Models/Endpoint/PSValidateCustomDomainOutput.cs deleted file mode 100644 index e018c850cafa..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSValidateCustomDomainOutput.cs +++ /dev/null @@ -1,25 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSValidateCustomDomainOutput - { - public bool CustomDomainValidated { get; set; } - - public string Reason { get; set; } - - public string Message { get; set; } - } -} diff --git a/src/Cdn/Cdn/Models/Endpoint/PSValidateProbeOutput.cs b/src/Cdn/Cdn/Models/Endpoint/PSValidateProbeOutput.cs deleted file mode 100644 index 8f40e4ada284..000000000000 --- a/src/Cdn/Cdn/Models/Endpoint/PSValidateProbeOutput.cs +++ /dev/null @@ -1,25 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Models.Endpoint -{ - public class PSValidateProbeOutput - { - public bool? IsValid { get; set; } - - public string ErrorCode { get; set; } - - public string Message { get; set; } - } -} diff --git a/src/Cdn/Cdn/Models/Origin/PSOrigin.cs b/src/Cdn/Cdn/Models/Origin/PSOrigin.cs deleted file mode 100644 index 1181ed82da9c..000000000000 --- a/src/Cdn/Cdn/Models/Origin/PSOrigin.cs +++ /dev/null @@ -1,92 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Text.RegularExpressions; - -namespace Microsoft.Azure.Commands.Cdn.Models.Origin -{ - public class PSOrigin : PSResource - { - private const string OriginKeyPatternFormat = - @"\/subscriptions\/(?<{0}>.*)\/resourcegroups\/(?<{1}>.*)\/providers\/Microsoft\.Cdn\/profiles\/(?<{2}>.*)\/endpoints\/(?<{3}>.*)\/origins\/(?<{4}>.*)"; - - private const string SubscriptionIdGroupKey = "subscriptionId"; - private const string ResourceGroupGroupKey = "resourceGroup"; - private const string ProfileNameGroupKey = "profileName"; - private const string EndpointNameGroupKey = "endpointName"; - private const string OriginNameGroupKey = "originName"; - - public string HostName { get; set; } - - public int? HttpPort { get; set; } - - public int? HttpsPort { get; set; } - - public string OriginHostHeader { get; set; } - - public int? Priority { get; set; } - - public string PrivateLinkApprovalMessage { get; set; } - - public string PrivateLinkLocation { get; set; } - - public string PrivateLinkResourceId { get; set; } - - public int? Weight { get; set; } - - public PSOriginResourceState ResourceState { get; set; } - - public string ResourceGroupName - { - get - { - return Regex.Match(Id, - string.Format(OriginKeyPatternFormat, - SubscriptionIdGroupKey, - ResourceGroupGroupKey, - ProfileNameGroupKey, - EndpointNameGroupKey, - OriginNameGroupKey), RegexOptions.IgnoreCase).Groups[ResourceGroupGroupKey].Value; - } - } - - public string ProfileName - { - get - { - return Regex.Match(Id, - string.Format(OriginKeyPatternFormat, - SubscriptionIdGroupKey, - ResourceGroupGroupKey, - ProfileNameGroupKey, - EndpointNameGroupKey, - OriginNameGroupKey), RegexOptions.IgnoreCase).Groups[ProfileNameGroupKey].Value; - } - } - - public string EndpointName - { - get - { - return Regex.Match(Id, - string.Format(OriginKeyPatternFormat, - SubscriptionIdGroupKey, - ResourceGroupGroupKey, - ProfileNameGroupKey, - EndpointNameGroupKey, - OriginNameGroupKey), RegexOptions.IgnoreCase).Groups[EndpointNameGroupKey].Value; - } - } - } -} diff --git a/src/Cdn/Cdn/Models/Origin/PSOriginResourceState.cs b/src/Cdn/Cdn/Models/Origin/PSOriginResourceState.cs deleted file mode 100644 index 1d832267cbd6..000000000000 --- a/src/Cdn/Cdn/Models/Origin/PSOriginResourceState.cs +++ /dev/null @@ -1,23 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Models.Origin -{ - public enum PSOriginResourceState - { - Creating, - Active, - Deleting - } -} diff --git a/src/Cdn/Cdn/Models/OriginGroup/PSOriginGroup.cs b/src/Cdn/Cdn/Models/OriginGroup/PSOriginGroup.cs deleted file mode 100644 index a77a67234ee3..000000000000 --- a/src/Cdn/Cdn/Models/OriginGroup/PSOriginGroup.cs +++ /dev/null @@ -1,83 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Azure.Management.Cdn.Models; -using System.Collections.Generic; -using System.Text.RegularExpressions; - -namespace Microsoft.Azure.Commands.Cdn.Models.OriginGroup -{ - public class PSOriginGroup : PSResource - { - private const string OriginGroupKeyPatternFormat = - @"\/subscriptions\/(?<{0}>.*)\/resourcegroups\/(?<{1}>.*)\/providers\/Microsoft\.Cdn\/profiles\/(?<{2}>.*)\/endpoints\/(?<{3}>.*)\/origingroups\/(?<{4}>.*)"; - - private const string SubscriptionIdGroupKey = "subscriptionId"; - private const string ResourceGroupGroupKey = "resourceGroup"; - private const string ProfileNameGroupKey = "profileName"; - private const string EndpointNameGroupKey = "endpointName"; - private const string OriginGroupNameGroupKey = "originGroupName"; - - public int ProbeIntervalInSeconds { get; set; } - public string ProbePath { get; set; } - public string ProbeProtocol { get; set; } - public string ProbeRequestType { get; set; } - - public IList Origins { get; set; } - - public PSOriginGroupResourceState ResourceState { get; set; } - - public string ResourceGroupName - { - get - { - return Regex.Match(Id, - string.Format(OriginGroupKeyPatternFormat, - SubscriptionIdGroupKey, - ResourceGroupGroupKey, - ProfileNameGroupKey, - EndpointNameGroupKey, - OriginGroupNameGroupKey), RegexOptions.IgnoreCase).Groups[ResourceGroupGroupKey].Value; - } - } - - public string ProfileName - { - get - { - return Regex.Match(Id, - string.Format(OriginGroupKeyPatternFormat, - SubscriptionIdGroupKey, - ResourceGroupGroupKey, - ProfileNameGroupKey, - EndpointNameGroupKey, - OriginGroupNameGroupKey), RegexOptions.IgnoreCase).Groups[ProfileNameGroupKey].Value; - } - } - - public string EndpointName - { - get - { - return Regex.Match(Id, - string.Format(OriginGroupKeyPatternFormat, - SubscriptionIdGroupKey, - ResourceGroupGroupKey, - ProfileNameGroupKey, - EndpointNameGroupKey, - OriginGroupNameGroupKey), RegexOptions.IgnoreCase).Groups[EndpointNameGroupKey].Value; - } - } - } -} diff --git a/src/Cdn/Cdn/Models/OriginGroup/PSOriginGroupResourceState.cs b/src/Cdn/Cdn/Models/OriginGroup/PSOriginGroupResourceState.cs deleted file mode 100644 index daa863c94b34..000000000000 --- a/src/Cdn/Cdn/Models/OriginGroup/PSOriginGroupResourceState.cs +++ /dev/null @@ -1,27 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Collections.Generic; -using System.Text; - -namespace Microsoft.Azure.Commands.Cdn.Models.OriginGroup -{ - public enum PSOriginGroupResourceState - { - Creating, - Active, - Deleting - } -} diff --git a/src/Cdn/Cdn/Models/PSProvisioningState.cs b/src/Cdn/Cdn/Models/PSProvisioningState.cs deleted file mode 100644 index bb9a6f0ae59b..000000000000 --- a/src/Cdn/Cdn/Models/PSProvisioningState.cs +++ /dev/null @@ -1,37 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Models -{ - /// - /// The provisioning state of the resources. - /// - public enum PSProvisioningState - { - /// - /// The resource is in creating state. - /// - Creating, - - /// - /// The resource is created successfully. - /// - Succeeded, - - /// - /// The resource creation failed. - /// - Failed - } -} diff --git a/src/Cdn/Cdn/Models/PSResourceUsage.cs b/src/Cdn/Cdn/Models/PSResourceUsage.cs deleted file mode 100644 index 4670ab2dc56b..000000000000 --- a/src/Cdn/Cdn/Models/PSResourceUsage.cs +++ /dev/null @@ -1,42 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Models -{ - /// - /// Resource usage class of powershell - /// - public class PSResourceUsage - { - /// - /// Gets or sets the resource type of the usage. - /// - public string ResourceType { get; set; } - - /// - /// The unit of the quota - /// - public string Unit { get; set; } - - /// - /// The current value of already used quota - /// - public int CurrentValue { get; set; } - - /// - /// The maximum quota of the entity - /// - public int Limit { get; set; } - } -} diff --git a/src/Cdn/Cdn/Models/PSResources.cs b/src/Cdn/Cdn/Models/PSResources.cs deleted file mode 100644 index dfcaa886b3f4..000000000000 --- a/src/Cdn/Cdn/Models/PSResources.cs +++ /dev/null @@ -1,43 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using Microsoft.Rest.Azure; - -namespace Microsoft.Azure.Commands.Cdn.Models -{ - /// - /// - public class PSResource : IResource - { - /// - /// Gets or sets the Resource Id - /// - public string Id { get; set; } - - /// - /// Gets or sets the Resource Name - /// - public string Name { get; set; } - - /// - /// Gets or sets the Resource type - /// - public string Type { get; set; } - - /// - /// Gets or sets the provisioning state of the resource - /// - public PSProvisioningState ProvisioningState { get; set; } - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn/Models/PSTrackedResources.cs b/src/Cdn/Cdn/Models/PSTrackedResources.cs deleted file mode 100644 index 22a606cd2254..000000000000 --- a/src/Cdn/Cdn/Models/PSTrackedResources.cs +++ /dev/null @@ -1,34 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections; - -namespace Microsoft.Azure.Commands.Cdn.Models -{ - /// - /// ARM tracked resource - /// - public class PSTrackedResource : PSResource - { - /// - /// Gets or sets Resource location - /// - public string Location { get; set; } - - /// - /// Resource tags - /// - public Hashtable Tags { get; set; } - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn/Models/Profile/PSOptimizationType.cs b/src/Cdn/Cdn/Models/Profile/PSOptimizationType.cs deleted file mode 100644 index 719fc1ff47f1..000000000000 --- a/src/Cdn/Cdn/Models/Profile/PSOptimizationType.cs +++ /dev/null @@ -1,32 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections; -using System.Collections.Generic; - -namespace Microsoft.Azure.Commands.Cdn.Models.Profile -{ - /// - /// Represents the optimization type of a CDN profile. - /// - public class PSOptimizationType - { - public PSOptimizationType(string optimizationType) - { - OptimizationType = optimizationType; - } - - string OptimizationType { get; set; } - } -} diff --git a/src/Cdn/Cdn/Models/Profile/PSProfile.cs b/src/Cdn/Cdn/Models/Profile/PSProfile.cs deleted file mode 100644 index 2c35d629429e..000000000000 --- a/src/Cdn/Cdn/Models/Profile/PSProfile.cs +++ /dev/null @@ -1,56 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Text.RegularExpressions; - -namespace Microsoft.Azure.Commands.Cdn.Models.Profile -{ - /// - /// Represents the properties of an Azure Cdn Profile. - /// - public class PSProfile : PSTrackedResource - { - private const string ProfileKeyPatternFormat = - @"\/subscriptions\/(?<{0}>.*)\/resourcegroups\/(?<{1}>.*)\/providers\/Microsoft\.Cdn\/profiles\/(?<{2}>.*)"; - private const string SubscriptionIdGroupKey = "subscriptionId"; - private const string ResourceGroupGroupKey = "resourceGroup"; - private const string ProfileNameGroupKey = "profileName"; - - /// - /// Gets or sets the profile sku. - /// - public PSSku Sku { get; set; } - - /// - /// Gets or sets the profile state. - /// - public PSProfileResourceState ResourceState { get; set; } - - /// - /// Gets the resource group from resource id. - /// - public string ResourceGroupName - { - get - { - var match = Regex.Match(Id, - string.Format(ProfileKeyPatternFormat, - SubscriptionIdGroupKey, - ResourceGroupGroupKey, - ProfileNameGroupKey), RegexOptions.IgnoreCase); - return match.Groups[ResourceGroupGroupKey].Value; - } - } - } -} diff --git a/src/Cdn/Cdn/Models/Profile/PSProfileResourceState.cs b/src/Cdn/Cdn/Models/Profile/PSProfileResourceState.cs deleted file mode 100644 index 7ecac1561624..000000000000 --- a/src/Cdn/Cdn/Models/Profile/PSProfileResourceState.cs +++ /dev/null @@ -1,26 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Models.Profile -{ - public enum PSProfileResourceState - { - Creating, - Active, - Activating, - Disabling, - Disabled, - Deleting - } -} diff --git a/src/Cdn/Cdn/Models/Profile/PSSku.cs b/src/Cdn/Cdn/Models/Profile/PSSku.cs deleted file mode 100644 index 7dfd7a41f49b..000000000000 --- a/src/Cdn/Cdn/Models/Profile/PSSku.cs +++ /dev/null @@ -1,21 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Models.Profile -{ - public class PSSku - { - public PSSkuName Name { get; set; } - } -} diff --git a/src/Cdn/Cdn/Models/Profile/PSSkuName.cs b/src/Cdn/Cdn/Models/Profile/PSSkuName.cs deleted file mode 100644 index b1cfb888e3c3..000000000000 --- a/src/Cdn/Cdn/Models/Profile/PSSkuName.cs +++ /dev/null @@ -1,34 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Models.Profile -{ - public enum PSSkuName - { - Standard_Verizon, - Premium_Verizon, - Custom_Verizon, - Standard_Akamai, - Standard_Microsoft, - Standard_ChinaCdn, - Premium_ChinaCdn, - Standard_955BandWidth_ChinaCdn, - Standard_AvgBandWidth_ChinaCdn, - StandardPlus_ChinaCdn, - StandardPlus_955BandWidth_ChinaCdn, - StandardPlus_AvgBandWidth_ChinaCdn, - Standard_AzureFrontDoor, - Premium_AzureFrontDoor - } -} \ No newline at end of file diff --git a/src/Cdn/Cdn/Models/Profile/PSSsoUri.cs b/src/Cdn/Cdn/Models/Profile/PSSsoUri.cs deleted file mode 100644 index 964481635f62..000000000000 --- a/src/Cdn/Cdn/Models/Profile/PSSsoUri.cs +++ /dev/null @@ -1,21 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -namespace Microsoft.Azure.Commands.Cdn.Models.Profile -{ - public class PSSsoUri - { - public string SsoUriValue { get; set; } - } -} diff --git a/src/Cdn/Cdn/Origin/GetAzureRmCdnOrigin.cs b/src/Cdn/Cdn/Origin/GetAzureRmCdnOrigin.cs deleted file mode 100644 index 5a0af21e3989..000000000000 --- a/src/Cdn/Cdn/Origin/GetAzureRmCdnOrigin.cs +++ /dev/null @@ -1,90 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.Origin; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using System.Linq; -using Microsoft.Azure.Commands.Cdn.Models.Endpoint; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; - -namespace Microsoft.Azure.Commands.Cdn.Origin -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnOrigin", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSOrigin))] - public class GetAzureRmCdnOrigin : AzureCdnCmdletBase - { - [Parameter(Mandatory = false, HelpMessage = "Azure CDN origin name.")] - [ValidateNotNullOrEmpty] - public string OriginName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN endpoint name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN profile name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource group of the Azure CDN profile.", ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource id of the Azure CDN origin.", ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The CDN endpoint object.", ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSEndpoint CdnEndpoint { get; set; } - - public override void ExecuteCmdlet() - { - - if(ParameterSetName == ObjectParameterSet) - { - EndpointName = CdnEndpoint.Name; - ProfileName = CdnEndpoint.ProfileName; - ResourceGroupName = CdnEndpoint.ResourceGroupName; - } - - if (ParameterSetName == ResourceIdParameterSet) - { - var parsedResourceId = new ResourceIdentifier(ResourceId); - ResourceGroupName = parsedResourceId.ResourceGroupName; - ProfileName = parsedResourceId.GetProfileName(); - EndpointName = parsedResourceId.GetEndpointName(); - OriginName = parsedResourceId.ResourceName; - } - - if (OriginName == null) - { - //list all origins on this endpoint - var origins = CdnManagementClient.Origins.ListByEndpoint(ResourceGroupName, ProfileName, EndpointName).Select(o => o.ToPsOrigin()); - WriteVerbose(Resources.Success); - WriteObject(origins, true); - } - else - { - var origin = CdnManagementClient.Origins.Get(ResourceGroupName, ProfileName, EndpointName, OriginName); - WriteVerbose(Resources.Success); - WriteObject(origin.ToPsOrigin()); - } - } - } -} diff --git a/src/Cdn/Cdn/Origin/NewAzCdnOrigin.cs b/src/Cdn/Cdn/Origin/NewAzCdnOrigin.cs deleted file mode 100644 index d76fcbdf8b16..000000000000 --- a/src/Cdn/Cdn/Origin/NewAzCdnOrigin.cs +++ /dev/null @@ -1,150 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.Origin; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Origin -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnOrigin", SupportsShouldProcess = true, DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSOrigin))] - public class NewAzCdnOrigin : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = "Azure CDN endpoint name.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = true, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN origin host name.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = true, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public string HostName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Azure CDN origin http port.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = false, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public int? HttpPort { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Azure CDN origin https port.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = false, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public int? HttpsPort { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Azure CDN origin host header.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = false, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginHostHeader { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN origin name.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = true, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN profile name.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = true, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Azure CDN origin priority.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = false, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public int? Priority { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "A custom message to be included in the approval request to connect to the Private Link.", ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public string PrivateLinkApprovalMessage { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN origin private link location.", ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public string PrivateLinkLocation { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN origin private link resource id.", ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public string PrivateLinkResourceId { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource group of the Azure CDN profile.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = true, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Azure CDN origin weight.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = false, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public int? Weight { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The CDN origin object.", ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSOrigin CdnOrigin { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - EndpointName = CdnOrigin.EndpointName; - HostName = CdnOrigin.HostName; - HttpPort = CdnOrigin.HttpPort; - HttpsPort = CdnOrigin.HttpsPort; - OriginHostHeader = CdnOrigin.OriginHostHeader; - OriginName = CdnOrigin.Name; - Priority = CdnOrigin.Priority; - PrivateLinkApprovalMessage = CdnOrigin.PrivateLinkApprovalMessage; - PrivateLinkLocation = CdnOrigin.PrivateLinkLocation; - PrivateLinkResourceId = CdnOrigin.PrivateLinkResourceId; - ProfileName = CdnOrigin.ProfileName; - ResourceGroupName = CdnOrigin.ResourceGroupName; - Weight = CdnOrigin.Weight; - } - - ConfirmAction(MyInvocation.InvocationName, OriginName, CreateOrigin); - } - - private void CreateOrigin() - { - Management.Cdn.Models.Origin origin = new Management.Cdn.Models.Origin(); - - origin.HostName = HostName; - origin.HttpPort = HttpPort; - origin.HttpsPort = HttpsPort; - origin.OriginHostHeader = OriginHostHeader; - origin.Priority = Priority; - origin.PrivateLinkResourceId = PrivateLinkResourceId; - origin.PrivateLinkApprovalMessage = PrivateLinkApprovalMessage; - origin.PrivateLinkLocation = PrivateLinkLocation; - origin.Weight = Weight; - - try - { - var createdOrigin = CdnManagementClient.Origins.Create( - ResourceGroupName, - ProfileName, - EndpointName, - OriginName, - origin); - - WriteVerbose(Resources.Success); - WriteObject(createdOrigin.ToPsOrigin()); - } - catch (Management.Cdn.Models.ErrorResponseException e) - { - throw new PSArgumentException(string.Format("Error response received.Error Message: '{0}'", - e.Response.Content)); - } - } - } -} diff --git a/src/Cdn/Cdn/Origin/RemoveAzCdnOrigin.cs b/src/Cdn/Cdn/Origin/RemoveAzCdnOrigin.cs deleted file mode 100644 index 5e3006859c63..000000000000 --- a/src/Cdn/Cdn/Origin/RemoveAzCdnOrigin.cs +++ /dev/null @@ -1,103 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Commands.Cdn.Models.Origin; - -namespace Microsoft.Azure.Commands.Cdn.Origin -{ - [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnOrigin", SupportsShouldProcess = true, DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(bool))] - public class RemoveAzCdnOrigin : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = "Azure CDN origin name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN endpoint name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN profile name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource group of the Azure CDN profile.", ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource id of the Azure CDN origin.", ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Return object if specified.")] - public SwitchParameter PassThru { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The CDN origin object.", ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSOrigin CdnOrigin { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - ResourceGroupName = CdnOrigin.ResourceGroupName; - ProfileName = CdnOrigin.ProfileName; - EndpointName = CdnOrigin.EndpointName; - OriginName = CdnOrigin.Name; - } - - if (ParameterSetName == ResourceIdParameterSet) - { - var parsedResourceId = new ResourceIdentifier(ResourceId); - ResourceGroupName = parsedResourceId.ResourceGroupName; - ProfileName = parsedResourceId.GetProfileName(); - EndpointName = parsedResourceId.GetEndpointName(); - OriginName = parsedResourceId.ResourceName; - } - - ConfirmAction(MyInvocation.InvocationName, OriginName, DeleteOrigin); - - if (PassThru) - { - WriteObject(true); - } - } - - public void DeleteOrigin() - { - try - { - CdnManagementClient.Origins.Delete( - ResourceGroupName, - ProfileName, - EndpointName, - OriginName); - - WriteVerbose(Resources.Success); - } - catch (Microsoft.Azure.Management.Cdn.Models.ErrorResponseException e) - { - throw new PSArgumentException(string.Format("Error response received.Error Message: '{0}'", - e.Response.Content)); - } - } - } -} diff --git a/src/Cdn/Cdn/Origin/SetAzureRmCdnOrigin.cs b/src/Cdn/Cdn/Origin/SetAzureRmCdnOrigin.cs deleted file mode 100644 index a5dc71ef17fd..000000000000 --- a/src/Cdn/Cdn/Origin/SetAzureRmCdnOrigin.cs +++ /dev/null @@ -1,150 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.Origin; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Origin -{ - [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnOrigin", SupportsShouldProcess = true, DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSOrigin))] - public class SetAzureRmCdnOrigin : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = "Azure CDN endpoint name.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = true, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN origin host name.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = true, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public string HostName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Azure CDN origin http port.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = false, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public int? HttpPort { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Azure CDN origin https port.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = false, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public int? HttpsPort { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Azure CDN origin host header.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = false, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginHostHeader { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN origin name.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = true, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN profile name.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = true, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Azure CDN origin priority.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = false, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public int? Priority { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "A custom message to be included in the approval request to connect to the Private Link.", ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public string PrivateLinkApprovalMessage { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN origin private link location.", ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public string PrivateLinkLocation { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN origin private link resource id.", ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public string PrivateLinkResourceId { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource group of the Azure CDN profile.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = true, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Azure CDN origin weight.", ParameterSetName = FieldsParameterSet)] - [Parameter(Mandatory = false, ParameterSetName = ByFieldsPrivateLinkParameterSet)] - [ValidateNotNullOrEmpty] - public int? Weight { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The CDN origin object.", ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSOrigin CdnOrigin { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - ResourceGroupName = CdnOrigin.ResourceGroupName; - ProfileName = CdnOrigin.ProfileName; - EndpointName = CdnOrigin.EndpointName; - OriginName = CdnOrigin.Name; - HostName = CdnOrigin.HostName; - HttpPort = CdnOrigin.HttpPort; - HttpsPort = CdnOrigin.HttpsPort; - OriginHostHeader = CdnOrigin.OriginHostHeader; - Priority = CdnOrigin.Priority; - PrivateLinkApprovalMessage = CdnOrigin.PrivateLinkApprovalMessage; - PrivateLinkLocation = CdnOrigin.PrivateLinkLocation; - PrivateLinkResourceId = CdnOrigin.PrivateLinkResourceId; - Weight = CdnOrigin.Weight; - - } - ConfirmAction(MyInvocation.InvocationName, - string.Format("{0} ({1})", OriginName, HostName), - SetOrigin); - } - - private void SetOrigin() - { - try - { - var origin = CdnManagementClient.Origins.Update( - ResourceGroupName, - ProfileName, - EndpointName, - OriginName, - new OriginUpdateParameters( - hostName: HostName, - httpPort: HttpPort, - httpsPort: HttpsPort, - originHostHeader: OriginHostHeader, - priority: Priority, - privateLinkApprovalMessage: PrivateLinkApprovalMessage, - privateLinkLocation: PrivateLinkLocation, - privateLinkResourceId: PrivateLinkResourceId, - weight: Weight)); - - WriteVerbose(Resources.Success); - WriteObject(origin.ToPsOrigin()); - } - catch (Microsoft.Azure.Management.Cdn.Models.ErrorResponseException e) - { - throw new PSArgumentException(string.Format("Error response received.Error Message: '{0}'", - e.Response.Content)); - } - } - } -} diff --git a/src/Cdn/Cdn/OriginGroups/GetAzCdnOriginGroup.cs b/src/Cdn/Cdn/OriginGroups/GetAzCdnOriginGroup.cs deleted file mode 100644 index 86661f7021e7..000000000000 --- a/src/Cdn/Cdn/OriginGroups/GetAzCdnOriginGroup.cs +++ /dev/null @@ -1,74 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.OriginGroup; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using Microsoft.Azure.Management.Cdn; - -namespace Microsoft.Azure.Commands.Cdn.OriginGroups -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnOriginGroup", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSOriginGroup))] - public class GetAzCdnOriginGroup : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = "Azure CDN endpoint name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN origin group name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN profile name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource group of the Azure CDN profile.", ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Resource Id for the the origin group", ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ResourceIdParameterSet) - { - var parsedResourceId = new ResourceIdentifier(ResourceId); - ResourceGroupName = parsedResourceId.ResourceGroupName; - ProfileName = parsedResourceId.GetProfileName(); - EndpointName = parsedResourceId.GetEndpointName(); - OriginGroupName = parsedResourceId.ResourceName; - } - - try - { - var originGroup = CdnManagementClient.OriginGroups.Get(ResourceGroupName, ProfileName, EndpointName, OriginGroupName); - WriteVerbose(Resources.Success); - WriteObject(originGroup.ToPsOriginGroup()); - } - catch (Management.Cdn.Models.ErrorResponseException e) - { - throw new PSArgumentException(string.Format("Error response received.Error Message: '{0}'", - e.Response.Content)); - } - } - } -} diff --git a/src/Cdn/Cdn/OriginGroups/NewAzCdnOriginGroup.cs b/src/Cdn/Cdn/OriginGroups/NewAzCdnOriginGroup.cs deleted file mode 100644 index 045166b46a46..000000000000 --- a/src/Cdn/Cdn/OriginGroups/NewAzCdnOriginGroup.cs +++ /dev/null @@ -1,151 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using System.Collections.Generic; -using System; -using Microsoft.Azure.Commands.Cdn.Models.OriginGroup; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Commands.Cdn.Helpers; - -namespace Microsoft.Azure.Commands.Cdn.OriginGroups -{ - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnOriginGroup", SupportsShouldProcess = true, DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSOriginGroup))] - public class NewAzCdnOriginGroup : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = "Azure CDN endpoint name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN origin group name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN origin group ids.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public List OriginId { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The number of seconds between health probes.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public int ProbeIntervalInSeconds { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The path relative to the origin that is used to determine the health of the origin.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProbePath { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Protocol to use for health probe.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - [PSArgumentCompleter("Http", "Https")] - public string ProbeProtocol { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The type of health probe request that is made.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - [PSArgumentCompleter("GET", "HEAD")] - public string ProbeRequestType { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN profile name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource group of the Azure CDN profile.", ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The CDN origin group object.", ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSOriginGroup CdnOriginGroup { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - EndpointName = CdnOriginGroup.EndpointName; - OriginGroupName = CdnOriginGroup.Name; - ProfileName = CdnOriginGroup.ProfileName; - ResourceGroupName = CdnOriginGroup.ResourceGroupName; - - ProbeIntervalInSeconds = CdnOriginGroup.ProbeIntervalInSeconds; - ProbePath = CdnOriginGroup.ProbePath; - ProbeProtocol = CdnOriginGroup.ProbeProtocol; - ProbeRequestType = CdnOriginGroup.ProbeRequestType; - } - - ConfirmAction(MyInvocation.InvocationName, OriginGroupName, CreateOriginGroup); - } - - public void CreateOriginGroup() - { - Management.Cdn.Models.OriginGroup originGroup = new Management.Cdn.Models.OriginGroup(); - - if (ParameterSetName == ObjectParameterSet) - { - originGroup.Origins = CdnOriginGroup.Origins; - } - else - { - originGroup.Origins = new List(); - - // OriginId refers to the list of origin ids, needed to be singular name per PS guidelines - foreach (string originId in OriginId) - { - Management.Cdn.Models.ResourceReference originIdResourceReference = new Management.Cdn.Models.ResourceReference(originId); - originGroup.Origins.Add(originIdResourceReference); - } - } - - bool isProbeIntervalInSecondsNotZero = ProbeIntervalInSeconds != 0 ? true : false; - - if (isProbeIntervalInSecondsNotZero || !String.IsNullOrWhiteSpace(ProbePath) || !String.IsNullOrWhiteSpace(ProbeProtocol) || !String.IsNullOrWhiteSpace(ProbeRequestType)) - { - int probeIntervalCopy = ProbeIntervalInSeconds; - - // when probe interval is 0 or not specified, set the probe interval to the default value - if (!isProbeIntervalInSecondsNotZero) - { - probeIntervalCopy = 240; - } - - originGroup.HealthProbeSettings = new Management.Cdn.Models.HealthProbeParameters - { - ProbeIntervalInSeconds = probeIntervalCopy, - ProbePath = ProbePath, - ProbeProtocol = OriginGroupUtilities.NormalizeProbeProtocol(ProbeProtocol), - ProbeRequestType = OriginGroupUtilities.NormalizeProbeRequestType(ProbeRequestType) - }; - } - - try - { - var createdOriginGroup = CdnManagementClient.OriginGroups.Create( - ResourceGroupName, - ProfileName, - EndpointName, - OriginGroupName, - originGroup); - - WriteVerbose(Resources.Success); - WriteObject(createdOriginGroup.ToPsOriginGroup()); - } - catch (Management.Cdn.Models.ErrorResponseException e) - { - throw new PSArgumentException(string.Format("Error response received.Error Message: '{0}'", - e.Response.Content)); - } - } - } -} diff --git a/src/Cdn/Cdn/OriginGroups/RmAzCdnOriginGroup.cs b/src/Cdn/Cdn/OriginGroups/RmAzCdnOriginGroup.cs deleted file mode 100644 index f9387648b3b5..000000000000 --- a/src/Cdn/Cdn/OriginGroups/RmAzCdnOriginGroup.cs +++ /dev/null @@ -1,100 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; -using Microsoft.Azure.Commands.Cdn.Models.OriginGroup; - -namespace Microsoft.Azure.Commands.Cdn.OriginGroups -{ - [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnOriginGroup", SupportsShouldProcess = true, DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(bool))] - public class RmAzCdnOriginGroup : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, HelpMessage = "Azure CDN origin group name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN endpoint name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN profile name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource group of the Azure CDN profile.", ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource id of the Azure CDN origin group.", ParameterSetName = ResourceIdParameterSet)] - [ValidateNotNullOrEmpty] - public string ResourceId { get; set; } - - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Return object if specified.")] - public SwitchParameter PassThru { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The CDN origin group object.", ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSOriginGroup CdnOriginGroup { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - ResourceGroupName = CdnOriginGroup.ResourceGroupName; - ProfileName = CdnOriginGroup.ProfileName; - EndpointName = CdnOriginGroup.EndpointName; - OriginGroupName = CdnOriginGroup.Name; - } - - if (ParameterSetName == ResourceIdParameterSet) - { - var parsedResourceId = new ResourceIdentifier(ResourceId); - ResourceGroupName = parsedResourceId.ResourceGroupName; - ProfileName = parsedResourceId.GetProfileName(); - EndpointName = parsedResourceId.GetEndpointName(); - OriginGroupName = parsedResourceId.ResourceName; - } - - ConfirmAction(MyInvocation.InvocationName, OriginGroupName, DeleteOriginGroup); - - if (PassThru) - { - WriteObject(true); - } - } - - public void DeleteOriginGroup() - { - try - { - CdnManagementClient.OriginGroups.Delete( - ResourceGroupName, - ProfileName, - EndpointName, - OriginGroupName); - } - catch (Management.Cdn.Models.ErrorResponseException e) - { - throw new PSArgumentException(string.Format("Error response received.Error Message: '{0}'", - e.Response.Content)); - } - } - } -} diff --git a/src/Cdn/Cdn/OriginGroups/SetAzCdnOriginGroup.cs b/src/Cdn/Cdn/OriginGroups/SetAzCdnOriginGroup.cs deleted file mode 100644 index 91f41d95dcd1..000000000000 --- a/src/Cdn/Cdn/OriginGroups/SetAzCdnOriginGroup.cs +++ /dev/null @@ -1,151 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; -using System.Collections.Generic; -using Microsoft.Azure.Commands.Cdn.Models.OriginGroup; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Properties; -using System; - -namespace Microsoft.Azure.Commands.Cdn.OriginGroups -{ - [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnOriginGroup", SupportsShouldProcess = true, DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSOriginGroup))] - public class SetAzCdnOriginGroup : AzureCdnCmdletBase - { - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN endpoint name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string EndpointName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN origin group name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string OriginGroupName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN origin group ids.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public List OriginId { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The number of seconds between health probes.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public int ProbeIntervalInSeconds { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The path relative to the origin that is used to determine the health of the origin.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProbePath { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "Protocol to use for health probe.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - [PSArgumentCompleter("Http", "Https")] - public string ProbeProtocol { get; set; } - - [Parameter(Mandatory = false, HelpMessage = "The type of health probe request that is made.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - [PSArgumentCompleter("GET", "HEAD")] - public string ProbeRequestType { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "Azure CDN profile name.", ParameterSetName = FieldsParameterSet)] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, HelpMessage = "The resource group of the Azure CDN profile.", ParameterSetName = FieldsParameterSet)] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The CDN origin group object.", ParameterSetName = ObjectParameterSet)] - [ValidateNotNull] - public PSOriginGroup CdnOriginGroup { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - ResourceGroupName = CdnOriginGroup.ResourceGroupName; - ProfileName = CdnOriginGroup.ProfileName; - EndpointName = CdnOriginGroup.EndpointName; - OriginGroupName = CdnOriginGroup.Name; - - ProbeIntervalInSeconds = CdnOriginGroup.ProbeIntervalInSeconds; - ProbePath = CdnOriginGroup.ProbePath; - ProbeProtocol = CdnOriginGroup.ProbeProtocol; - ProbeRequestType = CdnOriginGroup.ProbeRequestType; - - } - - ConfirmAction(MyInvocation.InvocationName, OriginGroupName, SetOriginGroup); - } - - public void SetOriginGroup() - { - OriginGroupUpdateParameters originGroup = new OriginGroupUpdateParameters(); - - if (ParameterSetName == ObjectParameterSet) - { - originGroup.Origins = CdnOriginGroup.Origins; - } - else - { - originGroup.Origins = new List(); - - // OriginId refers to the list of origin ids, needed to be singular name per PS guidelines - foreach (string originId in OriginId) - { - ResourceReference originIdResourceReference = new ResourceReference(originId); - originGroup.Origins.Add(originIdResourceReference); - } - } - - bool isProbeIntervalInSecondsNotZero = ProbeIntervalInSeconds != 0 ? true : false; - - if (isProbeIntervalInSecondsNotZero || !String.IsNullOrWhiteSpace(ProbePath) || !String.IsNullOrWhiteSpace(ProbeProtocol) || !String.IsNullOrWhiteSpace(ProbeRequestType)) - { - int probeIntervalCopy = ProbeIntervalInSeconds; - - // when probe interval is 0 or not specified, set the probe interval to the default value - if (!isProbeIntervalInSecondsNotZero) - { - probeIntervalCopy = 240; - } - - originGroup.HealthProbeSettings = new HealthProbeParameters - { - ProbeIntervalInSeconds = probeIntervalCopy, - ProbePath = ProbePath, - ProbeProtocol = OriginGroupUtilities.NormalizeProbeProtocol(ProbeProtocol), - ProbeRequestType = OriginGroupUtilities.NormalizeProbeRequestType(ProbeRequestType) - }; - } - - try - { - var updatedOriginGroup = CdnManagementClient.OriginGroups.Update( - ResourceGroupName, - ProfileName, - EndpointName, - OriginGroupName, - originGroup); - - WriteVerbose(Resources.Success); - WriteObject(updatedOriginGroup.ToPsOriginGroup()); - } - catch (ErrorResponseException e) - { - throw new PSArgumentException(string.Format("Error response received.Error Message: '{0}'", - e.Response.Content)); - } - } - } -} diff --git a/src/Cdn/Cdn/Profile/GetAzureRmCdnProfile.cs b/src/Cdn/Cdn/Profile/GetAzureRmCdnProfile.cs deleted file mode 100644 index ce14155733d3..000000000000 --- a/src/Cdn/Cdn/Profile/GetAzureRmCdnProfile.cs +++ /dev/null @@ -1,108 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Linq; -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.Profile; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using System; -using System.Net; -using Microsoft.Azure.Management.Cdn.Models; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Profile -{ - /// - /// Defines the New-AzCdnProfile cmdlet. - /// - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnProfile"), OutputType(typeof(PSProfile))] - public class GetAzureRmCdnProfile : AzureCdnCmdletBase - { - /// - /// Gets or sets the profile name. - /// - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Azure CDN profile name.")] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - /// - /// The resource group name of the profile. - /// - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group of the Azure CDN profile.")] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - - public override void ExecuteCmdlet() - { - if (ProfileName == null && ResourceGroupName == null) - { - // List by subscription. - var profiles = CdnManagementClient.Profiles.List() - .Where(profile => (profile.Sku.Name != "Premium_AzureFrontDoor") && (profile.Sku.Name != "Standard_AzureFrontDoor")) - .Select(profile => profile.ToPsProfile()); - - WriteVerbose(Resources.Success); - WriteObject(profiles, true); - } - else if (ProfileName == null && ResourceGroupName != null) - { - // List by Resource Group name. - var profiles = CdnManagementClient.Profiles.ListByResourceGroup(ResourceGroupName) - .Where(profile => (profile.Sku.Name != "Premium_AzureFrontDoor") && (profile.Sku.Name != "Standard_AzureFrontDoor")) - .Select(profile => profile.ToPsProfile()); - - WriteVerbose(Resources.Success); - WriteObject(profiles.ToArray(), true); - } - else if (ProfileName != null && ResourceGroupName == null) - { - var profiles = CdnManagementClient.Profiles.List() - .Where(profile => (profile.Sku.Name != "Premium_AzureFrontDoor") && (profile.Sku.Name != "Standard_AzureFrontDoor")) - .Where(profile => profile.Name == this.ProfileName) - .Select(profile => profile.ToPsProfile()); - - WriteVerbose(Resources.Success); - WriteObject(profiles); - } - else - { - try - { - // Get by both Profile Name and Resource Group Name. - var profile = CdnManagementClient.Profiles.Get(ResourceGroupName, ProfileName); - if ((profile.Sku.Name != "Premium_AzureFrontDoor") && (profile.Sku.Name != "Standard_AzureFrontDoor")) - { - WriteVerbose(Resources.Success); - WriteObject(profile.ToPsProfile()); - } - } - catch(ErrorResponseException ex) - { - if (ex.Response.StatusCode.Equals(HttpStatusCode.NotFound)) - { - throw new PSArgumentException(string.Format( - Resources.Error_ProfileNotFound, - ProfileName, - ResourceGroupName)); - } - } - } - } - } -} diff --git a/src/Cdn/Cdn/Profile/GetAzureRmCdnProfileResourceUsage.cs b/src/Cdn/Cdn/Profile/GetAzureRmCdnProfileResourceUsage.cs deleted file mode 100644 index b56e0b6512f6..000000000000 --- a/src/Cdn/Cdn/Profile/GetAzureRmCdnProfileResourceUsage.cs +++ /dev/null @@ -1,58 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Models.Profile; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using System.Linq; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Profile -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnProfileResourceUsage", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSResourceUsage))] - public class GetAzureRmCdnProfileResourceUsage : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "The name of the profile.")] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "The resource group to which the profile belongs.")] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = ObjectParameterSet, ValueFromPipeline = true, HelpMessage = "The Azure CDN profile object.")] - [ValidateNotNullOrEmpty] - public PSProfile CdnProfile { get; set; } - - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - ResourceGroupName = CdnProfile.ResourceGroupName; - ProfileName = CdnProfile.Name; - } - - var profileResourceUsages = CdnManagementClient.Profiles.ListResourceUsage(ResourceGroupName, ProfileName).Select(r => r.ToPsResourceUsage()); - - WriteVerbose(Resources.Success); - WriteObject(profileResourceUsages); - } - } -} diff --git a/src/Cdn/Cdn/Profile/GetAzureRmCdnProfileSsoUrl.cs b/src/Cdn/Cdn/Profile/GetAzureRmCdnProfileSsoUrl.cs deleted file mode 100644 index fa34080365ed..000000000000 --- a/src/Cdn/Cdn/Profile/GetAzureRmCdnProfileSsoUrl.cs +++ /dev/null @@ -1,55 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Models.Profile; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Profile -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnProfileSsoUrl", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSSsoUri))] - public class GetAzureRmCdnProfileSsoUrl : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "The name of the profile.")] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "The resource group to which the profile belongs.")] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = ObjectParameterSet, ValueFromPipeline = true, HelpMessage = "The Azure CDN profile object.")] - [ValidateNotNullOrEmpty] - public PSProfile CdnProfile { get; set; } - - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - ResourceGroupName = CdnProfile.ResourceGroupName; - ProfileName = CdnProfile.Name; - } - - var sso = CdnManagementClient.Profiles.GenerateSsoUri(ResourceGroupName, ProfileName); - - WriteVerbose(Resources.Success); - WriteObject(new PSSsoUri {SsoUriValue = sso.SsoUriValue }); - } - } -} diff --git a/src/Cdn/Cdn/Profile/GetAzureRmCdnProfileSupportedOptimizationType.cs b/src/Cdn/Cdn/Profile/GetAzureRmCdnProfileSupportedOptimizationType.cs deleted file mode 100644 index 3e1b9b1ff901..000000000000 --- a/src/Cdn/Cdn/Profile/GetAzureRmCdnProfileSupportedOptimizationType.cs +++ /dev/null @@ -1,59 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections.Generic; -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Models.Profile; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using System.Linq; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Profile -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnProfileSupportedOptimizationType", DefaultParameterSetName = FieldsParameterSet), OutputType(typeof(PSOptimizationType))] - public class GetAzureRmCdnProfileSupportedOptimizationType : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "The name of the profile.")] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "The resource group to which the profile belongs.")] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = ObjectParameterSet, ValueFromPipeline = true, HelpMessage = "The Azure CDN profile object.")] - [ValidateNotNullOrEmpty] - public PSProfile CdnProfile { get; set; } - - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - ResourceGroupName = CdnProfile.ResourceGroupName; - ProfileName = CdnProfile.Name; - } - var supportedOptimizationTypes = - CdnManagementClient.Profiles.ListSupportedOptimizationTypes(ResourceGroupName, ProfileName).SupportedOptimizationTypes.Select(optimizationType => new PSOptimizationType(optimizationType)).ToList(); - - WriteVerbose(Resources.Success); - WriteObject(supportedOptimizationTypes, true); - } - } -} diff --git a/src/Cdn/Cdn/Profile/NewAzureRmCdnProfile.cs b/src/Cdn/Cdn/Profile/NewAzureRmCdnProfile.cs deleted file mode 100644 index c1c3e4dfee1e..000000000000 --- a/src/Cdn/Cdn/Profile/NewAzureRmCdnProfile.cs +++ /dev/null @@ -1,109 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Collections; -using System.Management.Automation; -using System.Net; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.Profile; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using SdkSku = Microsoft.Azure.Management.Cdn.Models.Sku; -using SdkSkuName = Microsoft.Azure.Management.Cdn.Models.SkuName; -using System.Linq; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Profile -{ - /// - /// Defines the New-AzCdnProfile cmdlet. - /// - [Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnProfile", SupportsShouldProcess = true), OutputType(typeof(PSProfile))] - public class NewAzureRmCdnProfile : AzureCdnCmdletBase - { - /// - /// Gets or sets the profile name. - /// - [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Azure CDN profile name.")] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - /// - /// The location in which to create the profile. - /// - [Parameter(Mandatory = true, HelpMessage = "The location in which to create the CDN profile.")] - [LocationCompleter("Microsoft.Cdn/profiles")] - [ValidateNotNullOrEmpty] - public string Location { get; set; } - - /// - /// The pricing sku name of the profile. - /// - [Parameter(Mandatory = true, HelpMessage = "The pricing sku name of the Azure CDN profile. Valid values are StandardVerizon, StandardAkamai, Standard_Microsoft and PremiumVerizon.")] - public PSSkuName Sku { get; set; } - - /// - /// The resource group name of the profile. - /// - [Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group of the Azure CDN profile will be created in.")] - [ResourceGroupCompleter()] - public string ResourceGroupName { get; set; } - - /// - /// The tags to associate with the Azure Cdn Profile. - /// - [Parameter(Mandatory = false, - HelpMessage = "The tags to associate with the Azure CDN profile.")] - public Hashtable Tag { get; set; } - - - public override void ExecuteCmdlet() - { - - var existingProfile = CdnManagementClient.Profiles.List() - .Select(p => p.ToPsProfile()) - .Where(p => p.Name.ToLower() == ProfileName.ToLower()) - .FirstOrDefault(p => p.ResourceGroupName.ToLower() == ResourceGroupName.ToLower()); - - if (existingProfile != null) - { - throw new PSArgumentException(string.Format(Resources.Error_CreateExistingProfile, ProfileName, - ResourceGroupName)); - } - - ConfirmAction(MyInvocation.InvocationName, - ProfileName, - NewProfile); - } - - private void NewProfile() - { - var cdnProfile = CdnManagementClient.Profiles.Create( - ResourceGroupName, - ProfileName, - new Management.Cdn.Models.Profile( - Location, - new SdkSku(Sku.ToString()), - id: null, - name: null, - type: null, - tags: Tag.ToDictionaryTags()) - ); - - WriteObject(cdnProfile.ToPsProfile()); - } - } -} diff --git a/src/Cdn/Cdn/Profile/RemoveAzureRmCdnProfile.cs b/src/Cdn/Cdn/Profile/RemoveAzureRmCdnProfile.cs deleted file mode 100644 index 05c70cb09c58..000000000000 --- a/src/Cdn/Cdn/Profile/RemoveAzureRmCdnProfile.cs +++ /dev/null @@ -1,111 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Management.Automation; -using System.Net; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Models.Profile; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Management.Cdn.Models; -using System.Linq; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; - -namespace Microsoft.Azure.Commands.Cdn.Profile -{ - [Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnProfile", SupportsShouldProcess = true), OutputType(typeof(bool))] - public class RemoveAzureRmCdnProfile : AzureCdnCmdletBase - { - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "The name of the Azure CDN profile.")] - [ValidateNotNullOrEmpty] - public string ProfileName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = FieldsParameterSet, HelpMessage = "The resource group to which the Azure CDN profile belongs.")] - [ResourceGroupCompleter()] - [ValidateNotNullOrEmpty] - public string ResourceGroupName { get; set; } - - [Parameter(Mandatory = true, ParameterSetName = ObjectParameterSet, ValueFromPipeline = true, HelpMessage = "The Azure CDN profile.")] - [ValidateNotNullOrEmpty] - public PSProfile CdnProfile { get; set; } - - [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Return object (if specified).")] - public SwitchParameter PassThru { get; set; } - - [Parameter()] - public SwitchParameter Force { get; set; } - - public override void ExecuteCmdlet() - { - if (ParameterSetName == ObjectParameterSet) - { - ResourceGroupName = CdnProfile.ResourceGroupName; - ProfileName = CdnProfile.Name; - } - - try - { - // The current subscription level based profile list api has maximum item limit which will - // casue profile missing in the response - var existingProfile = CdnManagementClient.Profiles.Get(ResourceGroupName, ProfileName); - if (existingProfile.Sku.Name == AfdSkuConstants.PremiumAzureFrontDoor || - existingProfile.Sku.Name == AfdSkuConstants.StandardAzureFrontDoor) - { - throw new PSArgumentException($"You are attempting to delete a {existingProfile.Sku.Name} profile. Please use RemoveAzFrontDoorCdnProfile instead."); - } - } - catch (ErrorResponseException ex) - { - if (ex.Response.StatusCode.Equals(HttpStatusCode.NotFound)) - { - throw new PSArgumentException(string.Format( - Resources.Error_DeleteNonExistingProfile, - ProfileName, - ResourceGroupName)); - } - else - { - throw; - } - } - - ConfirmAction(Force, - string.Format(Resources.Confirm_RemoveProfile, ProfileName), - this.MyInvocation.InvocationName, - ProfileName, - () => CdnManagementClient.Profiles.Delete(ResourceGroupName, ProfileName), - () => ContainsEndpoints()); - - if (PassThru) - { - WriteObject(true); - } - } - - private bool ContainsEndpoints() - { - var existingEndpoints = CdnManagementClient.Endpoints.ListByProfile(ResourceGroupName, ProfileName); - if(existingEndpoints.Count() > 0) - { - return true; - } - else - { - return false; - } - } - } -} diff --git a/src/Cdn/Cdn/Profile/SetAzureRmCdnProfile.cs b/src/Cdn/Cdn/Profile/SetAzureRmCdnProfile.cs deleted file mode 100644 index f6a7eb24612e..000000000000 --- a/src/Cdn/Cdn/Profile/SetAzureRmCdnProfile.cs +++ /dev/null @@ -1,55 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Models.Profile; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; - -namespace Microsoft.Azure.Commands.Cdn.Profile -{ - /// - /// Defines the New-AzCdnProfile cmdlet. - /// - [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnProfile", SupportsShouldProcess = true), OutputType(typeof(PSProfile))] - public class SetAzureRmCdnProfile : AzureCdnCmdletBase - { - /// - /// Gets or sets the profile to update. - /// - [Parameter(Mandatory = true, ValueFromPipeline = true, HelpMessage = "The Azure CDN profile object.")] - [ValidateNotNull] - public PSProfile CdnProfile { get; set; } - - public override void ExecuteCmdlet() - { - ConfirmAction(MyInvocation.InvocationName, - CdnProfile.Name, - SetProfile); - } - - private void SetProfile() - { - var profile = CdnManagementClient.Profiles.Update( - CdnProfile.ResourceGroupName, - CdnProfile.Name, - CdnProfile.Tags.ToDictionaryTags()); - - WriteVerbose(Resources.Success); - WriteObject(profile.ToPsProfile()); - } - } -} diff --git a/src/Cdn/Cdn/Properties/AssemblyInfo.cs b/src/Cdn/Cdn/Properties/AssemblyInfo.cs deleted file mode 100644 index c79e6e930dc8..000000000000 --- a/src/Cdn/Cdn/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,29 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("Microsoft Azure Powershell - CDN")] -[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] -[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] -[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] - -[assembly: ComVisible(false)] -[assembly: CLSCompliant(false)] -[assembly: Guid("d90791a2-8102-47fc-8150-de25ae796eb1")] -[assembly: AssemblyVersion("1.8.3")] -[assembly: AssemblyFileVersion("1.8.3")] diff --git a/src/Cdn/Cdn/Properties/Resources.Designer.cs b/src/Cdn/Cdn/Properties/Resources.Designer.cs deleted file mode 100644 index be46e504f574..000000000000 --- a/src/Cdn/Cdn/Properties/Resources.Designer.cs +++ /dev/null @@ -1,279 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Microsoft.Azure.Commands.Cdn.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.Commands.Cdn.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to permanently remove custom domain '{0}' from endpoint '{1}' in profile '{2}', resource group '{3}'?. - /// - internal static string Confirm_RemoveCustomDomain { - get { - return ResourceManager.GetString("Confirm_RemoveCustomDomain", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to permanently remove endpoint '{0}' from profile '{1}' in resource group '{2}'?. - /// - internal static string Confirm_RemoveEndpoint { - get { - return ResourceManager.GetString("Confirm_RemoveEndpoint", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Profile {0} currently contains endpoints. Are you sure you want to permanently remove profile '{0}'?. - /// - internal static string Confirm_RemoveProfile { - get { - return ResourceManager.GetString("Confirm_RemoveProfile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to stop endpoint '{0}' from profile '{1}' in resource group '{2}'?. - /// - internal static string Confirm_StopEndpoint { - get { - return ResourceManager.GetString("Confirm_StopEndpoint", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Confirm. - /// - internal static string Confirm_Title { - get { - return ResourceManager.GetString("Confirm_Title", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to There is already an existing custom domain with name '{0}' in the endpoint '{1}', profile '{2}', resource group '{3}'. - /// - internal static string Error_CreateExistingCustomDomain { - get { - return ResourceManager.GetString("Error_CreateExistingCustomDomain", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to There is already an existing endpoint with name '{0}'.. - /// - internal static string Error_CreateExistingEndpoint { - get { - return ResourceManager.GetString("Error_CreateExistingEndpoint", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to There is already an existing profile with name '{0}' in the resource group '{1}'.. - /// - internal static string Error_CreateExistingProfile { - get { - return ResourceManager.GetString("Error_CreateExistingProfile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Endpoint with name '{0}' in the profile '{1}' and resource group '{2}' does not exist.. - /// - internal static string Error_DeleteNonExistingEndpoint { - get { - return ResourceManager.GetString("Error_DeleteNonExistingEndpoint", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Origin with name '{0}' on endpoint '{1}' could not be found.. - /// - internal static string Error_DeleteNonExistingOrigin { - get { - return ResourceManager.GetString("Error_DeleteNonExistingOrigin", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Profile with name '{0}' in the resource group '{1}' does not exist.. - /// - internal static string Error_DeleteNonExistingProfile { - get { - return ResourceManager.GetString("Error_DeleteNonExistingProfile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Custom domain with name '{0}' in the endpoint '{1}',profile '{2}', resource group '{3}' does not exist.. - /// - internal static string Error_NonExistingCustomDomain { - get { - return ResourceManager.GetString("Error_NonExistingCustomDomain", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Profile with name '{0}' in the resource group '{1}' does not exist.. - /// - internal static string Error_ProfileNotFound { - get { - return ResourceManager.GetString("Error_ProfileNotFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The resource group name is not specified. Specify the resource group or do not specify profile name.. - /// - internal static string Error_ResourceGroupNotSpecified { - get { - return ResourceManager.GetString("Error_ResourceGroupNotSpecified", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Removing custom domain .... - /// - internal static string Progress_RemovingCustomDomain { - get { - return ResourceManager.GetString("Progress_RemovingCustomDomain", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Removing endpoint .... - /// - internal static string Progress_RemovingEndpoint { - get { - return ResourceManager.GetString("Progress_RemovingEndpoint", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Removing origin.... - /// - internal static string Progress_RemovingOrigin { - get { - return ResourceManager.GetString("Progress_RemovingOrigin", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Removing profile .... - /// - internal static string Progress_RemovingProfile { - get { - return ResourceManager.GetString("Progress_RemovingProfile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Success!. - /// - internal static string Success { - get { - return ResourceManager.GetString("Success", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Remove-AzCdnCustomDomain on {0}.. - /// - internal static string Success_RemoveCustomDomain { - get { - return ResourceManager.GetString("Success_RemoveCustomDomain", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Remove-AzCdnEndpoint on {0}.. - /// - internal static string Success_RemoveEndpoint { - get { - return ResourceManager.GetString("Success_RemoveEndpoint", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Remove-AzCdnProfile on {0}.. - /// - internal static string Success_RemoveProfile { - get { - return ResourceManager.GetString("Success_RemoveProfile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Endpoint with name '{0}' in the profile '{1}' and resource group '{2}' has been started.. - /// - internal static string Success_StartEndpoint { - get { - return ResourceManager.GetString("Success_StartEndpoint", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Stop-AzCdnEndpoint on {0}.. - /// - internal static string Success_StopEndpoint { - get { - return ResourceManager.GetString("Success_StopEndpoint", resourceCulture); - } - } - } -} diff --git a/src/Cdn/Cdn/Properties/Resources.resx b/src/Cdn/Cdn/Properties/Resources.resx deleted file mode 100644 index 8fa57f7a5ad7..000000000000 --- a/src/Cdn/Cdn/Properties/Resources.resx +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Are you sure you want to permanently remove custom domain '{0}' from endpoint '{1}' in profile '{2}', resource group '{3}'? - - - Are you sure you want to permanently remove endpoint '{0}' from profile '{1}' in resource group '{2}'? - - - Profile {0} currently contains endpoints. Are you sure you want to permanently remove profile '{0}'? - - - Are you sure you want to stop endpoint '{0}' from profile '{1}' in resource group '{2}'? - - - Confirm - - - There is already an existing custom domain with name '{0}' in the endpoint '{1}', profile '{2}', resource group '{3}' - - - There is already an existing endpoint with name '{0}'. - - - There is already an existing profile with name '{0}' in the resource group '{1}'. - - - Endpoint with name '{0}' in the profile '{1}' and resource group '{2}' does not exist. - - - Origin with name '{0}' on endpoint '{1}' could not be found. - - - Profile with name '{0}' in the resource group '{1}' does not exist. - - - Custom domain with name '{0}' in the endpoint '{1}',profile '{2}', resource group '{3}' does not exist. - - - Profile with name '{0}' in the resource group '{1}' does not exist. - - - The resource group name is not specified. Specify the resource group or do not specify profile name. - - - Removing custom domain ... - - - Removing endpoint ... - - - Removing origin... - - - Removing profile ... - - - Success! - - - Remove-AzCdnCustomDomain on {0}. - - - Remove-AzCdnEndpoint on {0}. - - - Remove-AzCdnProfile on {0}. - - - Endpoint with name '{0}' in the profile '{1}' and resource group '{2}' has been started. - - - Stop-AzCdnEndpoint on {0}. - - \ No newline at end of file diff --git a/src/Cdn/Cdn/StartupScripts/sample.ps1 b/src/Cdn/Cdn/StartupScripts/sample.ps1 deleted file mode 100644 index 50ac77403ab6..000000000000 --- a/src/Cdn/Cdn/StartupScripts/sample.ps1 +++ /dev/null @@ -1 +0,0 @@ -#Placeholder for future scripts: Please delete this file and uncomment Always within the block in the .csproj file. \ No newline at end of file diff --git a/src/Cdn/Cdn/Subscription/GetAzureRmCdnEdgeNode.cs b/src/Cdn/Cdn/Subscription/GetAzureRmCdnEdgeNode.cs deleted file mode 100644 index c11439162de2..000000000000 --- a/src/Cdn/Cdn/Subscription/GetAzureRmCdnEdgeNode.cs +++ /dev/null @@ -1,40 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using System.Linq; -using Microsoft.Azure.Commands.Cdn.EdgeNodes; -using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; - -namespace Microsoft.Azure.Commands.Cdn.Endpoint -{ - [GenericBreakingChange("Get-AzCdnEdgeNodes alias will be removed in an upcoming breaking change release", "2.0.0")] - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnEdgeNode"), OutputType(typeof(PSEdgeNode))] - [Alias("Get-AzCdnEdgeNodes")] - public class GetAzureRmCdnEdgeNode : AzureCdnCmdletBase - { - - public override void ExecuteCmdlet() - { - var resourceUsages = CdnManagementClient.EdgeNodes.List().Select(e => e.ToPsEdgeNode()); - - WriteVerbose(Resources.Success); - WriteObject(resourceUsages); - } - } -} diff --git a/src/Cdn/Cdn/Subscription/GetAzureRmCdnSubscriptionResourceUsage.cs b/src/Cdn/Cdn/Subscription/GetAzureRmCdnSubscriptionResourceUsage.cs deleted file mode 100644 index 7e7ac0c4b4ef..000000000000 --- a/src/Cdn/Cdn/Subscription/GetAzureRmCdnSubscriptionResourceUsage.cs +++ /dev/null @@ -1,37 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Management.Automation; -using Microsoft.Azure.Commands.Cdn.Common; -using Microsoft.Azure.Commands.Cdn.Helpers; -using Microsoft.Azure.Commands.Cdn.Properties; -using Microsoft.Azure.Management.Cdn; -using Microsoft.Azure.Commands.Cdn.Models; -using System.Linq; - -namespace Microsoft.Azure.Commands.Cdn.Endpoint -{ - [Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "CdnSubscriptionResourceUsage"), OutputType(typeof(PSResourceUsage))] - public class GetAzureRmCdnSubscriptionResourceUsage : AzureCdnCmdletBase - { - - public override void ExecuteCmdlet() - { - var resourceUsages = CdnManagementClient.ResourceUsage.List().Select(r => r.ToPsResourceUsage()); - - WriteVerbose(Resources.Success); - WriteObject(resourceUsages); - } - } -} diff --git a/src/Cdn/Cdn/help/Az.Cdn.md b/src/Cdn/Cdn/help/Az.Cdn.md deleted file mode 100644 index a398a6e2ce69..000000000000 --- a/src/Cdn/Cdn/help/Az.Cdn.md +++ /dev/null @@ -1,235 +0,0 @@ ---- -Module Name: Az.Cdn -Module Guid: 91832aaa-dc11-4583-8239-bce5fd531604 -Download Help Link: https://docs.microsoft.com/powershell/module/az.cdn -Help Version: 4.2.4.0 -Locale: en-US ---- - -# Az.Cdn Module -## Description -The topics in this section document the Azure PowerShell cmdlets for Azure Content Delivery Network (CDN) in the Azure Resource Manager (ARM) framework. The cmdlets exist in the Microsoft.Azure.Commands.Cdn namespace. - -## Az.Cdn Cmdlets -### [Confirm-AzCdnEndpointProbeURL](Confirm-AzCdnEndpointProbeURL.md) -Validates a probe URL. - -### [Disable-AzCdnCustomDomain](Disable-AzCdnCustomDomain.md) -Disables Custom Domain HTTPS (Deprecated). - -### [Disable-AzCdnCustomDomainHttps](Disable-AzCdnCustomDomainHttps.md) -Disables Custom Domain HTTPS. - -### [Enable-AzCdnCustomDomain](Enable-AzCdnCustomDomain.md) -Enables Custom Domain HTTPS (Deprecated). - -### [Enable-AzCdnCustomDomainHttps](Enable-AzCdnCustomDomainHttps.md) -Enables custom HTTPS. - -### [Get-AzAfdCustomDomain](Get-AzAfdCustomDomain.md) -Gets the AFD custom domain. - -### [Get-AzAfdEndpoint](Get-AzAfdEndpoint.md) -Gets the AFD endpoint. - -### [Get-AzAfdOrigin](Get-AzAfdOrigin.md) -Gets the AFD origin. - -### [Get-AzAfdOriginGroup](Get-AzAfdOriginGroup.md) -Gets the AFD origin group. - -### [Get-AzAfdProfile](Get-AzAfdProfile.md) -Gets the AFD profile. - -### [Get-AzAfdRoute](Get-AzAfdRoute.md) -Gets the AFD route. - -### [Get-AzAfdRule](Get-AzAfdRule.md) -Gets the AFD rule. - -### [Get-AzAfdRuleSet](Get-AzAfdRuleSet.md) -Gets the AFD rule set. - -### [Get-AzAfdSecurityPolicy](Get-AzAfdSecurityPolicy.md) -Gets the AFD security policy. - -### [Get-AzCdnCustomDomain](Get-AzCdnCustomDomain.md) -Gets a CDN custom domain. - -### [Get-AzCdnEdgeNode](Get-AzCdnEdgeNode.md) -Gets Azure CDN edgenodes. - -### [Get-AzCdnEndpoint](Get-AzCdnEndpoint.md) -Gets a CDN endpoint. - -### [Get-AzCdnEndpointNameAvailability](Get-AzCdnEndpointNameAvailability.md) -Gets availability status of the CDN endpoint. - -### [Get-AzCdnEndpointResourceUsage](Get-AzCdnEndpointResourceUsage.md) -Gets the resource usage of a CDN endpoint. - -### [Get-AzCdnOrigin](Get-AzCdnOrigin.md) -Gets a CDN origin server. - -### [Get-AzCdnOriginGroup](Get-AzCdnOriginGroup.md) -Gets a CDN origin group - -### [Get-AzCdnProfile](Get-AzCdnProfile.md) -Gets a CDN profile. - -### [Get-AzCdnProfileResourceUsage](Get-AzCdnProfileResourceUsage.md) -Gets the resource usage of a CDN profile. - -### [Get-AzCdnProfileSsoUrl](Get-AzCdnProfileSsoUrl.md) -Gets the single sign-on URL of a CDN profile. - -### [Get-AzCdnProfileSupportedOptimizationType](Get-AzCdnProfileSupportedOptimizationType.md) -Gets the supported optimization types for a CDN profile. - -### [Get-AzCdnSubscriptionResourceUsage](Get-AzCdnSubscriptionResourceUsage.md) -Gets the resource usage for a subscription. - -### [New-AzAfdCustomDomain](New-AzAfdCustomDomain.md) -Creates an AFD custom domain. - -### [New-AzAfdEndpoint](New-AzAfdEndpoint.md) -Creates an AFD endpoint. - -### [New-AzAfdOrigin](New-AzAfdOrigin.md) -Creates an AFD origin. - -### [New-AzAfdOriginGroup](New-AzAfdOriginGroup.md) -Creates an AFD origin group. - -### [New-AzAfdProfile](New-AzAfdProfile.md) -Creates an AFD profile. - -### [New-AzAfdRoute](New-AzAfdRoute.md) -Creates an AFD route. - -### [New-AzAfdRule](New-AzAfdRule.md) -Creates an AFD rule. - -### [New-AzAfdRuleCacheExpirationAction](New-AzAfdRuleCacheExpirationAction.md) -Creates an AFD cache expiration rule action. - -### [New-AzAfdRuleSet](New-AzAfdRuleSet.md) -Creates an AFD rule set. - -### [New-AzAfdSecurityPolicy](New-AzAfdSecurityPolicy.md) -Creates the AFD security policy. - -### [New-AzCdnCustomDomain](New-AzCdnCustomDomain.md) -Creates a custom domain for a CDN endpoint. - -### [New-AzCdnDeliveryPolicy](New-AzCdnDeliveryPolicy.md) -Creates a delivery policy. - -### [New-AzCdnDeliveryRule](New-AzCdnDeliveryRule.md) -Creates a delivery rule. - -### [New-AzCdnDeliveryRuleAction](New-AzCdnDeliveryRuleAction.md) -Creates a delivery action. - -### [New-AzCdnDeliveryRuleCondition](New-AzCdnDeliveryRuleCondition.md) -Creates a delivery rule condition. - -### [New-AzCdnEndpoint](New-AzCdnEndpoint.md) -Creates a CDN endpoint. - -### [New-AzCdnOrigin](New-AzCdnOrigin.md) -Creates a new CDN origin - -### [New-AzCdnOriginGroup](New-AzCdnOriginGroup.md) -Creates a new CDN origin group - -### [New-AzCdnProfile](New-AzCdnProfile.md) -Creates a CDN profile. - -### [Publish-AzCdnEndpointContent](Publish-AzCdnEndpointContent.md) -Loads content to an endpoint. - -### [Remove-AzAfdCustomDomain](Remove-AzAfdCustomDomain.md) -Removes an AFD custom domain. - -### [Remove-AzAfdEndpoint](Remove-AzAfdEndpoint.md) -Removes an AFD endpoint. - -### [Remove-AzAfdOrigin](Remove-AzAfdOrigin.md) -Removes an AFD origin. - -### [Remove-AzAfdOriginGroup](Remove-AzAfdOriginGroup.md) -Removes an AFD origin group. - -### [Remove-AzAfdProfile](Remove-AzAfdProfile.md) -Removes an AFD profile. - -### [Remove-AzAfdRoute](Remove-AzAfdRoute.md) -Removes an AFD route. - -### [Remove-AzAfdRule](Remove-AzAfdRule.md) -Removes an AFD rule. - -### [Remove-AzAfdRuleSet](Remove-AzAfdRuleSet.md) -Removes an AFD rule set. - -### [Remove-AzAfdSecurityPolicy](Remove-AzAfdSecurityPolicy.md) -Removes the AFD security policy. - -### [Remove-AzCdnCustomDomain](Remove-AzCdnCustomDomain.md) -Removes a custom domain. - -### [Remove-AzCdnEndpoint](Remove-AzCdnEndpoint.md) -Removes a CDN endpoint. - -### [Remove-AzCdnOrigin](Remove-AzCdnOrigin.md) -Removes a CDN origin - -### [Remove-AzCdnOriginGroup](Remove-AzCdnOriginGroup.md) -Removes a CDN origin group - -### [Remove-AzCdnProfile](Remove-AzCdnProfile.md) -Removes a CDN profile. - -### [Set-AzAfdEndpoint](Set-AzAfdEndpoint.md) -Removes an AFD endpoint. - -### [Set-AzAfdOrigin](Set-AzAfdOrigin.md) -Removes an AFD origin. - -### [Set-AzAfdOriginGroup](Set-AzAfdOriginGroup.md) -Removes an AFD origin group. - -### [Set-AzAfdProfile](Set-AzAfdProfile.md) -Removes an AFD profile. - -### [Set-AzAfdRoute](Set-AzAfdRoute.md) -Removes an AFD route. - -### [Set-AzAfdSecurityPolicy](Set-AzAfdSecurityPolicy.md) -Sets the AFD security policy. - -### [Set-AzCdnEndpoint](Set-AzCdnEndpoint.md) -Updates a CDN endpoint. - -### [Set-AzCdnOrigin](Set-AzCdnOrigin.md) -Updates a CDN origin server. - -### [Set-AzCdnOriginGroup](Set-AzCdnOriginGroup.md) -Updates the CDN origin group - -### [Set-AzCdnProfile](Set-AzCdnProfile.md) -Updates a CDN profile. - -### [Start-AzCdnEndpoint](Start-AzCdnEndpoint.md) -Starts a CDN endpoint. - -### [Stop-AzCdnEndpoint](Stop-AzCdnEndpoint.md) -Stops the CDN endpoint. - -### [Test-AzCdnCustomDomain](Test-AzCdnCustomDomain.md) -Checks whether a custom domain can be added to an endpoint. - -### [Unpublish-AzCdnEndpointContent](Unpublish-AzCdnEndpointContent.md) -Purges a CDN endpoint. - diff --git a/src/Cdn/Cdn/help/Confirm-AzCdnEndpointProbeURL.md b/src/Cdn/Cdn/help/Confirm-AzCdnEndpointProbeURL.md deleted file mode 100644 index 670579775ec7..000000000000 --- a/src/Cdn/Cdn/help/Confirm-AzCdnEndpointProbeURL.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/confirm-azcdnendpointprobeurl -schema: 2.0.0 ---- - -# Confirm-AzCdnEndpointProbeURL - -## SYNOPSIS -Validates a probe URL. - -## SYNTAX - -``` -Confirm-AzCdnEndpointProbeURL -ProbeUrl [-DefaultProfile ] - [] -``` - -## DESCRIPTION -The **Confirm-AzCdnEndpointProbeURL** cmdlet confirms if the probe URL provided can be used for dynamic site acceleration. - -## EXAMPLES - -### Example 1 -```powershell -Confirm-AzCdnEndpointProbeURL -ProbeUrl "http://www.bing.com/images" -``` - -```output -IsValid: true -ErrorCode: None -Message: -``` - -Validates the probe url "http://www.bing.com/images" - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProbeUrl -Proposed probe URL name to validate. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSValidateProbeOutput - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Disable-AzCdnCustomDomain.md b/src/Cdn/Cdn/help/Disable-AzCdnCustomDomain.md deleted file mode 100644 index 18ec6dff285b..000000000000 --- a/src/Cdn/Cdn/help/Disable-AzCdnCustomDomain.md +++ /dev/null @@ -1,190 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/disable-azcdncustomdomain -schema: 2.0.0 ---- - -# Disable-AzCdnCustomDomain - -## SYNOPSIS -Disables Custom Domain HTTPS (Deprecated). - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Disable-AzCdnCustomDomain -CustomDomainName -EndpointName -ProfileName - -ResourceGroupName [-PassThru] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### ByObjectParameterSet -``` -Disable-AzCdnCustomDomain -InputObject [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -The **Disable-AzCdnCustomDomain** cmdlet disables the secured HTTPS delivery of a CDN custom domain. - -## EXAMPLES - -### Example 1 -```powershell -Disable-AzCdnCustomDomain -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroupName -``` - -Disable https delivery of the custom domain. - -## PARAMETERS - -### -CustomDomainName -Azure CDN custom domain display name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Azure CDN endpoint name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -The custom domain object. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -PassThru -Return object (if specified). - -```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 -``` - -### -ProfileName -Azure CDN profile name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The resource group of the Azure CDN profile. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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.Commands.Cdn.Models.CustomDomain.PSCustomDomain - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Disable-AzCdnCustomDomainHttps.md b/src/Cdn/Cdn/help/Disable-AzCdnCustomDomainHttps.md deleted file mode 100644 index e91d4793ff15..000000000000 --- a/src/Cdn/Cdn/help/Disable-AzCdnCustomDomainHttps.md +++ /dev/null @@ -1,214 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/disable-azcdncustomdomainhttps -schema: 2.0.0 ---- - -# Disable-AzCdnCustomDomainHttps - -## SYNOPSIS -Disables Custom Domain HTTPS. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Disable-AzCdnCustomDomainHttps -ResourceGroupName -ProfileName -EndpointName - -CustomDomainName [-PassThru] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### ByObjectParameterSet -``` -Disable-AzCdnCustomDomainHttps -InputObject [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### ByResourceIdParameterSet -``` -Disable-AzCdnCustomDomainHttps -ResourceId [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -The **Disable-AzCdnCustomDomainHttps** cmdlet disables the secured HTTPS delivery of a CDN custom domain. - -## EXAMPLES - -### Example 1 -```powershell -Disable-AzCdnCustomDomainHttps -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -CustomDomainName $customDomainName -``` - -Disable secure delivery of the custom domain. - -## PARAMETERS - -### -CustomDomainName -Azure CDN custom domain display name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Azure CDN endpoint name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -The custom domain object. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -PassThru -Return object if specified. - -```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 -``` - -### -ProfileName -Azure CDN profile name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The resource group of the Azure CDN profile - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -ResourceId of the Custom Domain - -```yaml -Type: System.String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -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.Commands.Cdn.Models.CustomDomain.PSCustomDomain - -### System.String - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Enable-AzCdnCustomDomain.md b/src/Cdn/Cdn/help/Enable-AzCdnCustomDomain.md deleted file mode 100644 index 51138df5ba96..000000000000 --- a/src/Cdn/Cdn/help/Enable-AzCdnCustomDomain.md +++ /dev/null @@ -1,190 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/enable-azcdncustomdomain -schema: 2.0.0 ---- - -# Enable-AzCdnCustomDomain - -## SYNOPSIS -Enables Custom Domain HTTPS (Deprecated). - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Enable-AzCdnCustomDomain -CustomDomainName -EndpointName -ProfileName - -ResourceGroupName [-PassThru] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### ByObjectParameterSet -``` -Enable-AzCdnCustomDomain -InputObject [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -The **Enable-AzCdnCustomDomain** cmdlet enables the secured HTTPS delivery of a CDN custom domain. - -## EXAMPLES - -### Example 1 -```powershell -Enable-AzCdnCustomDomain -CustomDomainName $customDomainName -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroupName -``` - -Enable https delivery of the custom domain. - -## PARAMETERS - -### -CustomDomainName -Azure CDN custom domain display name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Azure CDN endpoint name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -The custom domain object. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -PassThru -Return object (if specified). - -```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 -``` - -### -ProfileName -Azure CDN profile name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The resource group of the Azure CDN profile. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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.Commands.Cdn.Models.CustomDomain.PSCustomDomain - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Enable-AzCdnCustomDomainHttps.md b/src/Cdn/Cdn/help/Enable-AzCdnCustomDomainHttps.md deleted file mode 100644 index d0da3387563d..000000000000 --- a/src/Cdn/Cdn/help/Enable-AzCdnCustomDomainHttps.md +++ /dev/null @@ -1,214 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/enable-azcdncustomdomainhttps -schema: 2.0.0 ---- - -# Enable-AzCdnCustomDomainHttps - -## SYNOPSIS -Enables custom HTTPS. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Enable-AzCdnCustomDomainHttps -ResourceGroupName -ProfileName -EndpointName - -CustomDomainName [-PassThru] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### ByObjectParameterSet -``` -Enable-AzCdnCustomDomainHttps -InputObject [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### ByResourceIdParameterSet -``` -Enable-AzCdnCustomDomainHttps -ResourceId [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -The **Enable-AzCdnCustomDomainHttps** cmdlet enables the secured HTTPS delivery of a CDN custom domain. - -## EXAMPLES - -### Example 1 -```powershell -Enable-AzCdnCustomDomainHttps -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -CustomDomainName $customDomainName -``` - -Enable secure delivery of the custom domain. - -## PARAMETERS - -### -CustomDomainName -Azure CDN custom domain display name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Azure CDN endpoint name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -The custom domain object. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -PassThru -Return object if specified. - -```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 -``` - -### -ProfileName -Azure CDN profile name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The resource group of the Azure CDN profile - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -ResourceId of the Custom Domain - -```yaml -Type: System.String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -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.Commands.Cdn.Models.CustomDomain.PSCustomDomain - -### System.String - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Get-AzCdnCustomDomain.md b/src/Cdn/Cdn/help/Get-AzCdnCustomDomain.md deleted file mode 100644 index 3f5e6216bec7..000000000000 --- a/src/Cdn/Cdn/help/Get-AzCdnCustomDomain.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: 53246003-D1E9-4863-94E9-8E0BF1272134 -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdncustomdomain -schema: 2.0.0 ---- - -# Get-AzCdnCustomDomain - -## SYNOPSIS -Gets a CDN custom domain. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Get-AzCdnCustomDomain [-CustomDomainName ] -EndpointName -ProfileName - -ResourceGroupName [-DefaultProfile ] [] -``` - -### ByObjectParameterSet -``` -Get-AzCdnCustomDomain [-CustomDomainName ] -CdnEndpoint - [-DefaultProfile ] [] -``` - -## DESCRIPTION -The **Get-AzCdnCustomDomain** cmdlet gets an Azure Content Delivery Network (CDN) custom domain and its related settings. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzCdnCustomDomain -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint -``` - -```Output -HostName : cdn.example.com -ValidationData : -ResourceState : Active -CustomHttpsProvisioningState : Disabled -CustomHttpsProvisioningSubstate : None -ResourceGroupName : myresourcegroup -ProfileName : mycdnprofile -EndpointName : myendpoint -Id : /subscriptions/11111111-1111-1111-1111-111111111111/resourcegroups/myresourcegroup/providers - /Microsoft.Cdn/profiles/mycdnprofile/endpoints/myendpoint/customdomains/cdn-example-com -Name : cdn-example-com -Type : Microsoft.Cdn/profiles/endpoints/customdomains -ProvisioningState : Succeeded -``` - -## PARAMETERS - -### -CdnEndpoint -Specifies the CDN endpoint object of which the custom domain is a member. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -CustomDomainName -Specifies the name of the custom domain. -The name of the custom domain differs from the host name of the custom domain. - -```yaml -Type: System.String -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: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Specifies the name of the endpoint to which the custom domain belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -Specifies the name of the Profile to which the custom domain belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Specifies the name of the resource group to which the custom domain belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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.Commands.Cdn.Models.Endpoint.PSEndpoint - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain - -## NOTES - -## RELATED LINKS - -[New-AzCdnCustomDomain](./New-AzCdnCustomDomain.md) - -[Remove-AzCdnCustomDomain](./Remove-AzCdnCustomDomain.md) - - diff --git a/src/Cdn/Cdn/help/Get-AzCdnEdgeNode.md b/src/Cdn/Cdn/help/Get-AzCdnEdgeNode.md deleted file mode 100644 index dd0c72a7fcad..000000000000 --- a/src/Cdn/Cdn/help/Get-AzCdnEdgeNode.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnedgenode -schema: 2.0.0 ---- - -# Get-AzCdnEdgeNode - -## SYNOPSIS -Gets Azure CDN edgenodes. - -## SYNTAX - -``` -Get-AzCdnEdgeNode [-DefaultProfile ] [] -``` - -## DESCRIPTION -The **Get-AzCdnEdgeNode** cmdlet gets Azure CDN edgenodes. - -## EXAMPLES - -### Example 1 -```powershell -(Get-AzCdnEdgeNode).IpAddressGroups[0] | ConvertTo-Json -``` - -```Output -{ - "DeliveryRegion": "All", - "Ipv4Addresses": [ - { - "BaseIpAddress": "23.200.152.0", - "PrefixLength": 21 - } - ], - "Ipv6Addresses": [ - { - "BaseIpAddress": "2600:1417:9800::", - "PrefixLength": 48 - } - ] -} -``` - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.EdgeNodes.PSEdgeNode - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Get-AzCdnEndpoint.md b/src/Cdn/Cdn/help/Get-AzCdnEndpoint.md deleted file mode 100644 index 29e08386b33b..000000000000 --- a/src/Cdn/Cdn/help/Get-AzCdnEndpoint.md +++ /dev/null @@ -1,168 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: F93D9D7C-AC2A-4D83-87EC-4A54CD45272B -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnendpoint -schema: 2.0.0 ---- - -# Get-AzCdnEndpoint - -## SYNOPSIS -Gets a CDN endpoint. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Get-AzCdnEndpoint [-EndpointName ] -ProfileName -ResourceGroupName - [-DefaultProfile ] [] -``` - -### ByObjectParameterSet -``` -Get-AzCdnEndpoint [-EndpointName ] -CdnProfile [-DefaultProfile ] - [] -``` - -## DESCRIPTION -The **Get-AzCdnEndpoint** cmdlet gets an Azure Content Delivery Network (CDN) endpoint and its associated configuration data. - -## EXAMPLES - -### Example 1: Get all endpoints in the CDN profile -```powershell -Get-AzCdnEndpoint -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -``` - -```Output -HostName : myendpoint.azureedge.net -OriginHostHeader : -OriginPath : -ContentTypesToCompress : {} -IsCompressionEnabled : False -IsHttpAllowed : True -IsHttpsAllowed : True -QueryStringCachingBehavior : IgnoreQueryString -Origins : {mystorage} -OptimizationType : -ProbePath : -GeoFilters : {} -DeliveryPolicy : -ResourceState : Running -DefaultOriginGroup : -ResourceGroupName : myresourcegroup -ProfileName : mycdnprofile -Location : WestUs -Tags : {} -Id : /subscriptions/11111111-1111-1111-1111-111111111111/resourcegroups/myresourcegroup/providers/Micr - osoft.Cdn/profiles/mycdnprofile/endpoints/myendpoint -Name : myendpoint -Type : Microsoft.Cdn/profiles/endpoints -ProvisioningState : Succeeded -``` - -## PARAMETERS - -### -CdnProfile -Specifies the CDN profile object to which the endpoint belongs. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Specifies the name of the endpoint. -The name of the endpoint is not the host name of the endpoint. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -Specifies the name of the profile to which the endpoint belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Specifies the name of the resource group to which the endpoint belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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.Commands.Cdn.Models.Profile.PSProfile - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint - -## NOTES - -## RELATED LINKS - -[New-AzCdnEndpoint](./New-AzCdnEndpoint.md) - -[Remove-AzCdnEndpoint](./Remove-AzCdnEndpoint.md) - -[Set-AzCdnEndpoint](./Set-AzCdnEndpoint.md) - -[Start-AzCdnEndpoint](./Start-AzCdnEndpoint.md) - -[Stop-AzCdnEndpoint](./Stop-AzCdnEndpoint.md) - - diff --git a/src/Cdn/Cdn/help/Get-AzCdnEndpointNameAvailability.md b/src/Cdn/Cdn/help/Get-AzCdnEndpointNameAvailability.md deleted file mode 100644 index a9f22a2e21c4..000000000000 --- a/src/Cdn/Cdn/help/Get-AzCdnEndpointNameAvailability.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: 6BBD68B4-BCC6-479A-AA70-D4ED445CFB32 -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnendpointnameavailability -schema: 2.0.0 ---- - -# Get-AzCdnEndpointNameAvailability - -## SYNOPSIS -Gets availability status of the CDN endpoint. - -## SYNTAX - -``` -Get-AzCdnEndpointNameAvailability -EndpointName [-DefaultProfile ] - [] -``` - -## DESCRIPTION -The **Get-AzCdnEndpointNameAvailability** cmdlet gets availability status of the Azure Content Delivery Network (CDN) endpoint. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzCdnEndpointNameAvailability -EndpointName myendpoint -``` - -```Output -NameAvailable Reason Message -------------- ------ ------- - True -``` - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Specifies the name of the endpoint. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSCheckNameAvailabilityOutput - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Get-AzCdnEndpointResourceUsage.md b/src/Cdn/Cdn/help/Get-AzCdnEndpointResourceUsage.md deleted file mode 100644 index ee1b48dbe4e4..000000000000 --- a/src/Cdn/Cdn/help/Get-AzCdnEndpointResourceUsage.md +++ /dev/null @@ -1,154 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnendpointresourceusage -schema: 2.0.0 ---- - -# Get-AzCdnEndpointResourceUsage - -## SYNOPSIS -Gets the resource usage of a CDN endpoint. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Get-AzCdnEndpointResourceUsage -EndpointName -ProfileName -ResourceGroupName - [-DefaultProfile ] [] -``` - -### ByObjectParameterSet -``` -Get-AzCdnEndpointResourceUsage [-EndpointName ] -CdnEndpoint - [-DefaultProfile ] [] -``` - -## DESCRIPTION -The **Get-AzCdnEndpointResourceUsage** cmdlet gets resource limits and current usage for a CDN endpoint. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzCdnEndpointResourceUsage -ProfileName profile1 -ResourceGroupName rg -EndpointName endpoint1 -``` - -```output -ResourceType Unit CurrentValue Limit ------------- ---- ------------ ----- -customdomain count 2 20 -geofilter count 1 25 -deliveryrule count 2 25 -deliveryrulecondition count 2 10 -deliveryruleaction count 1 5 -origin count 2 10 -origingroup count 2 10 -originsPerOriginGroup count 2 10 -``` - -This example shows the resource limits and current usage of the endpoint with name 'endpoint1' under profile 'profile1'. - -## PARAMETERS - -### -CdnEndpoint -The CDN endpoint object. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Azure CDN endpoint name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -```yaml -Type: System.String -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -Azure CDN profile name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The resource group of the Azure CDN Profile. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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.Commands.Cdn.Models.Endpoint.PSEndpoint - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.PSResourceUsage - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Get-AzCdnOrigin.md b/src/Cdn/Cdn/help/Get-AzCdnOrigin.md deleted file mode 100644 index de2650d2ce96..000000000000 --- a/src/Cdn/Cdn/help/Get-AzCdnOrigin.md +++ /dev/null @@ -1,189 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: 91919242-59ED-4938-A3A3-23A66F85FBC1 -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnorigin -schema: 2.0.0 ---- - -# Get-AzCdnOrigin - -## SYNOPSIS -Gets a CDN origin server. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Get-AzCdnOrigin [-OriginName ] -EndpointName -ProfileName -ResourceGroupName - [-DefaultProfile ] [] -``` - -### ByResourceIdParameterSet -``` -Get-AzCdnOrigin [-OriginName ] -ResourceId [-DefaultProfile ] - [] -``` - -### ByObjectParameterSet -``` -Get-AzCdnOrigin [-OriginName ] -CdnEndpoint [-DefaultProfile ] - [] -``` - -## DESCRIPTION -The **Get-AzCdnOrigin** cmdlet gets an Azure Content Delivery Network (CDN) origin server and its configuration data. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzCdnOrigin -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint -``` - -```Output -HostName : mystorage.blob.core.windows.net -HttpPort : -HttpsPort : -OriginHostHeader : -Priority : -PrivateLinkApprovalMessage : -PrivateLinkLocation : -PrivateLinkResourceId : -Weight : -ResourceState : Active -ResourceGroupName : myresourcegroup -ProfileName : mycdnprofile -EndpointName : myendpoint -Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/myresourcegroup/providers/Micr - osoft.Cdn/profiles/mycdnprofile/endpoints/myendpoint/origins/mystorage -Name : mystorage -Type : Microsoft.Cdn/profiles/endpoints/origins -ProvisioningState : Succeeded -``` - -## PARAMETERS - -### -CdnEndpoint -Specifies the CDN endpoint object to which the origin belongs. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Specifies the name of the endpoint to which the origin server belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginName -Specifies the name of the origin server. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -Specifies the name of the profile to which the origin server belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Specifies the name of the resource group to which the origin server belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The resource id of the Azure CDN origin. - -```yaml -Type: System.String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -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.Commands.Cdn.Models.Endpoint.PSEndpoint - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.Origin.PSOrigin - -## NOTES - -## RELATED LINKS - -[Set-AzCdnOrigin](./Set-AzCdnOrigin.md) - - diff --git a/src/Cdn/Cdn/help/Get-AzCdnOriginGroup.md b/src/Cdn/Cdn/help/Get-AzCdnOriginGroup.md deleted file mode 100644 index 3aa2e8a427df..000000000000 --- a/src/Cdn/Cdn/help/Get-AzCdnOriginGroup.md +++ /dev/null @@ -1,143 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnorigingroup -schema: 2.0.0 ---- - -# Get-AzCdnOriginGroup - -## SYNOPSIS -Gets a CDN origin group - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Get-AzCdnOriginGroup -EndpointName -OriginGroupName -ProfileName - -ResourceGroupName [-DefaultProfile ] [] -``` - -### ByResourceIdParameterSet -``` -Get-AzCdnOriginGroup -ResourceId [-DefaultProfile ] [] -``` - -## DESCRIPTION -The Get-AzCdnOriginGroup cmdlet retrieves a CDN origin group. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -OriginGroupName $originGroupName -``` - -This command will get the origin group within the specified endpoint. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Azure CDN endpoint name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroupName -Azure CDN origin group name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -Azure CDN profile name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The resource group of the Azure CDN profile. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -Resource Id for the the origin group - -```yaml -Type: System.String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -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 - -### None - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Get-AzCdnProfile.md b/src/Cdn/Cdn/help/Get-AzCdnProfile.md deleted file mode 100644 index a1d41a2c426a..000000000000 --- a/src/Cdn/Cdn/help/Get-AzCdnProfile.md +++ /dev/null @@ -1,112 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: 28DECA86-37A5-48BE-9727-0C1A3B867E9B -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnprofile -schema: 2.0.0 ---- - -# Get-AzCdnProfile - -## SYNOPSIS -Gets a CDN profile. - -## SYNTAX - -``` -Get-AzCdnProfile [-ProfileName ] [-ResourceGroupName ] - [-DefaultProfile ] [] -``` - -## DESCRIPTION -The **Get-AzCdnProfile** cmdlet gets an Azure Content Delivery Network (CDN) profile and its related information. - -## EXAMPLES - -### Example 1: Get all CDN profiles in the resource group -```powershell -Get-AzCdnProfile -ResourceGroupName myresourcegroup -``` - -```Output -Sku : Microsoft.Azure.Commands.Cdn.Models.Profile.PSSku -ResourceState : Active -ResourceGroupName : myresourcegroup -Location : WestUs -Tags : {} -Id : /subscriptions/11111111-1111-1111-1111-111111111111/resourcegroups/myresourcegroup/providers/Microsoft.Cdn - /profiles/mycdnprofile -Name : mycdnprofile -Type : Microsoft.Cdn/profiles -ProvisioningState : Succeeded -``` - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -Specifies the name of the profile. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ResourceGroupName -Specifies the name of the resource group to which the profile belongs. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -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 - -### System.String - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile - -## NOTES - -## RELATED LINKS - -[New-AzCdnProfile](./New-AzCdnProfile.md) - -[Remove-AzCdnProfile](./Remove-AzCdnProfile.md) - -[Set-AzCdnProfile](./Set-AzCdnProfile.md) - - diff --git a/src/Cdn/Cdn/help/Get-AzCdnProfileResourceUsage.md b/src/Cdn/Cdn/help/Get-AzCdnProfileResourceUsage.md deleted file mode 100644 index 90f05b99ebe2..000000000000 --- a/src/Cdn/Cdn/help/Get-AzCdnProfileResourceUsage.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnprofileresourceusage -schema: 2.0.0 ---- - -# Get-AzCdnProfileResourceUsage - -## SYNOPSIS -Gets the resource usage of a CDN profile. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Get-AzCdnProfileResourceUsage -ProfileName -ResourceGroupName - [-DefaultProfile ] [] -``` - -### ByObjectParameterSet -``` -Get-AzCdnProfileResourceUsage -CdnProfile [-DefaultProfile ] - [] -``` - -## DESCRIPTION -The **Get-AzCdnProfileResourceUsage** cmdlet gets resource limits and current usage for a CDN profile. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzCdnProfileResourceUsage -ProfileName profile1 -ResourceGroupName rg -ResourceType Unit CurrentValue Limit -``` - -```output ------------- ---- ------------ ----- -endpoint count 2 25 -``` - -This example shows the resource limits and current usage of the profile with name 'profile1'. - -## PARAMETERS - -### -CdnProfile -The Azure CDN profile object. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The name of the profile. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The resource group to which the profile belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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.Commands.Cdn.Models.Profile.PSProfile - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.PSResourceUsage - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Get-AzCdnProfileSsoUrl.md b/src/Cdn/Cdn/help/Get-AzCdnProfileSsoUrl.md deleted file mode 100644 index f7076ffd2877..000000000000 --- a/src/Cdn/Cdn/help/Get-AzCdnProfileSsoUrl.md +++ /dev/null @@ -1,123 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: 93D5E2D9-FB89-4311-8E8E-44CBFAFC98A9 -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnprofilessourl -schema: 2.0.0 ---- - -# Get-AzCdnProfileSsoUrl - -## SYNOPSIS -Gets the single sign-on URL of a CDN profile. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Get-AzCdnProfileSsoUrl -ProfileName -ResourceGroupName - [-DefaultProfile ] [] -``` - -### ByObjectParameterSet -``` -Get-AzCdnProfileSsoUrl -CdnProfile [-DefaultProfile ] [] -``` - -## DESCRIPTION -The **Get-AzCdnProfileSsoUrl** cmdlet gets the single sign-on URL of the Azure Content Delivery Network (CDN) profile. -This URL lets users connect to a supplementary portal and use additional features of CDN. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzCdnProfileSsoUrl -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -``` - -```Output -SsoUriValue ------------ -https://cdn.windowsazure.com/account/loginexternal/?token=IUQ9oj9b0H%2bZTL8gSnaBFbe9hfGEoy%2fBMtkbUQmWOAU%3d×ta... -``` - -## PARAMETERS - -### -CdnProfile -Specifies the CDN profile. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -Specifies the name of the CDN profile. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Specifies the name of the resource group name to which the profile belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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.Commands.Cdn.Models.Profile.PSProfile - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.Profile.PSSsoUri - -## NOTES - -## RELATED LINKS - -[Get-AzCdnProfile](./Get-AzCdnProfile.md) - - diff --git a/src/Cdn/Cdn/help/Get-AzCdnProfileSupportedOptimizationType.md b/src/Cdn/Cdn/help/Get-AzCdnProfileSupportedOptimizationType.md deleted file mode 100644 index 94b30541f3b2..000000000000 --- a/src/Cdn/Cdn/help/Get-AzCdnProfileSupportedOptimizationType.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnprofilesupportedoptimizationtype -schema: 2.0.0 ---- - -# Get-AzCdnProfileSupportedOptimizationType - -## SYNOPSIS -Gets the supported optimization types for a CDN profile. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Get-AzCdnProfileSupportedOptimizationType -ProfileName -ResourceGroupName - [-DefaultProfile ] [] -``` - -### ByObjectParameterSet -``` -Get-AzCdnProfileSupportedOptimizationType -CdnProfile [-DefaultProfile ] - [] -``` - -## DESCRIPTION -The **Get-AzCdnProfileSupportedOptimizationType** cmdlet gets the supported optimization types for the current profile. A user can create an endpoint with an optimization type from the listed values. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzCdnProfileSupportedOptimizationType -ProfileName $profileName -ResourceGroupName $resourceGroupName -``` - -```output -OptimizationType: GeneralWebDelivery -OptimizationType: DynamicSiteAcceleration -``` - -Get the supported optimization types for a CDN profile. - -## PARAMETERS - -### -CdnProfile -The Azure CDN profile object. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The name of the profile. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The resource group to which the profile belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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.Commands.Cdn.Models.Profile.PSProfile - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.Profile.PSOptimizationType - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Get-AzCdnSubscriptionResourceUsage.md b/src/Cdn/Cdn/help/Get-AzCdnSubscriptionResourceUsage.md deleted file mode 100644 index 648eb109b1ce..000000000000 --- a/src/Cdn/Cdn/help/Get-AzCdnSubscriptionResourceUsage.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnsubscriptionresourceusage -schema: 2.0.0 ---- - -# Get-AzCdnSubscriptionResourceUsage - -## SYNOPSIS -Gets the resource usage for a subscription. - -## SYNTAX - -``` -Get-AzCdnSubscriptionResourceUsage [-DefaultProfile ] [] -``` - -## DESCRIPTION -The **Get-AzCdnSubscriptionResourceUsage** cmdlet gets the resource usage for a subscription. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzCdnSubscriptionResourceUsage -``` - -```Output -ResourceType Unit CurrentValue Limit ------------- ---- ------------ ----- -profile count 0 25 -``` - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.PSResourceUsage - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnCustomDomain.md b/src/Cdn/Cdn/help/Get-AzFrontDoorCdnCustomDomain.md deleted file mode 100644 index 6e46e1563c14..000000000000 --- a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnCustomDomain.md +++ /dev/null @@ -1,150 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdncustomdomain -schema: 2.0.0 ---- - -# Get-AzFrontDoorCdnCustomDomain - -## SYNOPSIS -Gets the custom domain. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Get-AzFrontDoorCdnCustomDomain [-CustomDomainName ] -ProfileName -ResourceGroupName - [-DefaultProfile ] [] -``` - -### ByObjectParameterSet -``` -Get-AzFrontDoorCdnCustomDomain -Profile [-DefaultProfile ] - [] -``` - -### ByResourceIdParameterSet -``` -Get-AzFrontDoorCdnCustomDomain -ResourceId [-DefaultProfile ] - [] -``` - -## DESCRIPTION -Gets the custom domain. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzFrontDoorCdnCustomDomain -CustomDomainName $customDomainName -ProfileName $profileName -ResourceGroupName $resourceGroupName -``` - -Gets the custom domain. - -## PARAMETERS - -### -CustomDomainName -The Azure Front Door custom domain name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -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: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Profile -The Azure Front Door profile object. - -```yaml -Type: PSAfdProfile -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -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.Commands.Cdn.AfdModels.PSAfdProfile - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdCustomDomain - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnEndpoint.md b/src/Cdn/Cdn/help/Get-AzFrontDoorCdnEndpoint.md deleted file mode 100644 index 40b069c248ec..000000000000 --- a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnEndpoint.md +++ /dev/null @@ -1,149 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnendpoint -schema: 2.0.0 ---- - -# Get-AzFrontDoorCdnEndpoint - -## SYNOPSIS -Gets the endpoint. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Get-AzFrontDoorCdnEndpoint [-EndpointName ] -ProfileName -ResourceGroupName - [-DefaultProfile ] [] -``` - -### ByObjectParameterSet -``` -Get-AzFrontDoorCdnEndpoint -Profile [-DefaultProfile ] - [] -``` - -### ByResourceIdParameterSet -``` -Get-AzFrontDoorCdnEndpoint -ResourceId [-DefaultProfile ] [] -``` - -## DESCRIPTION -Gets the endpoint. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroupName -``` - -Gets the endpoint. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -The Azure Front Door endpoint name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Profile -The Azure Front Door profile object. - -```yaml -Type: PSAfdProfile -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -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.Commands.Cdn.AfdModels.PSAfdProfile - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdEndpoint - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnOrigin.md b/src/Cdn/Cdn/help/Get-AzFrontDoorCdnOrigin.md deleted file mode 100644 index 3d05ee1a94dc..000000000000 --- a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnOrigin.md +++ /dev/null @@ -1,164 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnorigin -schema: 2.0.0 ---- - -# Get-AzFrontDoorCdnOrigin - -## SYNOPSIS -Gets the origin. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Get-AzFrontDoorCdnOrigin -OriginGroupName [-OriginName ] -ProfileName - -ResourceGroupName [-DefaultProfile ] [] -``` - -### ByObjectParameterSet -``` -Get-AzFrontDoorCdnOrigin -OriginGroup [-DefaultProfile ] - [] -``` - -### ByResourceIdParameterSet -``` -Get-AzFrontDoorCdnOrigin -ResourceId [-DefaultProfile ] [] -``` - -## DESCRIPTION -Gets the origin. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzFrontDoorCdnOrigin -OriginGroupName $originGroupName -OriginName $originName -ProfileName $profileName -ResourceGroupName $resourceGroupName -``` - -Gets the origin. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroup -The Azure Front Door origin group object. - -```yaml -Type: PSAfdOriginGroup -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -OriginGroupName -The Azure Front Door origin group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginName -The Azure Front Door origin name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -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.Commands.Cdn.AfdModels.PSAfdOriginGroup - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdOrigin - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnOriginGroup.md b/src/Cdn/Cdn/help/Get-AzFrontDoorCdnOriginGroup.md deleted file mode 100644 index 205356d44952..000000000000 --- a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnOriginGroup.md +++ /dev/null @@ -1,150 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnorigingroup -schema: 2.0.0 ---- - -# Get-AzFrontDoorCdnOriginGroup - -## SYNOPSIS -Gets the origin group. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Get-AzFrontDoorCdnOriginGroup [-OriginGroupName ] -ProfileName -ResourceGroupName - [-DefaultProfile ] [] -``` - -### ByObjectParameterSet -``` -Get-AzFrontDoorCdnOriginGroup -Profile [-DefaultProfile ] - [] -``` - -### ByResourceIdParameterSet -``` -Get-AzFrontDoorCdnOriginGroup -ResourceId [-DefaultProfile ] - [] -``` - -## DESCRIPTION -Gets the origin group. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $profileName -ResourceGroupName $resourceGroupName -``` - -Gets the origin group. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroupName -The Azure Front Door origin group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Profile -The Azure Front Door profile object. - -```yaml -Type: PSAfdProfile -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -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.Commands.Cdn.AfdModels.PSAfdProfile - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdOriginGroup - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnProfile.md b/src/Cdn/Cdn/help/Get-AzFrontDoorCdnProfile.md deleted file mode 100644 index 319884ee8283..000000000000 --- a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnProfile.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnprofile -schema: 2.0.0 ---- - -# Get-AzFrontDoorCdnProfile - -## SYNOPSIS -Gets the profile. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Get-AzFrontDoorCdnProfile [-ProfileName ] [-ResourceGroupName ] - [-DefaultProfile ] [] -``` - -### ByResourceIdParameterSet -``` -Get-AzFrontDoorCdnProfile -ResourceId [-DefaultProfile ] [] -``` - -## DESCRIPTION -Gets the profile. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzFrontDoorCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroupName -``` - -Gets the profile. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdProfile - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnRoute.md b/src/Cdn/Cdn/help/Get-AzFrontDoorCdnRoute.md deleted file mode 100644 index 3a256daf61f1..000000000000 --- a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnRoute.md +++ /dev/null @@ -1,164 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnroute -schema: 2.0.0 ---- - -# Get-AzFrontDoorCdnRoute - -## SYNOPSIS -Gets the route. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Get-AzFrontDoorCdnRoute -EndpointName -ProfileName -ResourceGroupName - [-RouteName ] [-DefaultProfile ] [] -``` - -### ByObjectParameterSet -``` -Get-AzFrontDoorCdnRoute -Endpoint [-DefaultProfile ] - [] -``` - -### ByResourceIdParameterSet -``` -Get-AzFrontDoorCdnRoute -ResourceId [-DefaultProfile ] [] -``` - -## DESCRIPTION -Gets the route. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzFrontDoorCdnRoute -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroupName -RouteName $routeName -``` - -Gets the route. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Endpoint -The Azure Front Door endpoint object. - -```yaml -Type: PSAfdEndpoint -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -EndpointName -The Azure Front Door endpoint name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RouteName -The Azure Front Door route name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -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.Commands.Cdn.AfdModels.PSAfdEndpoint - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdRoute - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnRule.md b/src/Cdn/Cdn/help/Get-AzFrontDoorCdnRule.md deleted file mode 100644 index 2dbffca56744..000000000000 --- a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnRule.md +++ /dev/null @@ -1,163 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnrule -schema: 2.0.0 ---- - -# Get-AzFrontDoorCdnRule - -## SYNOPSIS -Gets the rule. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Get-AzFrontDoorCdnRule -ProfileName -ResourceGroupName -RuleSetName - [-RuleName ] [-DefaultProfile ] [] -``` - -### ByResourceIdParameterSet -``` -Get-AzFrontDoorCdnRule -ResourceId [-DefaultProfile ] [] -``` - -### ByObjectParameterSet -``` -Get-AzFrontDoorCdnRule -RuleSet [-DefaultProfile ] [] -``` - -## DESCRIPTION -Gets the rule. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzFrontDoorCdnRule -ProfileName $profileName -ResourceGroupName $resourceGroupName -RuleSetName $ruleSetName -RuleName $ruleName -``` - -Gets the rule. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RuleName -The Azure Front Door rule name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RuleSet -The Azure Front Door rule set object. - -```yaml -Type: PSAfdRuleSet -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -RuleSetName -The Azure Front Door rule set name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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.Commands.Cdn.AfdModels.PSAfdRuleSet - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdRule - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnRuleSet.md b/src/Cdn/Cdn/help/Get-AzFrontDoorCdnRuleSet.md deleted file mode 100644 index f319ec0c7efc..000000000000 --- a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnRuleSet.md +++ /dev/null @@ -1,149 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnruleset -schema: 2.0.0 ---- - -# Get-AzFrontDoorCdnRuleSet - -## SYNOPSIS -Gets the rule set. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Get-AzFrontDoorCdnRuleSet -ProfileName -ResourceGroupName [-RuleSetName ] - [-DefaultProfile ] [] -``` - -### ByObjectParameterSet -``` -Get-AzFrontDoorCdnRuleSet -Profile [-DefaultProfile ] - [] -``` - -### ByResourceIdParameterSet -``` -Get-AzFrontDoorCdnRuleSet -ResourceId [-DefaultProfile ] [] -``` - -## DESCRIPTION -Gets the rule set. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzFrontDoorCdnRuleSet -ProfileName $profileName -ResourceGroupName $resourceGroupName -RuleSetName $ruleSetName -``` - -Gets the rule set. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Profile -The Azure Front Door profile object. - -```yaml -Type: PSAfdProfile -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RuleSetName -The Azure Front Door rule set name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -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.Commands.Cdn.AfdModels.PSAfdProfile - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdRuleSet - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnSecret.md b/src/Cdn/Cdn/help/Get-AzFrontDoorCdnSecret.md deleted file mode 100644 index d431bc10bc01..000000000000 --- a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnSecret.md +++ /dev/null @@ -1,149 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnsecret -schema: 2.0.0 ---- - -# Get-AzFrontDoorCdnSecret - -## SYNOPSIS -Gets the secret. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Get-AzFrontDoorCdnSecret -ProfileName -ResourceGroupName [-SecretName ] - [-DefaultProfile ] [] -``` - -### ByObjectParameterSet -``` -Get-AzFrontDoorCdnSecret -Profile [-DefaultProfile ] - [] -``` - -### ByResourceIdParameterSet -``` -Get-AzFrontDoorCdnSecret -ResourceId [-DefaultProfile ] [] -``` - -## DESCRIPTION -Gets the secret. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzFrontDoorCdnSecret -ProfileName $profileName -ResourceGroupName $resourceGroupName -SecretName $secretName -``` - -Gets the secret. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Profile -The Azure Front Door profile object. - -```yaml -Type: PSAfdProfile -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecretName -The Azure Front Door secret name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -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.Commands.Cdn.AfdModels.PSAfdProfile - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdSecret - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnSecurityPolicy.md b/src/Cdn/Cdn/help/Get-AzFrontDoorCdnSecurityPolicy.md deleted file mode 100644 index 2ed22ed20e16..000000000000 --- a/src/Cdn/Cdn/help/Get-AzFrontDoorCdnSecurityPolicy.md +++ /dev/null @@ -1,150 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnsecuritypolicy -schema: 2.0.0 ---- - -# Get-AzFrontDoorCdnSecurityPolicy - -## SYNOPSIS -Gets the security policy. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Get-AzFrontDoorCdnSecurityPolicy -ProfileName -ResourceGroupName - [-SecurityPolicyName ] [-DefaultProfile ] [] -``` - -### ByObjectParameterSet -``` -Get-AzFrontDoorCdnSecurityPolicy -Profile [-DefaultProfile ] - [] -``` - -### ByResourceIdParameterSet -``` -Get-AzFrontDoorCdnSecurityPolicy -ResourceId [-DefaultProfile ] - [] -``` - -## DESCRIPTION -Gets the security policy. - -## EXAMPLES - -### Example 1 -```powershell -Get-AzFrontDoorCdnSecurityPolicy -ProfileName $profileName -ResourceGroupName $resourceGroupName -SecurityPolicyName $securityPolicyName -``` - -Gets the security policy. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Profile -The Azure Front Door profile object. - -```yaml -Type: PSAfdProfile -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecurityPolicyName -The Azure Front Door security policy name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -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.Commands.Cdn.AfdModels.PSAfdProfile - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdSecurityPolicy - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/New-AzCdnCustomDomain.md b/src/Cdn/Cdn/help/New-AzCdnCustomDomain.md deleted file mode 100644 index eb367d23af9f..000000000000 --- a/src/Cdn/Cdn/help/New-AzCdnCustomDomain.md +++ /dev/null @@ -1,214 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: 7060D3D7-B397-447E-88E3-B6F0D094770D -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azcdncustomdomain -schema: 2.0.0 ---- - -# New-AzCdnCustomDomain - -## SYNOPSIS -Creates a custom domain for a CDN endpoint. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -New-AzCdnCustomDomain -HostName -CustomDomainName -EndpointName - -ProfileName -ResourceGroupName [-DefaultProfile ] [-WhatIf] - [-Confirm] [] -``` - -### ByObjectParameterSet -``` -New-AzCdnCustomDomain -HostName -CustomDomainName -CdnEndpoint - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -The **New-AzCdnCustomDomain** cmdlet creates a custom domain for the Azure Content Delivery Network (CDN) endpoint. - -## EXAMPLES - -### Example 1 -```powershell -New-AzCdnCustomDomain -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint -CustomDomainName cdn-example-com -HostName cdn.example.com -``` - -```Output -HostName : cdn.example.com -ValidationData : -ResourceState : Active -CustomHttpsProvisioningState : Disabled -CustomHttpsProvisioningSubstate : None -ResourceGroupName : myresourcegroup -ProfileName : mycdnprofile -EndpointName : myendpoint -Id : /subscriptions/11111111-1111-1111-1111-111111111111/resourcegroups/myresourcegroup/providers - /Microsoft.Cdn/profiles/mycdnprofile/endpoints/myendpoint/customdomains/cdn-example-com -Name : cdn-example-com -Type : Microsoft.Cdn/profiles/endpoints/customdomains -ProvisioningState : Succeeded -``` - -## PARAMETERS - -### -CdnEndpoint -Specifies the CDN endpoint object to which the custom domain is added. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -CustomDomainName -Specifies the resource name of the custom domain. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -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: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Specifies the name of the endpoint. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HostName -Specifies the host name of the custom domain. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -Specifies the name of the profile. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Specifies the name of the resource group to which the custom domain belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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: False -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: False -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.Commands.Cdn.Models.Endpoint.PSEndpoint - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain - -## NOTES - -## RELATED LINKS - -[Get-AzCdnCustomDomain](./Get-AzCdnCustomDomain.md) - -[Remove-AzCdnCustomDomain](./Remove-AzCdnCustomDomain.md) - -[Test-AzCdnCustomDomain](./Test-AzCdnCustomDomain.md) - - diff --git a/src/Cdn/Cdn/help/New-AzCdnDeliveryPolicy.md b/src/Cdn/Cdn/help/New-AzCdnDeliveryPolicy.md deleted file mode 100644 index d177cfe865f6..000000000000 --- a/src/Cdn/Cdn/help/New-AzCdnDeliveryPolicy.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azcdndeliverypolicy -schema: 2.0.0 ---- - -# New-AzCdnDeliveryPolicy - -## SYNOPSIS -Creates a delivery policy. - -## SYNTAX - -``` -New-AzCdnDeliveryPolicy [-Description ] -Rule - [-DefaultProfile ] [] -``` - -## DESCRIPTION -The **New-AzCdnDeliveryPolicy** cmdlet creates a delivery policy for CDN endpoint creation. - -## EXAMPLES - -### Example 1 -```powershell -New-AzCdnDeliveryPolicy -Description "Sample Policy" -Rule $rule -``` - -```output -Description Rules ------------ ----- -Sample Policy {rule1} -``` - -Create a sample delivery policy - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Description -Description of the policy - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Rule -A list of deliveryRules. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSDeliveryRule[] -Parameter Sets: (All) -Aliases: - -Required: True -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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSDeliveryPolicy - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/New-AzCdnDeliveryRule.md b/src/Cdn/Cdn/help/New-AzCdnDeliveryRule.md deleted file mode 100644 index 7b1fbade6d09..000000000000 --- a/src/Cdn/Cdn/help/New-AzCdnDeliveryRule.md +++ /dev/null @@ -1,128 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azcdndeliveryrule -schema: 2.0.0 ---- - -# New-AzCdnDeliveryRule - -## SYNOPSIS -Creates a delivery rule. - -## SYNTAX - -``` -New-AzCdnDeliveryRule [-Name ] -Order [-Condition ] - -Action [-DefaultProfile ] [] -``` - -## DESCRIPTION -The **New-AzCdnDeliveryRule** cmdlet creates a delivery rule for CDN endpoint creation. - -## EXAMPLES - -### Example 1 -```powershell -New-AzCdnDeliveryRule -Name "rule1" -Order 1 -Condition $cond1 -Action $action1 -``` - -```output -Name Order Actions Conditions ----- ----- ------- ---------- -rule1 1 {Accept-Encoding} {Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSDeliveryRuleCondition} -``` - -Create a simple rule. - -## PARAMETERS - -### -Action -A list of actions that are executed when all the conditions of a rule are satisfied. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSDeliveryRuleAction[] -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Condition -A list of conditions that must be matched for the actions to be executed. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSDeliveryRuleCondition[] -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: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name -Name of the rule - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Order -Order of the rule - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: True -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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSDeliveryRule - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/New-AzCdnDeliveryRuleAction.md b/src/Cdn/Cdn/help/New-AzCdnDeliveryRuleAction.md deleted file mode 100644 index b7a7148bac17..000000000000 --- a/src/Cdn/Cdn/help/New-AzCdnDeliveryRuleAction.md +++ /dev/null @@ -1,359 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azcdndeliveryruleaction -schema: 2.0.0 ---- - -# New-AzCdnDeliveryRuleAction - -## SYNOPSIS -Creates a delivery action. - -## SYNTAX - -### CacheExpirationActionParameterSet (Default) -``` -New-AzCdnDeliveryRuleAction -CacheBehavior [-CacheDuration ] - [-DefaultProfile ] [] -``` - -### HeaderActionParameterSet -``` -New-AzCdnDeliveryRuleAction -HeaderActionType -Action -HeaderName [-Value ] - [-DefaultProfile ] [] -``` - -### UrlRedirectActionParameterSet -``` -New-AzCdnDeliveryRuleAction -RedirectType [-DestinationProtocol ] [-CustomPath ] - [-CustomHostname ] [-CustomQueryString ] [-CustomFragment ] - [-DefaultProfile ] [] -``` - -### CacheKeyQueryStringActionParameterSet -``` -New-AzCdnDeliveryRuleAction -QueryStringBehavior [-QueryParameter ] - [-DefaultProfile ] [] -``` - -### UrlRewriteActionParameterSet -``` -New-AzCdnDeliveryRuleAction -SourcePattern -Destination [-PreservePath] - [-DefaultProfile ] [] -``` - -## DESCRIPTION -The **New-AzCdnDeliveryRule** cmdlet creates a delivery rule for CDN endpoint creation. - -## EXAMPLES - -### Example 1 -```powershell -New-AzCdnDeliveryRuleAction -HeaderActionType ModifyRequestHeader -Action Append -HeaderName "Accept-Encoding" -Value "gzip" -``` - -```output -HeaderActionType Action HeaderName Value ----------------- ------ ---------- ----- -ModifyRequestHeader Append Accept-Encoding gzip -``` - -Create a simple delivery rule. - -## PARAMETERS - -### -Action -Action to perform. - -```yaml -Type: System.String -Parameter Sets: HeaderActionParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CacheBehavior -Caching behavior for the action - -```yaml -Type: System.String -Parameter Sets: CacheExpirationActionParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CacheDuration -The duration for which the content needs to be cached. -Allowed format is \[d.\]hh:mm:ss - -```yaml -Type: System.String -Parameter Sets: CacheExpirationActionParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CustomFragment -Fragment to add to the redirect URL. -Fragment is the part of the URL that comes after #. -Do not include the #. - -```yaml -Type: System.String -Parameter Sets: UrlRedirectActionParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CustomHostname -Host to redirect. -Leave empty to use the incoming host as the destination host. - -```yaml -Type: System.String -Parameter Sets: UrlRedirectActionParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CustomPath -The full path to redirect. -Path cannot be empty and must start with /. -Leave empty to use the incoming path as destination path. - -```yaml -Type: System.String -Parameter Sets: UrlRedirectActionParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CustomQueryString -The set of query strings to be placed in the redirect URL. -Setting this value would replace any existing query string; leave empty to preserve the incoming query string. -Query string must be in \=\ format. -? and & will be added automatically so do not include them. - -```yaml -Type: System.String -Parameter Sets: UrlRedirectActionParameterSet -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: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Destination -Define the relative URL to which the above requests will be rewritten by. - -```yaml -Type: System.String -Parameter Sets: UrlRewriteActionParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DestinationProtocol -Protocol to use for the redirect. -The default value is MatchRequest. - -```yaml -Type: System.String -Parameter Sets: UrlRedirectActionParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HeaderActionType -Whether to modify request header or response header - -```yaml -Type: System.String -Parameter Sets: HeaderActionParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HeaderName -Name of the header to modify. - -```yaml -Type: System.String -Parameter Sets: HeaderActionParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PreservePath -Whether to preserve unmatched path. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: UrlRewriteActionParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -QueryParameter -Query parameters to include or exclude (comma separated). - -```yaml -Type: System.String[] -Parameter Sets: CacheKeyQueryStringActionParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -QueryStringBehavior -QueryString behavior for the requests - -```yaml -Type: System.String -Parameter Sets: CacheKeyQueryStringActionParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RedirectType -The redirect type the rule will use when redirecting traffic - -```yaml -Type: System.String -Parameter Sets: UrlRedirectActionParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SourcePattern -Define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched. - -```yaml -Type: System.String -Parameter Sets: UrlRewriteActionParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Value -Value for the specified action. - -```yaml -Type: System.String -Parameter Sets: HeaderActionParameterSet -Aliases: - -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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSDeliveryRuleAction - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/New-AzCdnDeliveryRuleCondition.md b/src/Cdn/Cdn/help/New-AzCdnDeliveryRuleCondition.md deleted file mode 100644 index a2c99779b03b..000000000000 --- a/src/Cdn/Cdn/help/New-AzCdnDeliveryRuleCondition.md +++ /dev/null @@ -1,163 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azcdndeliveryrulecondition -schema: 2.0.0 ---- - -# New-AzCdnDeliveryRuleCondition - -## SYNOPSIS -Creates a delivery rule condition. - -## SYNTAX - -``` -New-AzCdnDeliveryRuleCondition -MatchVariable -Operator [-Selector ] - -MatchValue [-Transform ] [-NegateCondition] [-DefaultProfile ] - [] -``` - -## DESCRIPTION -The **New-AzCdnDeliveryRule** cmdlet creates a delivery rule for CDN endpoint creation. - -## EXAMPLES - -### Example 1 -```powershell -New-AzCdnDeliveryRuleCondition -MatchVariable UrlPath -Operator Equal -MatchValue "abc" -``` - -```output -MatchVariable : UrlPath -Operator : Equal -Selector : -MatchValue : {abc} -NegateCondition : False -Transfroms : -``` - -Create a simple condition. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MatchValue -List of possible match values. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MatchVariable -Match variable of the condition. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -NegateCondition -Describes if the result of this condition should be negated. - -```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 -``` - -### -Operator -Describes operator to be matched - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Selector -Name of Selector to be matched - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Transform -Transform to apply before matching. -Possible values are Lowercase and Uppercase - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSDeliveryRuleCondition - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/New-AzCdnEndpoint.md b/src/Cdn/Cdn/help/New-AzCdnEndpoint.md deleted file mode 100644 index d9129d69371a..000000000000 --- a/src/Cdn/Cdn/help/New-AzCdnEndpoint.md +++ /dev/null @@ -1,656 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: A8C6F3BC-EE93-49A4-BF7B-8420967EEB7B -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnendpoint -schema: 2.0.0 ---- - -# New-AzCdnEndpoint - -## SYNOPSIS -Creates a CDN endpoint. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -New-AzCdnEndpoint -EndpointName -ProfileName -ResourceGroupName -Location - [-OriginHostHeader ] [-OriginPath ] [-ContentTypesToCompress ] - [-IsCompressionEnabled ] [-IsHttpAllowed ] [-IsHttpsAllowed ] - [-QueryStringCachingBehavior ] -OriginName -OriginHostName - [-HttpPort ] [-HttpsPort ] [-OptimizationType ] [-ProbePath ] - [-GeoFilters ] [-DeliveryPolicy ] [-Tag ] - [-DefaultOriginGroup ] [-Priority ] [-Weight ] [-PrivateLinkApprovalMessage ] - [-PrivateLinkLocation ] [-PrivateLinkResourceId ] - [-OriginId ] [-OriginGroupName ] - [-OriginGroupProbeIntervalInSeconds ] [-OriginGroupProbePath ] - [-OriginGroupProbeProtocol ] [-OriginGroupProbeRequestType ] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -New-AzCdnEndpoint -EndpointName -CdnProfile [-OriginHostHeader ] - [-OriginPath ] [-ContentTypesToCompress ] [-IsCompressionEnabled ] - [-IsHttpAllowed ] [-IsHttpsAllowed ] - [-QueryStringCachingBehavior ] -OriginName -OriginHostName - [-HttpPort ] [-HttpsPort ] [-OptimizationType ] [-ProbePath ] - [-GeoFilters ] [-DeliveryPolicy ] [-Tag ] - [-DefaultOriginGroup ] [-Priority ] [-Weight ] [-PrivateLinkApprovalMessage ] - [-PrivateLinkLocation ] [-PrivateLinkResourceId ] - [-OriginId ] [-OriginGroupName ] - [-OriginGroupProbeIntervalInSeconds ] [-OriginGroupProbePath ] - [-OriginGroupProbeProtocol ] [-OriginGroupProbeRequestType ] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -The **New-AzCdnEndpoint** cmdlet creates an Azure Content Delivery Network (CDN) endpoint. - -## EXAMPLES - -### Example 1 -```powershell -New-AzCdnEndpoint -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -Location westus -EndpointName myendpoint ` - -OriginName mystorage -OriginHostName mystorage.blob.core.windows.net ` - -OriginHostHeader mystorage.blob.core.windows.net -IsHttpAllowed $false -``` - -```Output -HostName : myendpoint.azureedge.net -OriginHostHeader : mystorage.blob.core.windows.net -OriginPath : -ContentTypesToCompress : {} -IsCompressionEnabled : False -IsHttpAllowed : False -IsHttpsAllowed : True -QueryStringCachingBehavior : IgnoreQueryString -Origins : {mystorage} -OptimizationType : -ProbePath : -GeoFilters : {} -DeliveryPolicy : -ResourceState : Running -DefaultOriginGroup : -ResourceGroupName : myresourcegroup -ProfileName : mycdnprofile -Location : WestUs -Tags : {} -Id : /subscriptions/11111111-1111-1111-1111-111111111111/resourcegroups/myresourcegroup/providers/Micr - osoft.Cdn/profiles/mycdnprofile/endpoints/myendpoint -Name : myendpoint -Type : Microsoft.Cdn/profiles/endpoints -ProvisioningState : Succeeded -``` - -## PARAMETERS - -### -CdnProfile -Specifies the CDN profile object to which the endpoint is added. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -ContentTypesToCompress -Specifies an array of content types to compress from the edge node to 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 -``` - -### -DefaultOriginGroup -The default origin group. - -```yaml -Type: System.String -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: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeliveryPolicy -The delivery policy for this endpoint. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSDeliveryPolicy -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Specifies the name of the endpoint. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GeoFilters -The list of geo filters that applies to this endpoint. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSGeoFilter[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPort -Specifies the HTTP port number on the origin server. - -```yaml -Type: System.Nullable`1[System.Int32] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpsPort -Specifies the HTTPS port number on the origin server. - -```yaml -Type: System.Nullable`1[System.Int32] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsCompressionEnabled -Indicates whether compression is enabled for the endpoint. - -```yaml -Type: System.Nullable`1[System.Boolean] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsHttpAllowed -Indicates whether the endpoint enables HTTP traffic. - -```yaml -Type: System.Nullable`1[System.Boolean] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsHttpsAllowed -Indicates whether the endpoint enables HTTPS traffic. - -```yaml -Type: System.Nullable`1[System.Boolean] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Location -Specifies the resource location of the endpoint. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OptimizationType -Specifies any optimization this endpoint has. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroupName -The name of the origin group. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroupProbeIntervalInSeconds -The number of seconds between health probes. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroupProbePath -The path relative to the origin that is used to determine the health of the origin. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroupProbeProtocol -Protocol to use for health probe. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroupProbeRequestType -The type of health probe request that is made. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginHostHeader -Specifies the origin host head of the endpoint. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginHostName -Specifies the host name of the origin server. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginId -Azure CDN origin group ids. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginName -Specifies the resource name of the origin server. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginPath -Specifies the path of the origin server. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Priority -Azure CDN origin priority. - -```yaml -Type: System.Nullable`1[System.Int32] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivateLinkApprovalMessage -A custom message to be included in the approval request to connect to the Private Link. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivateLinkLocation -Azure CDN origin private link location. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivateLinkResourceId -Azure CDN origin private link resource id. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProbePath -Specifies the probe path for Dynamic Site Acceleration - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -Specifies the name of the profile. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -QueryStringCachingBehavior -Specifies the behavior of CDN endpoint when a query string is in the request URL. - -```yaml -Type: System.Nullable`1[Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSQueryStringCachingBehavior] -Parameter Sets: (All) -Aliases: -Accepted values: IgnoreQueryString, BypassCaching, UseQueryString, NotSet - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Specifies the name of the resource group to which this endpoint belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag -The tags to associate with the Azure CDN endpoint. - -```yaml -Type: System.Collections.Hashtable -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Weight -Azure CDN origin weight. - -```yaml -Type: System.Nullable`1[System.Int32] -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: False -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: False -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.Commands.Cdn.Models.Profile.PSProfile - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint - -## NOTES - -## RELATED LINKS - -[Get-AzCdnEndpoint](./Get-AzCdnEndpoint.md) - -[Remove-AzCdnEndpoint](./Remove-AzCdnEndpoint.md) - -[Set-AzCdnEndpoint](./Set-AzCdnEndpoint.md) - -[Start-AzCdnEndpoint](./Start-AzCdnEndpoint.md) - -[Stop-AzCdnEndpoint](./Stop-AzCdnEndpoint.md) - - diff --git a/src/Cdn/Cdn/help/New-AzCdnOrigin.md b/src/Cdn/Cdn/help/New-AzCdnOrigin.md deleted file mode 100644 index 24e3964f8893..000000000000 --- a/src/Cdn/Cdn/help/New-AzCdnOrigin.md +++ /dev/null @@ -1,320 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnorigin -schema: 2.0.0 ---- - -# New-AzCdnOrigin - -## SYNOPSIS -Creates a new CDN origin - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -New-AzCdnOrigin -EndpointName -HostName [-HttpPort ] [-HttpsPort ] - [-OriginHostHeader ] -OriginName -ProfileName [-Priority ] - -ResourceGroupName [-Weight ] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### ByFieldsPrivateLinkParameterSet -``` -New-AzCdnOrigin -EndpointName -HostName [-HttpPort ] [-HttpsPort ] - [-OriginHostHeader ] -OriginName -ProfileName [-Priority ] - [-PrivateLinkApprovalMessage ] -PrivateLinkLocation -PrivateLinkResourceId - -ResourceGroupName [-Weight ] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### ByObjectParameterSet -``` -New-AzCdnOrigin -CdnOrigin [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -## DESCRIPTION -The New-AzCdnOrigin will create a new CDN origin within the specified endpoint. - -## EXAMPLES - -### Example 1 -```powershell -New-AzCdnOrigin -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -OriginName $originName -HostName $hostName -``` - -This cmdlet will create a new CDN origin for the specified endpoint. It will use the provided hostname as the origin. - -## PARAMETERS - -### -CdnOrigin -The CDN origin object. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Origin.PSOrigin -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Azure CDN endpoint name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HostName -Azure CDN origin host name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPort -Azure CDN origin http port. - -```yaml -Type: System.Nullable`1[System.Int32] -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpsPort -Azure CDN origin https port. - -```yaml -Type: System.Nullable`1[System.Int32] -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginHostHeader -Azure CDN origin host header. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginName -Azure CDN origin name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Priority -Azure CDN origin priority. - -```yaml -Type: System.Nullable`1[System.Int32] -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivateLinkApprovalMessage -A custom message to be included in the approval request to connect to the Private Link. - -```yaml -Type: System.String -Parameter Sets: ByFieldsPrivateLinkParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivateLinkLocation -Azure CDN origin private link location. - -```yaml -Type: System.String -Parameter Sets: ByFieldsPrivateLinkParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivateLinkResourceId -Azure CDN origin private link resource id. - -```yaml -Type: System.String -Parameter Sets: ByFieldsPrivateLinkParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -Azure CDN profile name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The resource group of the Azure CDN profile. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Weight -Azure CDN origin weight. - -```yaml -Type: System.Nullable`1[System.Int32] -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.Origin.PSOrigin - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/New-AzCdnOriginGroup.md b/src/Cdn/Cdn/help/New-AzCdnOriginGroup.md deleted file mode 100644 index 4a033f2cde0c..000000000000 --- a/src/Cdn/Cdn/help/New-AzCdnOriginGroup.md +++ /dev/null @@ -1,252 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnorigingroup -schema: 2.0.0 ---- - -# New-AzCdnOriginGroup - -## SYNOPSIS -Creates a new CDN origin group - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -New-AzCdnOriginGroup -EndpointName -OriginGroupName - -OriginId [-ProbeIntervalInSeconds ] - [-ProbePath ] [-ProbeProtocol ] [-ProbeRequestType ] -ProfileName - -ResourceGroupName [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### ByObjectParameterSet -``` -New-AzCdnOriginGroup -CdnOriginGroup [-DefaultProfile ] [-WhatIf] - [-Confirm] [] -``` - -## DESCRIPTION -The New-AzCdnOriginGroup will create a new origin group within the specified endpoint. If this is the first origin group for endpoint, then the DefaultOriginGroup property must also be set. - -## EXAMPLES - -### Example 1 -```powershell -New-AzCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -OriginGroupName $originGroupName -OriginId $originId -``` - -This cmdlet will create a new origin group within the specified endpoint. It will utilize the given origin ids as the set of origins. - -## PARAMETERS - -### -CdnOriginGroup -The CDN origin group object. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.OriginGroup.PSOriginGroup -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Azure CDN endpoint name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroupName -Azure CDN origin group name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginId -Azure CDN origin group ids. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProbeIntervalInSeconds -The number of seconds between health probes. - -```yaml -Type: System.Int32 -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProbePath -The path relative to the origin that is used to determine the health of the origin. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProbeProtocol -Protocol to use for health probe. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProbeRequestType -The type of health probe request that is made. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -Azure CDN profile name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The resource group of the Azure CDN profile. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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 - -### System.Object - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/New-AzCdnProfile.md b/src/Cdn/Cdn/help/New-AzCdnProfile.md deleted file mode 100644 index 59071b26af75..000000000000 --- a/src/Cdn/Cdn/help/New-AzCdnProfile.md +++ /dev/null @@ -1,182 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: 2785A8E5-6905-4EDE-BFE1-FF7B1E386A39 -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnprofile -schema: 2.0.0 ---- - -# New-AzCdnProfile - -## SYNOPSIS -Creates a CDN profile. - -## SYNTAX - -``` -New-AzCdnProfile -ProfileName -Location -Sku -ResourceGroupName - [-Tag ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -The **New-AzCdnProfile** cmdlet creates an Azure Content Delivery Network (CDN) profile. - -## EXAMPLES - -### Example 1 - -Creates a CDN profile. (autogenerated) - - - - -```powershell -New-AzCdnProfile -Location westus -ProfileName -ResourceGroupName myresourcegroup -Sku Standard_Verizon -``` - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Location -Specifies the resource location of the profile. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -Specifies the name of the profile. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ResourceGroupName -Specifies the name of the resource group to which the profile belongs. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Sku -Specifies the SKU of the profile. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Profile.PSSkuName -Parameter Sets: (All) -Aliases: -Accepted values: Standard_Verizon, Premium_Verizon, Custom_Verizon, Standard_Akamai, Standard_Microsoft, Standard_ChinaCdn, Premium_ChinaCdn, Standard_955BandWidth_ChinaCdn, Standard_AvgBandWidth_ChinaCdn, StandardPlus_ChinaCdn, StandardPlus_955BandWidth_ChinaCdn, StandardPlus_AvgBandWidth_ChinaCdn - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag -The tags to associate with the Azure CDN profile. - -```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: False -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: False -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 - -### System.String - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile - -## NOTES - -## RELATED LINKS - -[Get-AzCdnProfile](./Get-AzCdnProfile.md) - -[Remove-AzCdnProfile](./Remove-AzCdnProfile.md) - -[Set-AzCdnProfile](./Set-AzCdnProfile.md) - - diff --git a/src/Cdn/Cdn/help/New-AzFrontDoorCdnCustomDomain.md b/src/Cdn/Cdn/help/New-AzFrontDoorCdnCustomDomain.md deleted file mode 100644 index b9526e1681ed..000000000000 --- a/src/Cdn/Cdn/help/New-AzFrontDoorCdnCustomDomain.md +++ /dev/null @@ -1,208 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdncustomdomain -schema: 2.0.0 ---- - -# New-AzFrontDoorCdnCustomDomain - -## SYNOPSIS -Creates the custom domain. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -New-AzFrontDoorCdnCustomDomain [-AzureDnsZoneId ] -CustomDomainName -HostName - -ProfileName -ResourceGroupName [-DefaultProfile ] [-WhatIf] - [-Confirm] [] -``` - -### AfdCustomDomainCustomerCertificate -``` -New-AzFrontDoorCdnCustomDomain [-AzureDnsZoneId ] -CustomDomainName -HostName - -MinimumTlsVersion -ProfileName -ResourceGroupName -SecretId - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Creates the custom domain. - -## EXAMPLES - -### Example 1 -```powershell -New-AzFrontDoorCdnCustomDomain -CustomDomainName $customDomainName -HostName $hostName -ProfileName $profileName -ResourceGroupName $resourceGroupName -``` - -Creates the custom domain. - -## PARAMETERS - -### -AzureDnsZoneId -The resource reference to the Azure DNS zone. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CustomDomainName -The Azure Front Door custom domain name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -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: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HostName -The host name of the domain. -Must be a domain name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MinimumTlsVersion -TLS protocol version that will be used for Https - -```yaml -Type: String -Parameter Sets: AfdCustomDomainCustomerCertificate -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecretId -The resource reference to the secret. - -```yaml -Type: String -Parameter Sets: AfdCustomDomainCustomerCertificate -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: 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: 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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdCustomDomain - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/New-AzFrontDoorCdnEndpoint.md b/src/Cdn/Cdn/help/New-AzFrontDoorCdnEndpoint.md deleted file mode 100644 index 03227f48e9e8..000000000000 --- a/src/Cdn/Cdn/help/New-AzFrontDoorCdnEndpoint.md +++ /dev/null @@ -1,153 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnendpoint -schema: 2.0.0 ---- - -# New-AzFrontDoorCdnEndpoint - -## SYNOPSIS -Creates the endpoint. - -## SYNTAX - -``` -New-AzFrontDoorCdnEndpoint -EndpointName -ProfileName -ResourceGroupName - [-Tag ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Creates the endpoint. - -## EXAMPLES - -### Example 1 -```powershell -New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $profileName -ResourceGroupName $resourceGroupName -``` - -Creates the endpoint. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -The Azure Front Door endpoint name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag -The tags associated to the Azure resource. - -```yaml -Type: 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: 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: 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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdEndpoint - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/New-AzFrontDoorCdnOrigin.md b/src/Cdn/Cdn/help/New-AzFrontDoorCdnOrigin.md deleted file mode 100644 index 8fa3bd5f7d3a..000000000000 --- a/src/Cdn/Cdn/help/New-AzFrontDoorCdnOrigin.md +++ /dev/null @@ -1,305 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnorigin -schema: 2.0.0 ---- - -# New-AzFrontDoorCdnOrigin - -## SYNOPSIS -Creates the origin. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -New-AzFrontDoorCdnOrigin -HostName [-HttpPort ] [-HttpsPort ] -OriginGroupName - [-OriginHostHeader ] -OriginName [-Priority ] -ProfileName - -ResourceGroupName [-Weight ] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### SharedPrivateLinkResource -``` -New-AzFrontDoorCdnOrigin -HostName [-HttpPort ] [-HttpsPort ] -OriginGroupName - [-OriginHostHeader ] -OriginName [-Priority ] -PrivateLinkId - -PrivateLinkLocation -PrivateLinkRequestMessage -ProfileName - -ResourceGroupName [-Weight ] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -## DESCRIPTION -Creates the origin. - -## EXAMPLES - -### Example 1 -```powershell -New-AzFrontDoorCdnOrigin -HostName $hostName -OriginGroupName $originGroupName -OriginName $originName -ProfileName $profileName -ResourceGroupName $resourceGroupName -``` - -Creates the origin. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HostName -The address of the origin. -Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPort -The value of the HTTP port. -Must be between 1 and 65535. - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpsPort -The value of the HTTPS port. -Must be between 1 and 65535. - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroupName -The Azure Front Door origin group name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginHostHeader -The host header value sent to the origin with each request. -If you leave this blank, the request hostname determines this value. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginName -The Azure Front Door origin name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Priority -Priority of origin in given origin group for load balancing. -Higher priorities will not be used for load balancing if any lower priority origin is healthy. - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivateLinkId -The Azure resource id of the shared private link resource. - -```yaml -Type: String -Parameter Sets: SharedPrivateLinkResource -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivateLinkLocation -The location of the shared private link resource. - -```yaml -Type: String -Parameter Sets: SharedPrivateLinkResource -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivateLinkRequestMessage -The request message for requesting approval of the shared private link resource. - -```yaml -Type: String -Parameter Sets: SharedPrivateLinkResource -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Weight -Weight of the origin in given origin group for load balancing. - -```yaml -Type: Int32 -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: 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: 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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdOrigin - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/New-AzFrontDoorCdnOriginGroup.md b/src/Cdn/Cdn/help/New-AzFrontDoorCdnOriginGroup.md deleted file mode 100644 index a78eb309f86b..000000000000 --- a/src/Cdn/Cdn/help/New-AzFrontDoorCdnOriginGroup.md +++ /dev/null @@ -1,261 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnorigingroup -schema: 2.0.0 ---- - -# New-AzFrontDoorCdnOriginGroup - -## SYNOPSIS -Creates the origin group. - -## SYNTAX - -``` -New-AzFrontDoorCdnOriginGroup [-AdditionalLatencyInMillisecond ] -OriginGroupName - [-ProbeIntervalInSeconds ] [-ProbePath ] [-ProbeProtocol ] [-ProbeRequestType ] - -ProfileName -ResourceGroupName [-SampleSize ] [-SuccessfulSamplesRequired ] - [-TrafficRestorationTimeToHealedOrNewEndpointsInMinutes ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Creates the origin group. - -## EXAMPLES - -### Example 1 -```powershell -New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $profileName -ResourceGroupName $resourceGroupName -``` - -Creates the origin group. - -## PARAMETERS - -### -AdditionalLatencyInMillisecond -The additional latency in milliseconds for probes to fall into the lowest latency bucket. - -```yaml -Type: Int32 -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: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroupName -The Azure Front Door origin group name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProbeIntervalInSeconds -The number of seconds between health probes. - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProbePath -The path relative to the origin that is used to determine the health of the origin. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProbeProtocol -Protocol to use for health probe. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProbeRequestType -The type of health probe request that is made. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SampleSize -The number of samples to consider for load balancing decisions. - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SuccessfulSamplesRequired -The number of samples within the sample period that must succeed. - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TrafficRestorationTimeToHealedOrNewEndpointsInMinutes -Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. - -```yaml -Type: Int32 -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: 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: 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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdOriginGroup - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/New-AzFrontDoorCdnProfile.md b/src/Cdn/Cdn/help/New-AzFrontDoorCdnProfile.md deleted file mode 100644 index c6f56bf8d5d6..000000000000 --- a/src/Cdn/Cdn/help/New-AzFrontDoorCdnProfile.md +++ /dev/null @@ -1,153 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnprofile -schema: 2.0.0 ---- - -# New-AzFrontDoorCdnProfile - -## SYNOPSIS -Creates the profile. - -## SYNTAX - -``` -New-AzFrontDoorCdnProfile -ProfileName -ResourceGroupName -Sku [-Tag ] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Creates the profile. - -## EXAMPLES - -### Example 1 -```powershell -New-AzFrontDoorCdnProfile -ProfileName $profileName -ResourceGroupName $resourceGroupName -Sku $sku -``` - -Creates the profile. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Sku -The Azure Front Door profile SKU. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag -The tags associated to the Azure resource. - -```yaml -Type: 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: 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: 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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdProfile - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/New-AzFrontDoorCdnRoute.md b/src/Cdn/Cdn/help/New-AzFrontDoorCdnRoute.md deleted file mode 100644 index 42cfd71c917d..000000000000 --- a/src/Cdn/Cdn/help/New-AzFrontDoorCdnRoute.md +++ /dev/null @@ -1,184 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnroute -schema: 2.0.0 ---- - -# New-AzFrontDoorCdnRoute - -## SYNOPSIS -Creates the route. - -## SYNTAX - -``` -New-AzFrontDoorCdnRoute -CustomDomainId - -EndpointName -OriginGroupId -ProfileName -ResourceGroupName - -RouteName [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Creates the route. - -## EXAMPLES - -### Example 1 -```powershell -New-AzFrontDoorCdnRoute -CustomDomainId $customDomainId -EndpointName $endpointName -OriginGroupId $originGroupId -ProfileName $profileName -ResourceGroupName $resourceGroupName -RouteName $routeName -``` - -Creates the route. - -## PARAMETERS - -### -CustomDomainId -The resource ids of the Azure Front Door custom domains. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: True -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: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -The Azure Front Door endpoint name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroupId -The resource id of the Azure Front Door origin group. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RouteName -The Azure Front Door route name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: 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: 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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdRoute - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/New-AzFrontDoorCdnRule.md b/src/Cdn/Cdn/help/New-AzFrontDoorCdnRule.md deleted file mode 100644 index eeeab3bcf6b1..000000000000 --- a/src/Cdn/Cdn/help/New-AzFrontDoorCdnRule.md +++ /dev/null @@ -1,220 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnrule -schema: 2.0.0 ---- - -# New-AzFrontDoorCdnRule - -## SYNOPSIS -Creates the rule. - -## SYNTAX - -``` -New-AzFrontDoorCdnRule - -Action - [-Condition ] - -ProfileName -ResourceGroupName -RuleSetName -RuleName -Order - [-MatchProcessingBehavior ] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -## DESCRIPTION -Creates the rule. - -## EXAMPLES - -### Example 1 -```powershell -New-AzFrontDoorCdnRule -Action $action -Condition $condition -ProfileName $profileName -ResourceGroupName $resourceGroupName -RuleSetName $ruleSetName -RuleName $ruleName -Order $order -``` - -Creates the rule. - -## PARAMETERS - -### -Action -The set of actions for the delivery rule. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdRuleAction] -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Condition -The set of conditions for the delivery rule. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdRuleCondition] -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: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MatchProcessingBehavior -If this rule is a match should the rules engine continue running the remaining rules or stop. -If not present, defaults to Continue. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Order -The order in which the rules are applied for the endpoint. -Possible values {0,1,2,3,………}. -A rule with a lesser order will be applied before a rule with a greater order. - -```yaml -Type: Int32 -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RuleName -The Azure Front Door rule name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RuleSetName -The Azure Front Door rule set name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: 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: 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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdRule - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/New-AzFrontDoorCdnRuleAction.md b/src/Cdn/Cdn/help/New-AzFrontDoorCdnRuleAction.md deleted file mode 100644 index 1ac09a871c31..000000000000 --- a/src/Cdn/Cdn/help/New-AzFrontDoorCdnRuleAction.md +++ /dev/null @@ -1,376 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnruleaction -schema: 2.0.0 ---- - -# New-AzFrontDoorCdnRuleAction - -## SYNOPSIS -Creates the rule action. - -## SYNTAX - -### AfdRuleCacheExpirationAction (Default) -``` -New-AzFrontDoorCdnRuleAction -CacheBehavior [-CacheDuration ] - [-DefaultProfile ] [] -``` - -### AfdRuleHeaderTypeAction -``` -New-AzFrontDoorCdnRuleAction -HeaderType -HeaderAction -HeaderName - [-HeaderValue ] [-DefaultProfile ] [] -``` - -### AfdRuleCacheKeyQueryStringAction -``` -New-AzFrontDoorCdnRuleAction -QueryStringBehavior -QueryParameters - [-DefaultProfile ] [] -``` - -### AfdRuleUrlRedirectAction -``` -New-AzFrontDoorCdnRuleAction -RedirectType [-DestinationProtocol ] [-CustomPath ] - [-CustomHostname ] [-CustomQueryString ] [-CustomFragment ] - [-DefaultProfile ] [] -``` - -### AfdRuleUrlRewriteAction -``` -New-AzFrontDoorCdnRuleAction -SourcePattern -Destination [-PreservePath] - [-DefaultProfile ] [] -``` - -### AfdRuleOriginGroupOverrideAction -``` -New-AzFrontDoorCdnRuleAction -OriginGroupOverride [-DefaultProfile ] - [] -``` - -## DESCRIPTION -Creates the rule action. - -## EXAMPLES - -### Example 1 -```powershell -New-AzFrontDoorCdnRuleAction -CacheBehavior BypassCache -``` - -Creates the rule action. - -## PARAMETERS - -### -CacheBehavior -Caching behavior for the action. - -```yaml -Type: String -Parameter Sets: AfdRuleCacheExpirationAction -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CacheDuration -The duration for which the content needs to be cached. -Allowed format is \[d.\]hh:mm:ss - -```yaml -Type: String -Parameter Sets: AfdRuleCacheExpirationAction -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CustomFragment -Fragment to add to the redirect URL. -Fragment is the part of the URL that comes after #. -Do not include the #. - -```yaml -Type: String -Parameter Sets: AfdRuleUrlRedirectAction -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CustomHostname -Host to redirect. -Leave empty to use the incoming host as the destination host. - -```yaml -Type: String -Parameter Sets: AfdRuleUrlRedirectAction -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CustomPath -The full path to redirect. -Path cannot be empty and must start with /. -Leave empty to use the incoming path as destination path. - -```yaml -Type: String -Parameter Sets: AfdRuleUrlRedirectAction -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CustomQueryString -The set of query strings to be placed in the redirect URL. -Setting this value would replace any existing query string; leave empty to preserve the incoming query string. -Query string must be in \=\ format. -? and & will be added automatically so do not include them. - -```yaml -Type: String -Parameter Sets: AfdRuleUrlRedirectAction -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: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Destination -Define the relative URL to which the above requests will be rewritten by. - -```yaml -Type: String -Parameter Sets: AfdRuleUrlRewriteAction -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DestinationProtocol -Protocol to use for the redirect. -The default value is MatchRequest. - -```yaml -Type: String -Parameter Sets: AfdRuleUrlRedirectAction -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HeaderAction -Action to perform. - -```yaml -Type: String -Parameter Sets: AfdRuleHeaderTypeAction -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HeaderName -Name of the header to modify. - -```yaml -Type: String -Parameter Sets: AfdRuleHeaderTypeAction -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HeaderType -Whether to modify request header or response header. - -```yaml -Type: String -Parameter Sets: AfdRuleHeaderTypeAction -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HeaderValue -Value for the specified action. - -```yaml -Type: String -Parameter Sets: AfdRuleHeaderTypeAction -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroupOverride -Defines the origin group override action for the delivery rule. - -```yaml -Type: String -Parameter Sets: AfdRuleOriginGroupOverrideAction -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PreservePath -Whether to preserve unmatched path. - -```yaml -Type: SwitchParameter -Parameter Sets: AfdRuleUrlRewriteAction -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -QueryParameters -Query parameters to include or exclude (comma separated). - -```yaml -Type: String -Parameter Sets: AfdRuleCacheKeyQueryStringAction -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -QueryStringBehavior -Defines the parameters for the cache-key query string action. -Accepted values : Include, IncludeAll, Exclude, ExcludeAll - -```yaml -Type: String -Parameter Sets: AfdRuleCacheKeyQueryStringAction -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RedirectType -The redirect type the rule will use when redirecting traffic. - -```yaml -Type: String -Parameter Sets: AfdRuleUrlRedirectAction -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SourcePattern -Define a request URI pattern that identifies the type of requests that may be rewritten. -If value is blank, all strings are matched. - -```yaml -Type: String -Parameter Sets: AfdRuleUrlRewriteAction -Aliases: - -Required: True -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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdRuleAction - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/New-AzFrontDoorCdnRuleCondition.md b/src/Cdn/Cdn/help/New-AzFrontDoorCdnRuleCondition.md deleted file mode 100644 index 0f78b95e1d43..000000000000 --- a/src/Cdn/Cdn/help/New-AzFrontDoorCdnRuleCondition.md +++ /dev/null @@ -1,157 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnrulecondition -schema: 2.0.0 ---- - -# New-AzFrontDoorCdnRuleCondition - -## SYNOPSIS -Creates the rule condition. - -## SYNTAX - -``` -New-AzFrontDoorCdnRuleCondition -MatchVariable - -MatchValue [-Operator ] [-Selector ] - [-Transform ] [-NegateCondition] - [-DefaultProfile ] [] -``` - -## DESCRIPTION -Creates the rule condition. - -## EXAMPLES - -### Example 1 -```powershell -New-AzFrontDoorCdnRuleCondition -MatchVariable RequestMethod -MatchValue "PUT" -``` - -Creates the rule condition. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MatchValue -Match values to match against. -The operator will apply to each value in here with OR semantics. -If any of them match the variable with the given operator this match condition is considered a match. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MatchVariable -A list of conditions that must be matched for the actions to be executed. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -NegateCondition -Describes if the result of this condition should be negated. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Operator -Describes operator to be matched. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Selector -Name of Selector to be matched. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Transform -Transform to apply before matching. -Possible values are Lowercase and Uppercase. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdRuleCondition - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/New-AzFrontDoorCdnRuleSet.md b/src/Cdn/Cdn/help/New-AzFrontDoorCdnRuleSet.md deleted file mode 100644 index 8b2ff0474132..000000000000 --- a/src/Cdn/Cdn/help/New-AzFrontDoorCdnRuleSet.md +++ /dev/null @@ -1,138 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnruleset -schema: 2.0.0 ---- - -# New-AzFrontDoorCdnRuleSet - -## SYNOPSIS -Creates the rule set. - -## SYNTAX - -``` -New-AzFrontDoorCdnRuleSet -ProfileName -ResourceGroupName -RuleSetName - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Creates the rule set. - -## EXAMPLES - -### Example 1 -```powershell -New-AzFrontDoorCdnRuleSet -ProfileName $profileName -ResourceGroupName $resourceGroupName -RuleSetName $ruleSetName -``` - -Creates the rule set. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RuleSetName -The Azure Front Door rule set name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: 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: 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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdRuleSet - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/New-AzFrontDoorCdnSecret.md b/src/Cdn/Cdn/help/New-AzFrontDoorCdnSecret.md deleted file mode 100644 index c1af59358b87..000000000000 --- a/src/Cdn/Cdn/help/New-AzFrontDoorCdnSecret.md +++ /dev/null @@ -1,215 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnsecret -schema: 2.0.0 ---- - -# New-AzFrontDoorCdnSecret - -## SYNOPSIS -Creates the secret. - -## SYNTAX - -``` -New-AzFrontDoorCdnSecret [-CertificateAuthority ] -ProfileName -ResourceGroupName - -SecretName -SecretSource [-SecretVersion ] - [-SubjectAlternativeName ] [-UseLatestVersion] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Creates the secret. - -## EXAMPLES - -### Example 1 -```powershell -New-AzFrontDoorCdnSecret -ProfileName $profileName -ResourceGroupName $resourceGroupName -SecretName $secretName -SecretSource $secretSource -``` - -Creates the secret. - -## PARAMETERS - -### -CertificateAuthority -The certificate issuing authority. - -```yaml -Type: String -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: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecretName -The Azure Front Door secret name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecretSource -The resource reference to the Azure Key Vault secret. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecretVersion -The version of the secret to be used - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubjectAlternativeName -The list of the subject alternative names. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UseLatestVersion -Whether to use the latest version for the certificate. - -```yaml -Type: SwitchParameter -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: 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: 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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdSecret - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/New-AzFrontDoorCdnSecurityPolicy.md b/src/Cdn/Cdn/help/New-AzFrontDoorCdnSecurityPolicy.md deleted file mode 100644 index e75fafd845d0..000000000000 --- a/src/Cdn/Cdn/help/New-AzFrontDoorCdnSecurityPolicy.md +++ /dev/null @@ -1,169 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnsecuritypolicy -schema: 2.0.0 ---- - -# New-AzFrontDoorCdnSecurityPolicy - -## SYNOPSIS -Creates the security policy. - -## SYNTAX - -``` -New-AzFrontDoorCdnSecurityPolicy -ProfileName -ResourceGroupName -SecurityPolicyName - -WafPolicyId -DomainId - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Creates the security policy. - -## EXAMPLES - -### Example 1 -```powershell -New-AzFrontDoorCdnSecurityPolicy -ProfileName $profileName -ResourceGroupName $resourceGroupName -SecurityPolicyName $securityPolicyName -WafPolicyId $wafPolicyId -DomainId $domainId -``` - -Creates the security policy. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DomainId -The resource ids of the domains which will be linked to the Azure Front Door web application firewall. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecurityPolicyName -The Azure Front Door security policy name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WafPolicyId -The resource id of the Azure Front Door web application firewall. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: 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: 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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdSecurityPolicy - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Publish-AzCdnEndpointContent.md b/src/Cdn/Cdn/help/Publish-AzCdnEndpointContent.md deleted file mode 100644 index 580be6b94767..000000000000 --- a/src/Cdn/Cdn/help/Publish-AzCdnEndpointContent.md +++ /dev/null @@ -1,165 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: AFDBE48E-63B0-4A9E-9825-5246081AA129 -online version: https://docs.microsoft.com/powershell/module/az.cdn/publish-azcdnendpointcontent -schema: 2.0.0 ---- - -# Publish-AzCdnEndpointContent - -## SYNOPSIS -Loads content to an endpoint. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Publish-AzCdnEndpointContent -EndpointName -ProfileName -ResourceGroupName - -LoadContent [-PassThru] [-DefaultProfile ] [] -``` - -### ByObjectParameterSet -``` -Publish-AzCdnEndpointContent -CdnEndpoint -LoadContent [-PassThru] - [-DefaultProfile ] [] -``` - -## DESCRIPTION -The **Publish-AzCdnEndpointContent** cmdlet loads content from an origin server for the Azure Content Delivery Network (CDN) endpoint. - -## EXAMPLES - -### Example 1: Pre-load some assets -```powershell -Publish-AzCdnEndpointContent -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint -LoadContent "/images/kitten.png","/video/rickroll.mp4" -``` - -## PARAMETERS - -### -CdnEndpoint -Specifies the CDN endpoint. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Specifies the name of the endpoint. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LoadContent -Specifies an array of relative paths for the content on the origin server that this cmdlet publishes. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -Returns an object representing the item with which you are working. -By default, this cmdlet does not generate any output. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProfileName -Specifies the name of the profile to which the origin server belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Specifies the name of the resource group to which the origin server belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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.Commands.Cdn.Models.Endpoint.PSEndpoint - -### System.Management.Automation.SwitchParameter - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS - -[Unpublish-AzCdnEndpointContent](./Unpublish-AzCdnEndpointContent.md) - - diff --git a/src/Cdn/Cdn/help/Remove-AzCdnCustomDomain.md b/src/Cdn/Cdn/help/Remove-AzCdnCustomDomain.md deleted file mode 100644 index 97ff366491b2..000000000000 --- a/src/Cdn/Cdn/help/Remove-AzCdnCustomDomain.md +++ /dev/null @@ -1,201 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: 5727E2CA-0A0B-4050-9F4A-7E06758D9B53 -online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdncustomdomain -schema: 2.0.0 ---- - -# Remove-AzCdnCustomDomain - -## SYNOPSIS -Removes a custom domain. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Remove-AzCdnCustomDomain -CustomDomainName -EndpointName -ProfileName - -ResourceGroupName [-PassThru] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### ByObjectParameterSet -``` -Remove-AzCdnCustomDomain -CdnCustomDomain [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -The **Remove-AzCdnCustomDomain** cmdlet removes the custom domain from an Azure Content Delivery Network (CDN) endpoint. - -## EXAMPLES - -### Example 1 -```powershell -Remove-AzCdnCustomDomain -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint -CustomDomainName cdn-example-com -``` - -## PARAMETERS - -### -CdnCustomDomain -Specifies the custom domain that this cmdlet removes. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.CustomDomain.PSCustomDomain -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -CustomDomainName -Specifies the resource name of the custom domain that this cmdlet removes. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Specifies the name of the endpoint from which this cmdlet removes a custom domain. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -Returns an object representing the item with which you are working. -By default, this cmdlet does not generate any output. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProfileName -Specifies the name of the profile from which this cmdlet removes a custom domain. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Specifies the name of the resource group from which this cmdlet removes a custom domain. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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: False -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: False -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.Commands.Cdn.Models.CustomDomain.PSCustomDomain - -### System.Management.Automation.SwitchParameter - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS - -[Get-AzCdnCustomDomain](./Get-AzCdnCustomDomain.md) - -[New-AzCdnCustomDomain](./New-AzCdnCustomDomain.md) - -[Test-AzCdnCustomDomain](./Test-AzCdnCustomDomain.md) - - diff --git a/src/Cdn/Cdn/help/Remove-AzCdnEndpoint.md b/src/Cdn/Cdn/help/Remove-AzCdnEndpoint.md deleted file mode 100644 index ec7d01c0f2b4..000000000000 --- a/src/Cdn/Cdn/help/Remove-AzCdnEndpoint.md +++ /dev/null @@ -1,204 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: 7ADF4CDE-638B-4E00-88B1-688702B084A5 -online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnendpoint -schema: 2.0.0 ---- - -# Remove-AzCdnEndpoint - -## SYNOPSIS -Removes a CDN endpoint. - -## SYNTAX - -### ByFieldsParameterSet -``` -Remove-AzCdnEndpoint -EndpointName -ProfileName -ResourceGroupName [-PassThru] - [-Force] [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Remove-AzCdnEndpoint -CdnEndpoint [-PassThru] [-Force] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -The **Remove-AzCdnEndpoint** cmdlet removes an Azure Content Delivery Network (CDN) endpoint. - -## EXAMPLES - -### Example 1 -```powershell -Remove-AzCdnEndpoint -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint -Force -``` - -## PARAMETERS - -### -CdnEndpoint -Specifies the endpoint that this cmdlet removes. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Specifies the name of the endpoint that this cmdlet removes. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Force -Forces the command to run without asking for user confirmation. - -```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 -``` - -### -PassThru -Returns an object representing the item with which you are working. -By default, this cmdlet does not generate any output. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProfileName -Specifies the name of the profile to which the endpoint belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Specifies the name of the resource group to which the endpoint belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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: False -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: False -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.Commands.Cdn.Models.Endpoint.PSEndpoint - -### System.Management.Automation.SwitchParameter - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS - -[Get-AzCdnEndpoint](./Get-AzCdnEndpoint.md) - -[New-AzCdnEndpoint](./New-AzCdnEndpoint.md) - -[Set-AzCdnEndpoint](./Set-AzCdnEndpoint.md) - -[Start-AzCdnEndpoint](./Start-AzCdnEndpoint.md) - -[Stop-AzCdnEndpoint](./Stop-AzCdnEndpoint.md) - - diff --git a/src/Cdn/Cdn/help/Remove-AzCdnOrigin.md b/src/Cdn/Cdn/help/Remove-AzCdnOrigin.md deleted file mode 100644 index 1bac1a6d8695..000000000000 --- a/src/Cdn/Cdn/help/Remove-AzCdnOrigin.md +++ /dev/null @@ -1,212 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnorigin -schema: 2.0.0 ---- - -# Remove-AzCdnOrigin - -## SYNOPSIS -Removes a CDN origin - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Remove-AzCdnOrigin -OriginName -EndpointName -ProfileName - -ResourceGroupName [-PassThru] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### ByResourceIdParameterSet -``` -Remove-AzCdnOrigin -ResourceId [-PassThru] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Remove-AzCdnOrigin [-PassThru] -CdnOrigin [-DefaultProfile ] [-WhatIf] - [-Confirm] [] -``` - -## DESCRIPTION -Remove-AzCdnOrigin will delete a CDN origin from the given endpoint. If the origin is the only origin within the specified endpoint, then the deletion will fail since at least 1 origin is needed. - -## EXAMPLES - -### Example 1 -```powershell -Remove-AzCdnOrigin -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -OriginName $originName -``` - -This cmdlet will remove the specified origin from the given endpoint. - -## PARAMETERS - -### -CdnOrigin -The CDN origin object. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Origin.PSOrigin -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Azure CDN endpoint name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginName -Azure CDN origin name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -Return object if specified. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProfileName -Azure CDN profile name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The resource group of the Azure CDN profile. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The resource id of the Azure CDN origin. - -```yaml -Type: System.String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -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 - -### None - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Remove-AzCdnOriginGroup.md b/src/Cdn/Cdn/help/Remove-AzCdnOriginGroup.md deleted file mode 100644 index d440d18f34ec..000000000000 --- a/src/Cdn/Cdn/help/Remove-AzCdnOriginGroup.md +++ /dev/null @@ -1,212 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnorigingroup -schema: 2.0.0 ---- - -# Remove-AzCdnOriginGroup - -## SYNOPSIS -Removes a CDN origin group - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Remove-AzCdnOriginGroup -OriginGroupName -EndpointName -ProfileName - -ResourceGroupName [-PassThru] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### ByResourceIdParameterSet -``` -Remove-AzCdnOriginGroup -ResourceId [-PassThru] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Remove-AzCdnOriginGroup [-PassThru] -CdnOriginGroup [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Remove-AzCdnOriginGroup will remove a CDN origin group from the specified endpoint. - -## EXAMPLES - -### Example 1 -```powershell -Remove-AzCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -OriginGroupName $originGroupName -``` - -This cmdlet will remove the specified origin group from the given endpoint. - -## PARAMETERS - -### -CdnOriginGroup -The CDN origin group object. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.OriginGroup.PSOriginGroup -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Azure CDN endpoint name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroupName -Azure CDN origin group name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -Return object if specified. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProfileName -Azure CDN profile name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The resource group of the Azure CDN profile. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The resource id of the Azure CDN origin group. - -```yaml -Type: System.String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -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 - -### None - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Remove-AzCdnProfile.md b/src/Cdn/Cdn/help/Remove-AzCdnProfile.md deleted file mode 100644 index 4076342a4480..000000000000 --- a/src/Cdn/Cdn/help/Remove-AzCdnProfile.md +++ /dev/null @@ -1,185 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: 3A4F8442-1268-44BC-91ED-47C03CD20C47 -online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnprofile -schema: 2.0.0 ---- - -# Remove-AzCdnProfile - -## SYNOPSIS -Removes a CDN profile. - -## SYNTAX - -### ByFieldsParameterSet -``` -Remove-AzCdnProfile -ProfileName -ResourceGroupName [-PassThru] [-Force] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Remove-AzCdnProfile -CdnProfile [-PassThru] [-Force] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -The **Remove-AzCdnProfile** cmdlet removes a Azure Content Delivery Network (CDN) profile. - -## EXAMPLES - -### Example 1 -```powershell -Remove-AzCdnProfile -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -Force -``` - -## PARAMETERS - -### -CdnProfile -Specifies the profile that this cmdlet removes. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Force -Forces the command to run without asking for user confirmation. - -```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 -``` - -### -PassThru -Returns an object representing the item with which you are working. -By default, this cmdlet does not generate any output. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProfileName -Specifies the name of the profile that this cmdlet removes. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Specifies the name of the resource group to which the profile belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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: False -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: False -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.Commands.Cdn.Models.Profile.PSProfile - -### System.Management.Automation.SwitchParameter - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS - -[Get-AzCdnProfile](./Get-AzCdnProfile.md) - -[New-AzCdnProfile](./New-AzCdnProfile.md) - -[Set-AzCdnProfile](./Set-AzCdnProfile.md) - - diff --git a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnCustomDomain.md b/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnCustomDomain.md deleted file mode 100644 index d41ae945b198..000000000000 --- a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnCustomDomain.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdncustomdomain -schema: 2.0.0 ---- - -# Remove-AzFrontDoorCdnCustomDomain - -## SYNOPSIS -Removes the custom domain. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Remove-AzFrontDoorCdnCustomDomain -CustomDomainName -ProfileName -ResourceGroupName - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Remove-AzFrontDoorCdnCustomDomain -CustomDomain [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -### ByResourceIdParameterSet -``` -Remove-AzFrontDoorCdnCustomDomain -ResourceId [-DefaultProfile ] [-WhatIf] - [-Confirm] [] -``` - -## DESCRIPTION -Removes the custom domain. - -## EXAMPLES - -### Example 1 -```powershell -Remove-AzFrontDoorCdnCustomDomain -ResourceId $customDomainResourceId -``` - -Removes the custom domain. - -## PARAMETERS - -### -CustomDomain -The Azure Front Door custom domain object. - -```yaml -Type: PSAfdCustomDomain -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -CustomDomainName -The Azure Front Door custom domain name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: 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: 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.Commands.Cdn.AfdModels.PSAfdCustomDomain - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnEndpoint.md b/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnEndpoint.md deleted file mode 100644 index 50c991f950df..000000000000 --- a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnEndpoint.md +++ /dev/null @@ -1,196 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnendpoint -schema: 2.0.0 ---- - -# Remove-AzFrontDoorCdnEndpoint - -## SYNOPSIS -Removes the endpoint. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Remove-AzFrontDoorCdnEndpoint -EndpointName -ProfileName -ResourceGroupName - [-PassThru] [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Remove-AzFrontDoorCdnEndpoint -Endpoint [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -### ByResourceIdParameterSet -``` -Remove-AzFrontDoorCdnEndpoint -ResourceId [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Removes the endpoint. - -## EXAMPLES - -### Example 1 -```powershell -Remove-AzFrontDoorCdnEndpoint -ResourceId $endpointResourceId -``` - -Removes the endpoint. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Endpoint -The Azure Front Door endpoint object. - -```yaml -Type: PSAfdEndpoint -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -EndpointName -The Azure Front Door endpoint name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -Set by the user to signal that they would like to receive output from a cmdlet which does not return anything. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: 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: 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.Commands.Cdn.AfdModels.PSAfdEndpoint - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnOrigin.md b/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnOrigin.md deleted file mode 100644 index 80efbd22bf7b..000000000000 --- a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnOrigin.md +++ /dev/null @@ -1,212 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnorigin -schema: 2.0.0 ---- - -# Remove-AzFrontDoorCdnOrigin - -## SYNOPSIS -Removes the origin. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Remove-AzFrontDoorCdnOrigin -OriginGroupName -OriginName -ProfileName - -ResourceGroupName [-PassThru] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### ByResourceIdParameterSet -``` -Remove-AzFrontDoorCdnOrigin -ResourceId [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Remove-AzFrontDoorCdnOrigin -Origin [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Removes the origin. - -## EXAMPLES - -### Example 1 -```powershell -Remove-AzFrontDoorCdnOrigin -ResourceId $originResourceId -``` - -Removes the origin. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Origin -The Azure Front Door origin object. - -```yaml -Type: PSAfdOrigin -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -OriginGroupName -The Azure Front Door origin group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginName -The Azure Front Door origin name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -{{ Fill PassThru Description }} - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: 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: 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.Commands.Cdn.AfdModels.PSAfdOrigin - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdOrigin - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnOriginGroup.md b/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnOriginGroup.md deleted file mode 100644 index cfd6b443c501..000000000000 --- a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnOriginGroup.md +++ /dev/null @@ -1,196 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnorigingroup -schema: 2.0.0 ---- - -# Remove-AzFrontDoorCdnOriginGroup - -## SYNOPSIS -Removes the origin group. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Remove-AzFrontDoorCdnOriginGroup -OriginGroupName -ProfileName -ResourceGroupName - [-PassThru] [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Remove-AzFrontDoorCdnOriginGroup -OriginGroup [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### ByResourceIdParameterSet -``` -Remove-AzFrontDoorCdnOriginGroup -ResourceId [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Removes the origin group. - -## EXAMPLES - -### Example 1 -```powershell -Remove-AzFrontDoorCdnOriginGroup -ResourceId $originGroupResourceId -``` - -Removes the origin group. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroup -The Azure Front Door origin group object. - -```yaml -Type: PSAfdOriginGroup -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -OriginGroupName -The Azure Front Door origin group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -{{ Fill PassThru Description }} - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: 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: 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.Commands.Cdn.AfdModels.PSAfdOriginGroup - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnProfile.md b/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnProfile.md deleted file mode 100644 index 7d2269c516f6..000000000000 --- a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnProfile.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnprofile -schema: 2.0.0 ---- - -# Remove-AzFrontDoorCdnProfile - -## SYNOPSIS -Removes the profile. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Remove-AzFrontDoorCdnProfile -ProfileName -ResourceGroupName [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Remove-AzFrontDoorCdnProfile -Profile [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -### ByResourceIdParameterSet -``` -Remove-AzFrontDoorCdnProfile -ResourceId [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Removes the profile. - -## EXAMPLES - -### Example 1 -```powershell -Remove-AzFrontDoorCdnProfile -ResourceId $profileResourceId -``` - -Removes the profile. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -{{ Fill PassThru Description }} - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Profile -The Azure Front Door profile object. - -```yaml -Type: PSAfdProfile -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: 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: 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.Commands.Cdn.AfdModels.PSAfdProfile - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnRoute.md b/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnRoute.md deleted file mode 100644 index ce26c462cb62..000000000000 --- a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnRoute.md +++ /dev/null @@ -1,212 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnroute -schema: 2.0.0 ---- - -# Remove-AzFrontDoorCdnRoute - -## SYNOPSIS -Removes the route. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Remove-AzFrontDoorCdnRoute -EndpointName -ProfileName -ResourceGroupName - -RouteName [-PassThru] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### ByResourceIdParameterSet -``` -Remove-AzFrontDoorCdnRoute -ResourceId [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Remove-AzFrontDoorCdnRoute -Route [-PassThru] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] -``` - -## DESCRIPTION -Removes the route. - -## EXAMPLES - -### Example 1 -```powershell -Remove-AzFrontDoorCdnRoute -ResourceId $routeResourceId -``` - -Removes the route. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -The Azure Front Door endpoint name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -{{ Fill PassThru Description }} - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Route -The Azure Front Door route object. - -```yaml -Type: PSAfdRoute -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -RouteName -The Azure Front Door route name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: 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: 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.Commands.Cdn.AfdModels.PSAfdRoute - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnRule.md b/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnRule.md deleted file mode 100644 index 34d01d582d76..000000000000 --- a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnRule.md +++ /dev/null @@ -1,212 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnrule -schema: 2.0.0 ---- - -# Remove-AzFrontDoorCdnRule - -## SYNOPSIS -Removes the rule. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Remove-AzFrontDoorCdnRule -ProfileName -ResourceGroupName -RuleName - -RuleSetName [-PassThru] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### ByResourceIdParameterSet -``` -Remove-AzFrontDoorCdnRule -ResourceId [-PassThru] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Remove-AzFrontDoorCdnRule -Rule [-PassThru] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] -``` - -## DESCRIPTION -Removes the rule. - -## EXAMPLES - -### Example 1 -```powershell -Remove-AzFrontDoorCdnRule -ResourceId $ruleResourceId -``` - -Removes the rule. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -{{ Fill PassThru Description }} - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Rule -The Azure Front Door rule object. - -```yaml -Type: PSAfdRule -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -RuleName -The Azure Front Door rule name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RuleSetName -The Azure Front Door rule set name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: 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: 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.Commands.Cdn.AfdModels.PSAfdRule - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnRuleSet.md b/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnRuleSet.md deleted file mode 100644 index 46000b814362..000000000000 --- a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnRuleSet.md +++ /dev/null @@ -1,196 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnruleset -schema: 2.0.0 ---- - -# Remove-AzFrontDoorCdnRuleSet - -## SYNOPSIS -Removes the rule set. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Remove-AzFrontDoorCdnRuleSet -ProfileName -ResourceGroupName -RuleSetName - [-PassThru] [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Remove-AzFrontDoorCdnRuleSet -RuleSet [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -### ByResourceIdParameterSet -``` -Remove-AzFrontDoorCdnRuleSet -ResourceId [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Removes the rule set. - -## EXAMPLES - -### Example 1 -```powershell -Remove-AzFrontDoorCdnRuleSet -ResourceId $ruleSetResourceId -``` - -Removes the rule set. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -{{ Fill PassThru Description }} - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RuleSet -The Azure Front Door rule set object. - -```yaml -Type: PSAfdRuleSet -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -RuleSetName -The Azure Front Door rule set name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: 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: 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.Commands.Cdn.AfdModels.PSAfdRuleSet - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnSecret.md b/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnSecret.md deleted file mode 100644 index 192ddbbb240f..000000000000 --- a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnSecret.md +++ /dev/null @@ -1,196 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnsecret -schema: 2.0.0 ---- - -# Remove-AzFrontDoorCdnSecret - -## SYNOPSIS -Removes the secret. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Remove-AzFrontDoorCdnSecret -ProfileName -ResourceGroupName -SecretName [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### ByResourceIdParameterSet -``` -Remove-AzFrontDoorCdnSecret -ResourceId [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Remove-AzFrontDoorCdnSecret -Secret [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Removes the secret. - -## EXAMPLES - -### Example 1 -```powershell -Remove-AzFrontDoorCdnSecret -ResourceId $secretResourceId -``` - -Removes the secret. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -Set by the user to signal that they would like to receive output from a cmdlet which does not return anything. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Secret -The Azure Front Door secret object. - -```yaml -Type: PSAfdSecret -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecretName -The Azure Front Door secret name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: 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: 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 - -### None - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnSecurityPolicy.md b/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnSecurityPolicy.md deleted file mode 100644 index 3177e3366684..000000000000 --- a/src/Cdn/Cdn/help/Remove-AzFrontDoorCdnSecurityPolicy.md +++ /dev/null @@ -1,197 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnsecuritypolicy -schema: 2.0.0 ---- - -# Remove-AzFrontDoorCdnSecurityPolicy - -## SYNOPSIS -Removes the security policy. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Remove-AzFrontDoorCdnSecurityPolicy -ProfileName -ResourceGroupName - -SecurityPolicyName [-PassThru] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### ByResourceIdParameterSet -``` -Remove-AzFrontDoorCdnSecurityPolicy -ResourceId [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Remove-AzFrontDoorCdnSecurityPolicy -SecurityPolicy [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Removes the security policy. - -## EXAMPLES - -### Example 1 -```powershell -Remove-AzFrontDoorCdnSecurityPolicy -ResourceId $securityPolicyResourceId -``` - -Removes the security policy. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -Set by the user to signal that they would like to receive output from a cmdlet which does not return anything. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId -The Azure resource id. - -```yaml -Type: String -Parameter Sets: ByResourceIdParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecurityPolicy -The Azure Front Door security policy object. - -```yaml -Type: PSAfdSecurityPolicy -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -SecurityPolicyName -The Azure Front Door security policy name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: 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: 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.Commands.Cdn.AfdModels.PSAfdSecurityPolicy - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Set-AzCdnEndpoint.md b/src/Cdn/Cdn/help/Set-AzCdnEndpoint.md deleted file mode 100644 index 20be7f3a2757..000000000000 --- a/src/Cdn/Cdn/help/Set-AzCdnEndpoint.md +++ /dev/null @@ -1,150 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: 1A84AF77-1AEF-4FD0-9FAA-D195B361FCEB -online version: https://docs.microsoft.com/powershell/module/az.cdn/set-azcdnendpoint -schema: 2.0.0 ---- - -# Set-AzCdnEndpoint - -## SYNOPSIS -Updates a CDN endpoint. - -## SYNTAX - -``` -Set-AzCdnEndpoint -CdnEndpoint [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -## DESCRIPTION -The **Set-AzCdnEndpoint** cmdlet updates an Azure Content Delivery Network (CDN) endpoint. - -## EXAMPLES - -### Example 1: Set allowed protocols to HTTPS only -```powershell -$endpointObject = Get-AzCdnEndpoint -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint -$endpointObject.IsHttpAllowed = $false -Set-AzCdnEndpoint -CdnEndpoint $endpointObject -``` - -```Output -HostName : myendpoint.azureedge.net -OriginHostHeader : -OriginPath : -ContentTypesToCompress : {} -IsCompressionEnabled : False -IsHttpAllowed : False -IsHttpsAllowed : True -QueryStringCachingBehavior : IgnoreQueryString -Origins : {mystorage} -OptimizationType : -ProbePath : -GeoFilters : {} -DeliveryPolicy : -ResourceState : Running -DefaultOriginGroup : -ResourceGroupName : myresourcegroup -ProfileName : mycdnprofile -Location : WestUs -Tags : {} -Id : /subscriptions/11111111-1111-1111-1111-111111111111/resourcegroups/myresourcegroup/providers/Micr - osoft.Cdn/profiles/mycdnprofile/endpoints/myendpoint -Name : myendpoint -Type : Microsoft.Cdn/profiles/endpoints -ProvisioningState : Succeeded -``` - -Properties that are allowed to change are: `ContentTypesToCompress`, `IsCompressionEnabled`, `IsHttpAllowed`, `IsHttpsAllowed`, `QueryStringCachingBehavior`, `GeoFilters` and `Tags`. - -## PARAMETERS - -### -CdnEndpoint -Specifies the endpoint that this cmdlet updates. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -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: False -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: False -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.Commands.Cdn.Models.Endpoint.PSEndpoint - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint - -## NOTES - -## RELATED LINKS - -[Get-AzCdnEndpoint](./Get-AzCdnEndpoint.md) - -[New-AzCdnEndpoint](./New-AzCdnEndpoint.md) - -[Remove-AzCdnEndpoint](./Remove-AzCdnEndpoint.md) - -[Start-AzCdnEndpoint](./Start-AzCdnEndpoint.md) - -[Stop-AzCdnEndpoint](./Stop-AzCdnEndpoint.md) - - diff --git a/src/Cdn/Cdn/help/Set-AzCdnOrigin.md b/src/Cdn/Cdn/help/Set-AzCdnOrigin.md deleted file mode 100644 index 6d0c2eb97934..000000000000 --- a/src/Cdn/Cdn/help/Set-AzCdnOrigin.md +++ /dev/null @@ -1,347 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: 0EB9F1C9-54CC-4794-9E37-108342341FE5 -online version: https://docs.microsoft.com/powershell/module/az.cdn/set-azcdnorigin -schema: 2.0.0 ---- - -# Set-AzCdnOrigin - -## SYNOPSIS -Updates a CDN origin server. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Set-AzCdnOrigin -EndpointName -HostName [-HttpPort ] [-HttpsPort ] - [-OriginHostHeader ] -OriginName -ProfileName [-Priority ] - -ResourceGroupName [-Weight ] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### ByFieldsPrivateLinkParameterSet -``` -Set-AzCdnOrigin -EndpointName -HostName [-HttpPort ] [-HttpsPort ] - [-OriginHostHeader ] -OriginName -ProfileName [-Priority ] - [-PrivateLinkApprovalMessage ] -PrivateLinkLocation -PrivateLinkResourceId - -ResourceGroupName [-Weight ] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### ByObjectParameterSet -``` -Set-AzCdnOrigin -CdnOrigin [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -## DESCRIPTION -The **Set-AzCdnOrigin** cmdlet updates an Azure Content Delivery Network (CDN) origin server. - -## EXAMPLES - -### Example 1 -```powershell -Set-AzCdnOrigin -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint ` - -OriginName mystorage -HostName mystorage2.blob.core.windows.net -``` - -```Output -HostName : mystorage2.blob.core.windows.net -HttpPort : -HttpsPort : -OriginHostHeader : -Priority : -PrivateLinkApprovalMessage : -PrivateLinkLocation : -PrivateLinkResourceId : -Weight : -ResourceState : Active -ResourceGroupName : myresourcegroup -ProfileName : mycdnprofile -EndpointName : myendpoint -Id : /subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/myresourcegroup/providers/Micr - osoft.Cdn/profiles/mycdnprofile/endpoints/myendpoint/origins/mystorage -Name : mystorage -Type : Microsoft.Cdn/profiles/endpoints/origins -ProvisioningState : Succeeded -``` - -This cmdlet will change the hostname of the specified endpoint. - -## PARAMETERS - -### -CdnOrigin -Specifies the origin server that this cmdlet updates. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Origin.PSOrigin -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Azure CDN endpoint name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HostName -Azure CDN origin host name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPort -Azure CDN origin http port. - -```yaml -Type: System.Nullable`1[System.Int32] -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpsPort -Azure CDN origin https port. - -```yaml -Type: System.Nullable`1[System.Int32] -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginHostHeader -Azure CDN origin host header. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginName -Azure CDN origin name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Priority -Azure CDN origin priority. - -```yaml -Type: System.Nullable`1[System.Int32] -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivateLinkApprovalMessage -A custom message to be included in the approval request to connect to the Private Link. - -```yaml -Type: System.String -Parameter Sets: ByFieldsPrivateLinkParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivateLinkLocation -Azure CDN origin private link location. - -```yaml -Type: System.String -Parameter Sets: ByFieldsPrivateLinkParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivateLinkResourceId -Azure CDN origin private link resource id. - -```yaml -Type: System.String -Parameter Sets: ByFieldsPrivateLinkParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -Azure CDN profile name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The resource group of the Azure CDN profile. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Weight -Azure CDN origin weight. - -```yaml -Type: System.Nullable`1[System.Int32] -Parameter Sets: ByFieldsParameterSet, ByFieldsPrivateLinkParameterSet -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.Commands.Cdn.Models.Origin.PSOrigin - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.Origin.PSOrigin - -## NOTES - -## RELATED LINKS - -[Get-AzCdnOrigin](./Get-AzCdnOrigin.md) - - diff --git a/src/Cdn/Cdn/help/Set-AzCdnOriginGroup.md b/src/Cdn/Cdn/help/Set-AzCdnOriginGroup.md deleted file mode 100644 index 6391369802e2..000000000000 --- a/src/Cdn/Cdn/help/Set-AzCdnOriginGroup.md +++ /dev/null @@ -1,253 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/set-azcdnorigingroup -schema: 2.0.0 ---- - -# Set-AzCdnOriginGroup - -## SYNOPSIS -Updates the CDN origin group - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Set-AzCdnOriginGroup -EndpointName -OriginGroupName - -OriginId [-ProbeIntervalInSeconds ] - [-ProbePath ] [-ProbeProtocol ] [-ProbeRequestType ] -ProfileName - -ResourceGroupName [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### ByObjectParameterSet -``` -Set-AzCdnOriginGroup -CdnOriginGroup [-DefaultProfile ] [-WhatIf] - [-Confirm] [] -``` - -## DESCRIPTION -Set-AzCdnOriginGroup will update the specified origin group within the given endpoint. - -## EXAMPLES - -### Example 1 -```powershell -Set-AzCdnOriginGroup -ResourceGroupName $resourceGroupName -ProfileName $profileName -EndpointName $endpointName -OriginGroupName $originGroupName -OriginId $originIds -ProbeIntervalInSeconds $probeInterval -``` - -This cmdlet will update the ProbeIntervalInSeconds property in the origin group. - -## PARAMETERS - -### -CdnOriginGroup -The CDN origin group object. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.OriginGroup.PSOriginGroup -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Azure CDN endpoint name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroupName -Azure CDN origin group name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginId -Azure CDN origin group ids. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProbeIntervalInSeconds -The number of seconds between health probes. - -```yaml -Type: System.Int32 -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProbePath -The path relative to the origin that is used to determine the health of the origin. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProbeProtocol -Protocol to use for health probe. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProbeRequestType -The type of health probe request that is made. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -Azure CDN profile name. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The resource group of the Azure CDN profile. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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 - -### System.Object - -## OUTPUTS - -### System.Object - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Set-AzCdnProfile.md b/src/Cdn/Cdn/help/Set-AzCdnProfile.md deleted file mode 100644 index e6e29ef86a61..000000000000 --- a/src/Cdn/Cdn/help/Set-AzCdnProfile.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: 863DD160-4443-4D50-804E-089255F3EA4E -online version: https://docs.microsoft.com/powershell/module/az.cdn/set-azcdnprofile -schema: 2.0.0 ---- - -# Set-AzCdnProfile - -## SYNOPSIS -Updates a CDN profile. - -## SYNTAX - -``` -Set-AzCdnProfile -CdnProfile [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -## DESCRIPTION -The **Set-AzCdnProfile** cmdlet updates an Azure Content Delivery Network (CDN) profile. - -## EXAMPLES - -### Example 1 -```powershell -$profileObject = Get-AzCdnProfile -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -$profileObject.Tags = @{"key"="value"} -Set-AzCdnProfile -CdnProfile $profileObject -``` - -```Output -Sku : Microsoft.Azure.Commands.Cdn.Models.Profile.PSSku -ResourceState : Active -ResourceGroupName : myresourcegroup -Location : WestUs -Tags : {key} -Id : /subscriptions/11111111-1111-1111-1111-111111111111/resourcegroups/myresourcegroup/providers/Microsoft.Cdn - /profiles/mycdnprofile -Name : mycdnprofile -Type : Microsoft.Cdn/profiles -ProvisioningState : Succeeded -``` - -## PARAMETERS - -### -CdnProfile -Specifies the profile that this cmdlet updates. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -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: False -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: False -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.Commands.Cdn.Models.Profile.PSProfile - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.Profile.PSProfile - -## NOTES - -## RELATED LINKS - -[Get-AzCdnProfile](./Get-AzCdnProfile.md) - -[New-AzCdnProfile](./New-AzCdnProfile.md) - -[Remove-AzCdnProfile](./Remove-AzCdnProfile.md) - - diff --git a/src/Cdn/Cdn/help/Set-AzFrontDoorCdnCustomDomain.md b/src/Cdn/Cdn/help/Set-AzFrontDoorCdnCustomDomain.md deleted file mode 100644 index 9d0d8ee08afc..000000000000 --- a/src/Cdn/Cdn/help/Set-AzFrontDoorCdnCustomDomain.md +++ /dev/null @@ -1,192 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/set-azfrontdoorcdncustomdomain -schema: 2.0.0 ---- - -# Set-AzFrontDoorCdnCustomDomain - -## SYNOPSIS -Updates the custom domain. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Set-AzFrontDoorCdnCustomDomain [-AzureDnsZoneId ] -CustomDomainName -ProfileName - -ResourceGroupName [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### AfdCustomDomainCustomerCertificate -``` -Set-AzFrontDoorCdnCustomDomain [-AzureDnsZoneId ] -CustomDomainName - -MinimumTlsVersion -ProfileName -SecretId -ResourceGroupName - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Updates the custom domain. - -## EXAMPLES - -### Example 1 -```powershell -Set-AzFrontDoorCdnCustomDomain -AzureDnsZoneId $azureDnsZoneId -CustomDomainName $customDomainName -ProfileName $profileName -ResourceGroupName $resourceGroupName -``` - -Updates the custom domain. - -## PARAMETERS - -### -AzureDnsZoneId -The resource reference to the Azure DNS zone. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CustomDomainName -The Azure Front Door custom domain name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -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: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MinimumTlsVersion -TLS protocol version that will be used for Https - -```yaml -Type: String -Parameter Sets: AfdCustomDomainCustomerCertificate -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecretId -The resource reference to the secret. - -```yaml -Type: String -Parameter Sets: AfdCustomDomainCustomerCertificate -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: 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: 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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdCustomDomain - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Set-AzFrontDoorCdnEndpoint.md b/src/Cdn/Cdn/help/Set-AzFrontDoorCdnEndpoint.md deleted file mode 100644 index 3dcdce3c4642..000000000000 --- a/src/Cdn/Cdn/help/Set-AzFrontDoorCdnEndpoint.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/set-azfrontdoorcdnendpoint -schema: 2.0.0 ---- - -# Set-AzFrontDoorCdnEndpoint - -## SYNOPSIS -Updates the endpoint. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Set-AzFrontDoorCdnEndpoint -EndpointName -ProfileName -ResourceGroupName - [-Tag ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Set-AzFrontDoorCdnEndpoint -Endpoint [-DefaultProfile ] [-WhatIf] - [-Confirm] [] -``` - -## DESCRIPTION -Updates the endpoint. - -## EXAMPLES - -### Example 1 -```powershell -Set-AzFrontDoorCdnEndpoint -Endpoint $endpointObject -``` - -Updates the endpoint. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Endpoint -The Azure Front Door endpoint object. - -```yaml -Type: PSAfdEndpoint -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -EndpointName -The Azure Front Door endpoint name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag -The tags associated to the Azure resource. - -```yaml -Type: Hashtable -Parameter Sets: ByFieldsParameterSet -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: 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: 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.Commands.Cdn.AfdModels.PSAfdEndpoint - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdEndpoint - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Set-AzFrontDoorCdnOrigin.md b/src/Cdn/Cdn/help/Set-AzFrontDoorCdnOrigin.md deleted file mode 100644 index e254e65ee847..000000000000 --- a/src/Cdn/Cdn/help/Set-AzFrontDoorCdnOrigin.md +++ /dev/null @@ -1,318 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/set-azfrontdoorcdnorigin -schema: 2.0.0 ---- - -# Set-AzFrontDoorCdnOrigin - -## SYNOPSIS -Updates the origin. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Set-AzFrontDoorCdnOrigin [-HostName ] [-HttpPort ] [-HttpsPort ] - -OriginGroupName [-OriginHostHeader ] -OriginName [-Priority ] - [-PrivateLinkId ] [-PrivateLinkLocation ] [-PrivateLinkRequestMessage ] - -ProfileName -ResourceGroupName [-Weight ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Set-AzFrontDoorCdnOrigin -Origin [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -## DESCRIPTION -Updates the origin. - -## EXAMPLES - -### Example 1 -```powershell -Set-AzFrontDoorCdnOrigin -Origin $originObject -``` - -Updates the origin. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HostName -The address of the origin. -Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPort -The value of the HTTP port. -Must be between 1 and 65535. - -```yaml -Type: Int32 -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpsPort -The value of the HTTPS port. -Must be between 1 and 65535. - -```yaml -Type: Int32 -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Origin -The Azure Front Door origin object. - -```yaml -Type: PSAfdOrigin -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroupName -The Azure Front Door origin group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginHostHeader -The host header value sent to the origin with each request. -If you leave this blank, the request hostname determines this value. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginName -The Azure Front Door origin name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Priority -Priority of origin in given origin group for load balancing. -Higher priorities will not be used for load balancing if any lower priority origin is healthy. - -```yaml -Type: Int32 -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivateLinkId -The Azure resource id of the shared private link resource. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivateLinkLocation -The location of the shared private link resource. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivateLinkRequestMessage -The request message for requesting approval of the shared private link resource. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Weight -Weight of the origin in given origin group for load balancing. - -```yaml -Type: Int32 -Parameter Sets: ByFieldsParameterSet -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: 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: 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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdOrigin - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Set-AzFrontDoorCdnOriginGroup.md b/src/Cdn/Cdn/help/Set-AzFrontDoorCdnOriginGroup.md deleted file mode 100644 index 28f017018315..000000000000 --- a/src/Cdn/Cdn/help/Set-AzFrontDoorCdnOriginGroup.md +++ /dev/null @@ -1,283 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/set-azfrontdoorcdnorigingroup -schema: 2.0.0 ---- - -# Set-AzFrontDoorCdnOriginGroup - -## SYNOPSIS -Updates the origin group. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Set-AzFrontDoorCdnOriginGroup [-AdditionalLatencyInMillisecond ] -OriginGroupName - [-ProbeIntervalInSeconds ] [-ProbePath ] [-ProbeProtocol ] [-ProbeRequestType ] - -ProfileName -ResourceGroupName [-SampleSize ] [-SuccessfulSamplesRequired ] - [-TrafficRestorationTimeToHealedOrNewEndpointsInMinutes ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Set-AzFrontDoorCdnOriginGroup -OriginGroup [-DefaultProfile ] - [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Updates the origin group. - -## EXAMPLES - -### Example 1 -```powershell -Set-AzFrontDoorCdnOriginGroup -OriginGroup $originGroupObject -``` - -Updates the origin group. - -## PARAMETERS - -### -AdditionalLatencyInMillisecond -The additional latency in milliseconds for probes to fall into the lowest latency bucket. - -```yaml -Type: Int32 -Parameter Sets: ByFieldsParameterSet -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: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroup -The Azure Front Door origin group object. - -```yaml -Type: PSAfdOriginGroup -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -OriginGroupName -The Azure Front Door origin group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProbeIntervalInSeconds -The number of seconds between health probes. - -```yaml -Type: Int32 -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProbePath -The path relative to the origin that is used to determine the health of the origin. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProbeProtocol -Protocol to use for health probe. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProbeRequestType -The type of health probe request that is made. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SampleSize -The number of samples to consider for load balancing decisions. - -```yaml -Type: Int32 -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SuccessfulSamplesRequired -The number of samples within the sample period that must succeed. - -```yaml -Type: Int32 -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TrafficRestorationTimeToHealedOrNewEndpointsInMinutes -Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. - -```yaml -Type: Int32 -Parameter Sets: ByFieldsParameterSet -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: 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: 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.Commands.Cdn.AfdModels.PSAfdOriginGroup - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdOriginGroup - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Set-AzFrontDoorCdnProfile.md b/src/Cdn/Cdn/help/Set-AzFrontDoorCdnProfile.md deleted file mode 100644 index 467be4990371..000000000000 --- a/src/Cdn/Cdn/help/Set-AzFrontDoorCdnProfile.md +++ /dev/null @@ -1,160 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/set-azfrontdoorcdnprofile -schema: 2.0.0 ---- - -# Set-AzFrontDoorCdnProfile - -## SYNOPSIS -Updates the profile. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Set-AzFrontDoorCdnProfile [-ProfileName ] [-ResourceGroupName ] [-Tag ] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Set-AzFrontDoorCdnProfile -Profile [-DefaultProfile ] [-WhatIf] - [-Confirm] [] -``` - -## DESCRIPTION -Updates the profile. - -## EXAMPLES - -### Example 1 -```powershell -Set-AzFrontDoorCdnProfile -Profile $profileObject -``` - -Updates the profile. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Profile -The Azure Front Door profile object. - -```yaml -Type: PSAfdProfile -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag -The tags associated to the Azure resource. - -```yaml -Type: Hashtable -Parameter Sets: ByFieldsParameterSet -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: 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: 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.Commands.Cdn.AfdModels.PSAfdProfile - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdProfile - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Set-AzFrontDoorCdnRoute.md b/src/Cdn/Cdn/help/Set-AzFrontDoorCdnRoute.md deleted file mode 100644 index 4600a74d6f65..000000000000 --- a/src/Cdn/Cdn/help/Set-AzFrontDoorCdnRoute.md +++ /dev/null @@ -1,301 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/set-azfrontdoorcdnroute -schema: 2.0.0 ---- - -# Set-AzFrontDoorCdnRoute - -## SYNOPSIS -Updates the route. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Set-AzFrontDoorCdnRoute [-CustomDomainId ] - [-HttpsRedirect ] -EndpointName [-ForwardingProtocol ] [-OriginGroupId ] - -ProfileName [-QueryStringCachingBehavior ] [-OriginPath ] - -ResourceGroupName -RouteName - [-RuleSetId ] - [-SupportedProtocol ] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Set-AzFrontDoorCdnRoute -Route [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -## DESCRIPTION -Updates the route. - -## EXAMPLES - -### Example 1 -```powershell -Set-AzFrontDoorCdnRoute -Route $routeObject -``` - -Updates the route. - -## PARAMETERS - -### -CustomDomainId -The resource ids of the Azure Front Door custom domains. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: ByFieldsParameterSet -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: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -The Azure Front Door endpoint name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ForwardingProtocol -Protocol this rule will use when forwarding traffic to backends. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpsRedirect -Whether to automatically redirect HTTP traffic to HTTPS traffic. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginGroupId -The resource id of the Azure Front Door origin group. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OriginPath -A directory path on the origin that Azure Front Door can use to retrieve content from, e.g. -contoso.cloudapp.net/originpath. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -QueryStringCachingBehavior -Defines how Azure Front Door caches requests that include query strings. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Route -The Azure Front Door route object. - -```yaml -Type: PSAfdRoute -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -RouteName -The Azure Front Door route name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RuleSetId -The resource ids of the Azure Front Door rule sets. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SupportedProtocol -List of supported protocols for this route. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: ByFieldsParameterSet -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: 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: 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.Commands.Cdn.AfdModels.PSAfdRoute - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdRoute - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Set-AzFrontDoorCdnSecret.md b/src/Cdn/Cdn/help/Set-AzFrontDoorCdnSecret.md deleted file mode 100644 index 7d46babf1344..000000000000 --- a/src/Cdn/Cdn/help/Set-AzFrontDoorCdnSecret.md +++ /dev/null @@ -1,215 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/set-azfrontdoorcdnsecret -schema: 2.0.0 ---- - -# Set-AzFrontDoorCdnSecret - -## SYNOPSIS -Updates the secret. - -## SYNTAX - -``` -Set-AzFrontDoorCdnSecret [-CertificateAuthority ] -ProfileName -ResourceGroupName - -SecretName -SecretSource [-SecretVersion ] - [-SubjectAlternativeName ] [-UseLatestVersion] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Updates the secret. - -## EXAMPLES - -### Example 1 -```powershell -Set-AzFrontDoorCdnSecret -ProfileName $profileName -ResourceGroupName $resourceGroupName -SecretName $secretName -SecretSource $secretSource -``` - -Updates the secret. - -## PARAMETERS - -### -CertificateAuthority -The certificate issuing authority. - -```yaml -Type: String -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: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecretName -The Azure Front Door secret name. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecretSource -The resource reference to the Azure Key Vault secret. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecretVersion -The version of the secret to be used - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubjectAlternativeName -The list of the subject alternative names. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UseLatestVersion -Whether to use the latest version for the certificate. - -```yaml -Type: SwitchParameter -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: 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: 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 - -### None - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdSecret - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Set-AzFrontDoorCdnSecurityPolicy.md b/src/Cdn/Cdn/help/Set-AzFrontDoorCdnSecurityPolicy.md deleted file mode 100644 index 428680f87c67..000000000000 --- a/src/Cdn/Cdn/help/Set-AzFrontDoorCdnSecurityPolicy.md +++ /dev/null @@ -1,191 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -online version: https://docs.microsoft.com/powershell/module/az.cdn/set-azfrontdoorcdnsecuritypolicy -schema: 2.0.0 ---- - -# Set-AzFrontDoorCdnSecurityPolicy - -## SYNOPSIS -Updates the security policy. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Set-AzFrontDoorCdnSecurityPolicy [-DomainId ] - -ProfileName -ResourceGroupName -SecurityPolicyName [-WafPolicyId ] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Set-AzFrontDoorCdnSecurityPolicy -SecurityPolicy - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Updates the security policy. - -## EXAMPLES - -### Example 1 -```powershell -Set-AzFrontDoorCdnSecurityPolicy -DomainId $domainId -ProfileName $profileName -ResourceGroupName $resourceGroupName -SecurityPolicyName $securityPolicyName -WafPolicyId $wafPolicyId -``` - -Updates the security policy. - -## PARAMETERS - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. - -```yaml -Type: IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DomainId -The resource ids of the domains which will be linked to the Azure Front Door web application firewall. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -The Azure Front Door profile name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The Azure resource group name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecurityPolicy -The Azure Front Door security policy object. - -```yaml -Type: PSAfdSecurityPolicy -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -SecurityPolicyName -The Azure Front Door security policy name. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WafPolicyId -The resource id of the Azure Front Door web application firewall. - -```yaml -Type: String -Parameter Sets: ByFieldsParameterSet -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: 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: 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.Commands.Cdn.AfdModels.PSAfdSecurityPolicy - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.AfdModels.PSAfdSecurityPolicy - -## NOTES - -## RELATED LINKS diff --git a/src/Cdn/Cdn/help/Start-AzCdnEndpoint.md b/src/Cdn/Cdn/help/Start-AzCdnEndpoint.md deleted file mode 100644 index 6ed92fa7b830..000000000000 --- a/src/Cdn/Cdn/help/Start-AzCdnEndpoint.md +++ /dev/null @@ -1,189 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: 6477ADC3-0831-493D-8904-F1D787145DD3 -online version: https://docs.microsoft.com/powershell/module/az.cdn/start-azcdnendpoint -schema: 2.0.0 ---- - -# Start-AzCdnEndpoint - -## SYNOPSIS -Starts a CDN endpoint. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Start-AzCdnEndpoint -EndpointName -ProfileName -ResourceGroupName [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Start-AzCdnEndpoint -CdnEndpoint [-PassThru] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] -``` - -## DESCRIPTION -The **Start-AzCdnEndpoint** cmdlet starts an Azure Content Delivery Network (CDN) endpoint. - -## EXAMPLES - -### Example 1 -```powershell -Start-AzCdnEndpoint -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint -``` - -## PARAMETERS - -### -CdnEndpoint -Specifies the endpoint that this cmdlet starts. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Specifies the name of the endpoint that this cmdlet starts. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -Returns an object representing the item with which you are working. -By default, this cmdlet does not generate any output. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProfileName -Specifies the name of the profile to which the endpoint belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Specifies the name of the resource group to which the endpoint belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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: False -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: False -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.Commands.Cdn.Models.Endpoint.PSEndpoint - -### System.Management.Automation.SwitchParameter - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS - -[Get-AzCdnEndpoint](./Get-AzCdnEndpoint.md) - -[New-AzCdnEndpoint](./New-AzCdnEndpoint.md) - -[Remove-AzCdnEndpoint](./Remove-AzCdnEndpoint.md) - -[Set-AzCdnEndpoint](./Set-AzCdnEndpoint.md) - -[Stop-AzCdnEndpoint](./Stop-AzCdnEndpoint.md) - - diff --git a/src/Cdn/Cdn/help/Stop-AzCdnEndpoint.md b/src/Cdn/Cdn/help/Stop-AzCdnEndpoint.md deleted file mode 100644 index 22200161c068..000000000000 --- a/src/Cdn/Cdn/help/Stop-AzCdnEndpoint.md +++ /dev/null @@ -1,189 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: 1C45A450-CFD5-40CE-871C-1C2521A03073 -online version: https://docs.microsoft.com/powershell/module/az.cdn/stop-azcdnendpoint -schema: 2.0.0 ---- - -# Stop-AzCdnEndpoint - -## SYNOPSIS -Stops the CDN endpoint. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Stop-AzCdnEndpoint -EndpointName -ProfileName -ResourceGroupName [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### ByObjectParameterSet -``` -Stop-AzCdnEndpoint -CdnEndpoint [-PassThru] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] -``` - -## DESCRIPTION -The **Stop-AzCdnEndpoint** cmdlet stops the Azure Content Delivery Network (CDN) endpoint. - -## EXAMPLES - -### Example 1 -```powershell -Stop-AzCdnEndpoint -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint -``` - -## PARAMETERS - -### -CdnEndpoint -Specifies the endpoint object that this cmdlet stops. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Specifies the name of the endpoint that this cmdlet stops. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -Returns an object representing the item with which you are working. -By default, this cmdlet does not generate any output. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProfileName -Specifies the name of the profile to which the endpoint belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Specifies the name of the resource group to which the endpoint belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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: False -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: False -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.Commands.Cdn.Models.Endpoint.PSEndpoint - -### System.Management.Automation.SwitchParameter - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS - -[Get-AzCdnEndpoint](./Get-AzCdnEndpoint.md) - -[New-AzCdnEndpoint](./New-AzCdnEndpoint.md) - -[Remove-AzCdnEndpoint](./Remove-AzCdnEndpoint.md) - -[Set-AzCdnEndpoint](./Set-AzCdnEndpoint.md) - -[Start-AzCdnEndpoint](./Start-AzCdnEndpoint.md) - - diff --git a/src/Cdn/Cdn/help/Test-AzCdnCustomDomain.md b/src/Cdn/Cdn/help/Test-AzCdnCustomDomain.md deleted file mode 100644 index 074559fad0fe..000000000000 --- a/src/Cdn/Cdn/help/Test-AzCdnCustomDomain.md +++ /dev/null @@ -1,157 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: 8C4E824F-FB4A-4DE7-8FD9-3FDA3848F25C -online version: https://docs.microsoft.com/powershell/module/az.cdn/test-azcdncustomdomain -schema: 2.0.0 ---- - -# Test-AzCdnCustomDomain - -## SYNOPSIS -Checks whether a custom domain can be added to an endpoint. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Test-AzCdnCustomDomain -EndpointName -ProfileName -ResourceGroupName - -CustomDomainHostName [-DefaultProfile ] [] -``` - -### ByObjectParameterSet -``` -Test-AzCdnCustomDomain -CdnEndpoint -CustomDomainHostName - [-DefaultProfile ] [] -``` - -## DESCRIPTION -The **Test-AzCdnCustomDomain** cmdlet checks whether a custom domain can be added to an endpoint by validating the CName mapping. - -## EXAMPLES - -### Example 1 -```powershell -Test-AzCdnCustomDomain -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint -CustomDomainHostName cdn.example.com -``` - -```Output -CustomDomainValidated Reason Message ---------------------- ------ ------- - True -``` - -## PARAMETERS - -### -CdnEndpoint -Specifies the endpoint to which you want to add the custom domain. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -CustomDomainHostName -Specifies the host name of the custom domain. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -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: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Specifies the name of the endpoint to which you want to add the custom domain. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileName -Specifies the name of the profile. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Specifies the name of the resource group. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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.Commands.Cdn.Models.Endpoint.PSEndpoint - -## OUTPUTS - -### Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSValidateCustomDomainOutput - -## NOTES - -## RELATED LINKS - -[Get-AzCdnCustomDomain](./Get-AzCdnCustomDomain.md) - -[New-AzCdnCustomDomain](./New-AzCdnCustomDomain.md) - -[Remove-AzCdnCustomDomain](./Remove-AzCdnCustomDomain.md) - - diff --git a/src/Cdn/Cdn/help/Unpublish-AzCdnEndpointContent.md b/src/Cdn/Cdn/help/Unpublish-AzCdnEndpointContent.md deleted file mode 100644 index af1bfbea341a..000000000000 --- a/src/Cdn/Cdn/help/Unpublish-AzCdnEndpointContent.md +++ /dev/null @@ -1,202 +0,0 @@ ---- -external help file: Microsoft.Azure.PowerShell.Cmdlets.Cdn.dll-Help.xml -Module Name: Az.Cdn -ms.assetid: 21E9F441-A00B-4F79-8FF1-968D92982471 -online version: https://docs.microsoft.com/powershell/module/az.cdn/unpublish-azcdnendpointcontent -schema: 2.0.0 ---- - -# Unpublish-AzCdnEndpointContent - -## SYNOPSIS -Purges a CDN endpoint. - -## SYNTAX - -### ByFieldsParameterSet (Default) -``` -Unpublish-AzCdnEndpointContent -EndpointName -ProfileName -ResourceGroupName - -PurgeContent [-PassThru] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### ByObjectParameterSet -``` -Unpublish-AzCdnEndpointContent -CdnEndpoint -PurgeContent [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -The **Unpublish-AzCdnEndpointContent** cmdlet purges the content from an Azure Content Delivery Network (CDN) endpoint. - -## EXAMPLES - -### Example 1: Purge some assets -```powershell -Unpublish-AzCdnEndpointContent -ResourceGroupName myresourcegroup -ProfileName mycdnprofile -EndpointName myendpoint -PurgeContent "/images/kitten.png","/video/rickroll.mp4" -``` - -### Example 2: Purge everything in /images/ on all endpoints -```powershell -Get-AzCdnProfile | Get-AzCdnEndpoint | Unpublish-AzCdnEndpointContent -PurgeContent "/images/*" -``` - -## PARAMETERS - -### -CdnEndpoint -Specifies the endpoint that this cmdlet purges. - -```yaml -Type: Microsoft.Azure.Commands.Cdn.Models.Endpoint.PSEndpoint -Parameter Sets: ByObjectParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with azure - -```yaml -Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer -Parameter Sets: (All) -Aliases: AzContext, AzureRmContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EndpointName -Specifies name of the endpoint that this cmdlet purges. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PassThru -Returns an object representing the item with which you are working. -By default, this cmdlet does not generate any output. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -ProfileName -Specifies the name of the profile to which the endpoint belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PurgeContent -Specifies an array of relative paths for the content on the origin server that this cmdlet purges. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -Specifies the name of the resource group to which the endpoint belongs. - -```yaml -Type: System.String -Parameter Sets: ByFieldsParameterSet -Aliases: - -Required: True -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: False -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: False -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.Commands.Cdn.Models.Endpoint.PSEndpoint - -### System.Management.Automation.SwitchParameter - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS - -[Publish-AzCdnEndpointContent](./Publish-AzCdnEndpointContent.md) - - diff --git a/src/Cdn/documentation/current-breaking-changes.md b/src/Cdn/documentation/current-breaking-changes.md deleted file mode 100644 index 0fec7a93b8d5..000000000000 --- a/src/Cdn/documentation/current-breaking-changes.md +++ /dev/null @@ -1,51 +0,0 @@ - - -## Current Breaking Changes - -### Release 5.0.0 - May 2018 - -The following cmdlets were affected this release: - -**New-AzureRmCdnEndpoint** -- The parameter alias `Tags` is being removed - -**New-AzureRmCdnProfile** -- The parameter alias `Tags` is being removed \ No newline at end of file diff --git a/src/Cdn/documentation/upcoming-breaking-changes.md b/src/Cdn/documentation/upcoming-breaking-changes.md deleted file mode 100644 index e01c405de7a3..000000000000 --- a/src/Cdn/documentation/upcoming-breaking-changes.md +++ /dev/null @@ -1,28 +0,0 @@ - - -# Upcoming Breaking Changes \ No newline at end of file From 3fbe784ff2089d0e2f7628ca62623212e682cf46 Mon Sep 17 00:00:00 2001 From: azure-powershell-bot <65331932+azure-powershell-bot@users.noreply.github.com> Date: Sat, 14 May 2022 01:18:07 +0000 Subject: [PATCH 2/5] Move Cdn to wyunchi/cdn-removed --- src/Cdn/Az.Cdn.csproj | 7 + src/Cdn/Az.Cdn.format.ps1xml | 6973 +++++ src/Cdn/Az.Cdn.psd1 | 240 + src/Cdn/Az.Cdn.psm1 | 115 + src/Cdn/Cdn.sln | 104 + src/Cdn/Changelog.md | 24 + src/Cdn/Properties/AssemblyInfo.cs | 28 + src/Cdn/README.md | 233 + src/Cdn/build-module.ps1 | 161 + src/Cdn/check-dependencies.ps1 | 65 + src/Cdn/create-model-cmdlets.ps1 | 179 + src/Cdn/custom/Az.Cdn.custom.psm1 | 17 + src/Cdn/custom/Get-AzCdnProfile.ps1 | 106 + src/Cdn/custom/Get-AzFrontDoorCdnProfile.ps1 | 105 + src/Cdn/custom/New-AzCdnProfile.ps1 | 153 + ...CustomDomainTlsSettingParametersObject.ps1 | 61 + ...nDeliveryRuleClientPortConditionObject.ps1 | 74 + ...CdnOriginGroupHealthProbeSettingObject.ps1 | 67 + ...nOriginGroupLoadBalancingSettingObject.ps1 | 59 + src/Cdn/custom/New-AzFrontDoorCdnProfile.ps1 | 155 + ...-AzFrontDoorCdnResourceReferenceObject.ps1 | 47 + ...FrontDoorCdnRuleCookiesConditionObject.ps1 | 80 + ...rontDoorCdnRuleHostNameConditionObject.ps1 | 74 + ...tDoorCdnRuleHttpVersionConditionObject.ps1 | 67 + ...rontDoorCdnRuleIsDeviceConditionObject.ps1 | 67 + ...rontDoorCdnRulePostArgsConditionObject.ps1 | 80 + ...tDoorCdnRuleQueryStringConditionObject.ps1 | 74 + ...oorCdnRuleRemoteAddressConditionObject.ps1 | 74 + ...tDoorCdnRuleRequestBodyConditionObject.ps1 | 74 + ...ntDoorCdnRuleRequestHeaderActionObject.ps1 | 67 + ...oorCdnRuleRequestHeaderConditionObject.ps1 | 80 + ...oorCdnRuleRequestMethodConditionObject.ps1 | 67 + ...oorCdnRuleRequestSchemeConditionObject.ps1 | 67 + ...ntDoorCdnRuleRequestUriConditionObject.ps1 | 74 + ...tDoorCdnRuleResponseHeaderActionObject.ps1 | 67 + ...RouteConfigurationOverrideActionObject.ps1 | 94 + ...ntDoorCdnRuleServerPortConditionObject.ps1 | 74 + ...ntDoorCdnRuleSocketAddrConditionObject.ps1 | 74 + ...tDoorCdnRuleSslProtocolConditionObject.ps1 | 68 + ...CdnRuleUrlFileExtensionConditionObject.ps1 | 74 + ...tDoorCdnRuleUrlFileNameConditionObject.ps1 | 74 + ...FrontDoorCdnRuleUrlPathConditionObject.ps1 | 74 + ...rontDoorCdnRuleUrlRedirectActionObject.ps1 | 86 + ...FrontDoorCdnRuleUrlRewriteActionObject.ps1 | 66 + ...FrontDoorCdnRuleUrlSigningActionObject.ps1 | 61 + ...retCustomerCertificateParametersObject.ps1 | 72 + ...artyManagedCertificateParametersObject.ps1 | 48 + ...cretManagedCertificateParametersObject.ps1 | 48 + ...CdnSecretUrlSigningKeyParametersObject.ps1 | 66 + ...ebApplicationFirewallAssociationObject.ps1 | 53 + ...WebApplicationFirewallParametersObject.ps1 | 53 + src/Cdn/custom/README.md | 41 + src/Cdn/custom/Remove-AzCdnProfile.ps1 | 178 + .../custom/Remove-AzFrontDoorCdnProfile.ps1 | 178 + src/Cdn/custom/Update-AzCdnProfile.ps1 | 184 + .../custom/Update-AzFrontDoorCdnProfile.ps1 | 184 + ...zCdnDeliveryRuleCookiesConditionObject.ps1 | 80 + ...DeliveryRuleHttpVersionConditionObject.ps1 | 67 + ...CdnDeliveryRuleIsDeviceConditionObject.ps1 | 67 + .../New-AzCdnDeliveryRuleObject.ps1 | 65 + ...CdnDeliveryRulePostArgsConditionObject.ps1 | 80 + ...DeliveryRuleQueryStringConditionObject.ps1 | 74 + ...liveryRuleRemoteAddressConditionObject.ps1 | 74 + ...DeliveryRuleRequestBodyConditionObject.ps1 | 74 + ...nDeliveryRuleRequestHeaderActionObject.ps1 | 67 + ...liveryRuleRequestHeaderConditionObject.ps1 | 80 + ...liveryRuleRequestMethodConditionObject.ps1 | 67 + ...liveryRuleRequestSchemeConditionObject.ps1 | 67 + ...nDeliveryRuleRequestUriConditionObject.ps1 | 74 + ...DeliveryRuleResponseHeaderActionObject.ps1 | 67 + ...eryRuleUrlFileExtensionConditionObject.ps1 | 74 + ...DeliveryRuleUrlFileNameConditionObject.ps1 | 74 + ...zCdnDeliveryRuleUrlPathConditionObject.ps1 | 74 + .../New-AzCdnHealthProbeParametersObject.ps1 | 67 + .../New-AzCdnManagedHttpsParametersObject.ps1 | 69 + .../New-AzCdnResourceReferenceObject.ps1 | 47 + ...edOriginErrorDetectionParametersObject.ps1 | 60 + .../New-AzCdnUrlRedirectActionObject.ps1 | 86 + .../New-AzCdnUrlRewriteActionObject.ps1 | 66 + .../New-AzCdnUrlSigningActionObject.ps1 | 61 + ...-AzCdnUserManagedHttpsParametersObject.ps1 | 92 + src/Cdn/custom/common/Utils.ps1 | 8 + .../examples/Clear-AzCdnEndpointContent.md | 22 + .../Clear-AzFrontDoorCdnEndpointContent.md | 22 + .../Disable-AzCdnCustomDomainCustomHttps.md | 22 + .../Enable-AzCdnCustomDomainCustomHttps.md | 22 + src/Cdn/examples/Get-AzCdnCustomDomain.md | 22 + src/Cdn/examples/Get-AzCdnEdgeNode.md | 22 + src/Cdn/examples/Get-AzCdnEndpoint.md | 22 + .../Get-AzCdnEndpointResourceUsage.md | 22 + src/Cdn/examples/Get-AzCdnOrigin.md | 22 + src/Cdn/examples/Get-AzCdnOriginGroup.md | 22 + src/Cdn/examples/Get-AzCdnProfile.md | 22 + .../examples/Get-AzCdnProfileResourceUsage.md | 22 + ...t-AzCdnProfileSupportedOptimizationType.md | 22 + .../Get-AzCdnSubscriptionResourceUsage.md | 22 + .../Get-AzFrontDoorCdnCustomDomain.md | 22 + .../examples/Get-AzFrontDoorCdnEndpoint.md | 22 + ...Get-AzFrontDoorCdnEndpointResourceUsage.md | 22 + src/Cdn/examples/Get-AzFrontDoorCdnOrigin.md | 22 + .../examples/Get-AzFrontDoorCdnOriginGroup.md | 22 + ...-AzFrontDoorCdnOriginGroupResourceUsage.md | 22 + src/Cdn/examples/Get-AzFrontDoorCdnProfile.md | 22 + .../Get-AzFrontDoorCdnProfileResourceUsage.md | 22 + src/Cdn/examples/Get-AzFrontDoorCdnRoute.md | 22 + src/Cdn/examples/Get-AzFrontDoorCdnRule.md | 22 + src/Cdn/examples/Get-AzFrontDoorCdnRuleSet.md | 22 + .../Get-AzFrontDoorCdnRuleSetResourceUsage.md | 22 + src/Cdn/examples/Get-AzFrontDoorCdnSecret.md | 22 + .../Get-AzFrontDoorCdnSecurityPolicy.md | 22 + .../examples/Import-AzCdnEndpointContent.md | 22 + src/Cdn/examples/New-AzCdnCustomDomain.md | 22 + ...AzCdnDeliveryRuleCookiesConditionObject.md | 22 + ...nDeliveryRuleHttpVersionConditionObject.md | 22 + ...zCdnDeliveryRuleIsDeviceConditionObject.md | 22 + .../examples/New-AzCdnDeliveryRuleObject.md | 22 + ...zCdnDeliveryRulePostArgsConditionObject.md | 22 + ...nDeliveryRuleQueryStringConditionObject.md | 22 + ...eliveryRuleRemoteAddressConditionObject.md | 22 + ...nDeliveryRuleRequestBodyConditionObject.md | 22 + ...dnDeliveryRuleRequestHeaderActionObject.md | 22 + ...eliveryRuleRequestHeaderConditionObject.md | 22 + ...eliveryRuleRequestMethodConditionObject.md | 22 + ...eliveryRuleRequestSchemeConditionObject.md | 22 + ...dnDeliveryRuleRequestUriConditionObject.md | 22 + ...nDeliveryRuleResponseHeaderActionObject.md | 22 + ...veryRuleUrlFileExtensionConditionObject.md | 22 + ...nDeliveryRuleUrlFileNameConditionObject.md | 22 + ...AzCdnDeliveryRuleUrlPathConditionObject.md | 22 + src/Cdn/examples/New-AzCdnEndpoint.md | 22 + .../New-AzCdnHealthProbeParametersObject.md | 22 + .../New-AzCdnManagedHttpsParametersObject.md | 22 + src/Cdn/examples/New-AzCdnOrigin.md | 22 + src/Cdn/examples/New-AzCdnOriginGroup.md | 22 + src/Cdn/examples/New-AzCdnProfile.md | 22 + .../New-AzCdnResourceReferenceObject.md | 22 + ...sedOriginErrorDetectionParametersObject.md | 22 + .../New-AzCdnUrlRedirectActionObject.md | 22 + .../New-AzCdnUrlRewriteActionObject.md | 22 + .../New-AzCdnUrlSigningActionObject.md | 22 + ...w-AzCdnUserManagedHttpsParametersObject.md | 22 + .../New-AzFrontDoorCdnCustomDomain.md | 22 + ...nCustomDomainTlsSettingParametersObject.md | 22 + .../examples/New-AzFrontDoorCdnEndpoint.md | 22 + src/Cdn/examples/New-AzFrontDoorCdnOrigin.md | 22 + .../examples/New-AzFrontDoorCdnOriginGroup.md | 22 + ...rCdnOriginGroupHealthProbeSettingObject.md | 22 + ...dnOriginGroupLoadBalancingSettingObject.md | 22 + src/Cdn/examples/New-AzFrontDoorCdnProfile.md | 22 + ...w-AzFrontDoorCdnResourceReferenceObject.md | 22 + src/Cdn/examples/New-AzFrontDoorCdnRoute.md | 22 + src/Cdn/examples/New-AzFrontDoorCdnRule.md | 22 + ...ontDoorCdnRuleClientPortConditionObject.md | 22 + ...zFrontDoorCdnRuleCookiesConditionObject.md | 22 + ...FrontDoorCdnRuleHostNameConditionObject.md | 22 + ...ntDoorCdnRuleHttpVersionConditionObject.md | 22 + ...FrontDoorCdnRuleIsDeviceConditionObject.md | 22 + ...FrontDoorCdnRulePostArgsConditionObject.md | 22 + ...ntDoorCdnRuleQueryStringConditionObject.md | 22 + ...DoorCdnRuleRemoteAddressConditionObject.md | 22 + ...ntDoorCdnRuleRequestBodyConditionObject.md | 22 + ...ontDoorCdnRuleRequestHeaderActionObject.md | 22 + ...DoorCdnRuleRequestHeaderConditionObject.md | 22 + ...DoorCdnRuleRequestMethodConditionObject.md | 22 + ...DoorCdnRuleRequestSchemeConditionObject.md | 22 + ...ontDoorCdnRuleRequestUriConditionObject.md | 22 + ...ntDoorCdnRuleResponseHeaderActionObject.md | 22 + ...eRouteConfigurationOverrideActionObject.md | 22 + ...ontDoorCdnRuleServerPortConditionObject.md | 22 + src/Cdn/examples/New-AzFrontDoorCdnRuleSet.md | 22 + ...ontDoorCdnRuleSocketAddrConditionObject.md | 22 + ...ntDoorCdnRuleSslProtocolConditionObject.md | 22 + ...rCdnRuleUrlFileExtensionConditionObject.md | 22 + ...ntDoorCdnRuleUrlFileNameConditionObject.md | 22 + ...zFrontDoorCdnRuleUrlPathConditionObject.md | 22 + ...FrontDoorCdnRuleUrlRedirectActionObject.md | 22 + ...zFrontDoorCdnRuleUrlRewriteActionObject.md | 22 + ...zFrontDoorCdnRuleUrlSigningActionObject.md | 22 + src/Cdn/examples/New-AzFrontDoorCdnSecret.md | 22 + ...cretCustomerCertificateParametersObject.md | 22 + ...PartyManagedCertificateParametersObject.md | 22 + ...ecretManagedCertificateParametersObject.md | 22 + ...rCdnSecretUrlSigningKeyParametersObject.md | 22 + .../New-AzFrontDoorCdnSecurityPolicy.md | 22 + ...WebApplicationFirewallAssociationObject.md | 22 + ...yWebApplicationFirewallParametersObject.md | 22 + src/Cdn/examples/Remove-AzCdnCustomDomain.md | 22 + src/Cdn/examples/Remove-AzCdnEndpoint.md | 22 + src/Cdn/examples/Remove-AzCdnOrigin.md | 22 + src/Cdn/examples/Remove-AzCdnOriginGroup.md | 22 + src/Cdn/examples/Remove-AzCdnProfile.md | 22 + .../Remove-AzFrontDoorCdnCustomDomain.md | 22 + .../examples/Remove-AzFrontDoorCdnEndpoint.md | 22 + .../examples/Remove-AzFrontDoorCdnOrigin.md | 22 + .../Remove-AzFrontDoorCdnOriginGroup.md | 22 + .../examples/Remove-AzFrontDoorCdnProfile.md | 22 + .../examples/Remove-AzFrontDoorCdnRoute.md | 22 + src/Cdn/examples/Remove-AzFrontDoorCdnRule.md | 22 + .../examples/Remove-AzFrontDoorCdnRuleSet.md | 22 + .../examples/Remove-AzFrontDoorCdnSecret.md | 22 + .../Remove-AzFrontDoorCdnSecurityPolicy.md | 22 + src/Cdn/examples/Start-AzCdnEndpoint.md | 22 + src/Cdn/examples/Stop-AzCdnEndpoint.md | 22 + .../Test-AzCdnEndpointCustomDomain.md | 22 + .../examples/Test-AzCdnNameAvailability.md | 22 + src/Cdn/examples/Test-AzCdnProbe.md | 22 + ...Test-AzFrontDoorCdnEndpointCustomDomain.md | 22 + ...-AzFrontDoorCdnEndpointNameAvailability.md | 22 + ...FrontDoorCdnProfileHostNameAvailability.md | 22 + src/Cdn/examples/Update-AzCdnEndpoint.md | 22 + src/Cdn/examples/Update-AzCdnOrigin.md | 22 + src/Cdn/examples/Update-AzCdnOriginGroup.md | 22 + src/Cdn/examples/Update-AzCdnProfile.md | 22 + .../Update-AzFrontDoorCdnCustomDomain.md | 22 + ...FrontDoorCdnCustomDomainValidationToken.md | 22 + .../examples/Update-AzFrontDoorCdnEndpoint.md | 22 + .../examples/Update-AzFrontDoorCdnOrigin.md | 22 + .../Update-AzFrontDoorCdnOriginGroup.md | 22 + .../examples/Update-AzFrontDoorCdnProfile.md | 22 + .../examples/Update-AzFrontDoorCdnRoute.md | 22 + src/Cdn/examples/Update-AzFrontDoorCdnRule.md | 22 + .../Update-AzFrontDoorCdnSecurityPolicy.md | 22 + src/Cdn/export-surface.ps1 | 41 + .../exports/Clear-AzCdnEndpointContent.ps1 | 260 + .../Clear-AzFrontDoorCdnEndpointContent.ps1 | 269 + .../Disable-AzCdnCustomDomainCustomHttps.ps1 | 225 + .../Enable-AzCdnCustomDomainCustomHttps.ps1 | 239 + src/Cdn/exports/Get-AzCdnCustomDomain.ps1 | 225 + src/Cdn/exports/Get-AzCdnEdgeNode.ps1 | 156 + src/Cdn/exports/Get-AzCdnEndpoint.ps1 | 218 + .../Get-AzCdnEndpointResourceUsage.ps1 | 184 + src/Cdn/exports/Get-AzCdnOrigin.ps1 | 225 + src/Cdn/exports/Get-AzCdnOriginGroup.ps1 | 225 + src/Cdn/exports/Get-AzCdnProfile.ps1 | 202 + .../exports/Get-AzCdnProfileResourceUsage.ps1 | 178 + ...-AzCdnProfileSupportedOptimizationType.ps1 | 180 + .../Get-AzCdnSubscriptionResourceUsage.ps1 | 166 + .../Get-AzFrontDoorCdnCustomDomain.ps1 | 217 + .../exports/Get-AzFrontDoorCdnEndpoint.ps1 | 217 + ...et-AzFrontDoorCdnEndpointResourceUsage.ps1 | 184 + src/Cdn/exports/Get-AzFrontDoorCdnOrigin.ps1 | 224 + .../exports/Get-AzFrontDoorCdnOriginGroup.ps1 | 217 + ...AzFrontDoorCdnOriginGroupResourceUsage.ps1 | 184 + src/Cdn/exports/Get-AzFrontDoorCdnProfile.ps1 | 202 + ...Get-AzFrontDoorCdnProfileResourceUsage.ps1 | 178 + src/Cdn/exports/Get-AzFrontDoorCdnRoute.ps1 | 225 + src/Cdn/exports/Get-AzFrontDoorCdnRule.ps1 | 226 + src/Cdn/exports/Get-AzFrontDoorCdnRuleSet.ps1 | 218 + ...Get-AzFrontDoorCdnRuleSetResourceUsage.ps1 | 184 + src/Cdn/exports/Get-AzFrontDoorCdnSecret.ps1 | 218 + .../Get-AzFrontDoorCdnSecurityPolicy.ps1 | 218 + .../exports/Import-AzCdnEndpointContent.ps1 | 262 + src/Cdn/exports/New-AzCdnCustomDomain.ps1 | 210 + ...zCdnDeliveryRuleCookiesConditionObject.ps1 | 148 + ...DeliveryRuleHttpVersionConditionObject.ps1 | 135 + ...CdnDeliveryRuleIsDeviceConditionObject.ps1 | 135 + .../exports/New-AzCdnDeliveryRuleObject.ps1 | 149 + ...CdnDeliveryRulePostArgsConditionObject.ps1 | 148 + ...DeliveryRuleQueryStringConditionObject.ps1 | 142 + ...liveryRuleRemoteAddressConditionObject.ps1 | 144 + ...DeliveryRuleRequestBodyConditionObject.ps1 | 142 + ...nDeliveryRuleRequestHeaderActionObject.ps1 | 135 + ...liveryRuleRequestHeaderConditionObject.ps1 | 148 + ...liveryRuleRequestMethodConditionObject.ps1 | 135 + ...liveryRuleRequestSchemeConditionObject.ps1 | 135 + ...nDeliveryRuleRequestUriConditionObject.ps1 | 142 + ...DeliveryRuleResponseHeaderActionObject.ps1 | 135 + ...eryRuleUrlFileExtensionConditionObject.ps1 | 142 + ...DeliveryRuleUrlFileNameConditionObject.ps1 | 142 + ...zCdnDeliveryRuleUrlPathConditionObject.ps1 | 142 + src/Cdn/exports/New-AzCdnEndpoint.ps1 | 399 + .../New-AzCdnHealthProbeParametersObject.ps1 | 135 + .../New-AzCdnManagedHttpsParametersObject.ps1 | 137 + src/Cdn/exports/New-AzCdnOrigin.ps1 | 280 + src/Cdn/exports/New-AzCdnOriginGroup.ps1 | 254 + src/Cdn/exports/New-AzCdnProfile.ps1 | 218 + .../New-AzCdnResourceReferenceObject.ps1 | 115 + ...edOriginErrorDetectionParametersObject.ps1 | 137 + .../New-AzCdnUrlRedirectActionObject.ps1 | 163 + .../New-AzCdnUrlRewriteActionObject.ps1 | 136 + .../New-AzCdnUrlSigningActionObject.ps1 | 139 + ...-AzCdnUserManagedHttpsParametersObject.ps1 | 160 + .../New-AzFrontDoorCdnCustomDomain.ps1 | 233 + ...CustomDomainTlsSettingParametersObject.ps1 | 139 + .../exports/New-AzFrontDoorCdnEndpoint.ps1 | 225 + src/Cdn/exports/New-AzFrontDoorCdnOrigin.ps1 | 298 + .../exports/New-AzFrontDoorCdnOriginGroup.ps1 | 241 + ...CdnOriginGroupHealthProbeSettingObject.ps1 | 135 + ...nOriginGroupLoadBalancingSettingObject.ps1 | 127 + src/Cdn/exports/New-AzFrontDoorCdnProfile.ps1 | 218 + ...-AzFrontDoorCdnResourceReferenceObject.ps1 | 115 + src/Cdn/exports/New-AzFrontDoorCdnRoute.ps1 | 318 + src/Cdn/exports/New-AzFrontDoorCdnRule.ps1 | 248 + ...ntDoorCdnRuleClientPortConditionObject.ps1 | 142 + ...FrontDoorCdnRuleCookiesConditionObject.ps1 | 148 + ...rontDoorCdnRuleHostNameConditionObject.ps1 | 142 + ...tDoorCdnRuleHttpVersionConditionObject.ps1 | 135 + ...rontDoorCdnRuleIsDeviceConditionObject.ps1 | 135 + ...rontDoorCdnRulePostArgsConditionObject.ps1 | 148 + ...tDoorCdnRuleQueryStringConditionObject.ps1 | 142 + ...oorCdnRuleRemoteAddressConditionObject.ps1 | 144 + ...tDoorCdnRuleRequestBodyConditionObject.ps1 | 142 + ...ntDoorCdnRuleRequestHeaderActionObject.ps1 | 135 + ...oorCdnRuleRequestHeaderConditionObject.ps1 | 148 + ...oorCdnRuleRequestMethodConditionObject.ps1 | 135 + ...oorCdnRuleRequestSchemeConditionObject.ps1 | 135 + ...ntDoorCdnRuleRequestUriConditionObject.ps1 | 142 + ...tDoorCdnRuleResponseHeaderActionObject.ps1 | 135 + ...RouteConfigurationOverrideActionObject.ps1 | 166 + ...ntDoorCdnRuleServerPortConditionObject.ps1 | 142 + src/Cdn/exports/New-AzFrontDoorCdnRuleSet.ps1 | 185 + ...ntDoorCdnRuleSocketAddrConditionObject.ps1 | 142 + ...tDoorCdnRuleSslProtocolConditionObject.ps1 | 136 + ...CdnRuleUrlFileExtensionConditionObject.ps1 | 142 + ...tDoorCdnRuleUrlFileNameConditionObject.ps1 | 142 + ...FrontDoorCdnRuleUrlPathConditionObject.ps1 | 142 + ...rontDoorCdnRuleUrlRedirectActionObject.ps1 | 163 + ...FrontDoorCdnRuleUrlRewriteActionObject.ps1 | 136 + ...FrontDoorCdnRuleUrlSigningActionObject.ps1 | 139 + src/Cdn/exports/New-AzFrontDoorCdnSecret.ps1 | 211 + ...retCustomerCertificateParametersObject.ps1 | 140 + ...artyManagedCertificateParametersObject.ps1 | 116 + ...cretManagedCertificateParametersObject.ps1 | 116 + ...CdnSecretUrlSigningKeyParametersObject.ps1 | 135 + .../New-AzFrontDoorCdnSecurityPolicy.ps1 | 203 + ...ebApplicationFirewallAssociationObject.ps1 | 129 + ...WebApplicationFirewallParametersObject.ps1 | 131 + src/Cdn/exports/ProxyCmdletDefinitions.ps1 | 24913 ++++++++++++++++ src/Cdn/exports/README.md | 20 + src/Cdn/exports/Remove-AzCdnCustomDomain.ps1 | 238 + src/Cdn/exports/Remove-AzCdnEndpoint.ps1 | 232 + src/Cdn/exports/Remove-AzCdnOrigin.ps1 | 238 + src/Cdn/exports/Remove-AzCdnOriginGroup.ps1 | 238 + src/Cdn/exports/Remove-AzCdnProfile.ps1 | 228 + .../Remove-AzFrontDoorCdnCustomDomain.ps1 | 231 + .../exports/Remove-AzFrontDoorCdnEndpoint.ps1 | 231 + .../exports/Remove-AzFrontDoorCdnOrigin.ps1 | 237 + .../Remove-AzFrontDoorCdnOriginGroup.ps1 | 231 + .../exports/Remove-AzFrontDoorCdnProfile.ps1 | 228 + .../exports/Remove-AzFrontDoorCdnRoute.ps1 | 238 + src/Cdn/exports/Remove-AzFrontDoorCdnRule.ps1 | 239 + .../exports/Remove-AzFrontDoorCdnRuleSet.ps1 | 232 + .../exports/Remove-AzFrontDoorCdnSecret.ps1 | 232 + .../Remove-AzFrontDoorCdnSecurityPolicy.ps1 | 232 + src/Cdn/exports/Start-AzCdnEndpoint.ps1 | 226 + src/Cdn/exports/Stop-AzCdnEndpoint.ps1 | 226 + .../Test-AzCdnEndpointCustomDomain.ps1 | 220 + .../exports/Test-AzCdnNameAvailability.ps1 | 182 + src/Cdn/exports/Test-AzCdnProbe.ps1 | 176 + ...est-AzFrontDoorCdnEndpointCustomDomain.ps1 | 220 + ...AzFrontDoorCdnEndpointNameAvailability.ps1 | 195 + ...rontDoorCdnProfileHostNameAvailability.ps1 | 213 + src/Cdn/exports/Update-AzCdnEndpoint.ps1 | 379 + src/Cdn/exports/Update-AzCdnOrigin.ps1 | 309 + src/Cdn/exports/Update-AzCdnOriginGroup.ps1 | 279 + src/Cdn/exports/Update-AzCdnProfile.ps1 | 234 + .../Update-AzFrontDoorCdnCustomDomain.ps1 | 251 + ...rontDoorCdnCustomDomainValidationToken.ps1 | 231 + .../exports/Update-AzFrontDoorCdnEndpoint.ps1 | 248 + .../exports/Update-AzFrontDoorCdnOrigin.ps1 | 327 + .../Update-AzFrontDoorCdnOriginGroup.ps1 | 266 + .../exports/Update-AzFrontDoorCdnProfile.ps1 | 234 + .../exports/Update-AzFrontDoorCdnRoute.ps1 | 343 + src/Cdn/exports/Update-AzFrontDoorCdnRule.ps1 | 273 + .../Update-AzFrontDoorCdnSecurityPolicy.ps1 | 232 + src/Cdn/generate-help.ps1 | 74 + src/Cdn/generate-info.json | 8 + src/Cdn/generated/Module.cs | 181 + src/Cdn/generated/api/Cdn.cs | 23247 ++++++++++++++ .../generated/api/Models/Any.PowerShell.cs | 154 + .../generated/api/Models/Any.TypeConverter.cs | 146 + src/Cdn/generated/api/Models/Any.cs | 34 + src/Cdn/generated/api/Models/Any.json.cs | 104 + .../ActivatedResourceReference.PowerShell.cs | 170 + ...ctivatedResourceReference.TypeConverter.cs | 147 + .../Api20210601/ActivatedResourceReference.cs | 71 + .../ActivatedResourceReference.json.cs | 113 + .../Api20210601/AfdDomain.PowerShell.cs | 348 + .../Api20210601/AfdDomain.TypeConverter.cs | 146 + .../api/Models/Api20210601/AfdDomain.cs | 319 + .../api/Models/Api20210601/AfdDomain.json.cs | 112 + .../AfdDomainHttpsParameters.PowerShell.cs | 178 + .../AfdDomainHttpsParameters.TypeConverter.cs | 147 + .../Api20210601/AfdDomainHttpsParameters.cs | 85 + .../AfdDomainHttpsParameters.json.cs | 112 + .../AfdDomainListResult.PowerShell.cs | 172 + .../AfdDomainListResult.TypeConverter.cs | 147 + .../Models/Api20210601/AfdDomainListResult.cs | 73 + .../Api20210601/AfdDomainListResult.json.cs | 123 + .../AfdDomainProperties.PowerShell.cs | 258 + .../AfdDomainProperties.TypeConverter.cs | 147 + .../Models/Api20210601/AfdDomainProperties.cs | 197 + .../Api20210601/AfdDomainProperties.json.cs | 122 + .../AfdDomainUpdateParameters.PowerShell.cs | 210 + ...AfdDomainUpdateParameters.TypeConverter.cs | 147 + .../Api20210601/AfdDomainUpdateParameters.cs | 126 + .../AfdDomainUpdateParameters.json.cs | 108 + ...inUpdatePropertiesParameters.PowerShell.cs | 206 + ...pdatePropertiesParameters.TypeConverter.cs | 148 + .../AfdDomainUpdatePropertiesParameters.cs | 140 + ...fdDomainUpdatePropertiesParameters.json.cs | 118 + .../Api20210601/AfdEndpoint.PowerShell.cs | 310 + .../Api20210601/AfdEndpoint.TypeConverter.cs | 146 + .../api/Models/Api20210601/AfdEndpoint.cs | 249 + .../Models/Api20210601/AfdEndpoint.json.cs | 113 + .../AfdEndpointListResult.PowerShell.cs | 174 + .../AfdEndpointListResult.TypeConverter.cs | 147 + .../Api20210601/AfdEndpointListResult.cs | 76 + .../Api20210601/AfdEndpointListResult.json.cs | 124 + .../AfdEndpointProperties.PowerShell.cs | 202 + .../AfdEndpointProperties.TypeConverter.cs | 147 + .../Api20210601/AfdEndpointProperties.cs | 132 + .../Api20210601/AfdEndpointProperties.json.cs | 117 + ...ntPropertiesUpdateParameters.PowerShell.cs | 175 + ...ropertiesUpdateParameters.TypeConverter.cs | 149 + .../AfdEndpointPropertiesUpdateParameters.cs | 77 + ...EndpointPropertiesUpdateParameters.json.cs | 114 + .../AfdEndpointUpdateParameters.PowerShell.cs | 186 + ...dEndpointUpdateParameters.TypeConverter.cs | 147 + .../AfdEndpointUpdateParameters.cs | 100 + .../AfdEndpointUpdateParameters.json.cs | 110 + ...EndpointUpdateParametersTags.PowerShell.cs | 160 + ...pointUpdateParametersTags.TypeConverter.cs | 147 + .../AfdEndpointUpdateParametersTags.cs | 35 + ...EndpointUpdateParametersTags.dictionary.cs | 75 + .../AfdEndpointUpdateParametersTags.json.cs | 109 + .../AfdErrorResponse.PowerShell.cs | 206 + .../AfdErrorResponse.TypeConverter.cs | 146 + .../Models/Api20210601/AfdErrorResponse.cs | 136 + .../Api20210601/AfdErrorResponse.json.cs | 111 + .../Api20210601/AfdOrigin.PowerShell.cs | 406 + .../Api20210601/AfdOrigin.TypeConverter.cs | 146 + .../api/Models/Api20210601/AfdOrigin.cs | 457 + .../api/Models/Api20210601/AfdOrigin.json.cs | 113 + .../Api20210601/AfdOriginGroup.PowerShell.cs | 300 + .../AfdOriginGroup.TypeConverter.cs | 146 + .../api/Models/Api20210601/AfdOriginGroup.cs | 255 + .../Models/Api20210601/AfdOriginGroup.json.cs | 112 + .../AfdOriginGroupListResult.PowerShell.cs | 174 + .../AfdOriginGroupListResult.TypeConverter.cs | 147 + .../Api20210601/AfdOriginGroupListResult.cs | 76 + .../AfdOriginGroupListResult.json.cs | 124 + .../AfdOriginGroupProperties.PowerShell.cs | 210 + .../AfdOriginGroupProperties.TypeConverter.cs | 147 + .../Api20210601/AfdOriginGroupProperties.cs | 106 + .../AfdOriginGroupProperties.json.cs | 110 + ...dOriginGroupUpdateParameters.PowerShell.cs | 202 + ...iginGroupUpdateParameters.TypeConverter.cs | 147 + .../AfdOriginGroupUpdateParameters.cs | 140 + .../AfdOriginGroupUpdateParameters.json.cs | 108 + ...upUpdatePropertiesParameters.PowerShell.cs | 199 + ...pdatePropertiesParameters.TypeConverter.cs | 150 + ...fdOriginGroupUpdatePropertiesParameters.cs | 147 + ...ginGroupUpdatePropertiesParameters.json.cs | 121 + .../AfdOriginListResult.PowerShell.cs | 172 + .../AfdOriginListResult.TypeConverter.cs | 147 + .../Models/Api20210601/AfdOriginListResult.cs | 73 + .../Api20210601/AfdOriginListResult.json.cs | 123 + .../AfdOriginProperties.PowerShell.cs | 314 + .../AfdOriginProperties.TypeConverter.cs | 147 + .../Models/Api20210601/AfdOriginProperties.cs | 172 + .../Api20210601/AfdOriginProperties.json.cs | 110 + .../AfdOriginUpdateParameters.PowerShell.cs | 306 + ...AfdOriginUpdateParameters.TypeConverter.cs | 147 + .../Api20210601/AfdOriginUpdateParameters.cs | 337 + .../AfdOriginUpdateParameters.json.cs | 108 + ...inUpdatePropertiesParameters.PowerShell.cs | 302 + ...pdatePropertiesParameters.TypeConverter.cs | 148 + .../AfdOriginUpdatePropertiesParameters.cs | 366 + ...fdOriginUpdatePropertiesParameters.json.cs | 132 + .../AfdPurgeParameters.PowerShell.cs | 170 + .../AfdPurgeParameters.TypeConverter.cs | 147 + .../Models/Api20210601/AfdPurgeParameters.cs | 74 + .../Api20210601/AfdPurgeParameters.json.cs | 126 + .../AfdRouteCacheConfiguration.PowerShell.cs | 196 + ...fdRouteCacheConfiguration.TypeConverter.cs | 147 + .../Api20210601/AfdRouteCacheConfiguration.cs | 137 + .../AfdRouteCacheConfiguration.json.cs | 114 + .../AfdStateProperties.PowerShell.cs | 170 + .../AfdStateProperties.TypeConverter.cs | 147 + .../Models/Api20210601/AfdStateProperties.cs | 71 + .../Api20210601/AfdStateProperties.json.cs | 116 + ...FirstPartyManagedCertificate.PowerShell.cs | 184 + ...stPartyManagedCertificate.TypeConverter.cs | 147 + .../AzureFirstPartyManagedCertificate.cs | 73 + .../AzureFirstPartyManagedCertificate.json.cs | 110 + ...ManagedCertificateParameters.PowerShell.cs | 169 + ...agedCertificateParameters.TypeConverter.cs | 150 + ...eFirstPartyManagedCertificateParameters.cs | 61 + ...tPartyManagedCertificateParameters.json.cs | 112 + .../CacheConfiguration.PowerShell.cs | 196 + .../CacheConfiguration.TypeConverter.cs | 147 + .../Models/Api20210601/CacheConfiguration.cs | 148 + .../Api20210601/CacheConfiguration.json.cs | 118 + ...heExpirationActionParameters.PowerShell.cs | 188 + ...xpirationActionParameters.TypeConverter.cs | 147 + .../CacheExpirationActionParameters.cs | 113 + .../CacheExpirationActionParameters.json.cs | 114 + ...yQueryStringActionParameters.PowerShell.cs | 182 + ...eryStringActionParameters.TypeConverter.cs | 148 + .../CacheKeyQueryStringActionParameters.cs | 87 + ...acheKeyQueryStringActionParameters.json.cs | 113 + ...nCertificateSourceParameters.PowerShell.cs | 172 + ...rtificateSourceParameters.TypeConverter.cs | 147 + .../CdnCertificateSourceParameters.cs | 72 + .../CdnCertificateSourceParameters.json.cs | 112 + .../CdnManagedHttpsParameters.PowerShell.cs | 204 + ...CdnManagedHttpsParameters.TypeConverter.cs | 147 + .../Api20210601/CdnManagedHttpsParameters.cs | 113 + .../CdnManagedHttpsParameters.json.cs | 112 + .../Api20210601/Certificate.PowerShell.cs | 178 + .../Api20210601/Certificate.TypeConverter.cs | 146 + .../api/Models/Api20210601/Certificate.cs | 91 + .../Models/Api20210601/Certificate.json.cs | 118 + ...ndpointNameAvailabilityInput.PowerShell.cs | 182 + ...ointNameAvailabilityInput.TypeConverter.cs | 148 + .../CheckEndpointNameAvailabilityInput.cs | 85 + ...CheckEndpointNameAvailabilityInput.json.cs | 113 + ...dpointNameAvailabilityOutput.PowerShell.cs | 190 + ...intNameAvailabilityOutput.TypeConverter.cs | 148 + .../CheckEndpointNameAvailabilityOutput.cs | 123 + ...heckEndpointNameAvailabilityOutput.json.cs | 127 + ...eckHostNameAvailabilityInput.PowerShell.cs | 162 + ...HostNameAvailabilityInput.TypeConverter.cs | 147 + .../CheckHostNameAvailabilityInput.cs | 51 + .../CheckHostNameAvailabilityInput.json.cs | 108 + .../CheckNameAvailabilityInput.PowerShell.cs | 170 + ...heckNameAvailabilityInput.TypeConverter.cs | 147 + .../Api20210601/CheckNameAvailabilityInput.cs | 68 + .../CheckNameAvailabilityInput.json.cs | 110 + .../CheckNameAvailabilityOutput.PowerShell.cs | 178 + ...eckNameAvailabilityOutput.TypeConverter.cs | 147 + .../CheckNameAvailabilityOutput.cs | 94 + .../CheckNameAvailabilityOutput.json.cs | 121 + .../Api20210601/CidrIPAddress.PowerShell.cs | 170 + .../CidrIPAddress.TypeConverter.cs | 146 + .../api/Models/Api20210601/CidrIPAddress.cs | 68 + .../Models/Api20210601/CidrIPAddress.json.cs | 110 + ...PortMatchConditionParameters.PowerShell.cs | 198 + ...tMatchConditionParameters.TypeConverter.cs | 148 + .../ClientPortMatchConditionParameters.cs | 121 + ...ClientPortMatchConditionParameters.json.cs | 133 + ...riesItemsPropertiesDataItems.PowerShell.cs | 174 + ...sItemsPropertiesDataItems.TypeConverter.cs | 152 + ...ropertiesSeriesItemsPropertiesDataItems.cs | 63 + ...tiesSeriesItemsPropertiesDataItems.json.cs | 112 + ...riesItemsPropertiesDataItems.PowerShell.cs | 174 + ...sItemsPropertiesDataItems.TypeConverter.cs | 152 + ...ropertiesSeriesItemsPropertiesDataItems.cs | 63 + ...tiesSeriesItemsPropertiesDataItems.json.cs | 112 + ...aItemsPropertiesMetricsItems.PowerShell.cs | 182 + ...emsPropertiesMetricsItems.TypeConverter.cs | 152 + ...opertiesDataItemsPropertiesMetricsItems.cs | 79 + ...iesDataItemsPropertiesMetricsItems.json.cs | 114 + .../CompressionSettings.PowerShell.cs | 170 + .../CompressionSettings.TypeConverter.cs | 147 + .../Models/Api20210601/CompressionSettings.cs | 86 + .../Api20210601/CompressionSettings.json.cs | 118 + .../ContinentsResponse.PowerShell.cs | 170 + .../ContinentsResponse.TypeConverter.cs | 147 + .../Models/Api20210601/ContinentsResponse.cs | 64 + .../Api20210601/ContinentsResponse.json.cs | 126 + ...inentsResponseContinentsItem.PowerShell.cs | 162 + ...ntsResponseContinentsItem.TypeConverter.cs | 147 + .../ContinentsResponseContinentsItem.cs | 45 + .../ContinentsResponseContinentsItem.json.cs | 107 + ...ResponseCountryOrRegionsItem.PowerShell.cs | 173 + ...ponseCountryOrRegionsItem.TypeConverter.cs | 150 + .../ContinentsResponseCountryOrRegionsItem.cs | 61 + ...inentsResponseCountryOrRegionsItem.json.cs | 110 + ...kiesMatchConditionParameters.PowerShell.cs | 204 + ...sMatchConditionParameters.TypeConverter.cs | 147 + .../CookiesMatchConditionParameters.cs | 138 + .../CookiesMatchConditionParameters.json.cs | 134 + .../Api20210601/CustomDomain.PowerShell.cs | 300 + .../Api20210601/CustomDomain.TypeConverter.cs | 146 + .../api/Models/Api20210601/CustomDomain.cs | 255 + .../Models/Api20210601/CustomDomain.json.cs | 112 + .../CustomDomainHttpsParameters.PowerShell.cs | 178 + ...stomDomainHttpsParameters.TypeConverter.cs | 147 + .../CustomDomainHttpsParameters.cs | 85 + .../CustomDomainHttpsParameters.json.cs | 131 + .../CustomDomainListResult.PowerShell.cs | 174 + .../CustomDomainListResult.TypeConverter.cs | 147 + .../Api20210601/CustomDomainListResult.cs | 76 + .../CustomDomainListResult.json.cs | 124 + .../CustomDomainParameters.PowerShell.cs | 170 + .../CustomDomainParameters.TypeConverter.cs | 147 + .../Api20210601/CustomDomainParameters.cs | 60 + .../CustomDomainParameters.json.cs | 108 + .../CustomDomainProperties.PowerShell.cs | 210 + .../CustomDomainProperties.TypeConverter.cs | 147 + .../Api20210601/CustomDomainProperties.cs | 180 + .../CustomDomainProperties.json.cs | 132 + ...omDomainPropertiesParameters.PowerShell.cs | 164 + ...omainPropertiesParameters.TypeConverter.cs | 147 + .../CustomDomainPropertiesParameters.cs | 51 + .../CustomDomainPropertiesParameters.json.cs | 108 + .../CustomerCertificate.PowerShell.cs | 234 + .../CustomerCertificate.TypeConverter.cs | 147 + .../Models/Api20210601/CustomerCertificate.cs | 192 + .../Api20210601/CustomerCertificate.json.cs | 134 + ...ustomerCertificateParameters.PowerShell.cs | 234 + ...omerCertificateParameters.TypeConverter.cs | 147 + .../CustomerCertificateParameters.cs | 218 + .../CustomerCertificateParameters.json.cs | 144 + .../DeepCreatedOrigin.PowerShell.cs | 266 + .../DeepCreatedOrigin.TypeConverter.cs | 146 + .../Models/Api20210601/DeepCreatedOrigin.cs | 300 + .../Api20210601/DeepCreatedOrigin.json.cs | 110 + .../DeepCreatedOriginGroup.PowerShell.cs | 206 + .../DeepCreatedOriginGroup.TypeConverter.cs | 147 + .../Api20210601/DeepCreatedOriginGroup.cs | 148 + .../DeepCreatedOriginGroup.json.cs | 113 + ...CreatedOriginGroupProperties.PowerShell.cs | 188 + ...atedOriginGroupProperties.TypeConverter.cs | 147 + .../DeepCreatedOriginGroupProperties.cs | 130 + .../DeepCreatedOriginGroupProperties.json.cs | 122 + .../DeepCreatedOriginProperties.PowerShell.cs | 250 + ...epCreatedOriginProperties.TypeConverter.cs | 147 + .../DeepCreatedOriginProperties.cs | 307 + .../DeepCreatedOriginProperties.json.cs | 133 + .../Api20210601/DeliveryRule.PowerShell.cs | 186 + .../Api20210601/DeliveryRule.TypeConverter.cs | 146 + .../api/Models/Api20210601/DeliveryRule.cs | 120 + .../Models/Api20210601/DeliveryRule.json.cs | 130 + .../DeliveryRuleAction1.PowerShell.cs | 162 + .../DeliveryRuleAction1.TypeConverter.cs | 147 + .../Models/Api20210601/DeliveryRuleAction1.cs | 51 + .../Api20210601/DeliveryRuleAction1.json.cs | 155 + ...eryRuleCacheExpirationAction.PowerShell.cs | 206 + ...RuleCacheExpirationAction.TypeConverter.cs | 147 + .../DeliveryRuleCacheExpirationAction.cs | 136 + .../DeliveryRuleCacheExpirationAction.json.cs | 110 + ...uleCacheKeyQueryStringAction.PowerShell.cs | 199 + ...CacheKeyQueryStringAction.TypeConverter.cs | 149 + .../DeliveryRuleCacheKeyQueryStringAction.cs | 113 + ...iveryRuleCacheKeyQueryStringAction.json.cs | 111 + ...iveryRuleClientPortCondition.PowerShell.cs | 212 + ...ryRuleClientPortCondition.TypeConverter.cs | 147 + .../DeliveryRuleClientPortCondition.cs | 141 + .../DeliveryRuleClientPortCondition.json.cs | 110 + .../DeliveryRuleCondition.PowerShell.cs | 162 + .../DeliveryRuleCondition.TypeConverter.cs | 147 + .../Api20210601/DeliveryRuleCondition.cs | 51 + .../Api20210601/DeliveryRuleCondition.json.cs | 195 + ...DeliveryRuleCookiesCondition.PowerShell.cs | 218 + ...iveryRuleCookiesCondition.TypeConverter.cs | 147 + .../DeliveryRuleCookiesCondition.cs | 155 + .../DeliveryRuleCookiesCondition.json.cs | 110 + ...eliveryRuleHostNameCondition.PowerShell.cs | 210 + ...veryRuleHostNameCondition.TypeConverter.cs | 147 + .../DeliveryRuleHostNameCondition.cs | 141 + .../DeliveryRuleHostNameCondition.json.cs | 110 + ...veryRuleHttpVersionCondition.PowerShell.cs | 212 + ...yRuleHttpVersionCondition.TypeConverter.cs | 147 + .../DeliveryRuleHttpVersionCondition.cs | 144 + .../DeliveryRuleHttpVersionCondition.json.cs | 110 + ...eliveryRuleIsDeviceCondition.PowerShell.cs | 210 + ...veryRuleIsDeviceCondition.TypeConverter.cs | 147 + .../DeliveryRuleIsDeviceCondition.cs | 144 + .../DeliveryRuleIsDeviceCondition.json.cs | 110 + ...eliveryRulePostArgsCondition.PowerShell.cs | 218 + ...veryRulePostArgsCondition.TypeConverter.cs | 147 + .../DeliveryRulePostArgsCondition.cs | 155 + .../DeliveryRulePostArgsCondition.json.cs | 110 + ...veryRuleQueryStringCondition.PowerShell.cs | 212 + ...yRuleQueryStringCondition.TypeConverter.cs | 147 + .../DeliveryRuleQueryStringCondition.cs | 141 + .../DeliveryRuleQueryStringCondition.json.cs | 110 + ...ryRuleRemoteAddressCondition.PowerShell.cs | 214 + ...uleRemoteAddressCondition.TypeConverter.cs | 148 + .../DeliveryRuleRemoteAddressCondition.cs | 150 + ...DeliveryRuleRemoteAddressCondition.json.cs | 111 + ...veryRuleRequestBodyCondition.PowerShell.cs | 212 + ...yRuleRequestBodyCondition.TypeConverter.cs | 147 + .../DeliveryRuleRequestBodyCondition.cs | 141 + .../DeliveryRuleRequestBodyCondition.json.cs | 110 + ...iveryRuleRequestHeaderAction.PowerShell.cs | 204 + ...ryRuleRequestHeaderAction.TypeConverter.cs | 147 + .../DeliveryRuleRequestHeaderAction.cs | 127 + .../DeliveryRuleRequestHeaderAction.json.cs | 110 + ...ryRuleRequestHeaderCondition.PowerShell.cs | 222 + ...uleRequestHeaderCondition.TypeConverter.cs | 148 + .../DeliveryRuleRequestHeaderCondition.cs | 155 + ...DeliveryRuleRequestHeaderCondition.json.cs | 111 + ...ryRuleRequestMethodCondition.PowerShell.cs | 214 + ...uleRequestMethodCondition.TypeConverter.cs | 148 + .../DeliveryRuleRequestMethodCondition.cs | 144 + ...DeliveryRuleRequestMethodCondition.json.cs | 111 + ...ryRuleRequestSchemeCondition.PowerShell.cs | 214 + ...uleRequestSchemeCondition.TypeConverter.cs | 148 + .../DeliveryRuleRequestSchemeCondition.cs | 144 + ...DeliveryRuleRequestSchemeCondition.json.cs | 111 + ...iveryRuleRequestUriCondition.PowerShell.cs | 212 + ...ryRuleRequestUriCondition.TypeConverter.cs | 147 + .../DeliveryRuleRequestUriCondition.cs | 141 + .../DeliveryRuleRequestUriCondition.json.cs | 110 + ...veryRuleResponseHeaderAction.PowerShell.cs | 204 + ...yRuleResponseHeaderAction.TypeConverter.cs | 147 + .../DeliveryRuleResponseHeaderAction.cs | 127 + .../DeliveryRuleResponseHeaderAction.json.cs | 110 + ...eConfigurationOverrideAction.PowerShell.cs | 265 + ...nfigurationOverrideAction.TypeConverter.cs | 150 + ...eryRuleRouteConfigurationOverrideAction.cs | 233 + ...leRouteConfigurationOverrideAction.json.cs | 115 + ...iveryRuleServerPortCondition.PowerShell.cs | 212 + ...ryRuleServerPortCondition.TypeConverter.cs | 147 + .../DeliveryRuleServerPortCondition.cs | 141 + .../DeliveryRuleServerPortCondition.json.cs | 110 + ...iveryRuleSocketAddrCondition.PowerShell.cs | 212 + ...ryRuleSocketAddrCondition.TypeConverter.cs | 147 + .../DeliveryRuleSocketAddrCondition.cs | 141 + .../DeliveryRuleSocketAddrCondition.json.cs | 110 + ...veryRuleSslProtocolCondition.PowerShell.cs | 212 + ...yRuleSslProtocolCondition.TypeConverter.cs | 147 + .../DeliveryRuleSslProtocolCondition.cs | 144 + .../DeliveryRuleSslProtocolCondition.json.cs | 110 + ...uleUrlFileExtensionCondition.PowerShell.cs | 215 + ...UrlFileExtensionCondition.TypeConverter.cs | 149 + .../DeliveryRuleUrlFileExtensionCondition.cs | 141 + ...iveryRuleUrlFileExtensionCondition.json.cs | 111 + ...veryRuleUrlFileNameCondition.PowerShell.cs | 212 + ...yRuleUrlFileNameCondition.TypeConverter.cs | 147 + .../DeliveryRuleUrlFileNameCondition.cs | 141 + .../DeliveryRuleUrlFileNameCondition.json.cs | 110 + ...DeliveryRuleUrlPathCondition.PowerShell.cs | 210 + ...iveryRuleUrlPathCondition.TypeConverter.cs | 147 + .../DeliveryRuleUrlPathCondition.cs | 141 + .../DeliveryRuleUrlPathCondition.json.cs | 110 + .../DimensionProperties.PowerShell.cs | 178 + .../DimensionProperties.TypeConverter.cs | 147 + .../Models/Api20210601/DimensionProperties.cs | 85 + .../Api20210601/DimensionProperties.json.cs | 112 + .../DomainValidationProperties.PowerShell.cs | 170 + ...omainValidationProperties.TypeConverter.cs | 147 + .../Api20210601/DomainValidationProperties.cs | 74 + .../DomainValidationProperties.json.cs | 116 + .../Models/Api20210601/EdgeNode.PowerShell.cs | 252 + .../Api20210601/EdgeNode.TypeConverter.cs | 146 + .../api/Models/Api20210601/EdgeNode.cs | 139 + .../api/Models/Api20210601/EdgeNode.json.cs | 112 + .../EdgeNodeProperties.PowerShell.cs | 162 + .../EdgeNodeProperties.TypeConverter.cs | 147 + .../Models/Api20210601/EdgeNodeProperties.cs | 51 + .../Api20210601/EdgeNodeProperties.json.cs | 116 + .../Api20210601/EdgenodeResult.PowerShell.cs | 174 + .../EdgenodeResult.TypeConverter.cs | 146 + .../api/Models/Api20210601/EdgenodeResult.cs | 76 + .../Models/Api20210601/EdgenodeResult.json.cs | 124 + .../Models/Api20210601/Endpoint.PowerShell.cs | 454 + .../Api20210601/Endpoint.TypeConverter.cs | 146 + .../api/Models/Api20210601/Endpoint.cs | 568 + .../api/Models/Api20210601/Endpoint.json.cs | 113 + .../EndpointListResult.PowerShell.cs | 174 + .../EndpointListResult.TypeConverter.cs | 147 + .../Models/Api20210601/EndpointListResult.cs | 76 + .../Api20210601/EndpointListResult.json.cs | 124 + .../EndpointProperties.PowerShell.cs | 346 + .../EndpointProperties.TypeConverter.cs | 147 + .../Models/Api20210601/EndpointProperties.cs | 282 + .../Api20210601/EndpointProperties.json.cs | 156 + ...ntPropertiesUpdateParameters.PowerShell.cs | 302 + ...ropertiesUpdateParameters.TypeConverter.cs | 148 + .../EndpointPropertiesUpdateParameters.cs | 406 + ...EndpointPropertiesUpdateParameters.json.cs | 159 + ...dateParametersDeliveryPolicy.PowerShell.cs | 175 + ...eParametersDeliveryPolicy.TypeConverter.cs | 152 + ...ropertiesUpdateParametersDeliveryPolicy.cs | 70 + ...tiesUpdateParametersDeliveryPolicy.json.cs | 121 + ...pplicationFirewallPolicyLink.PowerShell.cs | 167 + ...icationFirewallPolicyLink.TypeConverter.cs | 152 + ...ametersWebApplicationFirewallPolicyLink.cs | 53 + ...rsWebApplicationFirewallPolicyLink.json.cs | 111 + .../EndpointUpdateParameters.PowerShell.cs | 314 + .../EndpointUpdateParameters.TypeConverter.cs | 147 + .../Api20210601/EndpointUpdateParameters.cs | 381 + .../EndpointUpdateParameters.json.cs | 110 + ...EndpointUpdateParametersTags.PowerShell.cs | 158 + ...pointUpdateParametersTags.TypeConverter.cs | 147 + .../EndpointUpdateParametersTags.cs | 35 + ...EndpointUpdateParametersTags.dictionary.cs | 75 + .../EndpointUpdateParametersTags.json.cs | 109 + .../ErrorAdditionalInfo.PowerShell.cs | 170 + .../ErrorAdditionalInfo.TypeConverter.cs | 147 + .../Models/Api20210601/ErrorAdditionalInfo.cs | 74 + .../Api20210601/ErrorAdditionalInfo.json.cs | 116 + .../Api20210601/ErrorDetail.PowerShell.cs | 194 + .../Api20210601/ErrorDetail.TypeConverter.cs | 146 + .../api/Models/Api20210601/ErrorDetail.cs | 134 + .../Models/Api20210601/ErrorDetail.json.cs | 147 + .../Api20210601/ErrorResponse.PowerShell.cs | 206 + .../ErrorResponse.TypeConverter.cs | 146 + .../api/Models/Api20210601/ErrorResponse.cs | 136 + .../Models/Api20210601/ErrorResponse.json.cs | 111 + .../Api20210601/GeoFilter.PowerShell.cs | 178 + .../Api20210601/GeoFilter.TypeConverter.cs | 146 + .../api/Models/Api20210601/GeoFilter.cs | 97 + .../api/Models/Api20210601/GeoFilter.json.cs | 120 + .../HeaderActionParameters.PowerShell.cs | 186 + .../HeaderActionParameters.TypeConverter.cs | 147 + .../Api20210601/HeaderActionParameters.cs | 104 + .../HeaderActionParameters.json.cs | 114 + .../HealthProbeParameters.PowerShell.cs | 186 + .../HealthProbeParameters.TypeConverter.cs | 147 + .../Api20210601/HealthProbeParameters.cs | 108 + .../Api20210601/HealthProbeParameters.json.cs | 114 + ...NameMatchConditionParameters.PowerShell.cs | 196 + ...eMatchConditionParameters.TypeConverter.cs | 147 + .../HostNameMatchConditionParameters.cs | 121 + .../HostNameMatchConditionParameters.json.cs | 132 + .../HttpErrorRangeParameters.PowerShell.cs | 170 + .../HttpErrorRangeParameters.TypeConverter.cs | 147 + .../Api20210601/HttpErrorRangeParameters.cs | 68 + .../HttpErrorRangeParameters.json.cs | 110 + ...sionMatchConditionParameters.PowerShell.cs | 198 + ...nMatchConditionParameters.TypeConverter.cs | 148 + .../HttpVersionMatchConditionParameters.cs | 124 + ...ttpVersionMatchConditionParameters.json.cs | 133 + .../Api20210601/IPAddressGroup.PowerShell.cs | 178 + .../IPAddressGroup.TypeConverter.cs | 146 + .../api/Models/Api20210601/IPAddressGroup.cs | 85 + .../Models/Api20210601/IPAddressGroup.json.cs | 128 + ...viceMatchConditionParameters.PowerShell.cs | 196 + ...eMatchConditionParameters.TypeConverter.cs | 147 + .../IsDeviceMatchConditionParameters.cs | 124 + .../IsDeviceMatchConditionParameters.json.cs | 132 + ...tCertificateSourceParameters.PowerShell.cs | 224 + ...rtificateSourceParameters.TypeConverter.cs | 148 + .../KeyVaultCertificateSourceParameters.cs | 198 + ...eyVaultCertificateSourceParameters.json.cs | 125 + ...KeyVaultSigningKeyParameters.PowerShell.cs | 202 + ...VaultSigningKeyParameters.TypeConverter.cs | 147 + .../KeyVaultSigningKeyParameters.cs | 138 + .../KeyVaultSigningKeyParameters.json.cs | 118 + ...dBalancingSettingsParameters.PowerShell.cs | 180 + ...lancingSettingsParameters.TypeConverter.cs | 147 + .../LoadBalancingSettingsParameters.cs | 91 + .../LoadBalancingSettingsParameters.json.cs | 112 + .../Api20210601/LoadParameters.PowerShell.cs | 162 + .../LoadParameters.TypeConverter.cs | 146 + .../api/Models/Api20210601/LoadParameters.cs | 57 + .../Models/Api20210601/LoadParameters.json.cs | 116 + .../LogSpecification.PowerShell.cs | 186 + .../LogSpecification.TypeConverter.cs | 146 + .../Models/Api20210601/LogSpecification.cs | 102 + .../Api20210601/LogSpecification.json.cs | 114 + .../ManagedCertificate.PowerShell.cs | 178 + .../ManagedCertificate.TypeConverter.cs | 147 + .../Models/Api20210601/ManagedCertificate.cs | 71 + .../Api20210601/ManagedCertificate.json.cs | 108 + ...ManagedCertificateParameters.PowerShell.cs | 178 + ...agedCertificateParameters.TypeConverter.cs | 147 + .../ManagedCertificateParameters.cs | 97 + .../ManagedCertificateParameters.json.cs | 118 + .../MetricAvailability.PowerShell.cs | 170 + .../MetricAvailability.TypeConverter.cs | 147 + .../Models/Api20210601/MetricAvailability.cs | 64 + .../Api20210601/MetricAvailability.json.cs | 110 + .../MetricSpecification.PowerShell.cs | 242 + .../MetricSpecification.TypeConverter.cs | 147 + .../Models/Api20210601/MetricSpecification.cs | 227 + .../Api20210601/MetricSpecification.json.cs | 152 + .../Api20210601/MetricsResponse.PowerShell.cs | 186 + .../MetricsResponse.TypeConverter.cs | 146 + .../api/Models/Api20210601/MetricsResponse.cs | 96 + .../Api20210601/MetricsResponse.json.cs | 122 + .../MetricsResponseSeriesItem.PowerShell.cs | 184 + ...MetricsResponseSeriesItem.TypeConverter.cs | 147 + .../Api20210601/MetricsResponseSeriesItem.cs | 93 + .../MetricsResponseSeriesItem.json.cs | 129 + ...nseSeriesPropertiesItemsItem.PowerShell.cs | 173 + ...SeriesPropertiesItemsItem.TypeConverter.cs | 150 + ...etricsResponseSeriesPropertiesItemsItem.cs | 63 + ...sResponseSeriesPropertiesItemsItem.json.cs | 111 + .../Api20210601/Operation.PowerShell.cs | 250 + .../Api20210601/Operation.TypeConverter.cs | 146 + .../api/Models/Api20210601/Operation.cs | 216 + .../api/Models/Api20210601/Operation.json.cs | 122 + .../OperationDisplay.PowerShell.cs | 186 + .../OperationDisplay.TypeConverter.cs | 146 + .../Models/Api20210601/OperationDisplay.cs | 114 + .../Api20210601/OperationDisplay.json.cs | 126 + .../OperationProperties.PowerShell.cs | 178 + .../OperationProperties.TypeConverter.cs | 147 + .../Models/Api20210601/OperationProperties.cs | 74 + .../Api20210601/OperationProperties.json.cs | 108 + .../OperationsListResult.PowerShell.cs | 172 + .../OperationsListResult.TypeConverter.cs | 147 + .../Api20210601/OperationsListResult.cs | 70 + .../Api20210601/OperationsListResult.json.cs | 120 + .../Models/Api20210601/Origin.PowerShell.cs | 358 + .../Api20210601/Origin.TypeConverter.cs | 146 + .../api/Models/Api20210601/Origin.cs | 398 + .../api/Models/Api20210601/Origin.json.cs | 113 + .../Api20210601/OriginGroup.PowerShell.cs | 292 + .../Api20210601/OriginGroup.TypeConverter.cs | 146 + .../api/Models/Api20210601/OriginGroup.cs | 244 + .../Models/Api20210601/OriginGroup.json.cs | 112 + .../OriginGroupListResult.PowerShell.cs | 174 + .../OriginGroupListResult.TypeConverter.cs | 147 + .../Api20210601/OriginGroupListResult.cs | 76 + .../Api20210601/OriginGroupListResult.json.cs | 124 + .../OriginGroupOverride.PowerShell.cs | 178 + .../OriginGroupOverride.TypeConverter.cs | 147 + .../Models/Api20210601/OriginGroupOverride.cs | 77 + .../Api20210601/OriginGroupOverride.json.cs | 110 + .../OriginGroupOverrideAction.PowerShell.cs | 194 + ...OriginGroupOverrideAction.TypeConverter.cs | 147 + .../Api20210601/OriginGroupOverrideAction.cs | 104 + .../OriginGroupOverrideAction.json.cs | 110 + ...roupOverrideActionParameters.PowerShell.cs | 182 + ...pOverrideActionParameters.TypeConverter.cs | 148 + .../OriginGroupOverrideActionParameters.cs | 79 + ...riginGroupOverrideActionParameters.json.cs | 111 + .../OriginGroupProperties.PowerShell.cs | 202 + .../OriginGroupProperties.TypeConverter.cs | 147 + .../Api20210601/OriginGroupProperties.cs | 117 + .../Api20210601/OriginGroupProperties.json.cs | 118 + .../OriginGroupUpdateParameters.PowerShell.cs | 194 + ...iginGroupUpdateParameters.TypeConverter.cs | 147 + .../OriginGroupUpdateParameters.cs | 126 + .../OriginGroupUpdateParameters.json.cs | 108 + ...upUpdatePropertiesParameters.PowerShell.cs | 191 + ...pdatePropertiesParameters.TypeConverter.cs | 149 + .../OriginGroupUpdatePropertiesParameters.cs | 130 + ...ginGroupUpdatePropertiesParameters.json.cs | 123 + .../OriginListResult.PowerShell.cs | 172 + .../OriginListResult.TypeConverter.cs | 146 + .../Models/Api20210601/OriginListResult.cs | 73 + .../Api20210601/OriginListResult.json.cs | 123 + .../OriginProperties.PowerShell.cs | 266 + .../OriginProperties.TypeConverter.cs | 146 + .../Models/Api20210601/OriginProperties.cs | 177 + .../Api20210601/OriginProperties.json.cs | 123 + .../OriginUpdateParameters.PowerShell.cs | 250 + .../OriginUpdateParameters.TypeConverter.cs | 147 + .../Api20210601/OriginUpdateParameters.cs | 260 + .../OriginUpdateParameters.json.cs | 108 + ...inUpdatePropertiesParameters.PowerShell.cs | 244 + ...pdatePropertiesParameters.TypeConverter.cs | 147 + .../OriginUpdatePropertiesParameters.cs | 281 + .../OriginUpdatePropertiesParameters.json.cs | 128 + ...ArgsMatchConditionParameters.PowerShell.cs | 204 + ...sMatchConditionParameters.TypeConverter.cs | 147 + .../PostArgsMatchConditionParameters.cs | 138 + .../PostArgsMatchConditionParameters.json.cs | 134 + .../Models/Api20210601/Profile.PowerShell.cs | 314 + .../Api20210601/Profile.TypeConverter.cs | 146 + .../api/Models/Api20210601/Profile.cs | 264 + .../api/Models/Api20210601/Profile.json.cs | 117 + .../ProfileListResult.PowerShell.cs | 172 + .../ProfileListResult.TypeConverter.cs | 146 + .../Models/Api20210601/ProfileListResult.cs | 73 + .../Api20210601/ProfileListResult.json.cs | 123 + .../ProfileProperties.PowerShell.cs | 186 + .../ProfileProperties.TypeConverter.cs | 146 + .../Models/Api20210601/ProfileProperties.cs | 117 + .../Api20210601/ProfileProperties.json.cs | 123 + ...lePropertiesUpdateParameters.PowerShell.cs | 166 + ...ropertiesUpdateParameters.TypeConverter.cs | 147 + .../ProfilePropertiesUpdateParameters.cs | 57 + .../ProfilePropertiesUpdateParameters.json.cs | 108 + .../ProfileUpdateParameters.PowerShell.cs | 178 + .../ProfileUpdateParameters.TypeConverter.cs | 147 + .../Api20210601/ProfileUpdateParameters.cs | 83 + .../ProfileUpdateParameters.json.cs | 110 + .../ProfileUpdateParametersTags.PowerShell.cs | 158 + ...ofileUpdateParametersTags.TypeConverter.cs | 147 + .../ProfileUpdateParametersTags.cs | 35 + .../ProfileUpdateParametersTags.dictionary.cs | 75 + .../ProfileUpdateParametersTags.json.cs | 109 + .../Api20210601/ProxyResource.PowerShell.cs | 236 + .../ProxyResource.TypeConverter.cs | 146 + .../api/Models/Api20210601/ProxyResource.cs | 113 + .../Models/Api20210601/ProxyResource.json.cs | 110 + .../Api20210601/PurgeParameters.PowerShell.cs | 162 + .../PurgeParameters.TypeConverter.cs | 146 + .../api/Models/Api20210601/PurgeParameters.cs | 57 + .../Api20210601/PurgeParameters.json.cs | 116 + ...ringMatchConditionParameters.PowerShell.cs | 198 + ...gMatchConditionParameters.TypeConverter.cs | 148 + .../QueryStringMatchConditionParameters.cs | 121 + ...ueryStringMatchConditionParameters.json.cs | 133 + .../RankingsResponse.PowerShell.cs | 178 + .../RankingsResponse.TypeConverter.cs | 146 + .../Models/Api20210601/RankingsResponse.cs | 80 + .../Api20210601/RankingsResponse.json.cs | 120 + .../RankingsResponseTablesItem.PowerShell.cs | 168 + ...ankingsResponseTablesItem.TypeConverter.cs | 147 + .../Api20210601/RankingsResponseTablesItem.cs | 61 + .../RankingsResponseTablesItem.json.cs | 117 + ...nseTablesPropertiesItemsItem.PowerShell.cs | 173 + ...TablesPropertiesItemsItem.TypeConverter.cs | 150 + ...nkingsResponseTablesPropertiesItemsItem.cs | 63 + ...sResponseTablesPropertiesItemsItem.json.cs | 119 + ...esPropertiesItemsMetricsItem.PowerShell.cs | 181 + ...ropertiesItemsMetricsItem.TypeConverter.cs | 152 + ...esponseTablesPropertiesItemsMetricsItem.cs | 79 + ...seTablesPropertiesItemsMetricsItem.json.cs | 114 + ...ressMatchConditionParameters.PowerShell.cs | 199 + ...sMatchConditionParameters.TypeConverter.cs | 149 + .../RemoteAddressMatchConditionParameters.cs | 130 + ...oteAddressMatchConditionParameters.json.cs | 133 + ...BodyMatchConditionParameters.PowerShell.cs | 198 + ...yMatchConditionParameters.TypeConverter.cs | 148 + .../RequestBodyMatchConditionParameters.cs | 121 + ...equestBodyMatchConditionParameters.json.cs | 133 + ...aderMatchConditionParameters.PowerShell.cs | 207 + ...rMatchConditionParameters.TypeConverter.cs | 149 + .../RequestHeaderMatchConditionParameters.cs | 138 + ...uestHeaderMatchConditionParameters.json.cs | 135 + ...thodMatchConditionParameters.PowerShell.cs | 199 + ...dMatchConditionParameters.TypeConverter.cs | 149 + .../RequestMethodMatchConditionParameters.cs | 124 + ...uestMethodMatchConditionParameters.json.cs | 133 + ...hemeMatchConditionParameters.PowerShell.cs | 199 + ...eMatchConditionParameters.TypeConverter.cs | 149 + .../RequestSchemeMatchConditionParameters.cs | 124 + ...uestSchemeMatchConditionParameters.json.cs | 133 + ...tUriMatchConditionParameters.PowerShell.cs | 198 + ...iMatchConditionParameters.TypeConverter.cs | 148 + .../RequestUriMatchConditionParameters.cs | 121 + ...RequestUriMatchConditionParameters.json.cs | 133 + .../Models/Api20210601/Resource.PowerShell.cs | 234 + .../Api20210601/Resource.TypeConverter.cs | 146 + .../api/Models/Api20210601/Resource.cs | 197 + .../api/Models/Api20210601/Resource.json.cs | 126 + .../ResourceReference.PowerShell.cs | 162 + .../ResourceReference.TypeConverter.cs | 146 + .../Models/Api20210601/ResourceReference.cs | 51 + .../Api20210601/ResourceReference.json.cs | 108 + .../Api20210601/ResourceUsage.PowerShell.cs | 186 + .../ResourceUsage.TypeConverter.cs | 146 + .../api/Models/Api20210601/ResourceUsage.cs | 114 + .../Models/Api20210601/ResourceUsage.json.cs | 126 + .../ResourceUsageListResult.PowerShell.cs | 170 + .../ResourceUsageListResult.TypeConverter.cs | 147 + .../Api20210601/ResourceUsageListResult.cs | 71 + .../ResourceUsageListResult.json.cs | 121 + .../ResourcesResponse.PowerShell.cs | 170 + .../ResourcesResponse.TypeConverter.cs | 146 + .../Models/Api20210601/ResourcesResponse.cs | 64 + .../Api20210601/ResourcesResponse.json.cs | 126 + ...cesResponseCustomDomainsItem.PowerShell.cs | 188 + ...ResponseCustomDomainsItem.TypeConverter.cs | 148 + .../ResourcesResponseCustomDomainsItem.cs | 93 + ...ResourcesResponseCustomDomainsItem.json.cs | 114 + ...sourcesResponseEndpointsItem.PowerShell.cs | 184 + ...rcesResponseEndpointsItem.TypeConverter.cs | 147 + .../ResourcesResponseEndpointsItem.cs | 93 + .../ResourcesResponseEndpointsItem.json.cs | 121 + ...EndpointsPropertiesItemsItem.PowerShell.cs | 189 + ...pointsPropertiesItemsItem.TypeConverter.cs | 150 + ...cesResponseEndpointsPropertiesItemsItem.cs | 95 + ...sponseEndpointsPropertiesItemsItem.json.cs | 116 + ...iginErrorDetectionParameters.PowerShell.cs | 185 + ...nErrorDetectionParameters.TypeConverter.cs | 150 + ...onseBasedOriginErrorDetectionParameters.cs | 103 + ...asedOriginErrorDetectionParameters.json.cs | 124 + .../Models/Api20210601/Route.PowerShell.cs | 402 + .../Models/Api20210601/Route.TypeConverter.cs | 146 + .../generated/api/Models/Api20210601/Route.cs | 439 + .../api/Models/Api20210601/Route.json.cs | 110 + ...tionOverrideActionParameters.PowerShell.cs | 247 + ...nOverrideActionParameters.TypeConverter.cs | 150 + ...teConfigurationOverrideActionParameters.cs | 217 + ...figurationOverrideActionParameters.json.cs | 114 + .../Api20210601/RouteListResult.PowerShell.cs | 172 + .../RouteListResult.TypeConverter.cs | 146 + .../api/Models/Api20210601/RouteListResult.cs | 73 + .../Api20210601/RouteListResult.json.cs | 123 + .../Api20210601/RouteProperties.PowerShell.cs | 314 + .../RouteProperties.TypeConverter.cs | 146 + .../api/Models/Api20210601/RouteProperties.cs | 169 + .../Api20210601/RouteProperties.json.cs | 110 + .../RouteUpdateParameters.PowerShell.cs | 306 + .../RouteUpdateParameters.TypeConverter.cs | 147 + .../Api20210601/RouteUpdateParameters.cs | 324 + .../Api20210601/RouteUpdateParameters.json.cs | 108 + ...teUpdatePropertiesParameters.PowerShell.cs | 300 + ...pdatePropertiesParameters.TypeConverter.cs | 147 + .../RouteUpdatePropertiesParameters.cs | 358 + .../RouteUpdatePropertiesParameters.json.cs | 165 + .../api/Models/Api20210601/Rule.PowerShell.cs | 298 + .../Models/Api20210601/Rule.TypeConverter.cs | 146 + .../generated/api/Models/Api20210601/Rule.cs | 261 + .../api/Models/Api20210601/Rule.json.cs | 108 + .../Api20210601/RuleListResult.PowerShell.cs | 172 + .../RuleListResult.TypeConverter.cs | 146 + .../api/Models/Api20210601/RuleListResult.cs | 73 + .../Models/Api20210601/RuleListResult.json.cs | 123 + .../Api20210601/RuleProperties.PowerShell.cs | 210 + .../RuleProperties.TypeConverter.cs | 146 + .../api/Models/Api20210601/RuleProperties.cs | 108 + .../Models/Api20210601/RuleProperties.json.cs | 110 + .../Models/Api20210601/RuleSet.PowerShell.cs | 266 + .../Api20210601/RuleSet.TypeConverter.cs | 146 + .../api/Models/Api20210601/RuleSet.cs | 176 + .../api/Models/Api20210601/RuleSet.json.cs | 110 + .../RuleSetListResult.PowerShell.cs | 174 + .../RuleSetListResult.TypeConverter.cs | 146 + .../Models/Api20210601/RuleSetListResult.cs | 76 + .../Api20210601/RuleSetListResult.json.cs | 124 + .../RuleSetProperties.PowerShell.cs | 178 + .../RuleSetProperties.TypeConverter.cs | 146 + .../Models/Api20210601/RuleSetProperties.cs | 86 + .../Api20210601/RuleSetProperties.json.cs | 113 + .../RuleUpdateParameters.PowerShell.cs | 202 + .../RuleUpdateParameters.TypeConverter.cs | 147 + .../Api20210601/RuleUpdateParameters.cs | 146 + .../Api20210601/RuleUpdateParameters.json.cs | 108 + ...leUpdatePropertiesParameters.PowerShell.cs | 194 + ...pdatePropertiesParameters.TypeConverter.cs | 147 + .../RuleUpdatePropertiesParameters.cs | 149 + .../RuleUpdatePropertiesParameters.json.cs | 135 + .../Models/Api20210601/Secret.PowerShell.cs | 274 + .../Api20210601/Secret.TypeConverter.cs | 146 + .../api/Models/Api20210601/Secret.cs | 190 + .../api/Models/Api20210601/Secret.json.cs | 110 + .../SecretListResult.PowerShell.cs | 172 + .../SecretListResult.TypeConverter.cs | 146 + .../Models/Api20210601/SecretListResult.cs | 73 + .../Api20210601/SecretListResult.json.cs | 123 + .../SecretParameters.PowerShell.cs | 162 + .../SecretParameters.TypeConverter.cs | 146 + .../Models/Api20210601/SecretParameters.cs | 51 + .../Api20210601/SecretParameters.json.cs | 135 + .../SecretProperties.PowerShell.cs | 186 + .../SecretProperties.TypeConverter.cs | 146 + .../Models/Api20210601/SecretProperties.cs | 103 + .../Api20210601/SecretProperties.json.cs | 115 + .../Api20210601/SecurityPolicy.PowerShell.cs | 274 + .../SecurityPolicy.TypeConverter.cs | 146 + .../api/Models/Api20210601/SecurityPolicy.cs | 190 + .../Models/Api20210601/SecurityPolicy.json.cs | 110 + .../SecurityPolicyListResult.PowerShell.cs | 174 + .../SecurityPolicyListResult.TypeConverter.cs | 147 + .../Api20210601/SecurityPolicyListResult.cs | 76 + .../SecurityPolicyListResult.json.cs | 124 + .../SecurityPolicyProperties.PowerShell.cs | 186 + .../SecurityPolicyProperties.TypeConverter.cs | 147 + .../Api20210601/SecurityPolicyProperties.cs | 103 + .../SecurityPolicyProperties.json.cs | 115 + ...tyPolicyPropertiesParameters.PowerShell.cs | 166 + ...olicyPropertiesParameters.TypeConverter.cs | 148 + .../SecurityPolicyPropertiesParameters.cs | 54 + ...SecurityPolicyPropertiesParameters.json.cs | 124 + ...curityPolicyUpdateParameters.PowerShell.cs | 170 + ...ityPolicyUpdateParameters.TypeConverter.cs | 147 + .../SecurityPolicyUpdateParameters.cs | 60 + .../SecurityPolicyUpdateParameters.json.cs | 108 + ...curityPolicyUpdateProperties.PowerShell.cs | 162 + ...ityPolicyUpdateProperties.TypeConverter.cs | 147 + .../SecurityPolicyUpdateProperties.cs | 51 + .../SecurityPolicyUpdateProperties.json.cs | 108 + ...plicationFirewallAssociation.PowerShell.cs | 175 + ...cationFirewallAssociation.TypeConverter.cs | 152 + ...PolicyWebApplicationFirewallAssociation.cs | 70 + ...yWebApplicationFirewallAssociation.json.cs | 129 + ...pplicationFirewallParameters.PowerShell.cs | 191 + ...icationFirewallParameters.TypeConverter.cs | 150 + ...yPolicyWebApplicationFirewallParameters.cs | 105 + ...cyWebApplicationFirewallParameters.json.cs | 123 + ...PortMatchConditionParameters.PowerShell.cs | 198 + ...tMatchConditionParameters.TypeConverter.cs | 148 + .../ServerPortMatchConditionParameters.cs | 121 + ...ServerPortMatchConditionParameters.json.cs | 133 + .../ServiceSpecification.PowerShell.cs | 170 + .../ServiceSpecification.TypeConverter.cs | 147 + .../Api20210601/ServiceSpecification.cs | 68 + .../Api20210601/ServiceSpecification.json.cs | 126 + ...rivateLinkResourceProperties.PowerShell.cs | 208 + ...ateLinkResourceProperties.TypeConverter.cs | 148 + .../SharedPrivateLinkResourceProperties.cs | 148 + ...haredPrivateLinkResourceProperties.json.cs | 119 + .../api/Models/Api20210601/Sku.PowerShell.cs | 196 + .../Models/Api20210601/Sku.TypeConverter.cs | 146 + .../generated/api/Models/Api20210601/Sku.cs | 101 + .../api/Models/Api20210601/Sku.json.cs | 124 + ...AddrMatchConditionParameters.PowerShell.cs | 198 + ...rMatchConditionParameters.TypeConverter.cs | 148 + .../SocketAddrMatchConditionParameters.cs | 121 + ...SocketAddrMatchConditionParameters.json.cs | 133 + ...ocolMatchConditionParameters.PowerShell.cs | 198 + ...lMatchConditionParameters.TypeConverter.cs | 148 + .../SslProtocolMatchConditionParameters.cs | 124 + ...slProtocolMatchConditionParameters.json.cs | 133 + .../Models/Api20210601/SsoUri.PowerShell.cs | 162 + .../Api20210601/SsoUri.TypeConverter.cs | 146 + .../api/Models/Api20210601/SsoUri.cs | 54 + .../api/Models/Api20210601/SsoUri.json.cs | 111 + ...dOptimizationTypesListResult.PowerShell.cs | 166 + ...timizationTypesListResult.TypeConverter.cs | 149 + .../SupportedOptimizationTypesListResult.cs | 54 + ...pportedOptimizationTypesListResult.json.cs | 120 + .../Api20210601/SystemData.PowerShell.cs | 202 + .../Api20210601/SystemData.TypeConverter.cs | 146 + .../api/Models/Api20210601/SystemData.cs | 136 + .../api/Models/Api20210601/SystemData.json.cs | 118 + .../Api20210601/TrackedResource.PowerShell.cs | 250 + .../TrackedResource.TypeConverter.cs | 146 + .../api/Models/Api20210601/TrackedResource.cs | 145 + .../Api20210601/TrackedResource.json.cs | 112 + .../TrackedResourceTags.PowerShell.cs | 158 + .../TrackedResourceTags.TypeConverter.cs | 147 + .../Models/Api20210601/TrackedResourceTags.cs | 35 + .../TrackedResourceTags.dictionary.cs | 75 + .../Api20210601/TrackedResourceTags.json.cs | 109 + ...sionMatchConditionParameters.PowerShell.cs | 199 + ...nMatchConditionParameters.TypeConverter.cs | 150 + ...rlFileExtensionMatchConditionParameters.cs | 123 + ...eExtensionMatchConditionParameters.json.cs | 134 + ...NameMatchConditionParameters.PowerShell.cs | 198 + ...eMatchConditionParameters.TypeConverter.cs | 148 + .../UrlFileNameMatchConditionParameters.cs | 121 + ...rlFileNameMatchConditionParameters.json.cs | 133 + ...PathMatchConditionParameters.PowerShell.cs | 196 + ...hMatchConditionParameters.TypeConverter.cs | 147 + .../UrlPathMatchConditionParameters.cs | 121 + .../UrlPathMatchConditionParameters.json.cs | 132 + .../UrlRedirectAction.PowerShell.cs | 226 + .../UrlRedirectAction.TypeConverter.cs | 146 + .../Models/Api20210601/UrlRedirectAction.cs | 196 + .../Api20210601/UrlRedirectAction.json.cs | 110 + .../UrlRedirectActionParameters.PowerShell.cs | 210 + ...lRedirectActionParameters.TypeConverter.cs | 147 + .../UrlRedirectActionParameters.cs | 182 + .../UrlRedirectActionParameters.json.cs | 120 + .../UrlRewriteAction.PowerShell.cs | 202 + .../UrlRewriteAction.TypeConverter.cs | 146 + .../Models/Api20210601/UrlRewriteAction.cs | 136 + .../Api20210601/UrlRewriteAction.json.cs | 110 + .../UrlRewriteActionParameters.PowerShell.cs | 186 + ...rlRewriteActionParameters.TypeConverter.cs | 147 + .../Api20210601/UrlRewriteActionParameters.cs | 113 + .../UrlRewriteActionParameters.json.cs | 114 + .../UrlSigningAction.PowerShell.cs | 194 + .../UrlSigningAction.TypeConverter.cs | 146 + .../Models/Api20210601/UrlSigningAction.cs | 119 + .../Api20210601/UrlSigningAction.json.cs | 110 + .../UrlSigningActionParameters.PowerShell.cs | 178 + ...rlSigningActionParameters.TypeConverter.cs | 147 + .../Api20210601/UrlSigningActionParameters.cs | 93 + .../UrlSigningActionParameters.json.cs | 120 + .../Api20210601/UrlSigningKey.PowerShell.cs | 218 + .../UrlSigningKey.TypeConverter.cs | 146 + .../api/Models/Api20210601/UrlSigningKey.cs | 155 + .../Models/Api20210601/UrlSigningKey.json.cs | 110 + .../UrlSigningKeyParameters.PowerShell.cs | 194 + .../UrlSigningKeyParameters.TypeConverter.cs | 147 + .../Api20210601/UrlSigningKeyParameters.cs | 127 + .../UrlSigningKeyParameters.json.cs | 114 + .../UrlSigningParamIdentifier.PowerShell.cs | 170 + ...UrlSigningParamIdentifier.TypeConverter.cs | 147 + .../Api20210601/UrlSigningParamIdentifier.cs | 68 + .../UrlSigningParamIdentifier.json.cs | 110 + .../Models/Api20210601/Usage.PowerShell.cs | 210 + .../Models/Api20210601/Usage.TypeConverter.cs | 146 + .../generated/api/Models/Api20210601/Usage.cs | 148 + .../api/Models/Api20210601/Usage.json.cs | 119 + .../Api20210601/UsageName.PowerShell.cs | 170 + .../Api20210601/UsageName.TypeConverter.cs | 146 + .../api/Models/Api20210601/UsageName.cs | 68 + .../api/Models/Api20210601/UsageName.json.cs | 110 + .../UsagesListResult.PowerShell.cs | 170 + .../UsagesListResult.TypeConverter.cs | 146 + .../Models/Api20210601/UsagesListResult.cs | 68 + .../Api20210601/UsagesListResult.json.cs | 118 + .../UserManagedHttpsParameters.PowerShell.cs | 252 + ...serManagedHttpsParameters.TypeConverter.cs | 147 + .../Api20210601/UserManagedHttpsParameters.cs | 221 + .../UserManagedHttpsParameters.json.cs | 112 + .../ValidateCustomDomainInput.PowerShell.cs | 162 + ...ValidateCustomDomainInput.TypeConverter.cs | 147 + .../Api20210601/ValidateCustomDomainInput.cs | 51 + .../ValidateCustomDomainInput.json.cs | 108 + .../ValidateCustomDomainOutput.PowerShell.cs | 178 + ...alidateCustomDomainOutput.TypeConverter.cs | 147 + .../Api20210601/ValidateCustomDomainOutput.cs | 94 + .../ValidateCustomDomainOutput.json.cs | 121 + .../ValidateProbeInput.PowerShell.cs | 162 + .../ValidateProbeInput.TypeConverter.cs | 147 + .../Models/Api20210601/ValidateProbeInput.cs | 51 + .../Api20210601/ValidateProbeInput.json.cs | 108 + .../ValidateProbeOutput.PowerShell.cs | 178 + .../ValidateProbeOutput.TypeConverter.cs | 147 + .../Models/Api20210601/ValidateProbeOutput.cs | 94 + .../Api20210601/ValidateProbeOutput.json.cs | 121 + .../ValidateSecretInput.PowerShell.cs | 186 + .../ValidateSecretInput.TypeConverter.cs | 147 + .../Models/Api20210601/ValidateSecretInput.cs | 98 + .../Api20210601/ValidateSecretInput.json.cs | 112 + .../ValidateSecretOutput.PowerShell.cs | 170 + .../ValidateSecretOutput.TypeConverter.cs | 147 + .../Api20210601/ValidateSecretOutput.cs | 68 + .../Api20210601/ValidateSecretOutput.json.cs | 110 + .../Api20210601/ValidationToken.PowerShell.cs | 162 + .../ValidationToken.TypeConverter.cs | 146 + .../api/Models/Api20210601/ValidationToken.cs | 51 + .../Api20210601/ValidationToken.json.cs | 111 + .../WafMetricsResponse.PowerShell.cs | 186 + .../WafMetricsResponse.TypeConverter.cs | 147 + .../Models/Api20210601/WafMetricsResponse.cs | 96 + .../Api20210601/WafMetricsResponse.json.cs | 122 + ...WafMetricsResponseSeriesItem.PowerShell.cs | 184 + ...MetricsResponseSeriesItem.TypeConverter.cs | 147 + .../WafMetricsResponseSeriesItem.cs | 93 + .../WafMetricsResponseSeriesItem.json.cs | 129 + ...nseSeriesPropertiesItemsItem.PowerShell.cs | 173 + ...SeriesPropertiesItemsItem.TypeConverter.cs | 150 + ...etricsResponseSeriesPropertiesItemsItem.cs | 63 + ...sResponseSeriesPropertiesItemsItem.json.cs | 111 + .../WafRankingsResponse.PowerShell.cs | 186 + .../WafRankingsResponse.TypeConverter.cs | 147 + .../Models/Api20210601/WafRankingsResponse.cs | 96 + .../Api20210601/WafRankingsResponse.json.cs | 130 + .../WafRankingsResponseDataItem.PowerShell.cs | 168 + ...fRankingsResponseDataItem.TypeConverter.cs | 147 + .../WafRankingsResponseDataItem.cs | 61 + .../WafRankingsResponseDataItem.json.cs | 125 + .../api/Models/CdnIdentity.PowerShell.cs | 256 + .../api/Models/CdnIdentity.TypeConverter.cs | 156 + src/Cdn/generated/api/Models/CdnIdentity.cs | 258 + .../generated/api/Models/CdnIdentity.json.cs | 129 + .../Support/AfdCertificateType.Completer.cs | 43 + .../AfdCertificateType.TypeConverter.cs | 59 + .../api/Support/AfdCertificateType.cs | 100 + .../Support/AfdEndpointProtocols.Completer.cs | 39 + .../AfdEndpointProtocols.TypeConverter.cs | 59 + .../api/Support/AfdEndpointProtocols.cs | 98 + .../Support/AfdMinimumTlsVersion.Completer.cs | 39 + .../AfdMinimumTlsVersion.TypeConverter.cs | 59 + .../api/Support/AfdMinimumTlsVersion.cs | 98 + .../Support/AfdProvisioningState.Completer.cs | 51 + .../AfdProvisioningState.TypeConverter.cs | 59 + .../api/Support/AfdProvisioningState.cs | 104 + ...AfdQueryStringCachingBehavior.Completer.cs | 50 + ...ueryStringCachingBehavior.TypeConverter.cs | 62 + .../Support/AfdQueryStringCachingBehavior.cs | 111 + .../api/Support/Algorithm.Completer.cs | 35 + .../api/Support/Algorithm.TypeConverter.cs | 59 + src/Cdn/generated/api/Support/Algorithm.cs | 96 + ...GeneratedDomainNameLabelScope.Completer.cs | 47 + ...ratedDomainNameLabelScope.TypeConverter.cs | 59 + .../AutoGeneratedDomainNameLabelScope.cs | 108 + .../api/Support/CacheBehavior.Completer.cs | 43 + .../Support/CacheBehavior.TypeConverter.cs | 59 + .../generated/api/Support/CacheBehavior.cs | 100 + .../Support/CertificateSource.Completer.cs | 39 + .../CertificateSource.TypeConverter.cs | 59 + .../api/Support/CertificateSource.cs | 98 + .../api/Support/CertificateType.Completer.cs | 39 + .../Support/CertificateType.TypeConverter.cs | 59 + .../generated/api/Support/CertificateType.cs | 98 + .../Support/ClientPortOperator.Completer.cs | 71 + .../ClientPortOperator.TypeConverter.cs | 59 + .../api/Support/ClientPortOperator.cs | 114 + .../api/Support/CookiesOperator.Completer.cs | 71 + .../Support/CookiesOperator.TypeConverter.cs | 59 + .../generated/api/Support/CookiesOperator.cs | 114 + .../CustomDomainResourceState.Completer.cs | 43 + ...CustomDomainResourceState.TypeConverter.cs | 59 + .../api/Support/CustomDomainResourceState.cs | 100 + .../CustomHttpsProvisioningState.Completer.cs | 51 + ...tomHttpsProvisioningState.TypeConverter.cs | 59 + .../Support/CustomHttpsProvisioningState.cs | 108 + ...stomHttpsProvisioningSubstate.Completer.cs | 73 + ...HttpsProvisioningSubstate.TypeConverter.cs | 61 + .../CustomHttpsProvisioningSubstate.cs | 122 + .../Support/DeliveryRuleAction.Completer.cs | 67 + .../DeliveryRuleAction.TypeConverter.cs | 59 + .../api/Support/DeliveryRuleAction.cs | 112 + .../api/Support/DeploymentStatus.Completer.cs | 47 + .../Support/DeploymentStatus.TypeConverter.cs | 59 + .../generated/api/Support/DeploymentStatus.cs | 101 + .../Support/DestinationProtocol.Completer.cs | 43 + .../DestinationProtocol.TypeConverter.cs | 59 + .../api/Support/DestinationProtocol.cs | 100 + .../DomainValidationState.Completer.cs | 69 + .../DomainValidationState.TypeConverter.cs | 61 + .../api/Support/DomainValidationState.cs | 114 + .../api/Support/EnabledState.Completer.cs | 41 + .../api/Support/EnabledState.TypeConverter.cs | 61 + src/Cdn/generated/api/Support/EnabledState.cs | 100 + .../EndpointResourceState.Completer.cs | 55 + .../EndpointResourceState.TypeConverter.cs | 59 + .../api/Support/EndpointResourceState.cs | 106 + .../Support/ForwardingProtocol.Completer.cs | 43 + .../ForwardingProtocol.TypeConverter.cs | 59 + .../api/Support/ForwardingProtocol.cs | 100 + .../api/Support/GeoFilterActions.Completer.cs | 39 + .../Support/GeoFilterActions.TypeConverter.cs | 59 + .../generated/api/Support/GeoFilterActions.cs | 98 + .../api/Support/HeaderAction.Completer.cs | 43 + .../api/Support/HeaderAction.TypeConverter.cs | 59 + src/Cdn/generated/api/Support/HeaderAction.cs | 100 + .../HealthProbeRequestType.Completer.cs | 43 + .../HealthProbeRequestType.TypeConverter.cs | 59 + .../api/Support/HealthProbeRequestType.cs | 100 + .../api/Support/HostNameOperator.Completer.cs | 71 + .../Support/HostNameOperator.TypeConverter.cs | 59 + .../generated/api/Support/HostNameOperator.cs | 114 + .../api/Support/HttpsRedirect.Completer.cs | 42 + .../Support/HttpsRedirect.TypeConverter.cs | 62 + .../generated/api/Support/HttpsRedirect.cs | 101 + .../api/Support/IdentityType.Completer.cs | 47 + .../api/Support/IdentityType.TypeConverter.cs | 59 + src/Cdn/generated/api/Support/IdentityType.cs | 102 + .../Support/LinkToDefaultDomain.Completer.cs | 39 + .../LinkToDefaultDomain.TypeConverter.cs | 59 + .../api/Support/LinkToDefaultDomain.cs | 98 + .../api/Support/LogMetric.Completer.cs | 55 + .../api/Support/LogMetric.TypeConverter.cs | 59 + src/Cdn/generated/api/Support/LogMetric.cs | 105 + .../LogMetricsGranularity.Completer.cs | 43 + .../LogMetricsGranularity.TypeConverter.cs | 59 + .../api/Support/LogMetricsGranularity.cs | 99 + .../Support/LogMetricsGroupBy.Completer.cs | 51 + .../LogMetricsGroupBy.TypeConverter.cs | 59 + .../api/Support/LogMetricsGroupBy.cs | 103 + .../api/Support/LogRanking.Completer.cs | 51 + .../api/Support/LogRanking.TypeConverter.cs | 59 + src/Cdn/generated/api/Support/LogRanking.cs | 103 + .../api/Support/LogRankingMetric.Completer.cs | 55 + .../Support/LogRankingMetric.TypeConverter.cs | 59 + .../generated/api/Support/LogRankingMetric.cs | 105 + .../MatchProcessingBehavior.Completer.cs | 42 + .../MatchProcessingBehavior.TypeConverter.cs | 62 + .../api/Support/MatchProcessingBehavior.cs | 101 + .../api/Support/MatchVariable.Completer.cs | 107 + .../Support/MatchVariable.TypeConverter.cs | 59 + .../generated/api/Support/MatchVariable.cs | 132 + .../Support/MinimumTlsVersion.Completer.cs | 43 + .../MinimumTlsVersion.TypeConverter.cs | 59 + .../api/Support/MinimumTlsVersion.cs | 100 + .../api/Support/OptimizationType.Completer.cs | 54 + .../Support/OptimizationType.TypeConverter.cs | 62 + .../generated/api/Support/OptimizationType.cs | 107 + .../OriginGroupResourceState.Completer.cs | 43 + .../OriginGroupResourceState.TypeConverter.cs | 59 + .../api/Support/OriginGroupResourceState.cs | 100 + .../Support/OriginResourceState.Completer.cs | 43 + .../OriginResourceState.TypeConverter.cs | 59 + .../api/Support/OriginResourceState.cs | 100 + .../api/Support/ParamIndicator.Completer.cs | 43 + .../Support/ParamIndicator.TypeConverter.cs | 59 + .../generated/api/Support/ParamIndicator.cs | 100 + .../api/Support/PostArgsOperator.Completer.cs | 71 + .../Support/PostArgsOperator.TypeConverter.cs | 59 + .../generated/api/Support/PostArgsOperator.cs | 114 + .../PrivateEndpointStatus.Completer.cs | 51 + .../PrivateEndpointStatus.TypeConverter.cs | 59 + .../api/Support/PrivateEndpointStatus.cs | 104 + .../api/Support/ProbeProtocol.Completer.cs | 43 + .../Support/ProbeProtocol.TypeConverter.cs | 59 + .../generated/api/Support/ProbeProtocol.cs | 100 + .../Support/ProfileResourceState.Completer.cs | 47 + .../ProfileResourceState.TypeConverter.cs | 59 + .../api/Support/ProfileResourceState.cs | 102 + .../api/Support/ProtocolType.Completer.cs | 39 + .../api/Support/ProtocolType.TypeConverter.cs | 59 + src/Cdn/generated/api/Support/ProtocolType.cs | 98 + .../Support/QueryStringBehavior.Completer.cs | 47 + .../QueryStringBehavior.TypeConverter.cs | 59 + .../api/Support/QueryStringBehavior.cs | 102 + .../QueryStringCachingBehavior.Completer.cs | 50 + ...ueryStringCachingBehavior.TypeConverter.cs | 62 + .../api/Support/QueryStringCachingBehavior.cs | 107 + .../Support/QueryStringOperator.Completer.cs | 71 + .../QueryStringOperator.TypeConverter.cs | 59 + .../api/Support/QueryStringOperator.cs | 114 + .../api/Support/RedirectType.Completer.cs | 47 + .../api/Support/RedirectType.TypeConverter.cs | 59 + src/Cdn/generated/api/Support/RedirectType.cs | 102 + .../RemoteAddressOperator.Completer.cs | 43 + .../RemoteAddressOperator.TypeConverter.cs | 59 + .../api/Support/RemoteAddressOperator.cs | 100 + .../Support/RequestBodyOperator.Completer.cs | 71 + .../RequestBodyOperator.TypeConverter.cs | 59 + .../api/Support/RequestBodyOperator.cs | 114 + .../RequestHeaderOperator.Completer.cs | 71 + .../RequestHeaderOperator.TypeConverter.cs | 59 + .../api/Support/RequestHeaderOperator.cs | 114 + .../Support/RequestUriOperator.Completer.cs | 71 + .../RequestUriOperator.TypeConverter.cs | 59 + .../api/Support/RequestUriOperator.cs | 114 + .../api/Support/ResourceType.Completer.cs | 39 + .../api/Support/ResourceType.TypeConverter.cs | 59 + src/Cdn/generated/api/Support/ResourceType.cs | 98 + ...sponseBasedDetectedErrorTypes.Completer.cs | 45 + ...seBasedDetectedErrorTypes.TypeConverter.cs | 61 + .../ResponseBasedDetectedErrorTypes.cs | 108 + .../Support/RuleCacheBehavior.Completer.cs | 43 + .../RuleCacheBehavior.TypeConverter.cs | 59 + .../api/Support/RuleCacheBehavior.cs | 100 + .../RuleIsCompressionEnabled.Completer.cs | 43 + .../RuleIsCompressionEnabled.TypeConverter.cs | 63 + .../api/Support/RuleIsCompressionEnabled.cs | 102 + ...uleQueryStringCachingBehavior.Completer.cs | 50 + ...ueryStringCachingBehavior.TypeConverter.cs | 62 + .../Support/RuleQueryStringCachingBehavior.cs | 111 + .../api/Support/SecretType.Completer.cs | 47 + .../api/Support/SecretType.TypeConverter.cs | 59 + src/Cdn/generated/api/Support/SecretType.cs | 102 + .../Support/ServerPortOperator.Completer.cs | 71 + .../ServerPortOperator.TypeConverter.cs | 59 + .../api/Support/ServerPortOperator.cs | 114 + ...aredPrivateLinkResourceStatus.Completer.cs | 53 + ...PrivateLinkResourceStatus.TypeConverter.cs | 61 + .../SharedPrivateLinkResourceStatus.cs | 112 + .../api/Support/SkuName.Completer.cs | 83 + .../api/Support/SkuName.TypeConverter.cs | 59 + src/Cdn/generated/api/Support/SkuName.cs | 120 + .../Support/SocketAddrOperator.Completer.cs | 39 + .../SocketAddrOperator.TypeConverter.cs | 59 + .../api/Support/SocketAddrOperator.cs | 98 + .../api/Support/SslProtocol.Completer.cs | 43 + .../api/Support/SslProtocol.TypeConverter.cs | 59 + src/Cdn/generated/api/Support/SslProtocol.cs | 100 + .../generated/api/Support/Status.Completer.cs | 47 + .../api/Support/Status.TypeConverter.cs | 59 + src/Cdn/generated/api/Support/Status.cs | 102 + .../api/Support/Transform.Completer.cs | 55 + .../api/Support/Transform.TypeConverter.cs | 59 + src/Cdn/generated/api/Support/Transform.cs | 106 + .../UrlFileExtensionOperator.Completer.cs | 71 + .../UrlFileExtensionOperator.TypeConverter.cs | 59 + .../api/Support/UrlFileExtensionOperator.cs | 114 + .../Support/UrlFileNameOperator.Completer.cs | 71 + .../UrlFileNameOperator.TypeConverter.cs | 59 + .../api/Support/UrlFileNameOperator.cs | 114 + .../api/Support/UrlPathOperator.Completer.cs | 75 + .../Support/UrlPathOperator.TypeConverter.cs | 59 + .../generated/api/Support/UrlPathOperator.cs | 116 + .../api/Support/WafAction.Completer.cs | 47 + .../api/Support/WafAction.TypeConverter.cs | 59 + src/Cdn/generated/api/Support/WafAction.cs | 101 + .../api/Support/WafGranularity.Completer.cs | 43 + .../Support/WafGranularity.TypeConverter.cs | 59 + .../generated/api/Support/WafGranularity.cs | 99 + .../api/Support/WafMetric.Completer.cs | 35 + .../api/Support/WafMetric.TypeConverter.cs | 59 + src/Cdn/generated/api/Support/WafMetric.cs | 95 + .../Support/WafRankingGroupBy.Completer.cs | 39 + .../WafRankingGroupBy.TypeConverter.cs | 59 + .../api/Support/WafRankingGroupBy.cs | 97 + .../api/Support/WafRankingType.Completer.cs | 63 + .../Support/WafRankingType.TypeConverter.cs | 59 + .../generated/api/Support/WafRankingType.cs | 109 + .../api/Support/WafRuleType.Completer.cs | 43 + .../api/Support/WafRuleType.TypeConverter.cs | 59 + src/Cdn/generated/api/Support/WafRuleType.cs | 99 + .../ClearAzCdnEndpointContent_Purge1.cs | 503 + ...learAzCdnEndpointContent_PurgeExpanded1.cs | 507 + ...rAzCdnEndpointContent_PurgeViaIdentity1.cs | 471 + ...dpointContent_PurgeViaIdentityExpanded1.cs | 475 + ...learAzFrontDoorCdnEndpointContent_Purge.cs | 505 + ...ontDoorCdnEndpointContent_PurgeExpanded.cs | 521 + ...DoorCdnEndpointContent_PurgeViaIdentity.cs | 471 + ...ndpointContent_PurgeViaIdentityExpanded.cs | 489 + ...bleAzCdnCustomDomainCustomHttps_Disable.cs | 472 + ...tomDomainCustomHttps_DisableViaIdentity.cs | 434 + ...ableAzCdnCustomDomainCustomHttps_Enable.cs | 485 + ...stomDomainCustomHttps_EnableViaIdentity.cs | 447 + .../cmdlets/GetAzCdnCustomDomain_Get1.cs | 432 + .../GetAzCdnCustomDomain_GetViaIdentity1.cs | 390 + .../cmdlets/GetAzCdnCustomDomain_List1.cs | 439 + .../cmdlets/GetAzCdnEdgeNode_List.cs | 378 + .../GetAzCdnEndpointResourceUsage_List1.cs | 444 + .../cmdlets/GetAzCdnEndpoint_Get1.cs | 420 + .../GetAzCdnEndpoint_GetViaIdentity1.cs | 388 + .../cmdlets/GetAzCdnEndpoint_List1.cs | 425 + .../GetAzCdnLogAnalyticLocation_Get.cs | 407 + ...AzCdnLogAnalyticLocation_GetViaIdentity.cs | 383 + .../cmdlets/GetAzCdnLogAnalyticMetric_Get.cs | 533 + ...etAzCdnLogAnalyticMetric_GetViaIdentity.cs | 509 + .../cmdlets/GetAzCdnLogAnalyticRanking_Get.cs | 490 + ...tAzCdnLogAnalyticRanking_GetViaIdentity.cs | 466 + .../GetAzCdnLogAnalyticResource_Get.cs | 407 + ...AzCdnLogAnalyticResource_GetViaIdentity.cs | 383 + ...zCdnLogAnalyticWafLogAnalyticMetric_Get.cs | 507 + ...yticWafLogAnalyticMetric_GetViaIdentity.cs | 483 + ...CdnLogAnalyticWafLogAnalyticRanking_Get.cs | 506 + ...ticWafLogAnalyticRanking_GetViaIdentity.cs | 482 + .../cmdlets/GetAzCdnOperation_List.cs | 377 + .../cmdlets/GetAzCdnOriginGroup_Get1.cs | 432 + .../GetAzCdnOriginGroup_GetViaIdentity1.cs | 390 + .../cmdlets/GetAzCdnOriginGroup_List1.cs | 439 + .../generated/cmdlets/GetAzCdnOrigin_Get1.cs | 432 + .../cmdlets/GetAzCdnOrigin_GetViaIdentity1.cs | 390 + .../generated/cmdlets/GetAzCdnOrigin_List1.cs | 439 + .../GetAzCdnProfileResourceUsage_List1.cs | 433 + ...dnProfileSupportedOptimizationType_List.cs | 412 + .../generated/cmdlets/GetAzCdnProfile_Get.cs | 410 + .../cmdlets/GetAzCdnProfile_GetViaIdentity.cs | 386 + .../generated/cmdlets/GetAzCdnProfile_List.cs | 400 + .../cmdlets/GetAzCdnProfile_List1.cs | 414 + .../GetAzCdnSubscriptionResourceUsage_List.cs | 402 + .../GetAzFrontDoorCdnCustomDomain_Get.cs | 422 + ...FrontDoorCdnCustomDomain_GetViaIdentity.cs | 389 + .../GetAzFrontDoorCdnCustomDomain_List.cs | 428 + ...zFrontDoorCdnEndpointResourceUsage_List.cs | 446 + .../cmdlets/GetAzFrontDoorCdnEndpoint_Get.cs | 422 + ...etAzFrontDoorCdnEndpoint_GetViaIdentity.cs | 389 + .../cmdlets/GetAzFrontDoorCdnEndpoint_List.cs | 427 + ...ontDoorCdnOriginGroupResourceUsage_List.cs | 446 + .../GetAzFrontDoorCdnOriginGroup_Get.cs | 419 + ...zFrontDoorCdnOriginGroup_GetViaIdentity.cs | 386 + .../GetAzFrontDoorCdnOriginGroup_List.cs | 427 + .../cmdlets/GetAzFrontDoorCdnOrigin_Get.cs | 433 + .../GetAzFrontDoorCdnOrigin_GetViaIdentity.cs | 390 + .../cmdlets/GetAzFrontDoorCdnOrigin_List.cs | 441 + ...AzFrontDoorCdnProfileResourceUsage_List.cs | 432 + .../cmdlets/GetAzFrontDoorCdnRoute_Get.cs | 437 + .../GetAzFrontDoorCdnRoute_GetViaIdentity.cs | 393 + .../cmdlets/GetAzFrontDoorCdnRoute_List.cs | 441 + ...AzFrontDoorCdnRuleSetResourceUsage_List.cs | 446 + .../cmdlets/GetAzFrontDoorCdnRuleSet_Get.cs | 423 + ...GetAzFrontDoorCdnRuleSet_GetViaIdentity.cs | 389 + .../cmdlets/GetAzFrontDoorCdnRuleSet_List.cs | 427 + .../cmdlets/GetAzFrontDoorCdnRule_Get.cs | 435 + .../GetAzFrontDoorCdnRule_GetViaIdentity.cs | 390 + .../cmdlets/GetAzFrontDoorCdnRule_List.cs | 442 + .../cmdlets/GetAzFrontDoorCdnSecret_Get.cs | 420 + .../GetAzFrontDoorCdnSecret_GetViaIdentity.cs | 386 + .../cmdlets/GetAzFrontDoorCdnSecret_List.cs | 427 + .../GetAzFrontDoorCdnSecurityPolicy_Get.cs | 420 + ...ontDoorCdnSecurityPolicy_GetViaIdentity.cs | 386 + .../GetAzFrontDoorCdnSecurityPolicy_List.cs | 427 + .../ImportAzCdnEndpointContent_Load.cs | 503 + ...ImportAzCdnEndpointContent_LoadExpanded.cs | 507 + ...ortAzCdnEndpointContent_LoadViaIdentity.cs | 471 + ...EndpointContent_LoadViaIdentityExpanded.cs | 475 + .../InvokeAzCdnSecretValidate_Secret.cs | 389 + ...nvokeAzCdnSecretValidate_SecretExpanded.cs | 413 + ...keAzCdnSecretValidate_SecretViaIdentity.cs | 391 + ...ecretValidate_SecretViaIdentityExpanded.cs | 415 + .../NewAzCdnCustomDomain_CreateExpanded1.cs | 515 + .../NewAzCdnEndpoint_CreateExpanded1.cs | 745 + .../NewAzCdnOriginGroup_CreateExpanded1.cs | 559 + .../cmdlets/NewAzCdnOrigin_CreateExpanded1.cs | 648 + .../cmdlets/NewAzCdnProfileSsoUri_Generate.cs | 409 + ...wAzCdnProfileSsoUri_GenerateViaIdentity.cs | 391 + .../cmdlets/NewAzCdnProfile_CreateExpanded.cs | 528 + ...FrontDoorCdnCustomDomain_CreateExpanded.cs | 539 + ...ewAzFrontDoorCdnEndpoint_CreateExpanded.cs | 545 + ...zFrontDoorCdnOriginGroup_CreateExpanded.cs | 544 + .../NewAzFrontDoorCdnOrigin_CreateExpanded.cs | 685 + .../NewAzFrontDoorCdnRoute_CreateExpanded.cs | 690 + .../NewAzFrontDoorCdnRuleSet_Create.cs | 456 + .../NewAzFrontDoorCdnRule_CreateExpanded.cs | 563 + .../NewAzFrontDoorCdnSecret_CreateExpanded.cs | 502 + ...ontDoorCdnSecurityPolicy_CreateExpanded.cs | 502 + .../RemoveAzCdnCustomDomain_Delete1.cs | 539 + ...oveAzCdnCustomDomain_DeleteViaIdentity1.cs | 495 + .../cmdlets/RemoveAzCdnEndpoint_Delete1.cs | 527 + .../RemoveAzCdnEndpoint_DeleteViaIdentity1.cs | 494 + .../cmdlets/RemoveAzCdnOriginGroup_Delete1.cs | 539 + ...moveAzCdnOriginGroup_DeleteViaIdentity1.cs | 495 + .../cmdlets/RemoveAzCdnOrigin_Delete1.cs | 539 + .../RemoveAzCdnOrigin_DeleteViaIdentity1.cs | 495 + .../cmdlets/RemoveAzCdnProfile_Delete.cs | 515 + .../RemoveAzCdnProfile_DeleteViaIdentity.cs | 491 + ...RemoveAzFrontDoorCdnCustomDomain_Delete.cs | 528 + ...ntDoorCdnCustomDomain_DeleteViaIdentity.cs | 494 + .../RemoveAzFrontDoorCdnEndpoint_Delete.cs | 528 + ...zFrontDoorCdnEndpoint_DeleteViaIdentity.cs | 494 + .../RemoveAzFrontDoorCdnOriginGroup_Delete.cs | 525 + ...ontDoorCdnOriginGroup_DeleteViaIdentity.cs | 491 + .../RemoveAzFrontDoorCdnOrigin_Delete.cs | 540 + ...eAzFrontDoorCdnOrigin_DeleteViaIdentity.cs | 495 + .../RemoveAzFrontDoorCdnRoute_Delete.cs | 544 + ...veAzFrontDoorCdnRoute_DeleteViaIdentity.cs | 498 + .../RemoveAzFrontDoorCdnRuleSet_Delete.cs | 529 + ...AzFrontDoorCdnRuleSet_DeleteViaIdentity.cs | 494 + .../RemoveAzFrontDoorCdnRule_Delete.cs | 542 + ...oveAzFrontDoorCdnRule_DeleteViaIdentity.cs | 495 + .../RemoveAzFrontDoorCdnSecret_Delete.cs | 526 + ...eAzFrontDoorCdnSecret_DeleteViaIdentity.cs | 491 + ...moveAzFrontDoorCdnSecurityPolicy_Delete.cs | 526 + ...DoorCdnSecurityPolicy_DeleteViaIdentity.cs | 491 + .../cmdlets/StartAzCdnEndpoint_Start.cs | 485 + .../StartAzCdnEndpoint_StartViaIdentity.cs | 452 + .../cmdlets/StopAzCdnEndpoint_Stop.cs | 485 + .../StopAzCdnEndpoint_StopViaIdentity.cs | 452 + ...nEndpointCustomDomain_ValidateExpanded1.cs | 433 + ...stomDomain_ValidateViaIdentityExpanded1.cs | 405 + ...TestAzCdnNameAvailability_CheckExpanded.cs | 385 + ...estAzCdnNameAvailability_CheckExpanded1.cs | 403 + .../TestAzCdnProbe_ValidateExpanded.cs | 393 + ...dnEndpointCustomDomain_ValidateExpanded.cs | 436 + ...ustomDomain_ValidateViaIdentityExpanded.cs | 407 + ...nEndpointNameAvailability_CheckExpanded.cs | 430 + ...ofileHostNameAvailability_CheckExpanded.cs | 419 + ...meAvailability_CheckViaIdentityExpanded.cs | 400 + .../UpdateAzCdnEndpoint_UpdateExpanded1.cs | 707 + ...zCdnEndpoint_UpdateViaIdentityExpanded1.cs | 674 + .../UpdateAzCdnOriginGroup_UpdateExpanded1.cs | 557 + ...nOriginGroup_UpdateViaIdentityExpanded1.cs | 513 + .../UpdateAzCdnOrigin_UpdateExpanded1.cs | 645 + ...eAzCdnOrigin_UpdateViaIdentityExpanded1.cs | 601 + .../UpdateAzCdnProfile_UpdateExpanded.cs | 505 + ...eAzCdnProfile_UpdateViaIdentityExpanded.cs | 481 + ...rCdnCustomDomainValidationToken_Refresh.cs | 491 + ...omainValidationToken_RefreshViaIdentity.cs | 460 + ...FrontDoorCdnCustomDomain_UpdateExpanded.cs | 526 + ...nCustomDomain_UpdateViaIdentityExpanded.cs | 494 + ...teAzFrontDoorCdnEndpoint_UpdateExpanded.cs | 520 + ...orCdnEndpoint_UpdateViaIdentityExpanded.cs | 486 + ...zFrontDoorCdnOriginGroup_UpdateExpanded.cs | 542 + ...dnOriginGroup_UpdateViaIdentityExpanded.cs | 510 + ...dateAzFrontDoorCdnOrigin_UpdateExpanded.cs | 682 + ...DoorCdnOrigin_UpdateViaIdentityExpanded.cs | 637 + ...pdateAzFrontDoorCdnRoute_UpdateExpanded.cs | 690 + ...tDoorCdnRoute_UpdateViaIdentityExpanded.cs | 644 + ...UpdateAzFrontDoorCdnRule_UpdateExpanded.cs | 563 + ...ntDoorCdnRule_UpdateViaIdentityExpanded.cs | 516 + ...rontDoorCdnSecurityPolicy_PatchExpanded.cs | 502 + ...SecurityPolicy_PatchViaIdentityExpanded.cs | 469 + .../generated/runtime/AsyncCommandRuntime.cs | 832 + src/Cdn/generated/runtime/AsyncJob.cs | 270 + .../runtime/AsyncOperationResponse.cs | 177 + .../BuildTime/Cmdlets/ExportCmdletSurface.cs | 113 + .../BuildTime/Cmdlets/ExportExampleStub.cs | 74 + .../BuildTime/Cmdlets/ExportFormatPs1xml.cs | 101 + .../BuildTime/Cmdlets/ExportHelpMarkdown.cs | 53 + .../BuildTime/Cmdlets/ExportModelSurface.cs | 117 + .../BuildTime/Cmdlets/ExportProxyCmdlet.cs | 177 + .../runtime/BuildTime/Cmdlets/ExportPsd1.cs | 191 + .../BuildTime/Cmdlets/ExportTestStub.cs | 148 + .../BuildTime/Cmdlets/GetCommonParameter.cs | 52 + .../BuildTime/Cmdlets/GetModuleGuid.cs | 31 + .../BuildTime/Cmdlets/GetScriptCmdlet.cs | 54 + .../runtime/BuildTime/CollectionExtensions.cs | 20 + .../runtime/BuildTime/MarkdownRenderer.cs | 114 + .../runtime/BuildTime/Models/PsFormatTypes.cs | 138 + .../BuildTime/Models/PsHelpMarkdownOutputs.cs | 199 + .../runtime/BuildTime/Models/PsHelpTypes.cs | 202 + .../BuildTime/Models/PsMarkdownTypes.cs | 294 + .../BuildTime/Models/PsProxyOutputs.cs | 611 + .../runtime/BuildTime/Models/PsProxyTypes.cs | 514 + .../runtime/BuildTime/PsAttributes.cs | 114 + .../runtime/BuildTime/PsExtensions.cs | 169 + .../generated/runtime/BuildTime/PsHelpers.cs | 104 + .../runtime/BuildTime/StringExtensions.cs | 24 + .../runtime/BuildTime/XmlExtensions.cs | 28 + src/Cdn/generated/runtime/CmdInfoHandler.cs | 40 + .../Conversions/ConversionException.cs | 17 + .../runtime/Conversions/IJsonConverter.cs | 13 + .../Conversions/Instances/BinaryConverter.cs | 24 + .../Conversions/Instances/BooleanConverter.cs | 13 + .../Instances/DateTimeConverter.cs | 18 + .../Instances/DateTimeOffsetConverter.cs | 15 + .../Conversions/Instances/DecimalConverter.cs | 16 + .../Conversions/Instances/DoubleConverter.cs | 13 + .../Conversions/Instances/EnumConverter.cs | 30 + .../Conversions/Instances/GuidConverter.cs | 15 + .../Instances/HashSet'1Converter.cs | 27 + .../Conversions/Instances/Int16Converter.cs | 13 + .../Conversions/Instances/Int32Converter.cs | 13 + .../Conversions/Instances/Int64Converter.cs | 13 + .../Instances/JsonArrayConverter.cs | 13 + .../Instances/JsonObjectConverter.cs | 13 + .../Conversions/Instances/SingleConverter.cs | 13 + .../Conversions/Instances/StringConverter.cs | 13 + .../Instances/TimeSpanConverter.cs | 15 + .../Conversions/Instances/UInt16Converter.cs | 13 + .../Conversions/Instances/UInt32Converter.cs | 13 + .../Conversions/Instances/UInt64Converter.cs | 13 + .../Conversions/Instances/UriConverter.cs | 15 + .../runtime/Conversions/JsonConverter.cs | 21 + .../Conversions/JsonConverterAttribute.cs | 18 + .../Conversions/JsonConverterFactory.cs | 91 + .../Conversions/StringLikeConverter.cs | 45 + .../Customizations/IJsonSerializable.cs | 263 + .../runtime/Customizations/JsonArray.cs | 13 + .../runtime/Customizations/JsonBoolean.cs | 16 + .../runtime/Customizations/JsonNode.cs | 21 + .../runtime/Customizations/JsonNumber.cs | 78 + .../runtime/Customizations/JsonObject.cs | 183 + .../runtime/Customizations/JsonString.cs | 34 + .../runtime/Customizations/XNodeArray.cs | 44 + src/Cdn/generated/runtime/Debugging.cs | 28 + .../generated/runtime/DictionaryExtensions.cs | 33 + src/Cdn/generated/runtime/EventData.cs | 78 + .../generated/runtime/EventDataExtensions.cs | 94 + src/Cdn/generated/runtime/EventListener.cs | 247 + src/Cdn/generated/runtime/Events.cs | 27 + src/Cdn/generated/runtime/EventsExtensions.cs | 27 + src/Cdn/generated/runtime/Extensions.cs | 117 + .../Extensions/StringBuilderExtensions.cs | 23 + .../Helpers/Extensions/TypeExtensions.cs | 61 + .../generated/runtime/Helpers/Seperator.cs | 11 + .../generated/runtime/Helpers/TypeDetails.cs | 116 + src/Cdn/generated/runtime/Helpers/XHelper.cs | 75 + src/Cdn/generated/runtime/HttpPipeline.cs | 88 + .../generated/runtime/HttpPipelineMocking.ps1 | 110 + .../generated/runtime/IAssociativeArray.cs | 24 + .../generated/runtime/IHeaderSerializable.cs | 14 + src/Cdn/generated/runtime/ISendAsync.cs | 296 + src/Cdn/generated/runtime/InfoAttribute.cs | 34 + src/Cdn/generated/runtime/Iso/IsoDate.cs | 214 + src/Cdn/generated/runtime/JsonType.cs | 18 + src/Cdn/generated/runtime/MessageAttribute.cs | 360 + .../runtime/MessageAttributeHelper.cs | 161 + src/Cdn/generated/runtime/Method.cs | 19 + .../generated/runtime/Models/JsonMember.cs | 83 + src/Cdn/generated/runtime/Models/JsonModel.cs | 89 + .../runtime/Models/JsonModelCache.cs | 19 + .../runtime/Nodes/Collections/JsonArray.cs | 65 + .../Nodes/Collections/XImmutableArray.cs | 62 + .../runtime/Nodes/Collections/XList.cs | 64 + .../runtime/Nodes/Collections/XNodeArray.cs | 68 + .../runtime/Nodes/Collections/XSet.cs | 60 + .../generated/runtime/Nodes/JsonBoolean.cs | 42 + src/Cdn/generated/runtime/Nodes/JsonDate.cs | 173 + src/Cdn/generated/runtime/Nodes/JsonNode.cs | 250 + src/Cdn/generated/runtime/Nodes/JsonNumber.cs | 109 + src/Cdn/generated/runtime/Nodes/JsonObject.cs | 172 + src/Cdn/generated/runtime/Nodes/JsonString.cs | 42 + src/Cdn/generated/runtime/Nodes/XBinary.cs | 40 + src/Cdn/generated/runtime/Nodes/XNull.cs | 15 + .../Parser/Exceptions/ParseException.cs | 24 + .../generated/runtime/Parser/JsonParser.cs | 180 + src/Cdn/generated/runtime/Parser/JsonToken.cs | 66 + .../generated/runtime/Parser/JsonTokenizer.cs | 177 + src/Cdn/generated/runtime/Parser/Location.cs | 43 + .../runtime/Parser/Readers/SourceReader.cs | 130 + .../generated/runtime/Parser/TokenReader.cs | 39 + src/Cdn/generated/runtime/PipelineMocking.cs | 262 + .../runtime/Properties/Resources.Designer.cs | 5633 ++++ .../runtime/Properties/Resources.resx | 1741 ++ src/Cdn/generated/runtime/Response.cs | 27 + .../runtime/Serialization/JsonSerializer.cs | 350 + .../Serialization/PropertyTransformation.cs | 21 + .../Serialization/SerializationOptions.cs | 65 + .../generated/runtime/SerializationMode.cs | 16 + .../runtime/TypeConverterExtensions.cs | 211 + .../runtime/UndeclaredResponseException.cs | 112 + .../generated/runtime/Writers/JsonWriter.cs | 223 + src/Cdn/generated/runtime/delegates.cs | 23 + src/Cdn/help/Az.Cdn.md | 449 + src/Cdn/help/Clear-AzCdnEndpointContent.md | 310 + .../Clear-AzFrontDoorCdnEndpointContent.md | 326 + .../Disable-AzCdnCustomDomainCustomHttps.md | 245 + .../Enable-AzCdnCustomDomainCustomHttps.md | 269 + src/Cdn/help/Get-AzCdnCustomDomain.md | 203 + src/Cdn/help/Get-AzCdnEdgeNode.md | 77 + src/Cdn/help/Get-AzCdnEndpoint.md | 188 + .../help/Get-AzCdnEndpointResourceUsage.md | 169 + src/Cdn/help/Get-AzCdnOrigin.md | 203 + src/Cdn/help/Get-AzCdnOriginGroup.md | 203 + src/Cdn/help/Get-AzCdnProfile.md | 177 + src/Cdn/help/Get-AzCdnProfileResourceUsage.md | 154 + ...t-AzCdnProfileSupportedOptimizationType.md | 156 + .../Get-AzCdnSubscriptionResourceUsage.md | 124 + .../help/Get-AzFrontDoorCdnCustomDomain.md | 188 + src/Cdn/help/Get-AzFrontDoorCdnEndpoint.md | 188 + ...Get-AzFrontDoorCdnEndpointResourceUsage.md | 170 + src/Cdn/help/Get-AzFrontDoorCdnOrigin.md | 203 + src/Cdn/help/Get-AzFrontDoorCdnOriginGroup.md | 188 + ...-AzFrontDoorCdnOriginGroupResourceUsage.md | 170 + src/Cdn/help/Get-AzFrontDoorCdnProfile.md | 177 + .../Get-AzFrontDoorCdnProfileResourceUsage.md | 154 + src/Cdn/help/Get-AzFrontDoorCdnRoute.md | 203 + src/Cdn/help/Get-AzFrontDoorCdnRule.md | 203 + src/Cdn/help/Get-AzFrontDoorCdnRuleSet.md | 188 + .../Get-AzFrontDoorCdnRuleSetResourceUsage.md | 169 + src/Cdn/help/Get-AzFrontDoorCdnSecret.md | 188 + .../help/Get-AzFrontDoorCdnSecurityPolicy.md | 188 + src/Cdn/help/Import-AzCdnEndpointContent.md | 312 + src/Cdn/help/New-AzCdnCustomDomain.md | 231 + ...AzCdnDeliveryRuleCookiesConditionObject.md | 154 + ...nDeliveryRuleHttpVersionConditionObject.md | 123 + ...zCdnDeliveryRuleIsDeviceConditionObject.md | 123 + src/Cdn/help/New-AzCdnDeliveryRuleObject.md | 140 + ...zCdnDeliveryRulePostArgsConditionObject.md | 154 + ...nDeliveryRuleQueryStringConditionObject.md | 139 + ...eliveryRuleRemoteAddressConditionObject.md | 141 + ...nDeliveryRuleRequestBodyConditionObject.md | 139 + ...dnDeliveryRuleRequestHeaderActionObject.md | 124 + ...eliveryRuleRequestHeaderConditionObject.md | 155 + ...eliveryRuleRequestMethodConditionObject.md | 123 + ...eliveryRuleRequestSchemeConditionObject.md | 123 + ...dnDeliveryRuleRequestUriConditionObject.md | 139 + ...nDeliveryRuleResponseHeaderActionObject.md | 124 + ...veryRuleUrlFileExtensionConditionObject.md | 139 + ...nDeliveryRuleUrlFileNameConditionObject.md | 139 + ...AzCdnDeliveryRuleUrlPathConditionObject.md | 139 + src/Cdn/help/New-AzCdnEndpoint.md | 570 + .../New-AzCdnHealthProbeParametersObject.md | 123 + .../New-AzCdnManagedHttpsParametersObject.md | 124 + src/Cdn/help/New-AzCdnOrigin.md | 393 + src/Cdn/help/New-AzCdnOriginGroup.md | 304 + src/Cdn/help/New-AzCdnProfile.md | 246 + .../help/New-AzCdnResourceReferenceObject.md | 77 + ...sedOriginErrorDetectionParametersObject.md | 119 + .../help/New-AzCdnUrlRedirectActionObject.md | 179 + .../help/New-AzCdnUrlRewriteActionObject.md | 125 + .../help/New-AzCdnUrlSigningActionObject.md | 119 + ...w-AzCdnUserManagedHttpsParametersObject.md | 186 + .../help/New-AzFrontDoorCdnCustomDomain.md | 275 + ...nCustomDomainTlsSettingParametersObject.md | 119 + src/Cdn/help/New-AzFrontDoorCdnEndpoint.md | 263 + src/Cdn/help/New-AzFrontDoorCdnOrigin.md | 440 + src/Cdn/help/New-AzFrontDoorCdnOriginGroup.md | 283 + ...rCdnOriginGroupHealthProbeSettingObject.md | 123 + ...dnOriginGroupLoadBalancingSettingObject.md | 108 + src/Cdn/help/New-AzFrontDoorCdnProfile.md | 246 + ...w-AzFrontDoorCdnResourceReferenceObject.md | 77 + src/Cdn/help/New-AzFrontDoorCdnRoute.md | 452 + src/Cdn/help/New-AzFrontDoorCdnRule.md | 294 + ...ontDoorCdnRuleClientPortConditionObject.md | 139 + ...zFrontDoorCdnRuleCookiesConditionObject.md | 154 + ...FrontDoorCdnRuleHostNameConditionObject.md | 139 + ...ntDoorCdnRuleHttpVersionConditionObject.md | 123 + ...FrontDoorCdnRuleIsDeviceConditionObject.md | 123 + ...FrontDoorCdnRulePostArgsConditionObject.md | 154 + ...ntDoorCdnRuleQueryStringConditionObject.md | 139 + ...DoorCdnRuleRemoteAddressConditionObject.md | 141 + ...ntDoorCdnRuleRequestBodyConditionObject.md | 139 + ...ontDoorCdnRuleRequestHeaderActionObject.md | 124 + ...DoorCdnRuleRequestHeaderConditionObject.md | 155 + ...DoorCdnRuleRequestMethodConditionObject.md | 123 + ...DoorCdnRuleRequestSchemeConditionObject.md | 123 + ...ontDoorCdnRuleRequestUriConditionObject.md | 139 + ...ntDoorCdnRuleResponseHeaderActionObject.md | 124 + ...eRouteConfigurationOverrideActionObject.md | 191 + ...ontDoorCdnRuleServerPortConditionObject.md | 139 + src/Cdn/help/New-AzFrontDoorCdnRuleSet.md | 169 + ...ontDoorCdnRuleSocketAddrConditionObject.md | 139 + ...ntDoorCdnRuleSslProtocolConditionObject.md | 123 + ...rCdnRuleUrlFileExtensionConditionObject.md | 139 + ...ntDoorCdnRuleUrlFileNameConditionObject.md | 139 + ...zFrontDoorCdnRuleUrlPathConditionObject.md | 139 + ...FrontDoorCdnRuleUrlRedirectActionObject.md | 179 + ...zFrontDoorCdnRuleUrlRewriteActionObject.md | 125 + ...zFrontDoorCdnRuleUrlSigningActionObject.md | 119 + src/Cdn/help/New-AzFrontDoorCdnSecret.md | 224 + ...cretCustomerCertificateParametersObject.md | 139 + ...PartyManagedCertificateParametersObject.md | 77 + ...ecretManagedCertificateParametersObject.md | 77 + ...rCdnSecretUrlSigningKeyParametersObject.md | 124 + .../help/New-AzFrontDoorCdnSecurityPolicy.md | 215 + ...WebApplicationFirewallAssociationObject.md | 102 + ...yWebApplicationFirewallParametersObject.md | 105 + src/Cdn/help/Remove-AzCdnCustomDomain.md | 275 + src/Cdn/help/Remove-AzCdnEndpoint.md | 260 + src/Cdn/help/Remove-AzCdnOrigin.md | 275 + src/Cdn/help/Remove-AzCdnOriginGroup.md | 275 + src/Cdn/help/Remove-AzCdnProfile.md | 246 + .../help/Remove-AzFrontDoorCdnCustomDomain.md | 260 + src/Cdn/help/Remove-AzFrontDoorCdnEndpoint.md | 260 + src/Cdn/help/Remove-AzFrontDoorCdnOrigin.md | 275 + .../help/Remove-AzFrontDoorCdnOriginGroup.md | 260 + src/Cdn/help/Remove-AzFrontDoorCdnProfile.md | 246 + src/Cdn/help/Remove-AzFrontDoorCdnRoute.md | 275 + src/Cdn/help/Remove-AzFrontDoorCdnRule.md | 275 + src/Cdn/help/Remove-AzFrontDoorCdnRuleSet.md | 260 + src/Cdn/help/Remove-AzFrontDoorCdnSecret.md | 260 + .../Remove-AzFrontDoorCdnSecurityPolicy.md | 260 + src/Cdn/help/Start-AzCdnEndpoint.md | 245 + src/Cdn/help/Stop-AzCdnEndpoint.md | 244 + .../help/Test-AzCdnEndpointCustomDomain.md | 231 + src/Cdn/help/Test-AzCdnNameAvailability.md | 163 + src/Cdn/help/Test-AzCdnProbe.md | 143 + ...Test-AzFrontDoorCdnEndpointCustomDomain.md | 231 + ...-AzFrontDoorCdnEndpointNameAvailability.md | 188 + ...FrontDoorCdnProfileHostNameAvailability.md | 215 + src/Cdn/help/Update-AzCdnEndpoint.md | 545 + src/Cdn/help/Update-AzCdnOrigin.md | 440 + src/Cdn/help/Update-AzCdnOriginGroup.md | 348 + src/Cdn/help/Update-AzCdnProfile.md | 261 + .../help/Update-AzFrontDoorCdnCustomDomain.md | 300 + ...FrontDoorCdnCustomDomainValidationToken.md | 260 + src/Cdn/help/Update-AzFrontDoorCdnEndpoint.md | 284 + src/Cdn/help/Update-AzFrontDoorCdnOrigin.md | 490 + .../help/Update-AzFrontDoorCdnOriginGroup.md | 325 + src/Cdn/help/Update-AzFrontDoorCdnProfile.md | 261 + src/Cdn/help/Update-AzFrontDoorCdnRoute.md | 498 + src/Cdn/help/Update-AzFrontDoorCdnRule.md | 335 + .../Update-AzFrontDoorCdnSecurityPolicy.md | 261 + src/Cdn/how-to.md | 58 + src/Cdn/internal/Az.Cdn.internal.psm1 | 38 + .../internal/Get-AzCdnLogAnalyticLocation.ps1 | 176 + .../internal/Get-AzCdnLogAnalyticMetric.ps1 | 239 + .../internal/Get-AzCdnLogAnalyticRanking.ps1 | 217 + .../internal/Get-AzCdnLogAnalyticResource.ps1 | 176 + ...t-AzCdnLogAnalyticWafLogAnalyticMetric.ps1 | 227 + ...-AzCdnLogAnalyticWafLogAnalyticRanking.ps1 | 226 + src/Cdn/internal/Get-AzCdnOperation.ps1 | 124 + src/Cdn/internal/Get-AzCdnProfile.ps1 | 181 + .../internal/Invoke-AzCdnSecretValidate.ps1 | 204 + src/Cdn/internal/New-AzCdnProfile.ps1 | 186 + src/Cdn/internal/New-AzCdnProfileSsoUri.ps1 | 179 + src/Cdn/internal/ProxyCmdletDefinitions.ps1 | 2353 ++ src/Cdn/internal/README.md | 14 + src/Cdn/internal/Remove-AzCdnProfile.ps1 | 196 + src/Cdn/internal/Update-AzCdnProfile.ps1 | 202 + src/Cdn/pack-module.ps1 | 17 + src/Cdn/run-module.ps1 | 62 + src/Cdn/test-module.ps1 | 94 + .../test/Clear-AzCdnEndpointContent.Tests.ps1 | 189 + ...ar-AzFrontDoorCdnEndpointContent.Tests.ps1 | 125 + ...ble-AzCdnCustomDomainCustomHttps.Tests.ps1 | 25 + ...ble-AzCdnCustomDomainCustomHttps.Tests.ps1 | 100 + src/Cdn/test/Get-AzCdnCustomDomain.Tests.ps1 | 134 + src/Cdn/test/Get-AzCdnEdgeNode.Tests.ps1 | 48 + src/Cdn/test/Get-AzCdnEndpoint.Tests.ps1 | 123 + .../Get-AzCdnEndpointResourceUsage.Tests.ps1 | 72 + src/Cdn/test/Get-AzCdnOrigin.Tests.ps1 | 131 + src/Cdn/test/Get-AzCdnOriginGroup.Tests.ps1 | 163 + src/Cdn/test/Get-AzCdnProfile.Tests.ps1 | 118 + .../Get-AzCdnProfileResourceUsage.Tests.ps1 | 41 + ...ProfileSupportedOptimizationType.Tests.ps1 | 41 + ...t-AzCdnSubscriptionResourceUsage.Tests.ps1 | 24 + .../Get-AzFrontDoorCdnCustomDomain.Tests.ps1 | 123 + .../test/Get-AzFrontDoorCdnEndpoint.Tests.ps1 | 99 + ...rontDoorCdnEndpointResourceUsage.Tests.ps1 | 44 + .../test/Get-AzFrontDoorCdnOrigin.Tests.ps1 | 129 + .../Get-AzFrontDoorCdnOriginGroup.Tests.ps1 | 108 + ...tDoorCdnOriginGroupResourceUsage.Tests.ps1 | 48 + .../test/Get-AzFrontDoorCdnProfile.Tests.ps1 | 112 + ...FrontDoorCdnProfileResourceUsage.Tests.ps1 | 40 + .../test/Get-AzFrontDoorCdnRoute.Tests.ps1 | 216 + src/Cdn/test/Get-AzFrontDoorCdnRule.Tests.ps1 | 129 + .../test/Get-AzFrontDoorCdnRuleSet.Tests.ps1 | 87 + ...FrontDoorCdnRuleSetResourceUsage.Tests.ps1 | 42 + .../test/Get-AzFrontDoorCdnSecret.Tests.ps1 | 107 + ...Get-AzFrontDoorCdnSecurityPolicy.Tests.ps1 | 122 + .../Import-AzCdnEndpointContent.Tests.ps1 | 189 + src/Cdn/test/New-AzCdnCustomDomain.Tests.ps1 | 55 + ...liveryRuleCookiesConditionObject.Tests.ps1 | 23 + ...ryRuleHttpVersionConditionObject.Tests.ps1 | 23 + ...iveryRuleIsDeviceConditionObject.Tests.ps1 | 23 + .../New-AzCdnDeliveryRuleObject.Tests.ps1 | 67 + ...iveryRulePostArgsConditionObject.Tests.ps1 | 23 + ...ryRuleQueryStringConditionObject.Tests.ps1 | 23 + ...RuleRemoteAddressConditionObject.Tests.ps1 | 23 + ...ryRuleRequestBodyConditionObject.Tests.ps1 | 23 + ...eryRuleRequestHeaderActionObject.Tests.ps1 | 23 + ...RuleRequestHeaderConditionObject.Tests.ps1 | 23 + ...RuleRequestMethodConditionObject.Tests.ps1 | 23 + ...RuleRequestSchemeConditionObject.Tests.ps1 | 23 + ...eryRuleRequestUriConditionObject.Tests.ps1 | 23 + ...ryRuleResponseHeaderActionObject.Tests.ps1 | 23 + ...eUrlFileExtensionConditionObject.Tests.ps1 | 23 + ...ryRuleUrlFileNameConditionObject.Tests.ps1 | 23 + ...liveryRuleUrlPathConditionObject.Tests.ps1 | 23 + src/Cdn/test/New-AzCdnEndpoint.Tests.ps1 | 52 + ...AzCdnHealthProbeParametersObject.Tests.ps1 | 21 + ...zCdnManagedHttpsParametersObject.Tests.ps1 | 23 + src/Cdn/test/New-AzCdnOrigin.Tests.ps1 | 66 + src/Cdn/test/New-AzCdnOriginGroup.Tests.ps1 | 78 + src/Cdn/test/New-AzCdnProfile.Tests.ps1 | 39 + ...New-AzCdnResourceReferenceObject.Tests.ps1 | 23 + ...inErrorDetectionParametersObject.Tests.ps1 | 21 + ...New-AzCdnUrlRedirectActionObject.Tests.ps1 | 23 + .../New-AzCdnUrlRewriteActionObject.Tests.ps1 | 23 + .../New-AzCdnUrlSigningActionObject.Tests.ps1 | 23 + ...UserManagedHttpsParametersObject.Tests.ps1 | 23 + .../New-AzFrontDoorCdnCustomDomain.Tests.ps1 | 51 + ...DomainTlsSettingParametersObject.Tests.ps1 | 23 + .../test/New-AzFrontDoorCdnEndpoint.Tests.ps1 | 47 + .../test/New-AzFrontDoorCdnOrigin.Tests.ps1 | 51 + .../New-AzFrontDoorCdnOriginGroup.Tests.ps1 | 45 + ...ginGroupHealthProbeSettingObject.Tests.ps1 | 25 + ...nGroupLoadBalancingSettingObject.Tests.ps1 | 25 + .../test/New-AzFrontDoorCdnProfile.Tests.ps1 | 39 + ...ntDoorCdnResourceReferenceObject.Tests.ps1 | 23 + .../test/New-AzFrontDoorCdnRoute.Tests.ps1 | 80 + src/Cdn/test/New-AzFrontDoorCdnRule.Tests.ps1 | 51 + ...CdnRuleClientPortConditionObject.Tests.ps1 | 23 + ...oorCdnRuleCookiesConditionObject.Tests.ps1 | 23 + ...orCdnRuleHostNameConditionObject.Tests.ps1 | 23 + ...dnRuleHttpVersionConditionObject.Tests.ps1 | 23 + ...orCdnRuleIsDeviceConditionObject.Tests.ps1 | 23 + ...orCdnRulePostArgsConditionObject.Tests.ps1 | 23 + ...dnRuleQueryStringConditionObject.Tests.ps1 | 23 + ...RuleRemoteAddressConditionObject.Tests.ps1 | 23 + ...dnRuleRequestBodyConditionObject.Tests.ps1 | 23 + ...CdnRuleRequestHeaderActionObject.Tests.ps1 | 23 + ...RuleRequestHeaderConditionObject.Tests.ps1 | 23 + ...RuleRequestMethodConditionObject.Tests.ps1 | 23 + ...RuleRequestSchemeConditionObject.Tests.ps1 | 23 + ...CdnRuleRequestUriConditionObject.Tests.ps1 | 23 + ...dnRuleResponseHeaderActionObject.Tests.ps1 | 23 + ...onfigurationOverrideActionObject.Tests.ps1 | 23 + ...CdnRuleServerPortConditionObject.Tests.ps1 | 23 + .../test/New-AzFrontDoorCdnRuleSet.Tests.ps1 | 38 + ...CdnRuleSocketAddrConditionObject.Tests.ps1 | 23 + ...dnRuleSslProtocolConditionObject.Tests.ps1 | 23 + ...eUrlFileExtensionConditionObject.Tests.ps1 | 23 + ...dnRuleUrlFileNameConditionObject.Tests.ps1 | 23 + ...oorCdnRuleUrlPathConditionObject.Tests.ps1 | 23 + ...orCdnRuleUrlRedirectActionObject.Tests.ps1 | 23 + ...oorCdnRuleUrlRewriteActionObject.Tests.ps1 | 23 + ...oorCdnRuleUrlSigningActionObject.Tests.ps1 | 23 + .../test/New-AzFrontDoorCdnSecret.Tests.ps1 | 43 + ...tomerCertificateParametersObject.Tests.ps1 | 23 + ...nagedCertificateParametersObject.Tests.ps1 | 23 + ...nagedCertificateParametersObject.Tests.ps1 | 23 + ...retUrlSigningKeyParametersObject.Tests.ps1 | 23 + ...New-AzFrontDoorCdnSecurityPolicy.Tests.ps1 | 48 + ...icationFirewallAssociationObject.Tests.ps1 | 23 + ...licationFirewallParametersObject.Tests.ps1 | 23 + src/Cdn/test/README.md | 17 + .../test/Remove-AzCdnCustomDomain.Tests.ps1 | 90 + src/Cdn/test/Remove-AzCdnEndpoint.Tests.ps1 | 80 + src/Cdn/test/Remove-AzCdnOrigin.Tests.ps1 | 112 + .../test/Remove-AzCdnOriginGroup.Tests.ps1 | 126 + src/Cdn/test/Remove-AzCdnProfile.Tests.ps1 | 60 + ...emove-AzFrontDoorCdnCustomDomain.Tests.ps1 | 90 + .../Remove-AzFrontDoorCdnEndpoint.Tests.ps1 | 66 + .../Remove-AzFrontDoorCdnOrigin.Tests.ps1 | 90 + ...Remove-AzFrontDoorCdnOriginGroup.Tests.ps1 | 76 + .../Remove-AzFrontDoorCdnProfile.Tests.ps1 | 60 + .../test/Remove-AzFrontDoorCdnRoute.Tests.ps1 | 153 + .../test/Remove-AzFrontDoorCdnRule.Tests.ps1 | 93 + .../Remove-AzFrontDoorCdnRuleSet.Tests.ps1 | 65 + .../Remove-AzFrontDoorCdnSecret.Tests.ps1 | 79 + ...ove-AzFrontDoorCdnSecurityPolicy.Tests.ps1 | 89 + src/Cdn/test/Start-AzCdnEndpoint.Tests.ps1 | 87 + src/Cdn/test/Stop-AzCdnEndpoint.Tests.ps1 | 85 + .../Test-AzCdnEndpointCustomDomain.Tests.ps1 | 100 + .../test/Test-AzCdnNameAvailability.Tests.ps1 | 90 + src/Cdn/test/Test-AzCdnProbe.Tests.ps1 | 45 + ...FrontDoorCdnEndpointCustomDomain.Tests.ps1 | 73 + ...tDoorCdnEndpointNameAvailability.Tests.ps1 | 85 + ...orCdnProfileHostNameAvailability.Tests.ps1 | 61 + src/Cdn/test/Update-AzCdnEndpoint.Tests.ps1 | 104 + src/Cdn/test/Update-AzCdnOrigin.Tests.ps1 | 113 + .../test/Update-AzCdnOriginGroup.Tests.ps1 | 152 + src/Cdn/test/Update-AzCdnProfile.Tests.ps1 | 84 + ...pdate-AzFrontDoorCdnCustomDomain.Tests.ps1 | 60 + ...orCdnCustomDomainValidationToken.Tests.ps1 | 97 + .../Update-AzFrontDoorCdnEndpoint.Tests.ps1 | 74 + .../Update-AzFrontDoorCdnOrigin.Tests.ps1 | 101 + ...Update-AzFrontDoorCdnOriginGroup.Tests.ps1 | 91 + .../Update-AzFrontDoorCdnProfile.Tests.ps1 | 84 + .../test/Update-AzFrontDoorCdnRoute.Tests.ps1 | 155 + .../test/Update-AzFrontDoorCdnRule.Tests.ps1 | 130 + ...ate-AzFrontDoorCdnSecurityPolicy.Tests.ps1 | 109 + src/Cdn/test/env.json | 5 + src/Cdn/test/loadEnv.ps1 | 29 + src/Cdn/test/localEnv.json | 5 + src/Cdn/test/utils.ps1 | 33 + src/Cdn/utils/Unprotect-SecureString.ps1 | 16 + 2149 files changed, 392330 insertions(+) create mode 100644 src/Cdn/Az.Cdn.csproj create mode 100644 src/Cdn/Az.Cdn.format.ps1xml create mode 100644 src/Cdn/Az.Cdn.psd1 create mode 100644 src/Cdn/Az.Cdn.psm1 create mode 100644 src/Cdn/Cdn.sln create mode 100644 src/Cdn/Changelog.md create mode 100644 src/Cdn/Properties/AssemblyInfo.cs create mode 100644 src/Cdn/README.md create mode 100644 src/Cdn/build-module.ps1 create mode 100644 src/Cdn/check-dependencies.ps1 create mode 100644 src/Cdn/create-model-cmdlets.ps1 create mode 100644 src/Cdn/custom/Az.Cdn.custom.psm1 create mode 100644 src/Cdn/custom/Get-AzCdnProfile.ps1 create mode 100644 src/Cdn/custom/Get-AzFrontDoorCdnProfile.ps1 create mode 100644 src/Cdn/custom/New-AzCdnProfile.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnDeliveryRuleClientPortConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnProfile.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnResourceReferenceObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleCookiesConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleHostNameConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleHttpVersionConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleIsDeviceConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRulePostArgsConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleQueryStringConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleRequestBodyConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleRequestHeaderActionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleRequestMethodConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleRequestUriConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleResponseHeaderActionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleServerPortConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleSocketAddrConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleSslProtocolConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleUrlPathConditionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleUrlRedirectActionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleUrlRewriteActionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnRuleUrlSigningActionObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.ps1 create mode 100644 src/Cdn/custom/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.ps1 create mode 100644 src/Cdn/custom/README.md create mode 100644 src/Cdn/custom/Remove-AzCdnProfile.ps1 create mode 100644 src/Cdn/custom/Remove-AzFrontDoorCdnProfile.ps1 create mode 100644 src/Cdn/custom/Update-AzCdnProfile.ps1 create mode 100644 src/Cdn/custom/Update-AzFrontDoorCdnProfile.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleCookiesConditionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleHttpVersionConditionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleIsDeviceConditionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRulePostArgsConditionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleQueryStringConditionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRemoteAddressConditionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestBodyConditionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestHeaderActionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestHeaderConditionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestMethodConditionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestSchemeConditionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestUriConditionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleResponseHeaderActionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleUrlFileNameConditionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleUrlPathConditionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnHealthProbeParametersObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnManagedHttpsParametersObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnResourceReferenceObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnUrlRedirectActionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnUrlRewriteActionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnUrlSigningActionObject.ps1 create mode 100644 src/Cdn/custom/autogen-model-cmdlets/New-AzCdnUserManagedHttpsParametersObject.ps1 create mode 100644 src/Cdn/custom/common/Utils.ps1 create mode 100644 src/Cdn/examples/Clear-AzCdnEndpointContent.md create mode 100644 src/Cdn/examples/Clear-AzFrontDoorCdnEndpointContent.md create mode 100644 src/Cdn/examples/Disable-AzCdnCustomDomainCustomHttps.md create mode 100644 src/Cdn/examples/Enable-AzCdnCustomDomainCustomHttps.md create mode 100644 src/Cdn/examples/Get-AzCdnCustomDomain.md create mode 100644 src/Cdn/examples/Get-AzCdnEdgeNode.md create mode 100644 src/Cdn/examples/Get-AzCdnEndpoint.md create mode 100644 src/Cdn/examples/Get-AzCdnEndpointResourceUsage.md create mode 100644 src/Cdn/examples/Get-AzCdnOrigin.md create mode 100644 src/Cdn/examples/Get-AzCdnOriginGroup.md create mode 100644 src/Cdn/examples/Get-AzCdnProfile.md create mode 100644 src/Cdn/examples/Get-AzCdnProfileResourceUsage.md create mode 100644 src/Cdn/examples/Get-AzCdnProfileSupportedOptimizationType.md create mode 100644 src/Cdn/examples/Get-AzCdnSubscriptionResourceUsage.md create mode 100644 src/Cdn/examples/Get-AzFrontDoorCdnCustomDomain.md create mode 100644 src/Cdn/examples/Get-AzFrontDoorCdnEndpoint.md create mode 100644 src/Cdn/examples/Get-AzFrontDoorCdnEndpointResourceUsage.md create mode 100644 src/Cdn/examples/Get-AzFrontDoorCdnOrigin.md create mode 100644 src/Cdn/examples/Get-AzFrontDoorCdnOriginGroup.md create mode 100644 src/Cdn/examples/Get-AzFrontDoorCdnOriginGroupResourceUsage.md create mode 100644 src/Cdn/examples/Get-AzFrontDoorCdnProfile.md create mode 100644 src/Cdn/examples/Get-AzFrontDoorCdnProfileResourceUsage.md create mode 100644 src/Cdn/examples/Get-AzFrontDoorCdnRoute.md create mode 100644 src/Cdn/examples/Get-AzFrontDoorCdnRule.md create mode 100644 src/Cdn/examples/Get-AzFrontDoorCdnRuleSet.md create mode 100644 src/Cdn/examples/Get-AzFrontDoorCdnRuleSetResourceUsage.md create mode 100644 src/Cdn/examples/Get-AzFrontDoorCdnSecret.md create mode 100644 src/Cdn/examples/Get-AzFrontDoorCdnSecurityPolicy.md create mode 100644 src/Cdn/examples/Import-AzCdnEndpointContent.md create mode 100644 src/Cdn/examples/New-AzCdnCustomDomain.md create mode 100644 src/Cdn/examples/New-AzCdnDeliveryRuleCookiesConditionObject.md create mode 100644 src/Cdn/examples/New-AzCdnDeliveryRuleHttpVersionConditionObject.md create mode 100644 src/Cdn/examples/New-AzCdnDeliveryRuleIsDeviceConditionObject.md create mode 100644 src/Cdn/examples/New-AzCdnDeliveryRuleObject.md create mode 100644 src/Cdn/examples/New-AzCdnDeliveryRulePostArgsConditionObject.md create mode 100644 src/Cdn/examples/New-AzCdnDeliveryRuleQueryStringConditionObject.md create mode 100644 src/Cdn/examples/New-AzCdnDeliveryRuleRemoteAddressConditionObject.md create mode 100644 src/Cdn/examples/New-AzCdnDeliveryRuleRequestBodyConditionObject.md create mode 100644 src/Cdn/examples/New-AzCdnDeliveryRuleRequestHeaderActionObject.md create mode 100644 src/Cdn/examples/New-AzCdnDeliveryRuleRequestHeaderConditionObject.md create mode 100644 src/Cdn/examples/New-AzCdnDeliveryRuleRequestMethodConditionObject.md create mode 100644 src/Cdn/examples/New-AzCdnDeliveryRuleRequestSchemeConditionObject.md create mode 100644 src/Cdn/examples/New-AzCdnDeliveryRuleRequestUriConditionObject.md create mode 100644 src/Cdn/examples/New-AzCdnDeliveryRuleResponseHeaderActionObject.md create mode 100644 src/Cdn/examples/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.md create mode 100644 src/Cdn/examples/New-AzCdnDeliveryRuleUrlFileNameConditionObject.md create mode 100644 src/Cdn/examples/New-AzCdnDeliveryRuleUrlPathConditionObject.md create mode 100644 src/Cdn/examples/New-AzCdnEndpoint.md create mode 100644 src/Cdn/examples/New-AzCdnHealthProbeParametersObject.md create mode 100644 src/Cdn/examples/New-AzCdnManagedHttpsParametersObject.md create mode 100644 src/Cdn/examples/New-AzCdnOrigin.md create mode 100644 src/Cdn/examples/New-AzCdnOriginGroup.md create mode 100644 src/Cdn/examples/New-AzCdnProfile.md create mode 100644 src/Cdn/examples/New-AzCdnResourceReferenceObject.md create mode 100644 src/Cdn/examples/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.md create mode 100644 src/Cdn/examples/New-AzCdnUrlRedirectActionObject.md create mode 100644 src/Cdn/examples/New-AzCdnUrlRewriteActionObject.md create mode 100644 src/Cdn/examples/New-AzCdnUrlSigningActionObject.md create mode 100644 src/Cdn/examples/New-AzCdnUserManagedHttpsParametersObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnCustomDomain.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnEndpoint.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnOrigin.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnOriginGroup.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnProfile.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnResourceReferenceObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRoute.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRule.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleClientPortConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleCookiesConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleHostNameConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleHttpVersionConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleIsDeviceConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRulePostArgsConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleQueryStringConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleRequestBodyConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleRequestHeaderActionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleRequestMethodConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleRequestUriConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleResponseHeaderActionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleServerPortConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleSet.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleSocketAddrConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleSslProtocolConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleUrlPathConditionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleUrlRedirectActionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleUrlRewriteActionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnRuleUrlSigningActionObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnSecret.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnSecurityPolicy.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.md create mode 100644 src/Cdn/examples/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.md create mode 100644 src/Cdn/examples/Remove-AzCdnCustomDomain.md create mode 100644 src/Cdn/examples/Remove-AzCdnEndpoint.md create mode 100644 src/Cdn/examples/Remove-AzCdnOrigin.md create mode 100644 src/Cdn/examples/Remove-AzCdnOriginGroup.md create mode 100644 src/Cdn/examples/Remove-AzCdnProfile.md create mode 100644 src/Cdn/examples/Remove-AzFrontDoorCdnCustomDomain.md create mode 100644 src/Cdn/examples/Remove-AzFrontDoorCdnEndpoint.md create mode 100644 src/Cdn/examples/Remove-AzFrontDoorCdnOrigin.md create mode 100644 src/Cdn/examples/Remove-AzFrontDoorCdnOriginGroup.md create mode 100644 src/Cdn/examples/Remove-AzFrontDoorCdnProfile.md create mode 100644 src/Cdn/examples/Remove-AzFrontDoorCdnRoute.md create mode 100644 src/Cdn/examples/Remove-AzFrontDoorCdnRule.md create mode 100644 src/Cdn/examples/Remove-AzFrontDoorCdnRuleSet.md create mode 100644 src/Cdn/examples/Remove-AzFrontDoorCdnSecret.md create mode 100644 src/Cdn/examples/Remove-AzFrontDoorCdnSecurityPolicy.md create mode 100644 src/Cdn/examples/Start-AzCdnEndpoint.md create mode 100644 src/Cdn/examples/Stop-AzCdnEndpoint.md create mode 100644 src/Cdn/examples/Test-AzCdnEndpointCustomDomain.md create mode 100644 src/Cdn/examples/Test-AzCdnNameAvailability.md create mode 100644 src/Cdn/examples/Test-AzCdnProbe.md create mode 100644 src/Cdn/examples/Test-AzFrontDoorCdnEndpointCustomDomain.md create mode 100644 src/Cdn/examples/Test-AzFrontDoorCdnEndpointNameAvailability.md create mode 100644 src/Cdn/examples/Test-AzFrontDoorCdnProfileHostNameAvailability.md create mode 100644 src/Cdn/examples/Update-AzCdnEndpoint.md create mode 100644 src/Cdn/examples/Update-AzCdnOrigin.md create mode 100644 src/Cdn/examples/Update-AzCdnOriginGroup.md create mode 100644 src/Cdn/examples/Update-AzCdnProfile.md create mode 100644 src/Cdn/examples/Update-AzFrontDoorCdnCustomDomain.md create mode 100644 src/Cdn/examples/Update-AzFrontDoorCdnCustomDomainValidationToken.md create mode 100644 src/Cdn/examples/Update-AzFrontDoorCdnEndpoint.md create mode 100644 src/Cdn/examples/Update-AzFrontDoorCdnOrigin.md create mode 100644 src/Cdn/examples/Update-AzFrontDoorCdnOriginGroup.md create mode 100644 src/Cdn/examples/Update-AzFrontDoorCdnProfile.md create mode 100644 src/Cdn/examples/Update-AzFrontDoorCdnRoute.md create mode 100644 src/Cdn/examples/Update-AzFrontDoorCdnRule.md create mode 100644 src/Cdn/examples/Update-AzFrontDoorCdnSecurityPolicy.md create mode 100644 src/Cdn/export-surface.ps1 create mode 100644 src/Cdn/exports/Clear-AzCdnEndpointContent.ps1 create mode 100644 src/Cdn/exports/Clear-AzFrontDoorCdnEndpointContent.ps1 create mode 100644 src/Cdn/exports/Disable-AzCdnCustomDomainCustomHttps.ps1 create mode 100644 src/Cdn/exports/Enable-AzCdnCustomDomainCustomHttps.ps1 create mode 100644 src/Cdn/exports/Get-AzCdnCustomDomain.ps1 create mode 100644 src/Cdn/exports/Get-AzCdnEdgeNode.ps1 create mode 100644 src/Cdn/exports/Get-AzCdnEndpoint.ps1 create mode 100644 src/Cdn/exports/Get-AzCdnEndpointResourceUsage.ps1 create mode 100644 src/Cdn/exports/Get-AzCdnOrigin.ps1 create mode 100644 src/Cdn/exports/Get-AzCdnOriginGroup.ps1 create mode 100644 src/Cdn/exports/Get-AzCdnProfile.ps1 create mode 100644 src/Cdn/exports/Get-AzCdnProfileResourceUsage.ps1 create mode 100644 src/Cdn/exports/Get-AzCdnProfileSupportedOptimizationType.ps1 create mode 100644 src/Cdn/exports/Get-AzCdnSubscriptionResourceUsage.ps1 create mode 100644 src/Cdn/exports/Get-AzFrontDoorCdnCustomDomain.ps1 create mode 100644 src/Cdn/exports/Get-AzFrontDoorCdnEndpoint.ps1 create mode 100644 src/Cdn/exports/Get-AzFrontDoorCdnEndpointResourceUsage.ps1 create mode 100644 src/Cdn/exports/Get-AzFrontDoorCdnOrigin.ps1 create mode 100644 src/Cdn/exports/Get-AzFrontDoorCdnOriginGroup.ps1 create mode 100644 src/Cdn/exports/Get-AzFrontDoorCdnOriginGroupResourceUsage.ps1 create mode 100644 src/Cdn/exports/Get-AzFrontDoorCdnProfile.ps1 create mode 100644 src/Cdn/exports/Get-AzFrontDoorCdnProfileResourceUsage.ps1 create mode 100644 src/Cdn/exports/Get-AzFrontDoorCdnRoute.ps1 create mode 100644 src/Cdn/exports/Get-AzFrontDoorCdnRule.ps1 create mode 100644 src/Cdn/exports/Get-AzFrontDoorCdnRuleSet.ps1 create mode 100644 src/Cdn/exports/Get-AzFrontDoorCdnRuleSetResourceUsage.ps1 create mode 100644 src/Cdn/exports/Get-AzFrontDoorCdnSecret.ps1 create mode 100644 src/Cdn/exports/Get-AzFrontDoorCdnSecurityPolicy.ps1 create mode 100644 src/Cdn/exports/Import-AzCdnEndpointContent.ps1 create mode 100644 src/Cdn/exports/New-AzCdnCustomDomain.ps1 create mode 100644 src/Cdn/exports/New-AzCdnDeliveryRuleCookiesConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnDeliveryRuleHttpVersionConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnDeliveryRuleIsDeviceConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnDeliveryRuleObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnDeliveryRulePostArgsConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnDeliveryRuleQueryStringConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnDeliveryRuleRemoteAddressConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnDeliveryRuleRequestBodyConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnDeliveryRuleRequestHeaderActionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnDeliveryRuleRequestHeaderConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnDeliveryRuleRequestMethodConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnDeliveryRuleRequestSchemeConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnDeliveryRuleRequestUriConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnDeliveryRuleResponseHeaderActionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnDeliveryRuleUrlFileNameConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnDeliveryRuleUrlPathConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnEndpoint.ps1 create mode 100644 src/Cdn/exports/New-AzCdnHealthProbeParametersObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnManagedHttpsParametersObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnOrigin.ps1 create mode 100644 src/Cdn/exports/New-AzCdnOriginGroup.ps1 create mode 100644 src/Cdn/exports/New-AzCdnProfile.ps1 create mode 100644 src/Cdn/exports/New-AzCdnResourceReferenceObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnUrlRedirectActionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnUrlRewriteActionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnUrlSigningActionObject.ps1 create mode 100644 src/Cdn/exports/New-AzCdnUserManagedHttpsParametersObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnCustomDomain.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnEndpoint.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnOrigin.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnOriginGroup.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnProfile.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnResourceReferenceObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRoute.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRule.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleClientPortConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleCookiesConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleHostNameConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleHttpVersionConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleIsDeviceConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRulePostArgsConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleQueryStringConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleRequestBodyConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleRequestHeaderActionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleRequestMethodConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleRequestUriConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleResponseHeaderActionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleServerPortConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleSet.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleSocketAddrConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleSslProtocolConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleUrlPathConditionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleUrlRedirectActionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleUrlRewriteActionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnRuleUrlSigningActionObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnSecret.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnSecurityPolicy.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.ps1 create mode 100644 src/Cdn/exports/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.ps1 create mode 100644 src/Cdn/exports/ProxyCmdletDefinitions.ps1 create mode 100644 src/Cdn/exports/README.md create mode 100644 src/Cdn/exports/Remove-AzCdnCustomDomain.ps1 create mode 100644 src/Cdn/exports/Remove-AzCdnEndpoint.ps1 create mode 100644 src/Cdn/exports/Remove-AzCdnOrigin.ps1 create mode 100644 src/Cdn/exports/Remove-AzCdnOriginGroup.ps1 create mode 100644 src/Cdn/exports/Remove-AzCdnProfile.ps1 create mode 100644 src/Cdn/exports/Remove-AzFrontDoorCdnCustomDomain.ps1 create mode 100644 src/Cdn/exports/Remove-AzFrontDoorCdnEndpoint.ps1 create mode 100644 src/Cdn/exports/Remove-AzFrontDoorCdnOrigin.ps1 create mode 100644 src/Cdn/exports/Remove-AzFrontDoorCdnOriginGroup.ps1 create mode 100644 src/Cdn/exports/Remove-AzFrontDoorCdnProfile.ps1 create mode 100644 src/Cdn/exports/Remove-AzFrontDoorCdnRoute.ps1 create mode 100644 src/Cdn/exports/Remove-AzFrontDoorCdnRule.ps1 create mode 100644 src/Cdn/exports/Remove-AzFrontDoorCdnRuleSet.ps1 create mode 100644 src/Cdn/exports/Remove-AzFrontDoorCdnSecret.ps1 create mode 100644 src/Cdn/exports/Remove-AzFrontDoorCdnSecurityPolicy.ps1 create mode 100644 src/Cdn/exports/Start-AzCdnEndpoint.ps1 create mode 100644 src/Cdn/exports/Stop-AzCdnEndpoint.ps1 create mode 100644 src/Cdn/exports/Test-AzCdnEndpointCustomDomain.ps1 create mode 100644 src/Cdn/exports/Test-AzCdnNameAvailability.ps1 create mode 100644 src/Cdn/exports/Test-AzCdnProbe.ps1 create mode 100644 src/Cdn/exports/Test-AzFrontDoorCdnEndpointCustomDomain.ps1 create mode 100644 src/Cdn/exports/Test-AzFrontDoorCdnEndpointNameAvailability.ps1 create mode 100644 src/Cdn/exports/Test-AzFrontDoorCdnProfileHostNameAvailability.ps1 create mode 100644 src/Cdn/exports/Update-AzCdnEndpoint.ps1 create mode 100644 src/Cdn/exports/Update-AzCdnOrigin.ps1 create mode 100644 src/Cdn/exports/Update-AzCdnOriginGroup.ps1 create mode 100644 src/Cdn/exports/Update-AzCdnProfile.ps1 create mode 100644 src/Cdn/exports/Update-AzFrontDoorCdnCustomDomain.ps1 create mode 100644 src/Cdn/exports/Update-AzFrontDoorCdnCustomDomainValidationToken.ps1 create mode 100644 src/Cdn/exports/Update-AzFrontDoorCdnEndpoint.ps1 create mode 100644 src/Cdn/exports/Update-AzFrontDoorCdnOrigin.ps1 create mode 100644 src/Cdn/exports/Update-AzFrontDoorCdnOriginGroup.ps1 create mode 100644 src/Cdn/exports/Update-AzFrontDoorCdnProfile.ps1 create mode 100644 src/Cdn/exports/Update-AzFrontDoorCdnRoute.ps1 create mode 100644 src/Cdn/exports/Update-AzFrontDoorCdnRule.ps1 create mode 100644 src/Cdn/exports/Update-AzFrontDoorCdnSecurityPolicy.ps1 create mode 100644 src/Cdn/generate-help.ps1 create mode 100644 src/Cdn/generate-info.json create mode 100644 src/Cdn/generated/Module.cs create mode 100644 src/Cdn/generated/api/Cdn.cs create mode 100644 src/Cdn/generated/api/Models/Any.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Any.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Any.cs create mode 100644 src/Cdn/generated/api/Models/Any.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ActivatedResourceReference.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ActivatedResourceReference.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ActivatedResourceReference.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ActivatedResourceReference.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomain.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomain.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomain.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomain.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainHttpsParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainHttpsParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainHttpsParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainHttpsParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainListResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainListResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainListResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainListResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdateParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdateParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdateParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdateParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdatePropertiesParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdatePropertiesParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdatePropertiesParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdatePropertiesParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpoint.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpoint.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpoint.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpoint.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointListResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointListResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointListResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointListResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointPropertiesUpdateParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointPropertiesUpdateParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointPropertiesUpdateParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointPropertiesUpdateParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.dictionary.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdErrorResponse.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdErrorResponse.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdErrorResponse.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdErrorResponse.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOrigin.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOrigin.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOrigin.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOrigin.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroup.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroup.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroup.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroup.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupListResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupListResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupListResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupListResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdateParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdateParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdateParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdateParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdatePropertiesParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdatePropertiesParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdatePropertiesParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdatePropertiesParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginListResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginListResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginListResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginListResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdateParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdateParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdateParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdateParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdatePropertiesParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdatePropertiesParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdatePropertiesParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdatePropertiesParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdPurgeParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdPurgeParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdPurgeParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdPurgeParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdRouteCacheConfiguration.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdRouteCacheConfiguration.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdRouteCacheConfiguration.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdRouteCacheConfiguration.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdStateProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdStateProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdStateProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AfdStateProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificate.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificate.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificate.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificate.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificateParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificateParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificateParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificateParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CacheConfiguration.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CacheConfiguration.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CacheConfiguration.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CacheConfiguration.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CacheExpirationActionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CacheExpirationActionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CacheExpirationActionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CacheExpirationActionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CacheKeyQueryStringActionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CacheKeyQueryStringActionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CacheKeyQueryStringActionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CacheKeyQueryStringActionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CdnCertificateSourceParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CdnCertificateSourceParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CdnCertificateSourceParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CdnCertificateSourceParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CdnManagedHttpsParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CdnManagedHttpsParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CdnManagedHttpsParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CdnManagedHttpsParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Certificate.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Certificate.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Certificate.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Certificate.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityInput.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityInput.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityInput.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityInput.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityOutput.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityOutput.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityOutput.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityOutput.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckHostNameAvailabilityInput.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckHostNameAvailabilityInput.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckHostNameAvailabilityInput.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckHostNameAvailabilityInput.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityInput.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityInput.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityInput.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityInput.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityOutput.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityOutput.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityOutput.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityOutput.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CidrIPAddress.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CidrIPAddress.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CidrIPAddress.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CidrIPAddress.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ClientPortMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ClientPortMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ClientPortMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ClientPortMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CompressionSettings.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CompressionSettings.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CompressionSettings.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CompressionSettings.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ContinentsResponse.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ContinentsResponse.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ContinentsResponse.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ContinentsResponse.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ContinentsResponseContinentsItem.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ContinentsResponseContinentsItem.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ContinentsResponseContinentsItem.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ContinentsResponseContinentsItem.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ContinentsResponseCountryOrRegionsItem.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ContinentsResponseCountryOrRegionsItem.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ContinentsResponseCountryOrRegionsItem.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ContinentsResponseCountryOrRegionsItem.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CookiesMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CookiesMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CookiesMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CookiesMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomain.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomain.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomain.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomain.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainHttpsParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainHttpsParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainHttpsParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainHttpsParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainListResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainListResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainListResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainListResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainPropertiesParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainPropertiesParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainPropertiesParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomDomainPropertiesParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomerCertificate.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomerCertificate.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomerCertificate.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomerCertificate.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomerCertificateParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomerCertificateParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomerCertificateParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/CustomerCertificateParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeepCreatedOrigin.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeepCreatedOrigin.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeepCreatedOrigin.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeepCreatedOrigin.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroup.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroup.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroup.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroup.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroupProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroupProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroupProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroupProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRule.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRule.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRule.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRule.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleAction1.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleAction1.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleAction1.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleAction1.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheExpirationAction.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheExpirationAction.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheExpirationAction.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheExpirationAction.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheKeyQueryStringAction.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheKeyQueryStringAction.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheKeyQueryStringAction.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheKeyQueryStringAction.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleClientPortCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleClientPortCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleClientPortCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleClientPortCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCookiesCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCookiesCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCookiesCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCookiesCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHostNameCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHostNameCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHostNameCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHostNameCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHttpVersionCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHttpVersionCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHttpVersionCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHttpVersionCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleIsDeviceCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleIsDeviceCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleIsDeviceCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleIsDeviceCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRulePostArgsCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRulePostArgsCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRulePostArgsCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRulePostArgsCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleQueryStringCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleQueryStringCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleQueryStringCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleQueryStringCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRemoteAddressCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRemoteAddressCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRemoteAddressCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRemoteAddressCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestBodyCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestBodyCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestBodyCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestBodyCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderAction.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderAction.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderAction.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderAction.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestMethodCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestMethodCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestMethodCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestMethodCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestSchemeCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestSchemeCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestSchemeCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestSchemeCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestUriCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestUriCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestUriCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestUriCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleResponseHeaderAction.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleResponseHeaderAction.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleResponseHeaderAction.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleResponseHeaderAction.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRouteConfigurationOverrideAction.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRouteConfigurationOverrideAction.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRouteConfigurationOverrideAction.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRouteConfigurationOverrideAction.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleServerPortCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleServerPortCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleServerPortCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleServerPortCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSocketAddrCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSocketAddrCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSocketAddrCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSocketAddrCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSslProtocolCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSslProtocolCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSslProtocolCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSslProtocolCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileExtensionCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileExtensionCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileExtensionCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileExtensionCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileNameCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileNameCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileNameCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileNameCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlPathCondition.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlPathCondition.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlPathCondition.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlPathCondition.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DimensionProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DimensionProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DimensionProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DimensionProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DomainValidationProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DomainValidationProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DomainValidationProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/DomainValidationProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EdgeNode.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EdgeNode.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EdgeNode.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EdgeNode.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EdgeNodeProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EdgeNodeProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EdgeNodeProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EdgeNodeProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EdgenodeResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EdgenodeResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EdgenodeResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EdgenodeResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Endpoint.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Endpoint.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Endpoint.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Endpoint.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointListResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointListResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointListResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointListResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersDeliveryPolicy.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersDeliveryPolicy.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersDeliveryPolicy.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersDeliveryPolicy.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.dictionary.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ErrorAdditionalInfo.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ErrorAdditionalInfo.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ErrorAdditionalInfo.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ErrorAdditionalInfo.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ErrorDetail.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ErrorDetail.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ErrorDetail.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ErrorDetail.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ErrorResponse.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ErrorResponse.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ErrorResponse.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ErrorResponse.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/GeoFilter.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/GeoFilter.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/GeoFilter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/GeoFilter.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HeaderActionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HeaderActionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HeaderActionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HeaderActionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HealthProbeParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HealthProbeParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HealthProbeParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HealthProbeParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HostNameMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HostNameMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HostNameMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HostNameMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HttpErrorRangeParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HttpErrorRangeParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HttpErrorRangeParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HttpErrorRangeParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HttpVersionMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HttpVersionMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HttpVersionMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/HttpVersionMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/IPAddressGroup.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/IPAddressGroup.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/IPAddressGroup.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/IPAddressGroup.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/IsDeviceMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/IsDeviceMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/IsDeviceMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/IsDeviceMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/KeyVaultCertificateSourceParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/KeyVaultCertificateSourceParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/KeyVaultCertificateSourceParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/KeyVaultCertificateSourceParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/KeyVaultSigningKeyParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/KeyVaultSigningKeyParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/KeyVaultSigningKeyParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/KeyVaultSigningKeyParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/LoadBalancingSettingsParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/LoadBalancingSettingsParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/LoadBalancingSettingsParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/LoadBalancingSettingsParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/LoadParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/LoadParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/LoadParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/LoadParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/LogSpecification.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/LogSpecification.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/LogSpecification.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/LogSpecification.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ManagedCertificate.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ManagedCertificate.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ManagedCertificate.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ManagedCertificate.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ManagedCertificateParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ManagedCertificateParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ManagedCertificateParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ManagedCertificateParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricAvailability.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricAvailability.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricAvailability.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricAvailability.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricSpecification.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricSpecification.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricSpecification.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricSpecification.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricsResponse.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricsResponse.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricsResponse.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricsResponse.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesItem.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesItem.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesItem.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesItem.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesPropertiesItemsItem.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesPropertiesItemsItem.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesPropertiesItemsItem.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesPropertiesItemsItem.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Operation.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Operation.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Operation.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Operation.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OperationDisplay.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OperationDisplay.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OperationDisplay.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OperationDisplay.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OperationProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OperationProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OperationProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OperationProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OperationsListResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OperationsListResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OperationsListResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OperationsListResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Origin.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Origin.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Origin.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Origin.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroup.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroup.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroup.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroup.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupListResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupListResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupListResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupListResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupOverride.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupOverride.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupOverride.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupOverride.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideAction.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideAction.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideAction.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideAction.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideActionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideActionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideActionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideActionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdateParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdateParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdateParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdateParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdatePropertiesParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdatePropertiesParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdatePropertiesParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdatePropertiesParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginListResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginListResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginListResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginListResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginUpdateParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginUpdateParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginUpdateParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginUpdateParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginUpdatePropertiesParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginUpdatePropertiesParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginUpdatePropertiesParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/OriginUpdatePropertiesParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/PostArgsMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/PostArgsMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/PostArgsMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/PostArgsMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Profile.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Profile.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Profile.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Profile.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfileListResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfileListResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfileListResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfileListResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfileProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfileProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfileProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfileProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfilePropertiesUpdateParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfilePropertiesUpdateParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfilePropertiesUpdateParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfilePropertiesUpdateParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.dictionary.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProxyResource.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProxyResource.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProxyResource.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ProxyResource.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/PurgeParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/PurgeParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/PurgeParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/PurgeParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/QueryStringMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/QueryStringMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/QueryStringMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/QueryStringMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RankingsResponse.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RankingsResponse.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RankingsResponse.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RankingsResponse.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesItem.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesItem.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesItem.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesItem.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsItem.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsItem.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsItem.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsItem.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsMetricsItem.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsMetricsItem.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsMetricsItem.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsMetricsItem.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RemoteAddressMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RemoteAddressMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RemoteAddressMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RemoteAddressMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestBodyMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestBodyMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestBodyMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestBodyMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestHeaderMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestHeaderMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestHeaderMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestHeaderMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestMethodMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestMethodMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestMethodMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestMethodMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestSchemeMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestSchemeMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestSchemeMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestSchemeMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestUriMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestUriMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestUriMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RequestUriMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Resource.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Resource.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Resource.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Resource.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourceReference.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourceReference.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourceReference.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourceReference.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourceUsage.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourceUsage.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourceUsage.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourceUsage.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourceUsageListResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourceUsageListResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourceUsageListResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourceUsageListResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourcesResponse.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourcesResponse.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourcesResponse.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourcesResponse.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourcesResponseCustomDomainsItem.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourcesResponseCustomDomainsItem.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourcesResponseCustomDomainsItem.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourcesResponseCustomDomainsItem.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsItem.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsItem.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsItem.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsItem.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsPropertiesItemsItem.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsPropertiesItemsItem.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsPropertiesItemsItem.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsPropertiesItemsItem.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResponseBasedOriginErrorDetectionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResponseBasedOriginErrorDetectionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResponseBasedOriginErrorDetectionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ResponseBasedOriginErrorDetectionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Route.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Route.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Route.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Route.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteConfigurationOverrideActionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteConfigurationOverrideActionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteConfigurationOverrideActionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteConfigurationOverrideActionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteListResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteListResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteListResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteListResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteUpdateParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteUpdateParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteUpdateParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteUpdateParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteUpdatePropertiesParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteUpdatePropertiesParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteUpdatePropertiesParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RouteUpdatePropertiesParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Rule.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Rule.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Rule.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Rule.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleListResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleListResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleListResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleListResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleSet.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleSet.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleSet.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleSet.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleSetListResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleSetListResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleSetListResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleSetListResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleSetProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleSetProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleSetProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleSetProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleUpdateParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleUpdateParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleUpdateParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleUpdateParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleUpdatePropertiesParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleUpdatePropertiesParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleUpdatePropertiesParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/RuleUpdatePropertiesParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Secret.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Secret.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Secret.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Secret.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecretListResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecretListResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecretListResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecretListResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecretParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecretParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecretParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecretParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecretProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecretProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecretProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecretProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicy.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicy.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicy.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicy.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyListResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyListResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyListResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyListResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyPropertiesParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyPropertiesParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyPropertiesParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyPropertiesParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallAssociation.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallAssociation.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallAssociation.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallAssociation.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ServerPortMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ServerPortMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ServerPortMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ServerPortMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ServiceSpecification.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ServiceSpecification.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ServiceSpecification.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ServiceSpecification.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SharedPrivateLinkResourceProperties.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SharedPrivateLinkResourceProperties.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SharedPrivateLinkResourceProperties.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SharedPrivateLinkResourceProperties.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Sku.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Sku.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Sku.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Sku.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SocketAddrMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SocketAddrMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SocketAddrMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SocketAddrMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SslProtocolMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SslProtocolMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SslProtocolMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SslProtocolMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SsoUri.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SsoUri.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SsoUri.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SsoUri.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SupportedOptimizationTypesListResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SupportedOptimizationTypesListResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SupportedOptimizationTypesListResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SupportedOptimizationTypesListResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SystemData.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SystemData.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SystemData.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/SystemData.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/TrackedResource.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/TrackedResource.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/TrackedResource.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/TrackedResource.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.dictionary.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlFileExtensionMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlFileExtensionMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlFileExtensionMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlFileExtensionMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlFileNameMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlFileNameMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlFileNameMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlFileNameMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlPathMatchConditionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlPathMatchConditionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlPathMatchConditionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlPathMatchConditionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlRedirectAction.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlRedirectAction.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlRedirectAction.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlRedirectAction.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlRedirectActionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlRedirectActionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlRedirectActionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlRedirectActionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlRewriteAction.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlRewriteAction.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlRewriteAction.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlRewriteAction.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlRewriteActionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlRewriteActionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlRewriteActionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlRewriteActionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningAction.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningAction.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningAction.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningAction.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningActionParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningActionParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningActionParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningActionParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningKey.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningKey.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningKey.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningKey.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningKeyParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningKeyParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningKeyParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningKeyParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningParamIdentifier.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningParamIdentifier.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningParamIdentifier.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UrlSigningParamIdentifier.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Usage.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Usage.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Usage.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/Usage.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UsageName.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UsageName.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UsageName.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UsageName.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UsagesListResult.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UsagesListResult.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UsagesListResult.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UsagesListResult.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UserManagedHttpsParameters.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UserManagedHttpsParameters.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UserManagedHttpsParameters.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/UserManagedHttpsParameters.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainInput.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainInput.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainInput.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainInput.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainOutput.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainOutput.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainOutput.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainOutput.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateProbeInput.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateProbeInput.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateProbeInput.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateProbeInput.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateProbeOutput.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateProbeOutput.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateProbeOutput.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateProbeOutput.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateSecretInput.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateSecretInput.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateSecretInput.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateSecretInput.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateSecretOutput.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateSecretOutput.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateSecretOutput.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidateSecretOutput.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidationToken.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidationToken.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidationToken.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/ValidationToken.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafMetricsResponse.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafMetricsResponse.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafMetricsResponse.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafMetricsResponse.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesItem.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesItem.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesItem.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesItem.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesPropertiesItemsItem.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesPropertiesItemsItem.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesPropertiesItemsItem.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesPropertiesItemsItem.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafRankingsResponse.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafRankingsResponse.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafRankingsResponse.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafRankingsResponse.json.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafRankingsResponseDataItem.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafRankingsResponseDataItem.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafRankingsResponseDataItem.cs create mode 100644 src/Cdn/generated/api/Models/Api20210601/WafRankingsResponseDataItem.json.cs create mode 100644 src/Cdn/generated/api/Models/CdnIdentity.PowerShell.cs create mode 100644 src/Cdn/generated/api/Models/CdnIdentity.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Models/CdnIdentity.cs create mode 100644 src/Cdn/generated/api/Models/CdnIdentity.json.cs create mode 100644 src/Cdn/generated/api/Support/AfdCertificateType.Completer.cs create mode 100644 src/Cdn/generated/api/Support/AfdCertificateType.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/AfdCertificateType.cs create mode 100644 src/Cdn/generated/api/Support/AfdEndpointProtocols.Completer.cs create mode 100644 src/Cdn/generated/api/Support/AfdEndpointProtocols.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/AfdEndpointProtocols.cs create mode 100644 src/Cdn/generated/api/Support/AfdMinimumTlsVersion.Completer.cs create mode 100644 src/Cdn/generated/api/Support/AfdMinimumTlsVersion.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/AfdMinimumTlsVersion.cs create mode 100644 src/Cdn/generated/api/Support/AfdProvisioningState.Completer.cs create mode 100644 src/Cdn/generated/api/Support/AfdProvisioningState.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/AfdProvisioningState.cs create mode 100644 src/Cdn/generated/api/Support/AfdQueryStringCachingBehavior.Completer.cs create mode 100644 src/Cdn/generated/api/Support/AfdQueryStringCachingBehavior.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/AfdQueryStringCachingBehavior.cs create mode 100644 src/Cdn/generated/api/Support/Algorithm.Completer.cs create mode 100644 src/Cdn/generated/api/Support/Algorithm.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/Algorithm.cs create mode 100644 src/Cdn/generated/api/Support/AutoGeneratedDomainNameLabelScope.Completer.cs create mode 100644 src/Cdn/generated/api/Support/AutoGeneratedDomainNameLabelScope.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/AutoGeneratedDomainNameLabelScope.cs create mode 100644 src/Cdn/generated/api/Support/CacheBehavior.Completer.cs create mode 100644 src/Cdn/generated/api/Support/CacheBehavior.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/CacheBehavior.cs create mode 100644 src/Cdn/generated/api/Support/CertificateSource.Completer.cs create mode 100644 src/Cdn/generated/api/Support/CertificateSource.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/CertificateSource.cs create mode 100644 src/Cdn/generated/api/Support/CertificateType.Completer.cs create mode 100644 src/Cdn/generated/api/Support/CertificateType.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/CertificateType.cs create mode 100644 src/Cdn/generated/api/Support/ClientPortOperator.Completer.cs create mode 100644 src/Cdn/generated/api/Support/ClientPortOperator.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/ClientPortOperator.cs create mode 100644 src/Cdn/generated/api/Support/CookiesOperator.Completer.cs create mode 100644 src/Cdn/generated/api/Support/CookiesOperator.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/CookiesOperator.cs create mode 100644 src/Cdn/generated/api/Support/CustomDomainResourceState.Completer.cs create mode 100644 src/Cdn/generated/api/Support/CustomDomainResourceState.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/CustomDomainResourceState.cs create mode 100644 src/Cdn/generated/api/Support/CustomHttpsProvisioningState.Completer.cs create mode 100644 src/Cdn/generated/api/Support/CustomHttpsProvisioningState.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/CustomHttpsProvisioningState.cs create mode 100644 src/Cdn/generated/api/Support/CustomHttpsProvisioningSubstate.Completer.cs create mode 100644 src/Cdn/generated/api/Support/CustomHttpsProvisioningSubstate.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/CustomHttpsProvisioningSubstate.cs create mode 100644 src/Cdn/generated/api/Support/DeliveryRuleAction.Completer.cs create mode 100644 src/Cdn/generated/api/Support/DeliveryRuleAction.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/DeliveryRuleAction.cs create mode 100644 src/Cdn/generated/api/Support/DeploymentStatus.Completer.cs create mode 100644 src/Cdn/generated/api/Support/DeploymentStatus.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/DeploymentStatus.cs create mode 100644 src/Cdn/generated/api/Support/DestinationProtocol.Completer.cs create mode 100644 src/Cdn/generated/api/Support/DestinationProtocol.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/DestinationProtocol.cs create mode 100644 src/Cdn/generated/api/Support/DomainValidationState.Completer.cs create mode 100644 src/Cdn/generated/api/Support/DomainValidationState.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/DomainValidationState.cs create mode 100644 src/Cdn/generated/api/Support/EnabledState.Completer.cs create mode 100644 src/Cdn/generated/api/Support/EnabledState.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/EnabledState.cs create mode 100644 src/Cdn/generated/api/Support/EndpointResourceState.Completer.cs create mode 100644 src/Cdn/generated/api/Support/EndpointResourceState.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/EndpointResourceState.cs create mode 100644 src/Cdn/generated/api/Support/ForwardingProtocol.Completer.cs create mode 100644 src/Cdn/generated/api/Support/ForwardingProtocol.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/ForwardingProtocol.cs create mode 100644 src/Cdn/generated/api/Support/GeoFilterActions.Completer.cs create mode 100644 src/Cdn/generated/api/Support/GeoFilterActions.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/GeoFilterActions.cs create mode 100644 src/Cdn/generated/api/Support/HeaderAction.Completer.cs create mode 100644 src/Cdn/generated/api/Support/HeaderAction.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/HeaderAction.cs create mode 100644 src/Cdn/generated/api/Support/HealthProbeRequestType.Completer.cs create mode 100644 src/Cdn/generated/api/Support/HealthProbeRequestType.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/HealthProbeRequestType.cs create mode 100644 src/Cdn/generated/api/Support/HostNameOperator.Completer.cs create mode 100644 src/Cdn/generated/api/Support/HostNameOperator.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/HostNameOperator.cs create mode 100644 src/Cdn/generated/api/Support/HttpsRedirect.Completer.cs create mode 100644 src/Cdn/generated/api/Support/HttpsRedirect.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/HttpsRedirect.cs create mode 100644 src/Cdn/generated/api/Support/IdentityType.Completer.cs create mode 100644 src/Cdn/generated/api/Support/IdentityType.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/IdentityType.cs create mode 100644 src/Cdn/generated/api/Support/LinkToDefaultDomain.Completer.cs create mode 100644 src/Cdn/generated/api/Support/LinkToDefaultDomain.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/LinkToDefaultDomain.cs create mode 100644 src/Cdn/generated/api/Support/LogMetric.Completer.cs create mode 100644 src/Cdn/generated/api/Support/LogMetric.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/LogMetric.cs create mode 100644 src/Cdn/generated/api/Support/LogMetricsGranularity.Completer.cs create mode 100644 src/Cdn/generated/api/Support/LogMetricsGranularity.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/LogMetricsGranularity.cs create mode 100644 src/Cdn/generated/api/Support/LogMetricsGroupBy.Completer.cs create mode 100644 src/Cdn/generated/api/Support/LogMetricsGroupBy.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/LogMetricsGroupBy.cs create mode 100644 src/Cdn/generated/api/Support/LogRanking.Completer.cs create mode 100644 src/Cdn/generated/api/Support/LogRanking.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/LogRanking.cs create mode 100644 src/Cdn/generated/api/Support/LogRankingMetric.Completer.cs create mode 100644 src/Cdn/generated/api/Support/LogRankingMetric.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/LogRankingMetric.cs create mode 100644 src/Cdn/generated/api/Support/MatchProcessingBehavior.Completer.cs create mode 100644 src/Cdn/generated/api/Support/MatchProcessingBehavior.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/MatchProcessingBehavior.cs create mode 100644 src/Cdn/generated/api/Support/MatchVariable.Completer.cs create mode 100644 src/Cdn/generated/api/Support/MatchVariable.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/MatchVariable.cs create mode 100644 src/Cdn/generated/api/Support/MinimumTlsVersion.Completer.cs create mode 100644 src/Cdn/generated/api/Support/MinimumTlsVersion.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/MinimumTlsVersion.cs create mode 100644 src/Cdn/generated/api/Support/OptimizationType.Completer.cs create mode 100644 src/Cdn/generated/api/Support/OptimizationType.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/OptimizationType.cs create mode 100644 src/Cdn/generated/api/Support/OriginGroupResourceState.Completer.cs create mode 100644 src/Cdn/generated/api/Support/OriginGroupResourceState.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/OriginGroupResourceState.cs create mode 100644 src/Cdn/generated/api/Support/OriginResourceState.Completer.cs create mode 100644 src/Cdn/generated/api/Support/OriginResourceState.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/OriginResourceState.cs create mode 100644 src/Cdn/generated/api/Support/ParamIndicator.Completer.cs create mode 100644 src/Cdn/generated/api/Support/ParamIndicator.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/ParamIndicator.cs create mode 100644 src/Cdn/generated/api/Support/PostArgsOperator.Completer.cs create mode 100644 src/Cdn/generated/api/Support/PostArgsOperator.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/PostArgsOperator.cs create mode 100644 src/Cdn/generated/api/Support/PrivateEndpointStatus.Completer.cs create mode 100644 src/Cdn/generated/api/Support/PrivateEndpointStatus.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/PrivateEndpointStatus.cs create mode 100644 src/Cdn/generated/api/Support/ProbeProtocol.Completer.cs create mode 100644 src/Cdn/generated/api/Support/ProbeProtocol.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/ProbeProtocol.cs create mode 100644 src/Cdn/generated/api/Support/ProfileResourceState.Completer.cs create mode 100644 src/Cdn/generated/api/Support/ProfileResourceState.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/ProfileResourceState.cs create mode 100644 src/Cdn/generated/api/Support/ProtocolType.Completer.cs create mode 100644 src/Cdn/generated/api/Support/ProtocolType.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/ProtocolType.cs create mode 100644 src/Cdn/generated/api/Support/QueryStringBehavior.Completer.cs create mode 100644 src/Cdn/generated/api/Support/QueryStringBehavior.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/QueryStringBehavior.cs create mode 100644 src/Cdn/generated/api/Support/QueryStringCachingBehavior.Completer.cs create mode 100644 src/Cdn/generated/api/Support/QueryStringCachingBehavior.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/QueryStringCachingBehavior.cs create mode 100644 src/Cdn/generated/api/Support/QueryStringOperator.Completer.cs create mode 100644 src/Cdn/generated/api/Support/QueryStringOperator.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/QueryStringOperator.cs create mode 100644 src/Cdn/generated/api/Support/RedirectType.Completer.cs create mode 100644 src/Cdn/generated/api/Support/RedirectType.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/RedirectType.cs create mode 100644 src/Cdn/generated/api/Support/RemoteAddressOperator.Completer.cs create mode 100644 src/Cdn/generated/api/Support/RemoteAddressOperator.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/RemoteAddressOperator.cs create mode 100644 src/Cdn/generated/api/Support/RequestBodyOperator.Completer.cs create mode 100644 src/Cdn/generated/api/Support/RequestBodyOperator.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/RequestBodyOperator.cs create mode 100644 src/Cdn/generated/api/Support/RequestHeaderOperator.Completer.cs create mode 100644 src/Cdn/generated/api/Support/RequestHeaderOperator.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/RequestHeaderOperator.cs create mode 100644 src/Cdn/generated/api/Support/RequestUriOperator.Completer.cs create mode 100644 src/Cdn/generated/api/Support/RequestUriOperator.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/RequestUriOperator.cs create mode 100644 src/Cdn/generated/api/Support/ResourceType.Completer.cs create mode 100644 src/Cdn/generated/api/Support/ResourceType.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/ResourceType.cs create mode 100644 src/Cdn/generated/api/Support/ResponseBasedDetectedErrorTypes.Completer.cs create mode 100644 src/Cdn/generated/api/Support/ResponseBasedDetectedErrorTypes.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/ResponseBasedDetectedErrorTypes.cs create mode 100644 src/Cdn/generated/api/Support/RuleCacheBehavior.Completer.cs create mode 100644 src/Cdn/generated/api/Support/RuleCacheBehavior.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/RuleCacheBehavior.cs create mode 100644 src/Cdn/generated/api/Support/RuleIsCompressionEnabled.Completer.cs create mode 100644 src/Cdn/generated/api/Support/RuleIsCompressionEnabled.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/RuleIsCompressionEnabled.cs create mode 100644 src/Cdn/generated/api/Support/RuleQueryStringCachingBehavior.Completer.cs create mode 100644 src/Cdn/generated/api/Support/RuleQueryStringCachingBehavior.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/RuleQueryStringCachingBehavior.cs create mode 100644 src/Cdn/generated/api/Support/SecretType.Completer.cs create mode 100644 src/Cdn/generated/api/Support/SecretType.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/SecretType.cs create mode 100644 src/Cdn/generated/api/Support/ServerPortOperator.Completer.cs create mode 100644 src/Cdn/generated/api/Support/ServerPortOperator.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/ServerPortOperator.cs create mode 100644 src/Cdn/generated/api/Support/SharedPrivateLinkResourceStatus.Completer.cs create mode 100644 src/Cdn/generated/api/Support/SharedPrivateLinkResourceStatus.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/SharedPrivateLinkResourceStatus.cs create mode 100644 src/Cdn/generated/api/Support/SkuName.Completer.cs create mode 100644 src/Cdn/generated/api/Support/SkuName.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/SkuName.cs create mode 100644 src/Cdn/generated/api/Support/SocketAddrOperator.Completer.cs create mode 100644 src/Cdn/generated/api/Support/SocketAddrOperator.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/SocketAddrOperator.cs create mode 100644 src/Cdn/generated/api/Support/SslProtocol.Completer.cs create mode 100644 src/Cdn/generated/api/Support/SslProtocol.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/SslProtocol.cs create mode 100644 src/Cdn/generated/api/Support/Status.Completer.cs create mode 100644 src/Cdn/generated/api/Support/Status.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/Status.cs create mode 100644 src/Cdn/generated/api/Support/Transform.Completer.cs create mode 100644 src/Cdn/generated/api/Support/Transform.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/Transform.cs create mode 100644 src/Cdn/generated/api/Support/UrlFileExtensionOperator.Completer.cs create mode 100644 src/Cdn/generated/api/Support/UrlFileExtensionOperator.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/UrlFileExtensionOperator.cs create mode 100644 src/Cdn/generated/api/Support/UrlFileNameOperator.Completer.cs create mode 100644 src/Cdn/generated/api/Support/UrlFileNameOperator.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/UrlFileNameOperator.cs create mode 100644 src/Cdn/generated/api/Support/UrlPathOperator.Completer.cs create mode 100644 src/Cdn/generated/api/Support/UrlPathOperator.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/UrlPathOperator.cs create mode 100644 src/Cdn/generated/api/Support/WafAction.Completer.cs create mode 100644 src/Cdn/generated/api/Support/WafAction.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/WafAction.cs create mode 100644 src/Cdn/generated/api/Support/WafGranularity.Completer.cs create mode 100644 src/Cdn/generated/api/Support/WafGranularity.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/WafGranularity.cs create mode 100644 src/Cdn/generated/api/Support/WafMetric.Completer.cs create mode 100644 src/Cdn/generated/api/Support/WafMetric.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/WafMetric.cs create mode 100644 src/Cdn/generated/api/Support/WafRankingGroupBy.Completer.cs create mode 100644 src/Cdn/generated/api/Support/WafRankingGroupBy.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/WafRankingGroupBy.cs create mode 100644 src/Cdn/generated/api/Support/WafRankingType.Completer.cs create mode 100644 src/Cdn/generated/api/Support/WafRankingType.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/WafRankingType.cs create mode 100644 src/Cdn/generated/api/Support/WafRuleType.Completer.cs create mode 100644 src/Cdn/generated/api/Support/WafRuleType.TypeConverter.cs create mode 100644 src/Cdn/generated/api/Support/WafRuleType.cs create mode 100644 src/Cdn/generated/cmdlets/ClearAzCdnEndpointContent_Purge1.cs create mode 100644 src/Cdn/generated/cmdlets/ClearAzCdnEndpointContent_PurgeExpanded1.cs create mode 100644 src/Cdn/generated/cmdlets/ClearAzCdnEndpointContent_PurgeViaIdentity1.cs create mode 100644 src/Cdn/generated/cmdlets/ClearAzCdnEndpointContent_PurgeViaIdentityExpanded1.cs create mode 100644 src/Cdn/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_Purge.cs create mode 100644 src/Cdn/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentityExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/DisableAzCdnCustomDomainCustomHttps_Disable.cs create mode 100644 src/Cdn/generated/cmdlets/DisableAzCdnCustomDomainCustomHttps_DisableViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/EnableAzCdnCustomDomainCustomHttps_Enable.cs create mode 100644 src/Cdn/generated/cmdlets/EnableAzCdnCustomDomainCustomHttps_EnableViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnCustomDomain_Get1.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnCustomDomain_GetViaIdentity1.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnCustomDomain_List1.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnEdgeNode_List.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnEndpointResourceUsage_List1.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnEndpoint_Get1.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnEndpoint_GetViaIdentity1.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnEndpoint_List1.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticLocation_Get.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticLocation_GetViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticMetric_Get.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticMetric_GetViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticRanking_Get.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticRanking_GetViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticResource_Get.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticResource_GetViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticMetric_Get.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticMetric_GetViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticRanking_Get.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticRanking_GetViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnOperation_List.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnOriginGroup_Get1.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnOriginGroup_GetViaIdentity1.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnOriginGroup_List1.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnOrigin_Get1.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnOrigin_GetViaIdentity1.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnOrigin_List1.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnProfileResourceUsage_List1.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnProfileSupportedOptimizationType_List.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnProfile_Get.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnProfile_GetViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnProfile_List.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnProfile_List1.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzCdnSubscriptionResourceUsage_List.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_Get.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_GetViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_List.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnEndpointResourceUsage_List.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnEndpoint_Get.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnEndpoint_GetViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnEndpoint_List.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOriginGroupResourceUsage_List.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_Get.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_GetViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_List.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOrigin_Get.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOrigin_GetViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOrigin_List.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnProfileResourceUsage_List.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRoute_Get.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRoute_GetViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRoute_List.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRuleSetResourceUsage_List.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRuleSet_Get.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRuleSet_GetViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRuleSet_List.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRule_Get.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRule_GetViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRule_List.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecret_Get.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecret_GetViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecret_List.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_Get.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_GetViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_List.cs create mode 100644 src/Cdn/generated/cmdlets/ImportAzCdnEndpointContent_Load.cs create mode 100644 src/Cdn/generated/cmdlets/ImportAzCdnEndpointContent_LoadExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/ImportAzCdnEndpointContent_LoadViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/ImportAzCdnEndpointContent_LoadViaIdentityExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/InvokeAzCdnSecretValidate_Secret.cs create mode 100644 src/Cdn/generated/cmdlets/InvokeAzCdnSecretValidate_SecretExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/InvokeAzCdnSecretValidate_SecretViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/InvokeAzCdnSecretValidate_SecretViaIdentityExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/NewAzCdnCustomDomain_CreateExpanded1.cs create mode 100644 src/Cdn/generated/cmdlets/NewAzCdnEndpoint_CreateExpanded1.cs create mode 100644 src/Cdn/generated/cmdlets/NewAzCdnOriginGroup_CreateExpanded1.cs create mode 100644 src/Cdn/generated/cmdlets/NewAzCdnOrigin_CreateExpanded1.cs create mode 100644 src/Cdn/generated/cmdlets/NewAzCdnProfileSsoUri_Generate.cs create mode 100644 src/Cdn/generated/cmdlets/NewAzCdnProfileSsoUri_GenerateViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/NewAzCdnProfile_CreateExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/NewAzFrontDoorCdnCustomDomain_CreateExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/NewAzFrontDoorCdnEndpoint_CreateExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/NewAzFrontDoorCdnOriginGroup_CreateExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/NewAzFrontDoorCdnOrigin_CreateExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/NewAzFrontDoorCdnRoute_CreateExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/NewAzFrontDoorCdnRuleSet_Create.cs create mode 100644 src/Cdn/generated/cmdlets/NewAzFrontDoorCdnRule_CreateExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/NewAzFrontDoorCdnSecret_CreateExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/NewAzFrontDoorCdnSecurityPolicy_CreateExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzCdnCustomDomain_Delete1.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzCdnCustomDomain_DeleteViaIdentity1.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzCdnEndpoint_Delete1.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzCdnEndpoint_DeleteViaIdentity1.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzCdnOriginGroup_Delete1.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzCdnOriginGroup_DeleteViaIdentity1.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzCdnOrigin_Delete1.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzCdnOrigin_DeleteViaIdentity1.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzCdnProfile_Delete.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzCdnProfile_DeleteViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnCustomDomain_Delete.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnCustomDomain_DeleteViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnEndpoint_Delete.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnEndpoint_DeleteViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnOriginGroup_Delete.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnOriginGroup_DeleteViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnOrigin_Delete.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnOrigin_DeleteViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRoute_Delete.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRoute_DeleteViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRuleSet_Delete.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRuleSet_DeleteViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRule_Delete.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRule_DeleteViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnSecret_Delete.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnSecret_DeleteViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnSecurityPolicy_Delete.cs create mode 100644 src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnSecurityPolicy_DeleteViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/StartAzCdnEndpoint_Start.cs create mode 100644 src/Cdn/generated/cmdlets/StartAzCdnEndpoint_StartViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/StopAzCdnEndpoint_Stop.cs create mode 100644 src/Cdn/generated/cmdlets/StopAzCdnEndpoint_StopViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/TestAzCdnEndpointCustomDomain_ValidateExpanded1.cs create mode 100644 src/Cdn/generated/cmdlets/TestAzCdnEndpointCustomDomain_ValidateViaIdentityExpanded1.cs create mode 100644 src/Cdn/generated/cmdlets/TestAzCdnNameAvailability_CheckExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/TestAzCdnNameAvailability_CheckExpanded1.cs create mode 100644 src/Cdn/generated/cmdlets/TestAzCdnProbe_ValidateExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/TestAzFrontDoorCdnEndpointCustomDomain_ValidateExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/TestAzFrontDoorCdnEndpointCustomDomain_ValidateViaIdentityExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/TestAzFrontDoorCdnEndpointNameAvailability_CheckExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/TestAzFrontDoorCdnProfileHostNameAvailability_CheckExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/TestAzFrontDoorCdnProfileHostNameAvailability_CheckViaIdentityExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzCdnEndpoint_UpdateExpanded1.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzCdnEndpoint_UpdateViaIdentityExpanded1.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzCdnOriginGroup_UpdateExpanded1.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzCdnOriginGroup_UpdateViaIdentityExpanded1.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzCdnOrigin_UpdateExpanded1.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzCdnOrigin_UpdateViaIdentityExpanded1.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzCdnProfile_UpdateExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzCdnProfile_UpdateViaIdentityExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomainValidationToken_Refresh.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomainValidationToken_RefreshViaIdentity.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomain_UpdateExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomain_UpdateViaIdentityExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnEndpoint_UpdateExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnEndpoint_UpdateViaIdentityExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnOriginGroup_UpdateExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnOriginGroup_UpdateViaIdentityExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnOrigin_UpdateExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnOrigin_UpdateViaIdentityExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnRoute_UpdateExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnRoute_UpdateViaIdentityExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnRule_UpdateExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnRule_UpdateViaIdentityExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnSecurityPolicy_PatchExpanded.cs create mode 100644 src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnSecurityPolicy_PatchViaIdentityExpanded.cs create mode 100644 src/Cdn/generated/runtime/AsyncCommandRuntime.cs create mode 100644 src/Cdn/generated/runtime/AsyncJob.cs create mode 100644 src/Cdn/generated/runtime/AsyncOperationResponse.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/CollectionExtensions.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/MarkdownRenderer.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/Models/PsFormatTypes.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/Models/PsHelpTypes.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/Models/PsProxyOutputs.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/Models/PsProxyTypes.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/PsAttributes.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/PsExtensions.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/PsHelpers.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/StringExtensions.cs create mode 100644 src/Cdn/generated/runtime/BuildTime/XmlExtensions.cs create mode 100644 src/Cdn/generated/runtime/CmdInfoHandler.cs create mode 100644 src/Cdn/generated/runtime/Conversions/ConversionException.cs create mode 100644 src/Cdn/generated/runtime/Conversions/IJsonConverter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/BinaryConverter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/BooleanConverter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/DateTimeConverter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/DecimalConverter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/DoubleConverter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/EnumConverter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/GuidConverter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/HashSet'1Converter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/Int16Converter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/Int32Converter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/Int64Converter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/JsonArrayConverter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/JsonObjectConverter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/SingleConverter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/StringConverter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/TimeSpanConverter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/UInt16Converter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/UInt32Converter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/UInt64Converter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/Instances/UriConverter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/JsonConverter.cs create mode 100644 src/Cdn/generated/runtime/Conversions/JsonConverterAttribute.cs create mode 100644 src/Cdn/generated/runtime/Conversions/JsonConverterFactory.cs create mode 100644 src/Cdn/generated/runtime/Conversions/StringLikeConverter.cs create mode 100644 src/Cdn/generated/runtime/Customizations/IJsonSerializable.cs create mode 100644 src/Cdn/generated/runtime/Customizations/JsonArray.cs create mode 100644 src/Cdn/generated/runtime/Customizations/JsonBoolean.cs create mode 100644 src/Cdn/generated/runtime/Customizations/JsonNode.cs create mode 100644 src/Cdn/generated/runtime/Customizations/JsonNumber.cs create mode 100644 src/Cdn/generated/runtime/Customizations/JsonObject.cs create mode 100644 src/Cdn/generated/runtime/Customizations/JsonString.cs create mode 100644 src/Cdn/generated/runtime/Customizations/XNodeArray.cs create mode 100644 src/Cdn/generated/runtime/Debugging.cs create mode 100644 src/Cdn/generated/runtime/DictionaryExtensions.cs create mode 100644 src/Cdn/generated/runtime/EventData.cs create mode 100644 src/Cdn/generated/runtime/EventDataExtensions.cs create mode 100644 src/Cdn/generated/runtime/EventListener.cs create mode 100644 src/Cdn/generated/runtime/Events.cs create mode 100644 src/Cdn/generated/runtime/EventsExtensions.cs create mode 100644 src/Cdn/generated/runtime/Extensions.cs create mode 100644 src/Cdn/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs create mode 100644 src/Cdn/generated/runtime/Helpers/Extensions/TypeExtensions.cs create mode 100644 src/Cdn/generated/runtime/Helpers/Seperator.cs create mode 100644 src/Cdn/generated/runtime/Helpers/TypeDetails.cs create mode 100644 src/Cdn/generated/runtime/Helpers/XHelper.cs create mode 100644 src/Cdn/generated/runtime/HttpPipeline.cs create mode 100644 src/Cdn/generated/runtime/HttpPipelineMocking.ps1 create mode 100644 src/Cdn/generated/runtime/IAssociativeArray.cs create mode 100644 src/Cdn/generated/runtime/IHeaderSerializable.cs create mode 100644 src/Cdn/generated/runtime/ISendAsync.cs create mode 100644 src/Cdn/generated/runtime/InfoAttribute.cs create mode 100644 src/Cdn/generated/runtime/Iso/IsoDate.cs create mode 100644 src/Cdn/generated/runtime/JsonType.cs create mode 100644 src/Cdn/generated/runtime/MessageAttribute.cs create mode 100644 src/Cdn/generated/runtime/MessageAttributeHelper.cs create mode 100644 src/Cdn/generated/runtime/Method.cs create mode 100644 src/Cdn/generated/runtime/Models/JsonMember.cs create mode 100644 src/Cdn/generated/runtime/Models/JsonModel.cs create mode 100644 src/Cdn/generated/runtime/Models/JsonModelCache.cs create mode 100644 src/Cdn/generated/runtime/Nodes/Collections/JsonArray.cs create mode 100644 src/Cdn/generated/runtime/Nodes/Collections/XImmutableArray.cs create mode 100644 src/Cdn/generated/runtime/Nodes/Collections/XList.cs create mode 100644 src/Cdn/generated/runtime/Nodes/Collections/XNodeArray.cs create mode 100644 src/Cdn/generated/runtime/Nodes/Collections/XSet.cs create mode 100644 src/Cdn/generated/runtime/Nodes/JsonBoolean.cs create mode 100644 src/Cdn/generated/runtime/Nodes/JsonDate.cs create mode 100644 src/Cdn/generated/runtime/Nodes/JsonNode.cs create mode 100644 src/Cdn/generated/runtime/Nodes/JsonNumber.cs create mode 100644 src/Cdn/generated/runtime/Nodes/JsonObject.cs create mode 100644 src/Cdn/generated/runtime/Nodes/JsonString.cs create mode 100644 src/Cdn/generated/runtime/Nodes/XBinary.cs create mode 100644 src/Cdn/generated/runtime/Nodes/XNull.cs create mode 100644 src/Cdn/generated/runtime/Parser/Exceptions/ParseException.cs create mode 100644 src/Cdn/generated/runtime/Parser/JsonParser.cs create mode 100644 src/Cdn/generated/runtime/Parser/JsonToken.cs create mode 100644 src/Cdn/generated/runtime/Parser/JsonTokenizer.cs create mode 100644 src/Cdn/generated/runtime/Parser/Location.cs create mode 100644 src/Cdn/generated/runtime/Parser/Readers/SourceReader.cs create mode 100644 src/Cdn/generated/runtime/Parser/TokenReader.cs create mode 100644 src/Cdn/generated/runtime/PipelineMocking.cs create mode 100644 src/Cdn/generated/runtime/Properties/Resources.Designer.cs create mode 100644 src/Cdn/generated/runtime/Properties/Resources.resx create mode 100644 src/Cdn/generated/runtime/Response.cs create mode 100644 src/Cdn/generated/runtime/Serialization/JsonSerializer.cs create mode 100644 src/Cdn/generated/runtime/Serialization/PropertyTransformation.cs create mode 100644 src/Cdn/generated/runtime/Serialization/SerializationOptions.cs create mode 100644 src/Cdn/generated/runtime/SerializationMode.cs create mode 100644 src/Cdn/generated/runtime/TypeConverterExtensions.cs create mode 100644 src/Cdn/generated/runtime/UndeclaredResponseException.cs create mode 100644 src/Cdn/generated/runtime/Writers/JsonWriter.cs create mode 100644 src/Cdn/generated/runtime/delegates.cs create mode 100644 src/Cdn/help/Az.Cdn.md create mode 100644 src/Cdn/help/Clear-AzCdnEndpointContent.md create mode 100644 src/Cdn/help/Clear-AzFrontDoorCdnEndpointContent.md create mode 100644 src/Cdn/help/Disable-AzCdnCustomDomainCustomHttps.md create mode 100644 src/Cdn/help/Enable-AzCdnCustomDomainCustomHttps.md create mode 100644 src/Cdn/help/Get-AzCdnCustomDomain.md create mode 100644 src/Cdn/help/Get-AzCdnEdgeNode.md create mode 100644 src/Cdn/help/Get-AzCdnEndpoint.md create mode 100644 src/Cdn/help/Get-AzCdnEndpointResourceUsage.md create mode 100644 src/Cdn/help/Get-AzCdnOrigin.md create mode 100644 src/Cdn/help/Get-AzCdnOriginGroup.md create mode 100644 src/Cdn/help/Get-AzCdnProfile.md create mode 100644 src/Cdn/help/Get-AzCdnProfileResourceUsage.md create mode 100644 src/Cdn/help/Get-AzCdnProfileSupportedOptimizationType.md create mode 100644 src/Cdn/help/Get-AzCdnSubscriptionResourceUsage.md create mode 100644 src/Cdn/help/Get-AzFrontDoorCdnCustomDomain.md create mode 100644 src/Cdn/help/Get-AzFrontDoorCdnEndpoint.md create mode 100644 src/Cdn/help/Get-AzFrontDoorCdnEndpointResourceUsage.md create mode 100644 src/Cdn/help/Get-AzFrontDoorCdnOrigin.md create mode 100644 src/Cdn/help/Get-AzFrontDoorCdnOriginGroup.md create mode 100644 src/Cdn/help/Get-AzFrontDoorCdnOriginGroupResourceUsage.md create mode 100644 src/Cdn/help/Get-AzFrontDoorCdnProfile.md create mode 100644 src/Cdn/help/Get-AzFrontDoorCdnProfileResourceUsage.md create mode 100644 src/Cdn/help/Get-AzFrontDoorCdnRoute.md create mode 100644 src/Cdn/help/Get-AzFrontDoorCdnRule.md create mode 100644 src/Cdn/help/Get-AzFrontDoorCdnRuleSet.md create mode 100644 src/Cdn/help/Get-AzFrontDoorCdnRuleSetResourceUsage.md create mode 100644 src/Cdn/help/Get-AzFrontDoorCdnSecret.md create mode 100644 src/Cdn/help/Get-AzFrontDoorCdnSecurityPolicy.md create mode 100644 src/Cdn/help/Import-AzCdnEndpointContent.md create mode 100644 src/Cdn/help/New-AzCdnCustomDomain.md create mode 100644 src/Cdn/help/New-AzCdnDeliveryRuleCookiesConditionObject.md create mode 100644 src/Cdn/help/New-AzCdnDeliveryRuleHttpVersionConditionObject.md create mode 100644 src/Cdn/help/New-AzCdnDeliveryRuleIsDeviceConditionObject.md create mode 100644 src/Cdn/help/New-AzCdnDeliveryRuleObject.md create mode 100644 src/Cdn/help/New-AzCdnDeliveryRulePostArgsConditionObject.md create mode 100644 src/Cdn/help/New-AzCdnDeliveryRuleQueryStringConditionObject.md create mode 100644 src/Cdn/help/New-AzCdnDeliveryRuleRemoteAddressConditionObject.md create mode 100644 src/Cdn/help/New-AzCdnDeliveryRuleRequestBodyConditionObject.md create mode 100644 src/Cdn/help/New-AzCdnDeliveryRuleRequestHeaderActionObject.md create mode 100644 src/Cdn/help/New-AzCdnDeliveryRuleRequestHeaderConditionObject.md create mode 100644 src/Cdn/help/New-AzCdnDeliveryRuleRequestMethodConditionObject.md create mode 100644 src/Cdn/help/New-AzCdnDeliveryRuleRequestSchemeConditionObject.md create mode 100644 src/Cdn/help/New-AzCdnDeliveryRuleRequestUriConditionObject.md create mode 100644 src/Cdn/help/New-AzCdnDeliveryRuleResponseHeaderActionObject.md create mode 100644 src/Cdn/help/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.md create mode 100644 src/Cdn/help/New-AzCdnDeliveryRuleUrlFileNameConditionObject.md create mode 100644 src/Cdn/help/New-AzCdnDeliveryRuleUrlPathConditionObject.md create mode 100644 src/Cdn/help/New-AzCdnEndpoint.md create mode 100644 src/Cdn/help/New-AzCdnHealthProbeParametersObject.md create mode 100644 src/Cdn/help/New-AzCdnManagedHttpsParametersObject.md create mode 100644 src/Cdn/help/New-AzCdnOrigin.md create mode 100644 src/Cdn/help/New-AzCdnOriginGroup.md create mode 100644 src/Cdn/help/New-AzCdnProfile.md create mode 100644 src/Cdn/help/New-AzCdnResourceReferenceObject.md create mode 100644 src/Cdn/help/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.md create mode 100644 src/Cdn/help/New-AzCdnUrlRedirectActionObject.md create mode 100644 src/Cdn/help/New-AzCdnUrlRewriteActionObject.md create mode 100644 src/Cdn/help/New-AzCdnUrlSigningActionObject.md create mode 100644 src/Cdn/help/New-AzCdnUserManagedHttpsParametersObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnCustomDomain.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnEndpoint.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnOrigin.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnOriginGroup.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnProfile.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnResourceReferenceObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRoute.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRule.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleClientPortConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleCookiesConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleHostNameConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleHttpVersionConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleIsDeviceConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRulePostArgsConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleQueryStringConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleRequestBodyConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleRequestHeaderActionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleRequestMethodConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleRequestUriConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleResponseHeaderActionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleServerPortConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleSet.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleSocketAddrConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleSslProtocolConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleUrlPathConditionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleUrlRedirectActionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleUrlRewriteActionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnRuleUrlSigningActionObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnSecret.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnSecurityPolicy.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.md create mode 100644 src/Cdn/help/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.md create mode 100644 src/Cdn/help/Remove-AzCdnCustomDomain.md create mode 100644 src/Cdn/help/Remove-AzCdnEndpoint.md create mode 100644 src/Cdn/help/Remove-AzCdnOrigin.md create mode 100644 src/Cdn/help/Remove-AzCdnOriginGroup.md create mode 100644 src/Cdn/help/Remove-AzCdnProfile.md create mode 100644 src/Cdn/help/Remove-AzFrontDoorCdnCustomDomain.md create mode 100644 src/Cdn/help/Remove-AzFrontDoorCdnEndpoint.md create mode 100644 src/Cdn/help/Remove-AzFrontDoorCdnOrigin.md create mode 100644 src/Cdn/help/Remove-AzFrontDoorCdnOriginGroup.md create mode 100644 src/Cdn/help/Remove-AzFrontDoorCdnProfile.md create mode 100644 src/Cdn/help/Remove-AzFrontDoorCdnRoute.md create mode 100644 src/Cdn/help/Remove-AzFrontDoorCdnRule.md create mode 100644 src/Cdn/help/Remove-AzFrontDoorCdnRuleSet.md create mode 100644 src/Cdn/help/Remove-AzFrontDoorCdnSecret.md create mode 100644 src/Cdn/help/Remove-AzFrontDoorCdnSecurityPolicy.md create mode 100644 src/Cdn/help/Start-AzCdnEndpoint.md create mode 100644 src/Cdn/help/Stop-AzCdnEndpoint.md create mode 100644 src/Cdn/help/Test-AzCdnEndpointCustomDomain.md create mode 100644 src/Cdn/help/Test-AzCdnNameAvailability.md create mode 100644 src/Cdn/help/Test-AzCdnProbe.md create mode 100644 src/Cdn/help/Test-AzFrontDoorCdnEndpointCustomDomain.md create mode 100644 src/Cdn/help/Test-AzFrontDoorCdnEndpointNameAvailability.md create mode 100644 src/Cdn/help/Test-AzFrontDoorCdnProfileHostNameAvailability.md create mode 100644 src/Cdn/help/Update-AzCdnEndpoint.md create mode 100644 src/Cdn/help/Update-AzCdnOrigin.md create mode 100644 src/Cdn/help/Update-AzCdnOriginGroup.md create mode 100644 src/Cdn/help/Update-AzCdnProfile.md create mode 100644 src/Cdn/help/Update-AzFrontDoorCdnCustomDomain.md create mode 100644 src/Cdn/help/Update-AzFrontDoorCdnCustomDomainValidationToken.md create mode 100644 src/Cdn/help/Update-AzFrontDoorCdnEndpoint.md create mode 100644 src/Cdn/help/Update-AzFrontDoorCdnOrigin.md create mode 100644 src/Cdn/help/Update-AzFrontDoorCdnOriginGroup.md create mode 100644 src/Cdn/help/Update-AzFrontDoorCdnProfile.md create mode 100644 src/Cdn/help/Update-AzFrontDoorCdnRoute.md create mode 100644 src/Cdn/help/Update-AzFrontDoorCdnRule.md create mode 100644 src/Cdn/help/Update-AzFrontDoorCdnSecurityPolicy.md create mode 100644 src/Cdn/how-to.md create mode 100644 src/Cdn/internal/Az.Cdn.internal.psm1 create mode 100644 src/Cdn/internal/Get-AzCdnLogAnalyticLocation.ps1 create mode 100644 src/Cdn/internal/Get-AzCdnLogAnalyticMetric.ps1 create mode 100644 src/Cdn/internal/Get-AzCdnLogAnalyticRanking.ps1 create mode 100644 src/Cdn/internal/Get-AzCdnLogAnalyticResource.ps1 create mode 100644 src/Cdn/internal/Get-AzCdnLogAnalyticWafLogAnalyticMetric.ps1 create mode 100644 src/Cdn/internal/Get-AzCdnLogAnalyticWafLogAnalyticRanking.ps1 create mode 100644 src/Cdn/internal/Get-AzCdnOperation.ps1 create mode 100644 src/Cdn/internal/Get-AzCdnProfile.ps1 create mode 100644 src/Cdn/internal/Invoke-AzCdnSecretValidate.ps1 create mode 100644 src/Cdn/internal/New-AzCdnProfile.ps1 create mode 100644 src/Cdn/internal/New-AzCdnProfileSsoUri.ps1 create mode 100644 src/Cdn/internal/ProxyCmdletDefinitions.ps1 create mode 100644 src/Cdn/internal/README.md create mode 100644 src/Cdn/internal/Remove-AzCdnProfile.ps1 create mode 100644 src/Cdn/internal/Update-AzCdnProfile.ps1 create mode 100644 src/Cdn/pack-module.ps1 create mode 100644 src/Cdn/run-module.ps1 create mode 100644 src/Cdn/test-module.ps1 create mode 100644 src/Cdn/test/Clear-AzCdnEndpointContent.Tests.ps1 create mode 100644 src/Cdn/test/Clear-AzFrontDoorCdnEndpointContent.Tests.ps1 create mode 100644 src/Cdn/test/Disable-AzCdnCustomDomainCustomHttps.Tests.ps1 create mode 100644 src/Cdn/test/Enable-AzCdnCustomDomainCustomHttps.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzCdnCustomDomain.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzCdnEdgeNode.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzCdnEndpoint.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzCdnEndpointResourceUsage.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzCdnOrigin.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzCdnOriginGroup.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzCdnProfile.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzCdnProfileResourceUsage.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzCdnProfileSupportedOptimizationType.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzCdnSubscriptionResourceUsage.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzFrontDoorCdnCustomDomain.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzFrontDoorCdnEndpoint.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzFrontDoorCdnEndpointResourceUsage.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzFrontDoorCdnOrigin.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzFrontDoorCdnOriginGroup.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzFrontDoorCdnOriginGroupResourceUsage.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzFrontDoorCdnProfile.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzFrontDoorCdnProfileResourceUsage.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzFrontDoorCdnRoute.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzFrontDoorCdnRule.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzFrontDoorCdnRuleSet.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzFrontDoorCdnRuleSetResourceUsage.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzFrontDoorCdnSecret.Tests.ps1 create mode 100644 src/Cdn/test/Get-AzFrontDoorCdnSecurityPolicy.Tests.ps1 create mode 100644 src/Cdn/test/Import-AzCdnEndpointContent.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnCustomDomain.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnDeliveryRuleCookiesConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnDeliveryRuleHttpVersionConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnDeliveryRuleIsDeviceConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnDeliveryRuleObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnDeliveryRulePostArgsConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnDeliveryRuleQueryStringConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnDeliveryRuleRemoteAddressConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnDeliveryRuleRequestBodyConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnDeliveryRuleRequestHeaderActionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnDeliveryRuleRequestHeaderConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnDeliveryRuleRequestMethodConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnDeliveryRuleRequestSchemeConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnDeliveryRuleRequestUriConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnDeliveryRuleResponseHeaderActionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnDeliveryRuleUrlFileNameConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnDeliveryRuleUrlPathConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnEndpoint.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnHealthProbeParametersObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnManagedHttpsParametersObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnOrigin.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnOriginGroup.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnProfile.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnResourceReferenceObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnUrlRedirectActionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnUrlRewriteActionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnUrlSigningActionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzCdnUserManagedHttpsParametersObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnCustomDomain.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnEndpoint.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnOrigin.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnOriginGroup.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnProfile.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnResourceReferenceObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRoute.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRule.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleClientPortConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleCookiesConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleHostNameConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleHttpVersionConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleIsDeviceConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRulePostArgsConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleQueryStringConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleRequestBodyConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleRequestHeaderActionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleRequestMethodConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleRequestUriConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleResponseHeaderActionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleServerPortConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleSet.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleSocketAddrConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleSslProtocolConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleUrlPathConditionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleUrlRedirectActionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleUrlRewriteActionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnRuleUrlSigningActionObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnSecret.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnSecurityPolicy.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.Tests.ps1 create mode 100644 src/Cdn/test/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.Tests.ps1 create mode 100644 src/Cdn/test/README.md create mode 100644 src/Cdn/test/Remove-AzCdnCustomDomain.Tests.ps1 create mode 100644 src/Cdn/test/Remove-AzCdnEndpoint.Tests.ps1 create mode 100644 src/Cdn/test/Remove-AzCdnOrigin.Tests.ps1 create mode 100644 src/Cdn/test/Remove-AzCdnOriginGroup.Tests.ps1 create mode 100644 src/Cdn/test/Remove-AzCdnProfile.Tests.ps1 create mode 100644 src/Cdn/test/Remove-AzFrontDoorCdnCustomDomain.Tests.ps1 create mode 100644 src/Cdn/test/Remove-AzFrontDoorCdnEndpoint.Tests.ps1 create mode 100644 src/Cdn/test/Remove-AzFrontDoorCdnOrigin.Tests.ps1 create mode 100644 src/Cdn/test/Remove-AzFrontDoorCdnOriginGroup.Tests.ps1 create mode 100644 src/Cdn/test/Remove-AzFrontDoorCdnProfile.Tests.ps1 create mode 100644 src/Cdn/test/Remove-AzFrontDoorCdnRoute.Tests.ps1 create mode 100644 src/Cdn/test/Remove-AzFrontDoorCdnRule.Tests.ps1 create mode 100644 src/Cdn/test/Remove-AzFrontDoorCdnRuleSet.Tests.ps1 create mode 100644 src/Cdn/test/Remove-AzFrontDoorCdnSecret.Tests.ps1 create mode 100644 src/Cdn/test/Remove-AzFrontDoorCdnSecurityPolicy.Tests.ps1 create mode 100644 src/Cdn/test/Start-AzCdnEndpoint.Tests.ps1 create mode 100644 src/Cdn/test/Stop-AzCdnEndpoint.Tests.ps1 create mode 100644 src/Cdn/test/Test-AzCdnEndpointCustomDomain.Tests.ps1 create mode 100644 src/Cdn/test/Test-AzCdnNameAvailability.Tests.ps1 create mode 100644 src/Cdn/test/Test-AzCdnProbe.Tests.ps1 create mode 100644 src/Cdn/test/Test-AzFrontDoorCdnEndpointCustomDomain.Tests.ps1 create mode 100644 src/Cdn/test/Test-AzFrontDoorCdnEndpointNameAvailability.Tests.ps1 create mode 100644 src/Cdn/test/Test-AzFrontDoorCdnProfileHostNameAvailability.Tests.ps1 create mode 100644 src/Cdn/test/Update-AzCdnEndpoint.Tests.ps1 create mode 100644 src/Cdn/test/Update-AzCdnOrigin.Tests.ps1 create mode 100644 src/Cdn/test/Update-AzCdnOriginGroup.Tests.ps1 create mode 100644 src/Cdn/test/Update-AzCdnProfile.Tests.ps1 create mode 100644 src/Cdn/test/Update-AzFrontDoorCdnCustomDomain.Tests.ps1 create mode 100644 src/Cdn/test/Update-AzFrontDoorCdnCustomDomainValidationToken.Tests.ps1 create mode 100644 src/Cdn/test/Update-AzFrontDoorCdnEndpoint.Tests.ps1 create mode 100644 src/Cdn/test/Update-AzFrontDoorCdnOrigin.Tests.ps1 create mode 100644 src/Cdn/test/Update-AzFrontDoorCdnOriginGroup.Tests.ps1 create mode 100644 src/Cdn/test/Update-AzFrontDoorCdnProfile.Tests.ps1 create mode 100644 src/Cdn/test/Update-AzFrontDoorCdnRoute.Tests.ps1 create mode 100644 src/Cdn/test/Update-AzFrontDoorCdnRule.Tests.ps1 create mode 100644 src/Cdn/test/Update-AzFrontDoorCdnSecurityPolicy.Tests.ps1 create mode 100644 src/Cdn/test/env.json create mode 100644 src/Cdn/test/loadEnv.ps1 create mode 100644 src/Cdn/test/localEnv.json create mode 100644 src/Cdn/test/utils.ps1 create mode 100644 src/Cdn/utils/Unprotect-SecureString.ps1 diff --git a/src/Cdn/Az.Cdn.csproj b/src/Cdn/Az.Cdn.csproj new file mode 100644 index 000000000000..91c9b1f0e53e --- /dev/null +++ b/src/Cdn/Az.Cdn.csproj @@ -0,0 +1,7 @@ + + + Cdn + + + + diff --git a/src/Cdn/Az.Cdn.format.ps1xml b/src/Cdn/Az.Cdn.format.ps1xml new file mode 100644 index 000000000000..20e75bdf0718 --- /dev/null +++ b/src/Cdn/Az.Cdn.format.ps1xml @@ -0,0 +1,6973 @@ + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.CdnIdentity + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.CdnIdentity + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CustomDomainName + + + EndpointName + + + OriginGroupName + + + OriginName + + + ProfileName + + + ResourceGroupName + + + RouteName + + + RuleName + + + RuleSetName + + + SecretName + + + SecurityPolicyName + + + SubscriptionId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ActivatedResourceReference + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ActivatedResourceReference + + + + + + + + + + + + IsActive + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomain + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomain + + + + + + + + + + + + + + + Name + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainHttpsParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainHttpsParameters + + + + + + + + + + + + + + + CertificateType + + + MinimumTlsVersion + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainListResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AzureDnsZoneId + + + DeploymentStatus + + + PreValidatedCustomDomainResourceId + + + ProfileName + + + ProvisioningState + + + DomainValidationState + + + HostName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainUpdatePropertiesParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainUpdatePropertiesParameters + + + + + + + + + + + + ProfileName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpoint + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpoint + + + + + + + + + + + + + + + + + + Location + + + Name + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointListResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + DeploymentStatus + + + EnabledState + + + ProfileName + + + ProvisioningState + + + AutoGeneratedDomainNameLabelScope + + + HostName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointPropertiesUpdateParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointPropertiesUpdateParameters + + + + + + + + + + + + + + + EnabledState + + + ProfileName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointUpdateParametersTags + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointUpdateParametersTags + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOrigin + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOrigin + + + + + + + + + + + + + + + Name + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroup + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroup + + + + + + + + + + + + + + + Name + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupListResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupProperties + + + + + + + + + + + + + + + + + + + + + + + + DeploymentStatus + + + ProfileName + + + ProvisioningState + + + SessionAffinityState + + + TrafficRestorationTimeToHealedOrNewEndpointsInMinute + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupUpdatePropertiesParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupUpdatePropertiesParameters + + + + + + + + + + + + + + + + + + ProfileName + + + SessionAffinityState + + + TrafficRestorationTimeToHealedOrNewEndpointsInMinute + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginListResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AzureOriginId + + + DeploymentStatus + + + EnabledState + + + EnforceCertificateNameCheck + + + HostName + + + HttpPort + + + HttpsPort + + + OriginGroupName + + + OriginHostHeader + + + Priority + + + PrivateLinkId + + + ProvisioningState + + + SharedPrivateLinkResourceGroupId + + + SharedPrivateLinkResourcePrivateLinkLocation + + + SharedPrivateLinkResourceRequestMessage + + + SharedPrivateLinkResourceStatus + + + Weight + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginUpdatePropertiesParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginUpdatePropertiesParameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EnabledState + + + EnforceCertificateNameCheck + + + HostName + + + HttpPort + + + HttpsPort + + + OriginGroupName + + + OriginHostHeader + + + Priority + + + Weight + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdPurgeParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdPurgeParameters + + + + + + + + + + + + + + + ContentPath + + + Domain + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdRouteCacheConfiguration + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdRouteCacheConfiguration + + + + + + + + + + + + + + + QueryParameter + + + QueryStringCachingBehavior + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties + + + + + + + + + + + + + + + DeploymentStatus + + + ProvisioningState + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AzureFirstPartyManagedCertificate + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AzureFirstPartyManagedCertificate + + + + + + + + + + + + + + + ExpirationDate + + + Subject + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheConfiguration + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheConfiguration + + + + + + + + + + + + + + + + + + + + + + + + CacheBehavior + + + CacheDuration + + + IsCompressionEnabled + + + QueryParameter + + + QueryStringCachingBehavior + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheExpirationActionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheExpirationActionParameters + + + + + + + + + + + + + + + + + + + + + CacheBehavior + + + CacheDuration + + + CacheType + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheKeyQueryStringActionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheKeyQueryStringActionParameters + + + + + + + + + + + + + + + + + + QueryParameter + + + QueryStringBehavior + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CdnCertificateSourceParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CdnCertificateSourceParameters + + + + + + + + + + + + + + + CertificateType + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CdnManagedHttpsParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CdnManagedHttpsParameters + + + + + + + + + + + + + + + + + + CertificateSource + + + MinimumTlsVersion + + + ProtocolType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Certificate + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Certificate + + + + + + + + + + + + + + + ExpirationDate + + + Subject + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckEndpointNameAvailabilityInput + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckEndpointNameAvailabilityInput + + + + + + + + + + + + + + + AutoGeneratedDomainNameLabelScope + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckEndpointNameAvailabilityOutput + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckEndpointNameAvailabilityOutput + + + + + + + + + + + + + + + + + + + + + AvailableHostname + + + Message + + + NameAvailable + + + Reason + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckHostNameAvailabilityInput + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckHostNameAvailabilityInput + + + + + + + + + + + + HostName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckNameAvailabilityInput + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckNameAvailabilityInput + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckNameAvailabilityOutput + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckNameAvailabilityOutput + + + + + + + + + + + + + + + + + + Message + + + NameAvailable + + + Reason + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CidrIPAddress + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CidrIPAddress + + + + + + + + + + + + + + + BaseIPAddress + + + PrefixLength + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ClientPortMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ClientPortMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems + + + + + + + + + + + + + + + DateTime + + + Value + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems + + + + + + + + + + + + + + + DateTime + + + Value + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems + + + + + + + + + + + + + + + + + + Metric + + + Percentage + + + Value + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CompressionSettings + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CompressionSettings + + + + + + + + + + + + + + + ContentTypesToCompress + + + IsCompressionEnabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ContinentsResponseCountryOrRegionsItem + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ContinentsResponseCountryOrRegionsItem + + + + + + + + + + + + ContinentId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CookiesMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CookiesMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Selector + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomain + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomain + + + + + + + + + + + + + + + Name + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainHttpsParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainHttpsParameters + + + + + + + + + + + + + + + + + + CertificateSource + + + MinimumTlsVersion + + + ProtocolType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainListResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + CustomHttpsProvisioningState + + + CustomHttpsProvisioningSubstate + + + HostName + + + ProvisioningState + + + ResourceState + + + ValidationData + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainPropertiesParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainPropertiesParameters + + + + + + + + + + + + HostName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomerCertificate + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomerCertificate + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ExpirationDate + + + Subject + + + CertificateAuthority + + + SecretVersion + + + SubjectAlternativeName + + + Thumbprint + + + UseLatestVersion + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomerCertificateParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomerCertificateParameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CertificateAuthority + + + ExpirationDate + + + SecretVersion + + + Subject + + + SubjectAlternativeName + + + Thumbprint + + + UseLatestVersion + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOrigin + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOrigin + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginGroup + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginGroup + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginGroupProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginGroupProperties + + + + + + + + + + + + TrafficRestorationTimeToHealedOrNewEndpointsInMinute + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Enabled + + + HostName + + + HttpPort + + + HttpsPort + + + OriginHostHeader + + + Priority + + + PrivateEndpointStatus + + + PrivateLinkAlias + + + PrivateLinkApprovalMessage + + + PrivateLinkLocation + + + PrivateLinkResourceId + + + Weight + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRule + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRule + + + + + + + + + + + + + + + Name + + + Order + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1 + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1 + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCacheExpirationAction + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCacheExpirationAction + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCacheKeyQueryStringAction + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCacheKeyQueryStringAction + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleClientPortCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleClientPortCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCookiesCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCookiesCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHostNameCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHostNameCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHttpVersionCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHttpVersionCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleIsDeviceCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleIsDeviceCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRulePostArgsCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRulePostArgsCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleQueryStringCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleQueryStringCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRemoteAddressCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRemoteAddressCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestBodyCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestBodyCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderAction + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderAction + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestMethodCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestMethodCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestSchemeCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestSchemeCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestUriCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestUriCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleResponseHeaderAction + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleResponseHeaderAction + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRouteConfigurationOverrideAction + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRouteConfigurationOverrideAction + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleServerPortCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleServerPortCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleSocketAddrCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleSocketAddrCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleSslProtocolCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleSslProtocolCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileExtensionCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileExtensionCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileNameCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileNameCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlPathCondition + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlPathCondition + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DimensionProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DimensionProperties + + + + + + + + + + + + + + + + + + DisplayName + + + InternalName + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DomainValidationProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DomainValidationProperties + + + + + + + + + + + + + + + ExpirationDate + + + ValidationToken + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EdgeNode + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EdgeNode + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EdgenodeResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EdgenodeResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Endpoint + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Endpoint + + + + + + + + + + + + + + + + + + Location + + + Name + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointListResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ContentTypesToCompress + + + DefaultOriginGroupId + + + DeliveryPolicyDescription + + + IsCompressionEnabled + + + IsHttpAllowed + + + IsHttpsAllowed + + + OptimizationType + + + OriginHostHeader + + + OriginPath + + + ProbePath + + + QueryStringCachingBehavior + + + WebApplicationFirewallPolicyLinkId + + + HostName + + + ProvisioningState + + + ResourceState + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ContentTypesToCompress + + + IsCompressionEnabled + + + IsHttpAllowed + + + IsHttpsAllowed + + + OptimizationType + + + OriginHostHeader + + + OriginPath + + + ProbePath + + + QueryStringCachingBehavior + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersDeliveryPolicy + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersDeliveryPolicy + + + + + + + + + + + + Description + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointUpdateParametersTags + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointUpdateParametersTags + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetail + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetail + + + + + + + + + + + + + + + + + + Code + + + Message + + + Target + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.GeoFilter + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.GeoFilter + + + + + + + + + + + + + + + + + + Action + + + CountryCode + + + RelativePath + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HeaderActionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HeaderActionParameters + + + + + + + + + + + + + + + + + + + + + HeaderAction + + + HeaderName + + + TypeName + + + Value + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters + + + + + + + + + + + + + + + + + + + + + ProbeIntervalInSecond + + + ProbePath + + + ProbeProtocol + + + ProbeRequestType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HostNameMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HostNameMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HttpErrorRangeParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HttpErrorRangeParameters + + + + + + + + + + + + + + + Begin + + + End + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HttpVersionMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HttpVersionMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPAddressGroup + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPAddressGroup + + + + + + + + + + + + DeliveryRegion + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IsDeviceMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IsDeviceMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.KeyVaultCertificateSourceParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.KeyVaultCertificateSourceParameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DeleteRule + + + ResourceGroupName + + + SecretName + + + SecretVersion + + + SubscriptionId + + + TypeName + + + UpdateRule + + + VaultName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.KeyVaultSigningKeyParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.KeyVaultSigningKeyParameters + + + + + + + + + + + + + + + + + + + + + + + + + + + ResourceGroupName + + + SecretName + + + SecretVersion + + + SubscriptionId + + + TypeName + + + VaultName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParameters + + + + + + + + + + + + + + + + + + AdditionalLatencyInMillisecond + + + SampleSize + + + SuccessfulSamplesRequired + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadParameters + + + + + + + + + + + + ContentPath + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LogSpecification + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LogSpecification + + + + + + + + + + + + + + + + + + + + + BlobDuration + + + DisplayName + + + LogFilterPattern + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ManagedCertificate + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ManagedCertificate + + + + + + + + + + + + + + + ExpirationDate + + + Subject + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ManagedCertificateParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ManagedCertificateParameters + + + + + + + + + + + + + + + ExpirationDate + + + Subject + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricAvailability + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricAvailability + + + + + + + + + + + + + + + BlobDuration + + + TimeGrain + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricSpecification + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricSpecification + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AggregationType + + + DisplayDescription + + + DisplayName + + + FillGapWithZero + + + IsInternal + + + MetricFilterPattern + + + Name + + + SupportedTimeGrainType + + + Unit + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricsResponse + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricsResponse + + + + + + + + + + + + + + + + + + DateTimeBegin + + + DateTimeEnd + + + Granularity + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricsResponseSeriesItem + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricsResponseSeriesItem + + + + + + + + + + + + + + + Metric + + + Unit + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricsResponseSeriesPropertiesItemsItem + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricsResponseSeriesPropertiesItemsItem + + + + + + + + + + + + + + + Name + + + Value + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Operation + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Operation + + + + + + + + + + + + + + + + + + IsDataAction + + + Name + + + Origin + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OperationDisplay + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OperationDisplay + + + + + + + + + + + + + + + + + + + + + Description + + + Operation + + + Provider + + + Resource + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OperationsListResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OperationsListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Origin + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Origin + + + + + + + + + + + + + + + Name + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroup + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroup + + + + + + + + + + + + + + + Name + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupListResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverride + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverride + + + + + + + + + + + + ForwardingProtocol + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverrideAction + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverrideAction + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverrideActionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverrideActionParameters + + + + + + + + + + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupProperties + + + + + + + + + + + + + + + + + + TrafficRestorationTimeToHealedOrNewEndpointsInMinute + + + ProvisioningState + + + ResourceState + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupUpdatePropertiesParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupUpdatePropertiesParameters + + + + + + + + + + + + TrafficRestorationTimeToHealedOrNewEndpointsInMinute + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginListResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Enabled + + + HostName + + + HttpPort + + + HttpsPort + + + OriginHostHeader + + + Priority + + + PrivateLinkAlias + + + PrivateLinkApprovalMessage + + + PrivateLinkLocation + + + PrivateLinkResourceId + + + Weight + + + PrivateEndpointStatus + + + ProvisioningState + + + ResourceState + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginUpdatePropertiesParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginUpdatePropertiesParameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Enabled + + + HostName + + + HttpPort + + + HttpsPort + + + OriginHostHeader + + + Priority + + + PrivateLinkAlias + + + PrivateLinkApprovalMessage + + + PrivateLinkLocation + + + PrivateLinkResourceId + + + Weight + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.PostArgsMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.PostArgsMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Selector + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Profile + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Profile + + + + + + + + + + + + + + + + + + + + + Location + + + Name + + + Kind + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileListResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileProperties + + + + + + + + + + + + + + + + + + + + + FrontDoorId + + + OriginResponseTimeoutSecond + + + ProvisioningState + + + ResourceState + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfilePropertiesUpdateParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfilePropertiesUpdateParameters + + + + + + + + + + + + OriginResponseTimeoutSecond + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileUpdateParametersTags + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileUpdateParametersTags + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProxyResource + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProxyResource + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.PurgeParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.PurgeParameters + + + + + + + + + + + + ContentPath + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.QueryStringMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.QueryStringMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RankingsResponse + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RankingsResponse + + + + + + + + + + + + + + + DateTimeBegin + + + DateTimeEnd + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RankingsResponseTablesItem + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RankingsResponseTablesItem + + + + + + + + + + + + Ranking + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RankingsResponseTablesPropertiesItemsItem + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RankingsResponseTablesPropertiesItemsItem + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RankingsResponseTablesPropertiesItemsMetricsItem + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RankingsResponseTablesPropertiesItemsMetricsItem + + + + + + + + + + + + + + + + + + Metric + + + Percentage + + + Value + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RemoteAddressMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RemoteAddressMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestBodyMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestBodyMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestHeaderMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestHeaderMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Selector + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestMethodMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestMethodMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestSchemeMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestSchemeMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestUriMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestUriMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourcesResponseCustomDomainsItem + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourcesResponseCustomDomainsItem + + + + + + + + + + + + + + + + + + EndpointId + + + History + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourcesResponseEndpointsItem + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourcesResponseEndpointsItem + + + + + + + + + + + + + + + History + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourcesResponseEndpointsPropertiesItemsItem + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourcesResponseEndpointsPropertiesItemsItem + + + + + + + + + + + + + + + + + + EndpointId + + + History + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceUsage + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceUsage + + + + + + + + + + + + + + + + + + + + + CurrentValue + + + Limit + + + ResourceType + + + Unit + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceUsageListResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceUsageListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParameters + + + + + + + + + + + + + + + ResponseBasedDetectedErrorType + + + ResponseBasedFailoverThresholdPercentage + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Route + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Route + + + + + + + + + + + + + + + Name + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteConfigurationOverrideActionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteConfigurationOverrideActionParameters + + + + + + + + + + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteListResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CacheConfigurationQueryParameter + + + CacheConfigurationQueryStringCachingBehavior + + + CompressionSettingContentTypesToCompress + + + CompressionSettingIsCompressionEnabled + + + DeploymentStatus + + + EnabledState + + + EndpointName + + + ForwardingProtocol + + + HttpsRedirect + + + LinkToDefaultDomain + + + OriginGroupId + + + OriginPath + + + PatternsToMatch + + + ProvisioningState + + + SupportedProtocol + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteUpdatePropertiesParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteUpdatePropertiesParameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EnabledState + + + EndpointName + + + ForwardingProtocol + + + HttpsRedirect + + + LinkToDefaultDomain + + + OriginPath + + + PatternsToMatch + + + SupportedProtocol + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Rule + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Rule + + + + + + + + + + + + + + + Name + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleListResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleProperties + + + + + + + + + + + + + + + + + + + + + + + + DeploymentStatus + + + MatchProcessingBehavior + + + Order + + + ProvisioningState + + + RuleSetName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleSet + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleSet + + + + + + + + + + + + + + + Name + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleSetListResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleSetListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleSetProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleSetProperties + + + + + + + + + + + + + + + + + + DeploymentStatus + + + ProvisioningState + + + ProfileName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleUpdatePropertiesParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleUpdatePropertiesParameters + + + + + + + + + + + + + + + + + + MatchProcessingBehavior + + + Order + + + RuleSetName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Secret + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Secret + + + + + + + + + + + + + + + Name + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretListResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretProperties + + + + + + + + + + + + + + + + + + DeploymentStatus + + + ProvisioningState + + + ProfileName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicy + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicy + + + + + + + + + + + + + + + Name + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyListResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyProperties + + + + + + + + + + + + + + + + + + DeploymentStatus + + + ProvisioningState + + + ProfileName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallAssociation + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallAssociation + + + + + + + + + + + + PatternsToMatch + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ServerPortMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ServerPortMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SharedPrivateLinkResourceProperties + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SharedPrivateLinkResourceProperties + + + + + + + + + + + + + + + + + + + + + GroupId + + + PrivateLinkLocation + + + RequestMessage + + + Status + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Sku + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Sku + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SocketAddrMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SocketAddrMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SslProtocolMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SslProtocolMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SsoUri + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SsoUri + + + + + + + + + + + + Value + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SupportedOptimizationTypesListResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SupportedOptimizationTypesListResult + + + + + + + + + + + + SupportedOptimizationType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemData + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemData + + + + + + + + + + + + + + + + + + + + + + + + + + + CreatedAt + + + CreatedBy + + + CreatedByType + + + LastModifiedAt + + + LastModifiedBy + + + LastModifiedByType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResource + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResource + + + + + + + + + + + + + + + Name + + + Location + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResourceTags + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResourceTags + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlFileExtensionMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlFileExtensionMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlFileNameMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlFileNameMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlPathMatchConditionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlPathMatchConditionParameters + + + + + + + + + + + + + + + + + + + + + + + + MatchValue + + + NegateCondition + + + Operator + + + Transform + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectAction + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectAction + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectActionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectActionParameters + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CustomFragment + + + CustomHostname + + + CustomPath + + + CustomQueryString + + + DestinationProtocol + + + RedirectType + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteAction + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteAction + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteActionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteActionParameters + + + + + + + + + + + + + + + + + + + + + Destination + + + PreserveUnmatchedPath + + + SourcePattern + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningAction + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningAction + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningActionParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningActionParameters + + + + + + + + + + + + + + + Algorithm + + + TypeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKey + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKey + + + + + + + + + + + + KeyId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKeyParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKeyParameters + + + + + + + + + + + + + + + KeyId + + + SecretVersion + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningParamIdentifier + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningParamIdentifier + + + + + + + + + + + + + + + ParamIndicator + + + ParamName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Usage + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Usage + + + + + + + + + + + + + + + + + + CurrentValue + + + Limit + + + Unit + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UsageName + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UsageName + + + + + + + + + + + + + + + LocalizedValue + + + Value + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UsagesListResult + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UsagesListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UserManagedHttpsParameters + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UserManagedHttpsParameters + + + + + + + + + + + + + + + + + + CertificateSource + + + MinimumTlsVersion + + + ProtocolType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateCustomDomainInput + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateCustomDomainInput + + + + + + + + + + + + HostName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateCustomDomainOutput + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateCustomDomainOutput + + + + + + + + + + + + + + + + + + CustomDomainValidated + + + Message + + + Reason + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateProbeInput + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateProbeInput + + + + + + + + + + + + ProbeUrl + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateProbeOutput + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateProbeOutput + + + + + + + + + + + + + + + + + + ErrorCode + + + IsValid + + + Message + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateSecretInput + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateSecretInput + + + + + + + + + + + + + + + SecretType + + + SecretVersion + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateSecretOutput + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateSecretOutput + + + + + + + + + + + + + + + Message + + + Status + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidationToken + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidationToken + + + + + + + + + + + + Token + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafMetricsResponse + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafMetricsResponse + + + + + + + + + + + + + + + + + + DateTimeBegin + + + DateTimeEnd + + + Granularity + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafMetricsResponseSeriesItem + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafMetricsResponseSeriesItem + + + + + + + + + + + + + + + Metric + + + Unit + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafMetricsResponseSeriesPropertiesItemsItem + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafMetricsResponseSeriesPropertiesItemsItem + + + + + + + + + + + + + + + Name + + + Value + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafRankingsResponse + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafRankingsResponse + + + + + + + + + + + + + + + + + + DateTimeBegin + + + DateTimeEnd + + + Group + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafRankingsResponseDataItem + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafRankingsResponseDataItem + + + + + + + + + + + + GroupValue + + + + + + + + \ No newline at end of file diff --git a/src/Cdn/Az.Cdn.psd1 b/src/Cdn/Az.Cdn.psd1 new file mode 100644 index 000000000000..6f0ffddd48d8 --- /dev/null +++ b/src/Cdn/Az.Cdn.psd1 @@ -0,0 +1,240 @@ +# +# Module manifest for module 'Az.Cdn' +# +# Generated by: Microsoft Corporation +# +# Generated on: 5/14/2022 +# + +@{ + +# Script module or binary module file associated with this manifest. +RootModule = './Az.Cdn.psm1' + +# Version number of this module. +ModuleVersion = '0.1.0' + +# Supported PSEditions +CompatiblePSEditions = 'Core', 'Desktop' + +# ID used to uniquely identify this module +GUID = 'f9fae843-9c26-4513-9442-17f4379802bf' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = 'Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = 'Microsoft Azure PowerShell: Cdn cmdlets' + +# Minimum version of the PowerShell engine required by this module +PowerShellVersion = '5.1' + +# Name of the PowerShell host required by this module +# PowerShellHostName = '' + +# Minimum version of the PowerShell host required by this module +# PowerShellHostVersion = '' + +# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. +DotNetFrameworkVersion = '4.7.2' + +# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. +# ClrVersion = '' + +# Processor architecture (None, X86, Amd64) required by this module +# ProcessorArchitecture = '' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.7.6'; }) + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = './bin/Az.Cdn.private.dll' + +# Script files (.ps1) that are run in the caller's environment prior to importing this module. +# ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +# TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = './Az.Cdn.format.ps1xml' + +# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess +# NestedModules = @() + +# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. +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-AzCdnHealthProbeParametersObject', + 'New-AzCdnManagedHttpsParametersObject', 'New-AzCdnOrigin', + 'New-AzCdnOriginGroup', 'New-AzCdnProfile', + 'New-AzCdnResourceReferenceObject', + 'New-AzCdnResponseBasedOriginErrorDetectionParametersObject', + 'New-AzCdnUrlRedirectActionObject', + 'New-AzCdnUrlRewriteActionObject', + 'New-AzCdnUrlSigningActionObject', + 'New-AzCdnUserManagedHttpsParametersObject', + 'New-AzFrontDoorCdnCustomDomain', + 'New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject', + 'New-AzFrontDoorCdnEndpoint', 'New-AzFrontDoorCdnOrigin', + 'New-AzFrontDoorCdnOriginGroup', + 'New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject', + 'New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject', + 'New-AzFrontDoorCdnProfile', + 'New-AzFrontDoorCdnResourceReferenceObject', + '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' + +# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. +CmdletsToExport = @() + +# Variables to export from this module +# VariablesToExport = @() + +# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. +AliasesToExport = '*' + +# DSC resources to export from this module +# DscResourcesToExport = @() + +# List of all modules packaged with this module +# ModuleList = @() + +# List of all files packaged with this module +# FileList = @() + +# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. +PrivateData = @{ + + PSData = @{ + + # Tags applied to this module. These help with module discovery in online galleries. + Tags = 'Azure','ResourceManager','ARM','PSModule','Cdn' + + # A URL to the license for this module. + LicenseUri = 'https://aka.ms/azps-license' + + # A URL to the main website for this project. + ProjectUri = 'https://github.com/Azure/azure-powershell' + + # A URL to an icon representing this module. + # IconUri = '' + + # ReleaseNotes of this module + # ReleaseNotes = '' + + # Prerelease string of this module + # Prerelease = '' + + # Flag to indicate whether the module requires explicit user acceptance for install/update/save + # RequireLicenseAcceptance = $false + + # External dependent modules of this module + # ExternalModuleDependencies = @() + + } # End of PSData hashtable + + } # End of PrivateData hashtable + +# HelpInfo URI of this module +# HelpInfoURI = '' + +# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. +# DefaultCommandPrefix = '' + +} + diff --git a/src/Cdn/Az.Cdn.psm1 b/src/Cdn/Az.Cdn.psm1 new file mode 100644 index 000000000000..72824702b0c1 --- /dev/null +++ b/src/Cdn/Az.Cdn.psm1 @@ -0,0 +1,115 @@ +# region Generated + # ---------------------------------------------------------------------------------- + # Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. + # ---------------------------------------------------------------------------------- + # Load required Az.Accounts module + $accountsName = 'Az.Accounts' + $accountsModule = Get-Module -Name $accountsName + if(-not $accountsModule) { + $localAccountsPath = Join-Path $PSScriptRoot 'generated\modules' + if(Test-Path -Path $localAccountsPath) { + $localAccounts = Get-ChildItem -Path $localAccountsPath -Recurse -Include 'Az.Accounts.psd1' | Select-Object -Last 1 + if($localAccounts) { + $accountsModule = Import-Module -Name ($localAccounts.FullName) -Scope Global -PassThru + } + } + if(-not $accountsModule) { + $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.7.5' } | Measure-Object).Count -gt 0 + if($hasAdequateVersion) { + $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.7.5 -Scope Global -PassThru + } + } + } + + if(-not $accountsModule) { + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://docs.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop + } elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) { + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop + } + Write-Information "Loaded Module '$($accountsModule.Name)'" + + # Load the private module dll + $null = Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.Cdn.private.dll') + + # Get the private module's instance + $instance = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module]::Instance + + # Ask for the shared functionality table + $VTable = Register-AzModule + + # Tweaks the pipeline on module load + $instance.OnModuleLoad = $VTable.OnModuleLoad + + # Following two delegates are added for telemetry + $instance.GetTelemetryId = $VTable.GetTelemetryId + $instance.Telemetry = $VTable.Telemetry + + + # Tweaks the pipeline per call + $instance.OnNewRequest = $VTable.OnNewRequest + + # Gets shared parameter values + $instance.GetParameterValue = $VTable.GetParameterValue + + # Allows shared module to listen to events from this module + $instance.EventListener = $VTable.EventListener + + # Gets shared argument completers + $instance.ArgumentCompleter = $VTable.ArgumentCompleter + + # The name of the currently selected Azure profile + $instance.ProfileName = $VTable.ProfileName + + + # Load the custom module + $customModulePath = Join-Path $PSScriptRoot './custom/Az.Cdn.custom.psm1' + if(Test-Path $customModulePath) { + $null = Import-Module -Name $customModulePath + } + + # Export nothing to clear implicit exports + Export-ModuleMember + + # Export proxy cmdlet scripts + $exportsPath = Join-Path $PSScriptRoot './exports' + $directories = Get-ChildItem -Directory -Path $exportsPath + $profileDirectory = $null + if($instance.ProfileName) { + if(($directories | ForEach-Object { $_.Name }) -contains $instance.ProfileName) { + $profileDirectory = $directories | Where-Object { $_.Name -eq $instance.ProfileName } + } else { + # Don't export anything if the profile doesn't exist for the module + $exportsPath = $null + Write-Warning "Selected Azure profile '$($instance.ProfileName)' does not exist for module '$($instance.Name)'. No cmdlets were loaded." + } + } elseif(($directories | Measure-Object).Count -gt 0) { + # Load the last folder if no profile is selected + $profileDirectory = $directories | Select-Object -Last 1 + } + + if($profileDirectory) { + Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'" + $exportsPath = $profileDirectory.FullName + } + + if($exportsPath) { + Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName } + $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath + Export-ModuleMember -Function $cmdletNames -Alias (Get-ScriptCmdlet -ScriptFolder $exportsPath -AsAlias) + } + + # Finalize initialization of this module + $instance.Init(); + Write-Information "Loaded Module '$($instance.Name)'" +# endregion diff --git a/src/Cdn/Cdn.sln b/src/Cdn/Cdn.sln new file mode 100644 index 000000000000..051b17744041 --- /dev/null +++ b/src/Cdn/Cdn.sln @@ -0,0 +1,104 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{D9E1FEBD-8E3A-4E49-8574-A5F8840179D4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{B3E8510D-B2A8-489F-B034-EF93301D21F9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{3A8456CF-E277-4E36-9645-F4D075C3FC6C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{2D8A2DD0-3A5D-4D14-AA80-8D56CC24AAF4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{F36EB0C0-5FBC-4694-8E95-B787D0CA4A45}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.Cdn", "Az.Cdn.csproj", "{35C085E2-DBEC-4419-A329-2969777FEDD2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D9E1FEBD-8E3A-4E49-8574-A5F8840179D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D9E1FEBD-8E3A-4E49-8574-A5F8840179D4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D9E1FEBD-8E3A-4E49-8574-A5F8840179D4}.Debug|x64.ActiveCfg = Debug|Any CPU + {D9E1FEBD-8E3A-4E49-8574-A5F8840179D4}.Debug|x64.Build.0 = Debug|Any CPU + {D9E1FEBD-8E3A-4E49-8574-A5F8840179D4}.Debug|x86.ActiveCfg = Debug|Any CPU + {D9E1FEBD-8E3A-4E49-8574-A5F8840179D4}.Debug|x86.Build.0 = Debug|Any CPU + {D9E1FEBD-8E3A-4E49-8574-A5F8840179D4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D9E1FEBD-8E3A-4E49-8574-A5F8840179D4}.Release|Any CPU.Build.0 = Release|Any CPU + {D9E1FEBD-8E3A-4E49-8574-A5F8840179D4}.Release|x64.ActiveCfg = Release|Any CPU + {D9E1FEBD-8E3A-4E49-8574-A5F8840179D4}.Release|x64.Build.0 = Release|Any CPU + {D9E1FEBD-8E3A-4E49-8574-A5F8840179D4}.Release|x86.ActiveCfg = Release|Any CPU + {D9E1FEBD-8E3A-4E49-8574-A5F8840179D4}.Release|x86.Build.0 = Release|Any CPU + {B3E8510D-B2A8-489F-B034-EF93301D21F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B3E8510D-B2A8-489F-B034-EF93301D21F9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B3E8510D-B2A8-489F-B034-EF93301D21F9}.Debug|x64.ActiveCfg = Debug|Any CPU + {B3E8510D-B2A8-489F-B034-EF93301D21F9}.Debug|x64.Build.0 = Debug|Any CPU + {B3E8510D-B2A8-489F-B034-EF93301D21F9}.Debug|x86.ActiveCfg = Debug|Any CPU + {B3E8510D-B2A8-489F-B034-EF93301D21F9}.Debug|x86.Build.0 = Debug|Any CPU + {B3E8510D-B2A8-489F-B034-EF93301D21F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B3E8510D-B2A8-489F-B034-EF93301D21F9}.Release|Any CPU.Build.0 = Release|Any CPU + {B3E8510D-B2A8-489F-B034-EF93301D21F9}.Release|x64.ActiveCfg = Release|Any CPU + {B3E8510D-B2A8-489F-B034-EF93301D21F9}.Release|x64.Build.0 = Release|Any CPU + {B3E8510D-B2A8-489F-B034-EF93301D21F9}.Release|x86.ActiveCfg = Release|Any CPU + {B3E8510D-B2A8-489F-B034-EF93301D21F9}.Release|x86.Build.0 = Release|Any CPU + {3A8456CF-E277-4E36-9645-F4D075C3FC6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3A8456CF-E277-4E36-9645-F4D075C3FC6C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3A8456CF-E277-4E36-9645-F4D075C3FC6C}.Debug|x64.ActiveCfg = Debug|Any CPU + {3A8456CF-E277-4E36-9645-F4D075C3FC6C}.Debug|x64.Build.0 = Debug|Any CPU + {3A8456CF-E277-4E36-9645-F4D075C3FC6C}.Debug|x86.ActiveCfg = Debug|Any CPU + {3A8456CF-E277-4E36-9645-F4D075C3FC6C}.Debug|x86.Build.0 = Debug|Any CPU + {3A8456CF-E277-4E36-9645-F4D075C3FC6C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3A8456CF-E277-4E36-9645-F4D075C3FC6C}.Release|Any CPU.Build.0 = Release|Any CPU + {3A8456CF-E277-4E36-9645-F4D075C3FC6C}.Release|x64.ActiveCfg = Release|Any CPU + {3A8456CF-E277-4E36-9645-F4D075C3FC6C}.Release|x64.Build.0 = Release|Any CPU + {3A8456CF-E277-4E36-9645-F4D075C3FC6C}.Release|x86.ActiveCfg = Release|Any CPU + {3A8456CF-E277-4E36-9645-F4D075C3FC6C}.Release|x86.Build.0 = Release|Any CPU + {2D8A2DD0-3A5D-4D14-AA80-8D56CC24AAF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D8A2DD0-3A5D-4D14-AA80-8D56CC24AAF4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D8A2DD0-3A5D-4D14-AA80-8D56CC24AAF4}.Debug|x64.ActiveCfg = Debug|Any CPU + {2D8A2DD0-3A5D-4D14-AA80-8D56CC24AAF4}.Debug|x64.Build.0 = Debug|Any CPU + {2D8A2DD0-3A5D-4D14-AA80-8D56CC24AAF4}.Debug|x86.ActiveCfg = Debug|Any CPU + {2D8A2DD0-3A5D-4D14-AA80-8D56CC24AAF4}.Debug|x86.Build.0 = Debug|Any CPU + {2D8A2DD0-3A5D-4D14-AA80-8D56CC24AAF4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D8A2DD0-3A5D-4D14-AA80-8D56CC24AAF4}.Release|Any CPU.Build.0 = Release|Any CPU + {2D8A2DD0-3A5D-4D14-AA80-8D56CC24AAF4}.Release|x64.ActiveCfg = Release|Any CPU + {2D8A2DD0-3A5D-4D14-AA80-8D56CC24AAF4}.Release|x64.Build.0 = Release|Any CPU + {2D8A2DD0-3A5D-4D14-AA80-8D56CC24AAF4}.Release|x86.ActiveCfg = Release|Any CPU + {2D8A2DD0-3A5D-4D14-AA80-8D56CC24AAF4}.Release|x86.Build.0 = Release|Any CPU + {F36EB0C0-5FBC-4694-8E95-B787D0CA4A45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F36EB0C0-5FBC-4694-8E95-B787D0CA4A45}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F36EB0C0-5FBC-4694-8E95-B787D0CA4A45}.Debug|x64.ActiveCfg = Debug|Any CPU + {F36EB0C0-5FBC-4694-8E95-B787D0CA4A45}.Debug|x64.Build.0 = Debug|Any CPU + {F36EB0C0-5FBC-4694-8E95-B787D0CA4A45}.Debug|x86.ActiveCfg = Debug|Any CPU + {F36EB0C0-5FBC-4694-8E95-B787D0CA4A45}.Debug|x86.Build.0 = Debug|Any CPU + {F36EB0C0-5FBC-4694-8E95-B787D0CA4A45}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F36EB0C0-5FBC-4694-8E95-B787D0CA4A45}.Release|Any CPU.Build.0 = Release|Any CPU + {F36EB0C0-5FBC-4694-8E95-B787D0CA4A45}.Release|x64.ActiveCfg = Release|Any CPU + {F36EB0C0-5FBC-4694-8E95-B787D0CA4A45}.Release|x64.Build.0 = Release|Any CPU + {F36EB0C0-5FBC-4694-8E95-B787D0CA4A45}.Release|x86.ActiveCfg = Release|Any CPU + {F36EB0C0-5FBC-4694-8E95-B787D0CA4A45}.Release|x86.Build.0 = Release|Any CPU + {35C085E2-DBEC-4419-A329-2969777FEDD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {35C085E2-DBEC-4419-A329-2969777FEDD2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {35C085E2-DBEC-4419-A329-2969777FEDD2}.Debug|x64.ActiveCfg = Debug|Any CPU + {35C085E2-DBEC-4419-A329-2969777FEDD2}.Debug|x64.Build.0 = Debug|Any CPU + {35C085E2-DBEC-4419-A329-2969777FEDD2}.Debug|x86.ActiveCfg = Debug|Any CPU + {35C085E2-DBEC-4419-A329-2969777FEDD2}.Debug|x86.Build.0 = Debug|Any CPU + {35C085E2-DBEC-4419-A329-2969777FEDD2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {35C085E2-DBEC-4419-A329-2969777FEDD2}.Release|Any CPU.Build.0 = Release|Any CPU + {35C085E2-DBEC-4419-A329-2969777FEDD2}.Release|x64.ActiveCfg = Release|Any CPU + {35C085E2-DBEC-4419-A329-2969777FEDD2}.Release|x64.Build.0 = Release|Any CPU + {35C085E2-DBEC-4419-A329-2969777FEDD2}.Release|x86.ActiveCfg = Release|Any CPU + {35C085E2-DBEC-4419-A329-2969777FEDD2}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/src/Cdn/Changelog.md b/src/Cdn/Changelog.md new file mode 100644 index 000000000000..6a48708abdff --- /dev/null +++ b/src/Cdn/Changelog.md @@ -0,0 +1,24 @@ + +## Upcoming Release + +## Version 0.1.0 +* First preview release for module Az.Cdn + diff --git a/src/Cdn/Properties/AssemblyInfo.cs b/src/Cdn/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..3675382a77f2 --- /dev/null +++ b/src/Cdn/Properties/AssemblyInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Microsoft Azure Powershell - Cdn")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] +[assembly: Guid("8eadbc78-9db8-41a7-854e-4802432c03ba")] +[assembly: AssemblyVersion("0.1.0")] +[assembly: AssemblyFileVersion("0.1.0")] diff --git a/src/Cdn/README.md b/src/Cdn/README.md new file mode 100644 index 000000000000..311bb335755c --- /dev/null +++ b/src/Cdn/README.md @@ -0,0 +1,233 @@ + +# Az.Cdn +This directory contains the PowerShell module for the Cdn service. + +--- +## Status +[![Az.Cdn](https://img.shields.io/powershellgallery/v/Az.Cdn.svg?style=flat-square&label=Az.Cdn "Az.Cdn")](https://www.powershellgallery.com/packages/Az.Cdn/) + +## Info +- Modifiable: yes +- Generated: all +- Committed: yes +- Packaged: yes + +--- +## Detail +This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension. + +## Module Requirements +- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater + +## Authentication +AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent. + +## Development +For information on how to develop for `Az.Cdn`, see [how-to.md](how-to.md). + + +### AutoRest Configuration +> see https://aka.ms/autorest + +``` yaml +require: +# readme.azure.noprofile.md is the common configuration file + - $(this-folder)/../readme.azure.noprofile.md +input-file: +# You need to specify your swagger files here. + - $(repo)/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json + - $(repo)/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json +# If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally +# - (this-folder)/relative-path-to-your-swagger + +# For new RP, the version is 0.1.0 +module-version: 0.1.0 +# Normally, title is the service name +title: Cdn +subject-prefix: $(service-name) + +# If there are post APIs for some kinds of actions in the RP, you may need to +# uncomment following line to support viaIdentity for these post APIs +identity-correction-for-post: true + +resourcegroup-append: true +nested-object-to-string: true + +directive: + - no-inline: + # AFDX + - SecurityPolicyPropertiesParameters + - SecretParameters + - AFDDomainHttpsParameters + - LoadBalancingSettingsParameters + # CDN + - CustomDomainHttpsParameters + - ResponseBasedOriginErrorDetectionParameters + # Both CDN and AFDX + - HealthProbeParameters + # Generate memory object as parameter of the cmelet. + - model-cmdlet: + - ResourceReference + # origin group parameters + - HealthProbeParameters + - ResponseBasedOriginErrorDetectionParameters + # https + - UserManagedHttpsParameters + - CdnManagedHttpsParameters + - DeliveryRule + # CDN condition + - DeliveryRuleRemoteAddressCondition + - DeliveryRuleRequestMethodCondition + - DeliveryRuleQueryStringCondition + - DeliveryRulePostArgsCondition + - DeliveryRuleRequestUriCondition + - DeliveryRuleRequestHeaderCondition + - DeliveryRuleRequestBodyCondition + - DeliveryRuleRequestSchemeCondition + - DeliveryRuleUrlPathCondition + - DeliveryRuleUrlFileExtensionCondition + - DeliveryRuleUrlFileNameCondition + - DeliveryRuleHttpVersionCondition + - DeliveryRuleCookiesCondition + - DeliveryRuleIsDeviceCondition + # CDN action + - UrlRedirectAction + - UrlSigningAction + - UrlRewriteAction + - DeliveryRuleRequestHeaderAction + - DeliveryRuleResponseHeaderAction + + - where: + model-name: .* + set: + format-table: + exclude-properties: + - SystemData + - SystemDataCreatedAt + - SystemDataCreatedBy + - SystemDataCreatedByType + - SystemDataLastModifiedAt + - SystemDataLastModifiedBy + - SystemDataLastModifiedByType + + # Following is two common directive which are normally required in all the RPs + # 1. Remove the unexpanded parameter set + # 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well + - where: + variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^Patch$|^PatchViaIdentity$|^Check$|^Check1$|^CheckViaIdentity$|^Validate$|^ValidateViaIdentity$ + subject: ^(?!RuleSet).+$ + remove: true + - where: + variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ + subject: ^RuleSet$ + remove: true + # Remove the set-* cmdlet + - where: + verb: Set + remove: true + # Remove some cmdlets' ViaIdentity which are inconvinient to call + - where: + variant: ^CheckViaIdentity$|^CheckViaIdentityExpanded$ + subject: ^NameAvailability$|^EndpointNameAvailability$ + remove: true + - where: + variant: ^ValidateViaIdentity$|^ValidateViaIdentityExpanded$ + subject: ^Probe$ + remove: true + - where: + variant: ^EnableExpanded$|^EnableViaIdentityExpanded$ + subject: ^CustomDomainCustomHttps$ + remove: true + + # Hide Cdn profile + - where: + subject: Profile + hide: true + - where: + subject: ProfileSsoUri + hide: true + - where: + subject: SecretValidate + hide: true + - where: + subject: LogAnalytic(.*) + hide: true + + # Rename + - where: + subject: Afd(.*) + set: + subject-prefix: FrontDoorCdn + subject: $1 + + - where: + subject: Rule + set: + subject-prefix: FrontDoorCdn + - where: + subject: RuleSet + set: + subject-prefix: FrontDoorCdn + - where: + subject: RuleSetResourceUsage + set: + subject-prefix: FrontDoorCdn + + - where: + subject: Route + set: + subject-prefix: FrontDoorCdn + subject: Route + - where: + subject: Secret + set: + subject-prefix: FrontDoorCdn + subject: Secret + - where: + subject: SecurityPolicy + set: + subject-prefix: FrontDoorCdn + subject: SecurityPolicy + - where: + subject: EndpointNameAvailability + set: + subject-prefix: FrontDoorCdn + - where: + subject: ResourceUsage + set: + subject: SubscriptionResourceUsage + + # https://github.com/Azure/autorest.powershell/issues/906 + - where: + model-name: AfdDomainUpdatePropertiesParameters + property-name: PreValidatedCustomDomainResourceId + set: + property-name: AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId + - where: + model-name: AfdDomainUpdatePropertiesParameters + property-name: PreValidatedCustomDomainResourceIdId + set: + property-name: PreValidatedCustomDomainResourceId + + # Delete 404 + - from: swagger-document + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}"].delete + transform: >- + $["x-ms-long-running-operation-options"] = {"final-state-via": "azure-async-operation"} + - from: swagger-document + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}"].delete + transform: >- + $["x-ms-long-running-operation-options"] = {"final-state-via": "azure-async-operation"} + - from: swagger-document + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}"].delete + transform: >- + $["x-ms-long-running-operation-options"] = {"final-state-via": "azure-async-operation"} + - from: swagger-document + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}"].delete + transform: >- + $["x-ms-long-running-operation-options"] = {"final-state-via": "azure-async-operation"} + - from: swagger-document + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}"].delete + transform: >- + $["x-ms-long-running-operation-options"] = {"final-state-via": "azure-async-operation"} +``` diff --git a/src/Cdn/build-module.ps1 b/src/Cdn/build-module.ps1 new file mode 100644 index 000000000000..d17d7f41ef1f --- /dev/null +++ b/src/Cdn/build-module.ps1 @@ -0,0 +1,161 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs) +$ErrorActionPreference = 'Stop' + +if($PSEdition -ne 'Core') { + Write-Error 'This script requires PowerShell Core to execute. [Note] Generated cmdlets will work in both PowerShell Core or Windows PowerShell.' +} + +if(-not $Isolated -and -not $Debugger) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + + if($LastExitCode -ne 0) { + # Build failed. Don't attempt to run the module. + return + } + + if($Test) { + . (Join-Path $PSScriptRoot 'test-module.ps1') + if($LastExitCode -ne 0) { + # Tests failed. Don't attempt to run the module. + return + } + } + + if($Docs) { + . (Join-Path $PSScriptRoot 'generate-help.ps1') + if($LastExitCode -ne 0) { + # Docs generation failed. Don't attempt to run the module. + return + } + } + + if($Pack) { + . (Join-Path $PSScriptRoot 'pack-module.ps1') + if($LastExitCode -ne 0) { + # Packing failed. Don't attempt to run the module. + return + } + } + + $runModulePath = Join-Path $PSScriptRoot 'run-module.ps1' + if($Code) { + . $runModulePath -Code + } elseif($Run) { + . $runModulePath + } else { + Write-Host -ForegroundColor Cyan "To run this module in an isolated PowerShell session, run the 'run-module.ps1' script or provide the '-Run' parameter to this script." + } + return +} + +$binFolder = Join-Path $PSScriptRoot 'bin' +$objFolder = Join-Path $PSScriptRoot 'obj' + +if(-not $Debugger) { + Write-Host -ForegroundColor Green 'Cleaning build folders...' + $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path $binFolder, $objFolder + + if((Test-Path $binFolder) -or (Test-Path $objFolder)) { + Write-Host -ForegroundColor Cyan 'Did you forget to exit your isolated module session before rebuilding?' + Write-Error 'Unable to clean ''bin'' or ''obj'' folder. A process may have an open handle.' + } + + Write-Host -ForegroundColor Green 'Compiling module...' + $buildConfig = 'Debug' + if($Release) { + $buildConfig = 'Release' + } + dotnet publish $PSScriptRoot --verbosity quiet --configuration $buildConfig /nologo + if($LastExitCode -ne 0) { + Write-Error 'Compilation failed.' + } + + $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path (Join-Path $binFolder 'Debug'), (Join-Path $binFolder 'Release') +} + +$dll = Join-Path $PSScriptRoot 'bin\Az.Cdn.private.dll' +if(-not (Test-Path $dll)) { + Write-Error "Unable to find output assembly in '$binFolder'." +} + +# Load DLL to use build-time cmdlets +$null = Import-Module -Name $dll + +$modulePaths = $dll +$customPsm1 = Join-Path $PSScriptRoot 'custom\Az.Cdn.custom.psm1' +if(Test-Path $customPsm1) { + $modulePaths = @($dll, $customPsm1) +} + +$exportsFolder = Join-Path $PSScriptRoot 'exports' +if(Test-Path $exportsFolder) { + $null = Get-ChildItem -Path $exportsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue +} +$null = New-Item -ItemType Directory -Force -Path $exportsFolder + +$internalFolder = Join-Path $PSScriptRoot 'internal' +if(Test-Path $internalFolder) { + $null = Get-ChildItem -Path $internalFolder -Recurse -Exclude '*.psm1', 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue +} +$null = New-Item -ItemType Directory -Force -Path $internalFolder + +$psd1 = Join-Path $PSScriptRoot './Az.Cdn.psd1' +$guid = Get-ModuleGuid -Psd1Path $psd1 +$moduleName = 'Az.Cdn' +$examplesFolder = Join-Path $PSScriptRoot 'examples' +$null = New-Item -ItemType Directory -Force -Path $examplesFolder + +Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...' +$modelCmdlets = @('ResourceReference', 'HealthProbeParameters', 'ResponseBasedOriginErrorDetectionParameters', 'UserManagedHttpsParameters', 'CdnManagedHttpsParameters', 'DeliveryRule', 'DeliveryRuleRemoteAddressCondition', 'DeliveryRuleRequestMethodCondition', 'DeliveryRuleQueryStringCondition', 'DeliveryRulePostArgsCondition', 'DeliveryRuleRequestUriCondition', 'DeliveryRuleRequestHeaderCondition', 'DeliveryRuleRequestBodyCondition', 'DeliveryRuleRequestSchemeCondition', 'DeliveryRuleUrlPathCondition', 'DeliveryRuleUrlFileExtensionCondition', 'DeliveryRuleUrlFileNameCondition', 'DeliveryRuleHttpVersionCondition', 'DeliveryRuleCookiesCondition', 'DeliveryRuleIsDeviceCondition', 'UrlRedirectAction', 'UrlSigningAction', 'UrlRewriteAction', 'DeliveryRuleRequestHeaderAction', 'DeliveryRuleResponseHeaderAction') +if ($modelCmdlets.Count -gt 0) { + . (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1') + CreateModelCmdlet($modelCmdlets) +} + +if($NoDocs) { + Write-Host -ForegroundColor Green 'Creating exports...' + Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder +} else { + Write-Host -ForegroundColor Green 'Creating exports and docs...' + $moduleDescription = 'Microsoft Azure PowerShell: Cdn cmdlets' + $docsFolder = Join-Path $PSScriptRoot 'docs' + if(Test-Path $docsFolder) { + $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue + } + $null = New-Item -ItemType Directory -Force -Path $docsFolder + Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid +} + +Write-Host -ForegroundColor Green 'Creating format.ps1xml...' +$formatPs1xml = Join-Path $PSScriptRoot './Az.Cdn.format.ps1xml' +Export-FormatPs1xml -FilePath $formatPs1xml + +Write-Host -ForegroundColor Green 'Creating psd1...' +$customFolder = Join-Path $PSScriptRoot 'custom' +Export-Psd1 -ExportsFolder $exportsFolder -CustomFolder $customFolder -Psd1Path $psd1 -ModuleGuid $guid + +Write-Host -ForegroundColor Green 'Creating test stubs...' +$testFolder = Join-Path $PSScriptRoot 'test' +$null = New-Item -ItemType Directory -Force -Path $testFolder +Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFolder $testFolder + +Write-Host -ForegroundColor Green 'Creating example stubs...' +Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder + +Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/src/Cdn/check-dependencies.ps1 b/src/Cdn/check-dependencies.ps1 new file mode 100644 index 000000000000..c29591c7bfe1 --- /dev/null +++ b/src/Cdn/check-dependencies.ps1 @@ -0,0 +1,65 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources) +$ErrorActionPreference = 'Stop' + +if(-not $Isolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + return +} + +function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum, [string]$requiredVersion) { + if($predicate) { + $module = Get-Module -ListAvailable -Name $moduleName + if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0) -or ($requiredVersion -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -eq [System.Version]$requiredVersion } | Measure-Object).Count -eq 0)) { + $null = New-Item -ItemType Directory -Force -Path $path + Write-Host -ForegroundColor Green "Installing local $moduleName module into '$path'..." + if ($requiredVersion) { + Find-Module -Name $moduleName -RequiredVersion $requiredVersion -Repository PSGallery | Save-Module -Path $path + }elseif($versionMinimum) { + Find-Module -Name $moduleName -MinimumVersion $versionMinimum -Repository PSGallery | Save-Module -Path $path + } else { + Find-Module -Name $moduleName -Repository PSGallery | Save-Module -Path $path + } + } + } +} + +$ProgressPreference = 'SilentlyContinue' +$all = (@($Accounts.IsPresent, $Pester.IsPresent) | Select-Object -Unique | Measure-Object).Count -eq 1 + +$localModulesPath = Join-Path $PSScriptRoot 'generated\modules' +if(Test-Path -Path $localModulesPath) { + $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" +} + +DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.7.5' +DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1' + +$tools = Join-Path $PSScriptRoot 'tools' +$resourceDir = Join-Path $tools 'Resources' +$resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psm1' + +if ($Resources.IsPresent -and ((-not (Test-Path -Path $resourceModule)) -or $RegenerateSupportModule.IsPresent)) { + Write-Host -ForegroundColor Green "Building local Resource module used for test..." + Set-Location $resourceDir + $null = autorest .\README.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources + $null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/ + Set-Location $HOME/.PSSharedModules/Resources + $null = .\build-module.ps1 + Set-Location $PSScriptRoot +} diff --git a/src/Cdn/create-model-cmdlets.ps1 b/src/Cdn/create-model-cmdlets.ps1 new file mode 100644 index 000000000000..d4545fa90924 --- /dev/null +++ b/src/Cdn/create-model-cmdlets.ps1 @@ -0,0 +1,179 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +function CreateModelCmdlet { + + param([string[]]$Models) + + if ($Models.Count -eq 0) + { + return + } + + $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models' + $ModuleName = 'Cdn' + $OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets' + $null = New-Item -ItemType Directory -Force -Path $OutputDir + + $CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs + $Content = '' + $null = $CsFiles | ForEach-Object -Process { if ($_.Name.Split('.').count -eq 2 ) + { $Content += get-content $_.fullname -raw + } } + + $Tree = [Microsoft.CodeAnalysis.CSharp.SyntaxFactory]::ParseCompilationUnit($Content) + $Nodes = $Tree.ChildNodes().ChildNodes() + foreach ($Model in $Models) + { + $InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$Model") } + if ($InterfaceNode.count -eq 0) { + continue + } + # through a queue, we iterate all the parent models. + $Queue = @($InterfaceNode) + $visited = @("I$Model") + $AllInterfaceNodes = @() + while ($Queue.count -ne 0) + { + $AllInterfaceNodes += $Queue[0] + # Baselist contains the direct parent models. + foreach ($parent in $Queue[0].BaseList.Types) + { + if (($parent.Type.Right.Identifier.Value -ne 'IJsonSerializable') -and (-not $visited.Contains($parent.Type.Right.Identifier.Value))) + { + $Queue = [Array]$Queue + ($Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq $parent.Type.Right.Identifier.Value) }) + $visited = [Array]$visited + $parent.Type.Right.Identifier.Value + } + } + $first, $Queue = $Queue + } + + $Namespace = $InterfaceNode.Parent.Name + $ObjectType = $Model + $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}" + # remove duplicated module name + if ($ObjectType.StartsWith($ModuleName)) { + $ModulePrefix = '' + } else { + $ModulePrefix = $ModuleName + } + $OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir + + $ParameterDefineScriptList = New-Object System.Collections.Generic.List[string] + $ParameterAssignScriptList = New-Object System.Collections.Generic.List[string] + foreach ($Node in $AllInterfaceNodes) + { + foreach ($Member in $Node.Members) + { + $Arguments = $Member.AttributeLists.Attributes.ArgumentList.Arguments + $Required = $false + $Description = "" + $Readonly = $False + foreach ($Argument in $Arguments) + { + if ($Argument.NameEquals.Name.Identifier.Value -eq "Required") + { + $Required = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Description") + { + $Description = $Argument.Expression.Token.Value.Trim('.').replace('"', '`"') + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Readonly") + { + $Readonly = $Argument.Expression.Token.Value + } + } + if ($Readonly) + { + continue + } + $Identifier = $Member.Identifier.Value + $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1] + $ParameterDefinePropertyList = New-Object System.Collections.Generic.List[string] + if ($Required) + { + $ParameterDefinePropertyList.Add("Mandatory") + } + if ($Description -ne "") + { + $ParameterDefinePropertyList.Add("HelpMessage=`"${Description}.`"") + } + $ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList) + # check whether completer is needed + $completer = ''; + if($Type.Split('.').Split('.')[-2] -eq 'Support') { + # If Type is an array, need to strip [] + $strippedType = $Type.Replace('[]', '') + $completer += "`n [ArgumentCompleter([${strippedType}])]" + } + $ParameterDefineScript = " + [Parameter($ParameterDefineProperty)]${completer} + [${Type}] + `$${Identifier}" + $ParameterDefineScriptList.Add($ParameterDefineScript) + $ParameterAssignScriptList.Add(" + if (`$PSBoundParameters.ContainsKey('${Identifier}')) { + `$Object.${Identifier} = `$${Identifier} + }") + } + } + $ParameterDefineScript = $ParameterDefineScriptList | Join-String -Separator "," + $ParameterAssignScript = $ParameterAssignScriptList | Join-String -Separator "" + + $Script = " +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for ${ObjectType}. +.Description +Create an in-memory object for ${ObjectType}. + +.Outputs +${ObjectTypeWithNamespace} +.Link +https://docs.microsoft.com/powershell/module/az.${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object +#> +function New-Az${ModulePrefix}${ObjectType}Object { + [OutputType('${ObjectTypeWithNamespace}')] + [CmdletBinding(PositionalBinding=`$false)] + Param( +${ParameterDefineScript} + ) + + process { + `$Object = [${ObjectTypeWithNamespace}]::New() +${ParameterAssignScript} + return `$Object + } +} +" + Set-Content -Path $OutputPath -Value $Script + } +} diff --git a/src/Cdn/custom/Az.Cdn.custom.psm1 b/src/Cdn/custom/Az.Cdn.custom.psm1 new file mode 100644 index 000000000000..79563b7a03cc --- /dev/null +++ b/src/Cdn/custom/Az.Cdn.custom.psm1 @@ -0,0 +1,17 @@ +# region Generated + # Load the private module dll + $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Cdn.private.dll') + + # Load the internal module + $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.Cdn.internal.psm1' + if(Test-Path $internalModulePath) { + $null = Import-Module -Name $internalModulePath + } + + # Export nothing to clear implicit exports + Export-ModuleMember + + # Export script cmdlets + Get-ChildItem -Path $PSScriptRoot -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName } + Export-ModuleMember -Function (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot) -Alias (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot -AsAlias) +# endregion diff --git a/src/Cdn/custom/Get-AzCdnProfile.ps1 b/src/Cdn/custom/Get-AzCdnProfile.ps1 new file mode 100644 index 000000000000..32e8a3bf2136 --- /dev/null +++ b/src/Cdn/custom/Get-AzCdnProfile.ps1 @@ -0,0 +1,106 @@ +function Get-AzCdnProfile { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] + [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] + param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process { + $internalProfiles = Az.Cdn.internal\Get-AzCdnProfile @PSBoundParameters + + if ($null -ne $internalProfiles ) + { + if($internalProfiles -is [array]){ + foreach ($oneInternalProfile in $internalProfiles) + { + if(-Not (ISFrontDoorCdnProfile($oneInternalProfile.SkuName))) + { + Write-Output $oneInternalProfile + } + } + }else + { + $oneInternalProfile = $internalProfiles + if(-Not (ISFrontDoorCdnProfile($oneInternalProfile.SkuName))) + { + Write-Output $oneInternalProfile + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/custom/Get-AzFrontDoorCdnProfile.ps1 b/src/Cdn/custom/Get-AzFrontDoorCdnProfile.ps1 new file mode 100644 index 000000000000..0803ffd4e45b --- /dev/null +++ b/src/Cdn/custom/Get-AzFrontDoorCdnProfile.ps1 @@ -0,0 +1,105 @@ +function Get-AzFrontDoorCdnProfile { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] + [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] + param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process { + $internalProfiles = Az.Cdn.internal\Get-AzCdnProfile @PSBoundParameters + if ($null -ne $internalProfiles ) + { + if($internalProfiles -is [array]){ + foreach ($oneInternalProfile in $internalProfiles) + { + if(ISFrontDoorCdnProfile($oneInternalProfile.SkuName)) + { + Write-Output $oneInternalProfile + } + } + }else + { + $oneInternalProfile = $internalProfiles + if(ISFrontDoorCdnProfile($oneInternalProfile.SkuName)) + { + Write-Output $oneInternalProfile + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/custom/New-AzCdnProfile.ps1 b/src/Cdn/custom/New-AzCdnProfile.ps1 new file mode 100644 index 000000000000..0bbedae1596d --- /dev/null +++ b/src/Cdn/custom/New-AzCdnProfile.ps1 @@ -0,0 +1,153 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +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. +.Description +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. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnprofile +#> +function New-AzCdnProfile { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] + [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource location. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Send and receive timeout on forwarding request to the origin. + # When timeout is reached, the request fails and returns. + ${OriginResponseTimeoutSecond}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName] + # Name of the pricing tier. + ${SkuName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + if(-Not (ISFrontDoorCdnProfile($PSBoundParameters['SkuName']))){ + Az.Cdn.internal\New-AzCdnProfile @PSBoundParameters + }else{ + throw "$($PSBoundParameters['SkuName']) is not a valid SKU. Please use a valid AzureCDN SkuName."; + } +} + \ No newline at end of file diff --git a/src/Cdn/custom/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.ps1 new file mode 100644 index 000000000000..de16f02424ec --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.ps1 @@ -0,0 +1,61 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for AFDDomainHttpsParameters. +.Description +Create an in-memory object for AFDDomainHttpsParameters. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AFDDomainHttpsParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnCustomDomainTlsSettingParametersObject +#> +function New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AFDDomainHttpsParameters')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(Mandatory, HelpMessage="Defines the source of the SSL certificate.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType] + $CertificateType, + [Parameter(HelpMessage="TLS protocol version that will be used for Https.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion] + $MinimumTlsVersion, + [Parameter(HelpMessage="Resource reference to the secret. ie. subs/rg/profile/secret.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference] + $Secret + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AFDDomainHttpsParameters]::New() + + if ($PSBoundParameters.ContainsKey('CertificateType')) { + $Object.CertificateType = $CertificateType + } + if ($PSBoundParameters.ContainsKey('MinimumTlsVersion')) { + $Object.MinimumTlsVersion = $MinimumTlsVersion + } + if ($PSBoundParameters.ContainsKey('Secret')) { + $Object.Secret = $Secret + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnDeliveryRuleClientPortConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnDeliveryRuleClientPortConditionObject.ps1 new file mode 100644 index 000000000000..111c264ddf5a --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnDeliveryRuleClientPortConditionObject.ps1 @@ -0,0 +1,74 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleClientPortCondition. +.Description +Create an in-memory object for DeliveryRuleClientPortCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleClientPortCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleClientPortConditionObject +#> +function New-AzFrontDoorCdnRuleClientPortConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleClientPortCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator] + $ParameterOperator, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleClientPortCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.ps1 new file mode 100644 index 000000000000..ba1746d8ddd5 --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.ps1 @@ -0,0 +1,67 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for HealthProbeParameters. +.Description +Create an in-memory object for HealthProbeParameters. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnOriginGroupHealthProbeSettingObject +#> +function New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The number of seconds between health probes.Default is 240sec.")] + [int] + $ProbeIntervalInSecond, + [Parameter(HelpMessage="The path relative to the origin that is used to determine the health of the origin.")] + [string] + $ProbePath, + [Parameter(HelpMessage="Protocol to use for health probe.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol] + $ProbeProtocol, + [Parameter(HelpMessage="The type of health probe request that is made.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType] + $ProbeRequestType + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters]::New() + + if ($PSBoundParameters.ContainsKey('ProbeIntervalInSecond')) { + $Object.ProbeIntervalInSecond = $ProbeIntervalInSecond + } + if ($PSBoundParameters.ContainsKey('ProbePath')) { + $Object.ProbePath = $ProbePath + } + if ($PSBoundParameters.ContainsKey('ProbeProtocol')) { + $Object.ProbeProtocol = $ProbeProtocol + } + if ($PSBoundParameters.ContainsKey('ProbeRequestType')) { + $Object.ProbeRequestType = $ProbeRequestType + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.ps1 new file mode 100644 index 000000000000..55bd790e3f0e --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.ps1 @@ -0,0 +1,59 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for LoadBalancingSettingsParameters. +.Description +Create an in-memory object for LoadBalancingSettingsParameters. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject +#> +function New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParameters')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The additional latency in milliseconds for probes to fall into the lowest latency bucket.")] + [int] + $AdditionalLatencyInMillisecond, + [Parameter(HelpMessage="The number of samples to consider for load balancing decisions.")] + [int] + $SampleSize, + [Parameter(HelpMessage="The number of samples within the sample period that must succeed.")] + [int] + $SuccessfulSamplesRequired + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParameters]::New() + + if ($PSBoundParameters.ContainsKey('AdditionalLatencyInMillisecond')) { + $Object.AdditionalLatencyInMillisecond = $AdditionalLatencyInMillisecond + } + if ($PSBoundParameters.ContainsKey('SampleSize')) { + $Object.SampleSize = $SampleSize + } + if ($PSBoundParameters.ContainsKey('SuccessfulSamplesRequired')) { + $Object.SuccessfulSamplesRequired = $SuccessfulSamplesRequired + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnProfile.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnProfile.ps1 new file mode 100644 index 000000000000..76be0ef5238d --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnProfile.ps1 @@ -0,0 +1,155 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +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. +.Description +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. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnprofile +#> +function New-AzFrontDoorCdnProfile { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] + [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource location. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Send and receive timeout on forwarding request to the origin. + # When timeout is reached, the request fails and returns. + ${OriginResponseTimeoutSecond}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName] + # Name of the pricing tier. + ${SkuName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process { + if(ISFrontDoorCdnProfile($PSBoundParameters['SkuName'])){ + Az.Cdn.internal\New-AzCdnProfile @PSBoundParameters + }else{ + throw "$($PSBoundParameters['SkuName']) is not a valid SKU. Please use a valid AzureFrontDoor SkuName."; + } + } +} + \ No newline at end of file diff --git a/src/Cdn/custom/New-AzFrontDoorCdnResourceReferenceObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnResourceReferenceObject.ps1 new file mode 100644 index 000000000000..8072c96b7a2e --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnResourceReferenceObject.ps1 @@ -0,0 +1,47 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for ResourceReference. +.Description +Create an in-memory object for ResourceReference. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnResourceReferenceObject +#> +function New-AzFrontDoorCdnResourceReferenceObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="Resource ID.")] + [string] + $Id + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference]::New() + + if ($PSBoundParameters.ContainsKey('Id')) { + $Object.Id = $Id + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleCookiesConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleCookiesConditionObject.ps1 new file mode 100644 index 000000000000..24351c940564 --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleCookiesConditionObject.ps1 @@ -0,0 +1,80 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleCookiesCondition. +.Description +Create an in-memory object for DeliveryRuleCookiesCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCookiesCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleCookiesConditionObject +#> +function New-AzFrontDoorCdnRuleCookiesConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCookiesCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator] + $ParameterOperator, + [Parameter(HelpMessage="Name of Cookies to be matched.")] + [string] + $ParameterSelector, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCookiesCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterSelector')) { + $Object.ParameterSelector = $ParameterSelector + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleHostNameConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleHostNameConditionObject.ps1 new file mode 100644 index 000000000000..62e79062c285 --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleHostNameConditionObject.ps1 @@ -0,0 +1,74 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleHostNameCondition. +.Description +Create an in-memory object for DeliveryRuleHostNameCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHostNameCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleHostNameConditionObject +#> +function New-AzFrontDoorCdnRuleHostNameConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHostNameCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator] + $ParameterOperator, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHostNameCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleHttpVersionConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleHttpVersionConditionObject.ps1 new file mode 100644 index 000000000000..61e19277b463 --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleHttpVersionConditionObject.ps1 @@ -0,0 +1,67 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleHttpVersionCondition. +.Description +Create an in-memory object for DeliveryRuleHttpVersionCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHttpVersionCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleHttpVersionConditionObject +#> +function New-AzFrontDoorCdnRuleHttpVersionConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHttpVersionCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHttpVersionCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleIsDeviceConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleIsDeviceConditionObject.ps1 new file mode 100644 index 000000000000..0c663034e1be --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleIsDeviceConditionObject.ps1 @@ -0,0 +1,67 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleIsDeviceCondition. +.Description +Create an in-memory object for DeliveryRuleIsDeviceCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleIsDeviceCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleIsDeviceConditionObject +#> +function New-AzFrontDoorCdnRuleIsDeviceConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleIsDeviceCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleIsDeviceCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRulePostArgsConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRulePostArgsConditionObject.ps1 new file mode 100644 index 000000000000..5004a4c0e28d --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRulePostArgsConditionObject.ps1 @@ -0,0 +1,80 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRulePostArgsCondition. +.Description +Create an in-memory object for DeliveryRulePostArgsCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRulePostArgsCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRulePostArgsConditionObject +#> +function New-AzFrontDoorCdnRulePostArgsConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRulePostArgsCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator] + $ParameterOperator, + [Parameter(HelpMessage="Name of PostArg to be matched.")] + [string] + $ParameterSelector, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRulePostArgsCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterSelector')) { + $Object.ParameterSelector = $ParameterSelector + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleQueryStringConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleQueryStringConditionObject.ps1 new file mode 100644 index 000000000000..3a08fe4ea97e --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleQueryStringConditionObject.ps1 @@ -0,0 +1,74 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleQueryStringCondition. +.Description +Create an in-memory object for DeliveryRuleQueryStringCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleQueryStringCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleQueryStringConditionObject +#> +function New-AzFrontDoorCdnRuleQueryStringConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleQueryStringCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator] + $ParameterOperator, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleQueryStringCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.ps1 new file mode 100644 index 000000000000..57bf73ea6ed2 --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.ps1 @@ -0,0 +1,74 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRemoteAddressCondition. +.Description +Create an in-memory object for DeliveryRuleRemoteAddressCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRemoteAddressCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRemoteAddressConditionObject +#> +function New-AzFrontDoorCdnRuleRemoteAddressConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRemoteAddressCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the variable with the given operator this match condition is considered a match.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator] + $ParameterOperator, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRemoteAddressCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleRequestBodyConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleRequestBodyConditionObject.ps1 new file mode 100644 index 000000000000..ca036278e18b --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleRequestBodyConditionObject.ps1 @@ -0,0 +1,74 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestBodyCondition. +.Description +Create an in-memory object for DeliveryRuleRequestBodyCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestBodyCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestBodyConditionObject +#> +function New-AzFrontDoorCdnRuleRequestBodyConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestBodyCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator] + $ParameterOperator, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestBodyCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleRequestHeaderActionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleRequestHeaderActionObject.ps1 new file mode 100644 index 000000000000..2f669655a93d --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleRequestHeaderActionObject.ps1 @@ -0,0 +1,67 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestHeaderAction. +.Description +Create an in-memory object for DeliveryRuleRequestHeaderAction. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestHeaderActionObject +#> +function New-AzFrontDoorCdnRuleRequestHeaderActionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderAction')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(Mandatory, HelpMessage="Action to perform.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction] + $ParameterHeaderAction, + [Parameter(Mandatory, HelpMessage="Name of the header to modify.")] + [string] + $ParameterHeaderName, + [Parameter(HelpMessage="Value for the specified action.")] + [string] + $ParameterValue, + [Parameter(Mandatory, HelpMessage="The name of the action for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderAction]::New() + + if ($PSBoundParameters.ContainsKey('ParameterHeaderAction')) { + $Object.ParameterHeaderAction = $ParameterHeaderAction + } + if ($PSBoundParameters.ContainsKey('ParameterHeaderName')) { + $Object.ParameterHeaderName = $ParameterHeaderName + } + if ($PSBoundParameters.ContainsKey('ParameterValue')) { + $Object.ParameterValue = $ParameterValue + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.ps1 new file mode 100644 index 000000000000..06baeace079d --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.ps1 @@ -0,0 +1,80 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestHeaderCondition. +.Description +Create an in-memory object for DeliveryRuleRequestHeaderCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestHeaderConditionObject +#> +function New-AzFrontDoorCdnRuleRequestHeaderConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator] + $ParameterOperator, + [Parameter(HelpMessage="Name of Header to be matched.")] + [string] + $ParameterSelector, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterSelector')) { + $Object.ParameterSelector = $ParameterSelector + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleRequestMethodConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleRequestMethodConditionObject.ps1 new file mode 100644 index 000000000000..afa59503c2fc --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleRequestMethodConditionObject.ps1 @@ -0,0 +1,67 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestMethodCondition. +.Description +Create an in-memory object for DeliveryRuleRequestMethodCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestMethodCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestMethodConditionObject +#> +function New-AzFrontDoorCdnRuleRequestMethodConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestMethodCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestMethodCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.ps1 new file mode 100644 index 000000000000..33c355b42b65 --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.ps1 @@ -0,0 +1,67 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestSchemeCondition. +.Description +Create an in-memory object for DeliveryRuleRequestSchemeCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestSchemeCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestSchemeConditionObject +#> +function New-AzFrontDoorCdnRuleRequestSchemeConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestSchemeCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestSchemeCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleRequestUriConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleRequestUriConditionObject.ps1 new file mode 100644 index 000000000000..fbe579f07365 --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleRequestUriConditionObject.ps1 @@ -0,0 +1,74 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestUriCondition. +.Description +Create an in-memory object for DeliveryRuleRequestUriCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestUriCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestUriConditionObject +#> +function New-AzFrontDoorCdnRuleRequestUriConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestUriCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator] + $ParameterOperator, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestUriCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleResponseHeaderActionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleResponseHeaderActionObject.ps1 new file mode 100644 index 000000000000..726bf15cd409 --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleResponseHeaderActionObject.ps1 @@ -0,0 +1,67 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleResponseHeaderAction. +.Description +Create an in-memory object for DeliveryRuleResponseHeaderAction. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleResponseHeaderAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleResponseHeaderActionObject +#> +function New-AzFrontDoorCdnRuleResponseHeaderActionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleResponseHeaderAction')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(Mandatory, HelpMessage="Action to perform.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction] + $ParameterHeaderAction, + [Parameter(Mandatory, HelpMessage="Name of the header to modify.")] + [string] + $ParameterHeaderName, + [Parameter(HelpMessage="Value for the specified action.")] + [string] + $ParameterValue, + [Parameter(Mandatory, HelpMessage="The name of the action for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleResponseHeaderAction]::New() + + if ($PSBoundParameters.ContainsKey('ParameterHeaderAction')) { + $Object.ParameterHeaderAction = $ParameterHeaderAction + } + if ($PSBoundParameters.ContainsKey('ParameterHeaderName')) { + $Object.ParameterHeaderName = $ParameterHeaderName + } + if ($PSBoundParameters.ContainsKey('ParameterValue')) { + $Object.ParameterValue = $ParameterValue + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.ps1 new file mode 100644 index 000000000000..6e26c595fe4a --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.ps1 @@ -0,0 +1,94 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRouteConfigurationOverrideAction. +.Description +Create an in-memory object for DeliveryRuleRouteConfigurationOverrideAction. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRouteConfigurationOverrideAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject +#> +function New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRouteConfigurationOverrideAction')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="Caching behavior for the requests.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior] + $CacheConfigurationCacheBehavior, + [Parameter(HelpMessage="The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss.")] + [string] + $CacheConfigurationCacheDuration, + [Parameter(HelpMessage="Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled] + $CacheConfigurationIsCompressionEnabled, + [Parameter(HelpMessage="query parameters to include or exclude (comma separated).")] + [string] + $CacheConfigurationQueryParameter, + [Parameter(HelpMessage="Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior] + $CacheConfigurationQueryStringCachingBehavior, + [Parameter(HelpMessage="Resource ID.")] + [string] + $OriginGroupId, + [Parameter(HelpMessage="Protocol this rule will use when forwarding traffic to backends.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol] + $OriginGroupOverrideForwardingProtocol, + [Parameter(Mandatory, HelpMessage="The name of the action for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRouteConfigurationOverrideAction]::New() + + if ($PSBoundParameters.ContainsKey('CacheConfigurationCacheBehavior')) { + $Object.CacheConfigurationCacheBehavior = $CacheConfigurationCacheBehavior + } + if ($PSBoundParameters.ContainsKey('CacheConfigurationCacheDuration')) { + $Object.CacheConfigurationCacheDuration = $CacheConfigurationCacheDuration + } + if ($PSBoundParameters.ContainsKey('CacheConfigurationIsCompressionEnabled')) { + $Object.CacheConfigurationIsCompressionEnabled = $CacheConfigurationIsCompressionEnabled + } + if ($PSBoundParameters.ContainsKey('CacheConfigurationQueryParameter')) { + $Object.CacheConfigurationQueryParameter = $CacheConfigurationQueryParameter + } + if ($PSBoundParameters.ContainsKey('CacheConfigurationQueryStringCachingBehavior')) { + $Object.CacheConfigurationQueryStringCachingBehavior = $CacheConfigurationQueryStringCachingBehavior + } + if ($PSBoundParameters.ContainsKey('OriginGroupId')) { + $Object.OriginGroupId = $OriginGroupId + } + if ($PSBoundParameters.ContainsKey('OriginGroupOverrideForwardingProtocol')) { + $Object.OriginGroupOverrideForwardingProtocol = $OriginGroupOverrideForwardingProtocol + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleServerPortConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleServerPortConditionObject.ps1 new file mode 100644 index 000000000000..0c273453ea9c --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleServerPortConditionObject.ps1 @@ -0,0 +1,74 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleServerPortCondition. +.Description +Create an in-memory object for DeliveryRuleServerPortCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleServerPortCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleServerPortConditionObject +#> +function New-AzFrontDoorCdnRuleServerPortConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleServerPortCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator] + $ParameterOperator, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleServerPortCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleSocketAddrConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleSocketAddrConditionObject.ps1 new file mode 100644 index 000000000000..56cd0442132b --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleSocketAddrConditionObject.ps1 @@ -0,0 +1,74 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleSocketAddrCondition. +.Description +Create an in-memory object for DeliveryRuleSocketAddrCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleSocketAddrCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleSocketAddrConditionObject +#> +function New-AzFrontDoorCdnRuleSocketAddrConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleSocketAddrCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator] + $ParameterOperator, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleSocketAddrCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleSslProtocolConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleSslProtocolConditionObject.ps1 new file mode 100644 index 000000000000..93e566302c74 --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleSslProtocolConditionObject.ps1 @@ -0,0 +1,68 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleSslProtocolCondition. +.Description +Create an in-memory object for DeliveryRuleSslProtocolCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleSslProtocolCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleSslProtocolConditionObject +#> +function New-AzFrontDoorCdnRuleSslProtocolConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleSslProtocolCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleSslProtocolCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.ps1 new file mode 100644 index 000000000000..074ef5dfe1e2 --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.ps1 @@ -0,0 +1,74 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleUrlFileExtensionCondition. +.Description +Create an in-memory object for DeliveryRuleUrlFileExtensionCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileExtensionCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlFileExtensionConditionObject +#> +function New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileExtensionCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator] + $ParameterOperator, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileExtensionCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.ps1 new file mode 100644 index 000000000000..c4c041365111 --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.ps1 @@ -0,0 +1,74 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleUrlFileNameCondition. +.Description +Create an in-memory object for DeliveryRuleUrlFileNameCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileNameCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlFileNameConditionObject +#> +function New-AzFrontDoorCdnRuleUrlFileNameConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileNameCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator] + $ParameterOperator, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileNameCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleUrlPathConditionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleUrlPathConditionObject.ps1 new file mode 100644 index 000000000000..d78781314fca --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleUrlPathConditionObject.ps1 @@ -0,0 +1,74 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleUrlPathCondition. +.Description +Create an in-memory object for DeliveryRuleUrlPathCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlPathCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlPathConditionObject +#> +function New-AzFrontDoorCdnRuleUrlPathConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlPathCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator] + $ParameterOperator, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlPathCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleUrlRedirectActionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleUrlRedirectActionObject.ps1 new file mode 100644 index 000000000000..d2167521d493 --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleUrlRedirectActionObject.ps1 @@ -0,0 +1,86 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for UrlRedirectAction. +.Description +Create an in-memory object for UrlRedirectAction. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlRedirectActionObject +#> +function New-AzFrontDoorCdnRuleUrlRedirectActionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectAction')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #.")] + [string] + $ParameterCustomFragment, + [Parameter(HelpMessage="Host to redirect. Leave empty to use the incoming host as the destination host.")] + [string] + $ParameterCustomHostname, + [Parameter(HelpMessage="The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path.")] + [string] + $ParameterCustomPath, + [Parameter(HelpMessage="The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query string. Query string must be in = format. ? and & will be added automatically so do not include them.")] + [string] + $ParameterCustomQueryString, + [Parameter(HelpMessage="Protocol to use for the redirect. The default value is MatchRequest.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol] + $ParameterDestinationProtocol, + [Parameter(Mandatory, HelpMessage="The redirect type the rule will use when redirecting traffic.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType] + $ParameterRedirectType, + [Parameter(Mandatory, HelpMessage="The name of the action for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectAction]::New() + + if ($PSBoundParameters.ContainsKey('ParameterCustomFragment')) { + $Object.ParameterCustomFragment = $ParameterCustomFragment + } + if ($PSBoundParameters.ContainsKey('ParameterCustomHostname')) { + $Object.ParameterCustomHostname = $ParameterCustomHostname + } + if ($PSBoundParameters.ContainsKey('ParameterCustomPath')) { + $Object.ParameterCustomPath = $ParameterCustomPath + } + if ($PSBoundParameters.ContainsKey('ParameterCustomQueryString')) { + $Object.ParameterCustomQueryString = $ParameterCustomQueryString + } + if ($PSBoundParameters.ContainsKey('ParameterDestinationProtocol')) { + $Object.ParameterDestinationProtocol = $ParameterDestinationProtocol + } + if ($PSBoundParameters.ContainsKey('ParameterRedirectType')) { + $Object.ParameterRedirectType = $ParameterRedirectType + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleUrlRewriteActionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleUrlRewriteActionObject.ps1 new file mode 100644 index 000000000000..396abd652e2f --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleUrlRewriteActionObject.ps1 @@ -0,0 +1,66 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for UrlRewriteAction. +.Description +Create an in-memory object for UrlRewriteAction. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlRewriteActionObject +#> +function New-AzFrontDoorCdnRuleUrlRewriteActionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteAction')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(Mandatory, HelpMessage="Define the relative URL to which the above requests will be rewritten by.")] + [string] + $ParameterDestination, + [Parameter(HelpMessage="Whether to preserve unmatched path. Default value is true.")] + [bool] + $ParameterPreserveUnmatchedPath, + [Parameter(Mandatory, HelpMessage="define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched.")] + [string] + $ParameterSourcePattern, + [Parameter(Mandatory, HelpMessage="The name of the action for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteAction]::New() + + if ($PSBoundParameters.ContainsKey('ParameterDestination')) { + $Object.ParameterDestination = $ParameterDestination + } + if ($PSBoundParameters.ContainsKey('ParameterPreserveUnmatchedPath')) { + $Object.ParameterPreserveUnmatchedPath = $ParameterPreserveUnmatchedPath + } + if ($PSBoundParameters.ContainsKey('ParameterSourcePattern')) { + $Object.ParameterSourcePattern = $ParameterSourcePattern + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnRuleUrlSigningActionObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnRuleUrlSigningActionObject.ps1 new file mode 100644 index 000000000000..be81d653b4f1 --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnRuleUrlSigningActionObject.ps1 @@ -0,0 +1,61 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for UrlSigningAction. +.Description +Create an in-memory object for UrlSigningAction. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlSigningActionObject +#> +function New-AzFrontDoorCdnRuleUrlSigningActionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningAction')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="Algorithm to use for URL signing.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm] + $ParameterAlgorithm, + [Parameter(HelpMessage="Defines which query string parameters in the url to be considered for expires, key id etc. .")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[]] + $ParameterNameOverride, + [Parameter(Mandatory, HelpMessage="The name of the action for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningAction]::New() + + if ($PSBoundParameters.ContainsKey('ParameterAlgorithm')) { + $Object.ParameterAlgorithm = $ParameterAlgorithm + } + if ($PSBoundParameters.ContainsKey('ParameterNameOverride')) { + $Object.ParameterNameOverride = $ParameterNameOverride + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.ps1 new file mode 100644 index 000000000000..13428b7cd548 --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.ps1 @@ -0,0 +1,72 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for CustomerCertificateParameters. +.Description +Create an in-memory object for CustomerCertificateParameters. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomerCertificateParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecretCustomerCertificateParametersObject +#> +function New-AzFrontDoorCdnSecretCustomerCertificateParametersObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomerCertificateParameters')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="Resource ID.")] + [string] + $SecretSourceId, + [Parameter(HelpMessage="Version of the secret to be used.")] + [string] + $SecretVersion, + [Parameter(HelpMessage="The list of SANs.")] + [string[]] + $SubjectAlternativeName, + [Parameter(HelpMessage="Whether to use the latest version for the certificate.")] + [bool] + $UseLatestVersion, + [Parameter(Mandatory, HelpMessage="The type of the secret resource.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType] + $Type + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomerCertificateParameters]::New() + + if ($PSBoundParameters.ContainsKey('SecretSourceId')) { + $Object.SecretSourceId = $SecretSourceId + } + if ($PSBoundParameters.ContainsKey('SecretVersion')) { + $Object.SecretVersion = $SecretVersion + } + if ($PSBoundParameters.ContainsKey('SubjectAlternativeName')) { + $Object.SubjectAlternativeName = $SubjectAlternativeName + } + if ($PSBoundParameters.ContainsKey('UseLatestVersion')) { + $Object.UseLatestVersion = $UseLatestVersion + } + if ($PSBoundParameters.ContainsKey('Type')) { + $Object.Type = $Type + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.ps1 new file mode 100644 index 000000000000..1a0e01efc399 --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.ps1 @@ -0,0 +1,48 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for AzureFirstPartyManagedCertificateParameters. +.Description +Create an in-memory object for AzureFirstPartyManagedCertificateParameters. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AzureFirstPartyManagedCertificateParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject +#> +function New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AzureFirstPartyManagedCertificateParameters')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(Mandatory, HelpMessage="The type of the secret resource.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType] + $Type + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AzureFirstPartyManagedCertificateParameters]::New() + + if ($PSBoundParameters.ContainsKey('Type')) { + $Object.Type = $Type + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.ps1 new file mode 100644 index 000000000000..397d2049ac8b --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.ps1 @@ -0,0 +1,48 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for ManagedCertificateParameters. +.Description +Create an in-memory object for ManagedCertificateParameters. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ManagedCertificateParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecretManagedCertificateParametersObject +#> +function New-AzFrontDoorCdnSecretManagedCertificateParametersObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ManagedCertificateParameters')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(Mandatory, HelpMessage="The type of the secret resource.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType] + $Type + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ManagedCertificateParameters]::New() + + if ($PSBoundParameters.ContainsKey('Type')) { + $Object.Type = $Type + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.ps1 new file mode 100644 index 000000000000..c147382b6df7 --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.ps1 @@ -0,0 +1,66 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for UrlSigningKeyParameters. +.Description +Create an in-memory object for UrlSigningKeyParameters. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKeyParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecretUrlSigningKeyParametersObject +#> +function New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKeyParameters')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(Mandatory, HelpMessage="Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash.")] + [string] + $KeyId, + [Parameter(HelpMessage="Resource ID.")] + [string] + $SecretSourceId, + [Parameter(HelpMessage="Version of the secret to be used.")] + [string] + $SecretVersion, + [Parameter(Mandatory, HelpMessage="The type of the secret resource.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType] + $Type + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKeyParameters]::New() + + if ($PSBoundParameters.ContainsKey('KeyId')) { + $Object.KeyId = $KeyId + } + if ($PSBoundParameters.ContainsKey('SecretSourceId')) { + $Object.SecretSourceId = $SecretSourceId + } + if ($PSBoundParameters.ContainsKey('SecretVersion')) { + $Object.SecretVersion = $SecretVersion + } + if ($PSBoundParameters.ContainsKey('Type')) { + $Object.Type = $Type + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.ps1 new file mode 100644 index 000000000000..d18717e4b31a --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.ps1 @@ -0,0 +1,53 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for SecurityPolicyWebApplicationFirewallAssociation. +.Description +Create an in-memory object for SecurityPolicyWebApplicationFirewallAssociation. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallAssociation +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject +#> +function New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallAssociation')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="List of domains.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[]] + $Domain, + [Parameter(HelpMessage="List of paths.")] + [string[]] + $PatternsToMatch + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallAssociation]::New() + + if ($PSBoundParameters.ContainsKey('Domain')) { + $Object.Domain = $Domain + } + if ($PSBoundParameters.ContainsKey('PatternsToMatch')) { + $Object.PatternsToMatch = $PatternsToMatch + } + return $Object + } +} + diff --git a/src/Cdn/custom/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.ps1 b/src/Cdn/custom/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.ps1 new file mode 100644 index 000000000000..dc3325a86efd --- /dev/null +++ b/src/Cdn/custom/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.ps1 @@ -0,0 +1,53 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for SecurityPolicyWebApplicationFirewallParameters. +.Description +Create an in-memory object for SecurityPolicyWebApplicationFirewallParameters. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnFrontDoorSecurityPolicyWebApplicationFirewallParametersObject +#> +function New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallParameters')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="Waf associations.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation[]] + $Association, + [Parameter(HelpMessage="Resource ID.")] + [string] + $WafPolicyId + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallParameters]::New() + + if ($PSBoundParameters.ContainsKey('Association')) { + $Object.Association = $Association + } + if ($PSBoundParameters.ContainsKey('WafPolicyId')) { + $Object.WafPolicyId = $WafPolicyId + } + return $Object + } +} + diff --git a/src/Cdn/custom/README.md b/src/Cdn/custom/README.md new file mode 100644 index 000000000000..46564ef06a48 --- /dev/null +++ b/src/Cdn/custom/README.md @@ -0,0 +1,41 @@ +# Custom +This directory contains custom implementation for non-generated cmdlets for the `Az.Cdn` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.Cdn.custom.psm1`. This file should not be modified. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: yes + +## Details +For `Az.Cdn` to use custom cmdlets, it does this two different ways. We **highly recommend** creating script cmdlets, as they are easier to write and allow access to the other exported cmdlets. C# cmdlets *cannot access exported cmdlets*. + +For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.Cdn.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder. + +For script cmdlets, these are loaded via the `Az.Cdn.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build. + +## Purpose +This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder. + +## Usage +The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters: +- Break +- DefaultProfile +- HttpPipelineAppend +- HttpPipelinePrepend +- Proxy +- ProxyCredential +- ProxyUseDefaultCredentials + +These provide functionality to our HTTP pipeline and other useful features. In script, you can forward these parameters using `$PSBoundParameters` to the other cmdlets you're calling within `Az.Cdn`. For C#, follow the usage seen in the `ProcessRecordAsync` method. + +### Attributes +For processing the cmdlets, we've created some additional attributes: +- `Microsoft.Azure.PowerShell.Cmdlets.Cdn.DescriptionAttribute` + - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. +- `Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotExportAttribute` + - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.Cdn`. +- `Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExportAttribute` + - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.Cdn`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder. +- `Microsoft.Azure.PowerShell.Cmdlets.Cdn.ProfileAttribute` + - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules. \ No newline at end of file diff --git a/src/Cdn/custom/Remove-AzCdnProfile.ps1 b/src/Cdn/custom/Remove-AzCdnProfile.ps1 new file mode 100644 index 000000000000..9b7869d3c44f --- /dev/null +++ b/src/Cdn/custom/Remove-AzCdnProfile.ps1 @@ -0,0 +1,178 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +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. +.Description +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. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnprofile +#> +function Remove-AzCdnProfile { + [OutputType([System.Boolean])] + [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process { + if ($PSCmdlet.ParameterSetName -eq 'Delete') { + $cdnProfile = Get-AzCdnProfile -ResourceGroupName ${ResourceGroupName} -Name ${Name} + } elseif ($PSCmdlet.ParameterSetName -eq 'DeleteViaIdentity') { + $cdnProfile = Get-AzCdnProfile -InputObject $InputObject + }else { + throw "Not supported ParameterSetName." + } + + if($null -eq $cdnProfile) + { + throw "Provided CdnProfile does not exist." + }else{ + if(-Not (ISFrontDoorCdnProfile($frontDoorCdnProfile.SkuName))){ + Az.Cdn.internal\Remove-AzCdnProfile @PSBoundParameters + }else{ + throw "Provided CdnProfile does not exist." + } + } + } +} + \ No newline at end of file diff --git a/src/Cdn/custom/Remove-AzFrontDoorCdnProfile.ps1 b/src/Cdn/custom/Remove-AzFrontDoorCdnProfile.ps1 new file mode 100644 index 000000000000..4cb2974ba1c4 --- /dev/null +++ b/src/Cdn/custom/Remove-AzFrontDoorCdnProfile.ps1 @@ -0,0 +1,178 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +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. +.Description +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. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnprofile +#> +function Remove-AzFrontDoorCdnProfile { + [OutputType([System.Boolean])] + [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process { + if ($PSCmdlet.ParameterSetName -eq 'Delete') { + $frontDoorCdnProfile = Get-AzFrontDoorCdnProfile -ResourceGroupName ${ResourceGroupName} -Name ${Name} + } elseif ($PSCmdlet.ParameterSetName -eq 'DeleteViaIdentity') { + $frontDoorCdnProfile = Get-AzFrontDoorCdnProfile -InputObject $InputObject + }else { + throw "Not supported ParameterSetName." + } + + if($null -eq $frontDoorCdnProfile) + { + throw "Provided FrontDoorCdnProfile does not exist." + }else{ + if(ISFrontDoorCdnProfile($frontDoorCdnProfile.SkuName)){ + Az.Cdn.internal\Remove-AzCdnProfile @PSBoundParameters + }else{ + throw "Provided FrontDoorCdnProfile does not exist." + } + } + } +} + \ No newline at end of file diff --git a/src/Cdn/custom/Update-AzCdnProfile.ps1 b/src/Cdn/custom/Update-AzCdnProfile.ps1 new file mode 100644 index 000000000000..c92043bc795c --- /dev/null +++ b/src/Cdn/custom/Update-AzCdnProfile.ps1 @@ -0,0 +1,184 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +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. +.Description +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. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Notes +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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azcdnprofile +#> +function Update-AzCdnProfile { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] + [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Send and receive timeout on forwarding request to the origin. + # When timeout is reached, the request fails and returns. + ${OriginResponseTimeoutSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags]))] + [System.Collections.Hashtable] + # Profile tags + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process { + if ($PSCmdlet.ParameterSetName -eq 'UpdateExpanded') { + $cdnProfile = Get-AzCdnProfile -ResourceGroupName ${ResourceGroupName} -Name ${Name} + } elseif ($PSCmdlet.ParameterSetName -eq 'UpdateViaIdentityExpanded') { + $cdnProfile = Get-AzCdnProfile -InputObject $InputObject + }else { + throw "Not supported ParameterSetName." + } + + if($null -eq $cdnProfile) + { + throw "Provided cdnProfile does not exist." + }else{ + if(-Not (ISFrontDoorCdnProfile($cdnProfile.SkuName))){ + Az.Cdn.internal\Update-AzCdnProfile @PSBoundParameters + }else{ + throw "Provided cdnProfile does not exist." + } + } + } +} + \ No newline at end of file diff --git a/src/Cdn/custom/Update-AzFrontDoorCdnProfile.ps1 b/src/Cdn/custom/Update-AzFrontDoorCdnProfile.ps1 new file mode 100644 index 000000000000..4f5c56f5c0f1 --- /dev/null +++ b/src/Cdn/custom/Update-AzFrontDoorCdnProfile.ps1 @@ -0,0 +1,184 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +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. +.Description +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. +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} +.Example +PS C:\> {{ Add code here }} + +{{ Add output here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Notes +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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnprofile +#> +function Update-AzFrontDoorCdnProfile { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] + [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Send and receive timeout on forwarding request to the origin. + # When timeout is reached, the request fails and returns. + ${OriginResponseTimeoutSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags]))] + [System.Collections.Hashtable] + # Profile tags + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process { + if ($PSCmdlet.ParameterSetName -eq 'UpdateExpanded') { + $frontDoorCdnProfile = Get-AzFrontDoorCdnProfile -ResourceGroupName ${ResourceGroupName} -Name ${Name} + } elseif ($PSCmdlet.ParameterSetName -eq 'UpdateViaIdentityExpanded') { + $frontDoorCdnProfile = Get-AzFrontDoorCdnProfile -InputObject $InputObject + }else { + throw "Not supported ParameterSetName." + } + + if($null -eq $frontDoorCdnProfile) + { + throw "Provided FrontDoorCdnProfile does not exist." + }else{ + if(ISFrontDoorCdnProfile($frontDoorCdnProfile.SkuName)){ + Az.Cdn.internal\Update-AzCdnProfile @PSBoundParameters + }else{ + throw "Provided FrontDoorCdnProfile does not exist." + } + } + } +} + \ No newline at end of file diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleCookiesConditionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleCookiesConditionObject.ps1 new file mode 100644 index 000000000000..063b758ab6fe --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleCookiesConditionObject.ps1 @@ -0,0 +1,80 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleCookiesCondition. +.Description +Create an in-memory object for DeliveryRuleCookiesCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCookiesCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleCookiesConditionObject +#> +function New-AzCdnDeliveryRuleCookiesConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCookiesCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator] + $ParameterOperator, + [Parameter(HelpMessage="Name of Cookies to be matched.")] + [string] + $ParameterSelector, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCookiesCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterSelector')) { + $Object.ParameterSelector = $ParameterSelector + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleHttpVersionConditionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleHttpVersionConditionObject.ps1 new file mode 100644 index 000000000000..3e0dd65fca32 --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleHttpVersionConditionObject.ps1 @@ -0,0 +1,67 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleHttpVersionCondition. +.Description +Create an in-memory object for DeliveryRuleHttpVersionCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHttpVersionCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleHttpVersionConditionObject +#> +function New-AzCdnDeliveryRuleHttpVersionConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHttpVersionCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHttpVersionCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleIsDeviceConditionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleIsDeviceConditionObject.ps1 new file mode 100644 index 000000000000..0c4c60df3d1d --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleIsDeviceConditionObject.ps1 @@ -0,0 +1,67 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleIsDeviceCondition. +.Description +Create an in-memory object for DeliveryRuleIsDeviceCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleIsDeviceCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleIsDeviceConditionObject +#> +function New-AzCdnDeliveryRuleIsDeviceConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleIsDeviceCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleIsDeviceCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleObject.ps1 new file mode 100644 index 000000000000..a0cd97a75b30 --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleObject.ps1 @@ -0,0 +1,65 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRule. +.Description +Create an in-memory object for DeliveryRule. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRule +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleObject +#> +function New-AzCdnDeliveryRuleObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRule')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(Mandatory, HelpMessage="A list of actions that are executed when all the conditions of a rule are satisfied.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[]] + $Action, + [Parameter(HelpMessage="A list of conditions that must be matched for the actions to be executed.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[]] + $Condition, + [Parameter(HelpMessage="Name of the rule.")] + [string] + $Name, + [Parameter(Mandatory, HelpMessage="The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.")] + [int] + $Order + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRule]::New() + + if ($PSBoundParameters.ContainsKey('Action')) { + $Object.Action = $Action + } + if ($PSBoundParameters.ContainsKey('Condition')) { + $Object.Condition = $Condition + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + if ($PSBoundParameters.ContainsKey('Order')) { + $Object.Order = $Order + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRulePostArgsConditionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRulePostArgsConditionObject.ps1 new file mode 100644 index 000000000000..eaaf9075369a --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRulePostArgsConditionObject.ps1 @@ -0,0 +1,80 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRulePostArgsCondition. +.Description +Create an in-memory object for DeliveryRulePostArgsCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRulePostArgsCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRulePostArgsConditionObject +#> +function New-AzCdnDeliveryRulePostArgsConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRulePostArgsCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator] + $ParameterOperator, + [Parameter(HelpMessage="Name of PostArg to be matched.")] + [string] + $ParameterSelector, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRulePostArgsCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterSelector')) { + $Object.ParameterSelector = $ParameterSelector + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleQueryStringConditionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleQueryStringConditionObject.ps1 new file mode 100644 index 000000000000..934485c3f11e --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleQueryStringConditionObject.ps1 @@ -0,0 +1,74 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleQueryStringCondition. +.Description +Create an in-memory object for DeliveryRuleQueryStringCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleQueryStringCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleQueryStringConditionObject +#> +function New-AzCdnDeliveryRuleQueryStringConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleQueryStringCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator] + $ParameterOperator, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleQueryStringCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRemoteAddressConditionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRemoteAddressConditionObject.ps1 new file mode 100644 index 000000000000..28c89feb4cf4 --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRemoteAddressConditionObject.ps1 @@ -0,0 +1,74 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRemoteAddressCondition. +.Description +Create an in-memory object for DeliveryRuleRemoteAddressCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRemoteAddressCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRemoteAddressConditionObject +#> +function New-AzCdnDeliveryRuleRemoteAddressConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRemoteAddressCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the variable with the given operator this match condition is considered a match.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator] + $ParameterOperator, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRemoteAddressCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestBodyConditionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestBodyConditionObject.ps1 new file mode 100644 index 000000000000..053b0dce0930 --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestBodyConditionObject.ps1 @@ -0,0 +1,74 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestBodyCondition. +.Description +Create an in-memory object for DeliveryRuleRequestBodyCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestBodyCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestBodyConditionObject +#> +function New-AzCdnDeliveryRuleRequestBodyConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestBodyCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator] + $ParameterOperator, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestBodyCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestHeaderActionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestHeaderActionObject.ps1 new file mode 100644 index 000000000000..daf6d60993d2 --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestHeaderActionObject.ps1 @@ -0,0 +1,67 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestHeaderAction. +.Description +Create an in-memory object for DeliveryRuleRequestHeaderAction. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestHeaderActionObject +#> +function New-AzCdnDeliveryRuleRequestHeaderActionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderAction')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(Mandatory, HelpMessage="Action to perform.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction] + $ParameterHeaderAction, + [Parameter(Mandatory, HelpMessage="Name of the header to modify.")] + [string] + $ParameterHeaderName, + [Parameter(HelpMessage="Value for the specified action.")] + [string] + $ParameterValue, + [Parameter(Mandatory, HelpMessage="The name of the action for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderAction]::New() + + if ($PSBoundParameters.ContainsKey('ParameterHeaderAction')) { + $Object.ParameterHeaderAction = $ParameterHeaderAction + } + if ($PSBoundParameters.ContainsKey('ParameterHeaderName')) { + $Object.ParameterHeaderName = $ParameterHeaderName + } + if ($PSBoundParameters.ContainsKey('ParameterValue')) { + $Object.ParameterValue = $ParameterValue + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestHeaderConditionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestHeaderConditionObject.ps1 new file mode 100644 index 000000000000..6e271ba79534 --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestHeaderConditionObject.ps1 @@ -0,0 +1,80 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestHeaderCondition. +.Description +Create an in-memory object for DeliveryRuleRequestHeaderCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestHeaderConditionObject +#> +function New-AzCdnDeliveryRuleRequestHeaderConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator] + $ParameterOperator, + [Parameter(HelpMessage="Name of Header to be matched.")] + [string] + $ParameterSelector, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterSelector')) { + $Object.ParameterSelector = $ParameterSelector + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestMethodConditionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestMethodConditionObject.ps1 new file mode 100644 index 000000000000..c6036e13a4ea --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestMethodConditionObject.ps1 @@ -0,0 +1,67 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestMethodCondition. +.Description +Create an in-memory object for DeliveryRuleRequestMethodCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestMethodCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestMethodConditionObject +#> +function New-AzCdnDeliveryRuleRequestMethodConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestMethodCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestMethodCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestSchemeConditionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestSchemeConditionObject.ps1 new file mode 100644 index 000000000000..3335115851ce --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestSchemeConditionObject.ps1 @@ -0,0 +1,67 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestSchemeCondition. +.Description +Create an in-memory object for DeliveryRuleRequestSchemeCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestSchemeCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestSchemeConditionObject +#> +function New-AzCdnDeliveryRuleRequestSchemeConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestSchemeCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestSchemeCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestUriConditionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestUriConditionObject.ps1 new file mode 100644 index 000000000000..7031a54d3997 --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleRequestUriConditionObject.ps1 @@ -0,0 +1,74 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestUriCondition. +.Description +Create an in-memory object for DeliveryRuleRequestUriCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestUriCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestUriConditionObject +#> +function New-AzCdnDeliveryRuleRequestUriConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestUriCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator] + $ParameterOperator, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestUriCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleResponseHeaderActionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleResponseHeaderActionObject.ps1 new file mode 100644 index 000000000000..de970a88b532 --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleResponseHeaderActionObject.ps1 @@ -0,0 +1,67 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleResponseHeaderAction. +.Description +Create an in-memory object for DeliveryRuleResponseHeaderAction. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleResponseHeaderAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleResponseHeaderActionObject +#> +function New-AzCdnDeliveryRuleResponseHeaderActionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleResponseHeaderAction')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(Mandatory, HelpMessage="Action to perform.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction] + $ParameterHeaderAction, + [Parameter(Mandatory, HelpMessage="Name of the header to modify.")] + [string] + $ParameterHeaderName, + [Parameter(HelpMessage="Value for the specified action.")] + [string] + $ParameterValue, + [Parameter(Mandatory, HelpMessage="The name of the action for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleResponseHeaderAction]::New() + + if ($PSBoundParameters.ContainsKey('ParameterHeaderAction')) { + $Object.ParameterHeaderAction = $ParameterHeaderAction + } + if ($PSBoundParameters.ContainsKey('ParameterHeaderName')) { + $Object.ParameterHeaderName = $ParameterHeaderName + } + if ($PSBoundParameters.ContainsKey('ParameterValue')) { + $Object.ParameterValue = $ParameterValue + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.ps1 new file mode 100644 index 000000000000..9636c144a2c4 --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.ps1 @@ -0,0 +1,74 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleUrlFileExtensionCondition. +.Description +Create an in-memory object for DeliveryRuleUrlFileExtensionCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileExtensionCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleUrlFileExtensionConditionObject +#> +function New-AzCdnDeliveryRuleUrlFileExtensionConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileExtensionCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator] + $ParameterOperator, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileExtensionCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleUrlFileNameConditionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleUrlFileNameConditionObject.ps1 new file mode 100644 index 000000000000..53d1ce81631f --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleUrlFileNameConditionObject.ps1 @@ -0,0 +1,74 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleUrlFileNameCondition. +.Description +Create an in-memory object for DeliveryRuleUrlFileNameCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileNameCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleUrlFileNameConditionObject +#> +function New-AzCdnDeliveryRuleUrlFileNameConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileNameCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator] + $ParameterOperator, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileNameCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleUrlPathConditionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleUrlPathConditionObject.ps1 new file mode 100644 index 000000000000..ed10490b2474 --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnDeliveryRuleUrlPathConditionObject.ps1 @@ -0,0 +1,74 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleUrlPathCondition. +.Description +Create an in-memory object for DeliveryRuleUrlPathCondition. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlPathCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleUrlPathConditionObject +#> +function New-AzCdnDeliveryRuleUrlPathConditionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlPathCondition')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The match value for the condition of the delivery rule.")] + [string[]] + $ParameterMatchValue, + [Parameter(HelpMessage="Describes if this is negate condition or not.")] + [bool] + $ParameterNegateCondition, + [Parameter(Mandatory, HelpMessage="Describes operator to be matched.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator] + $ParameterOperator, + [Parameter(HelpMessage="List of transforms.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + $ParameterTransform, + [Parameter(Mandatory, HelpMessage="The name of the condition for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlPathCondition]::New() + + if ($PSBoundParameters.ContainsKey('ParameterMatchValue')) { + $Object.ParameterMatchValue = $ParameterMatchValue + } + if ($PSBoundParameters.ContainsKey('ParameterNegateCondition')) { + $Object.ParameterNegateCondition = $ParameterNegateCondition + } + if ($PSBoundParameters.ContainsKey('ParameterOperator')) { + $Object.ParameterOperator = $ParameterOperator + } + if ($PSBoundParameters.ContainsKey('ParameterTransform')) { + $Object.ParameterTransform = $ParameterTransform + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnHealthProbeParametersObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnHealthProbeParametersObject.ps1 new file mode 100644 index 000000000000..c7921c89ffdf --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnHealthProbeParametersObject.ps1 @@ -0,0 +1,67 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for HealthProbeParameters. +.Description +Create an in-memory object for HealthProbeParameters. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnHealthProbeParametersObject +#> +function New-AzCdnHealthProbeParametersObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The number of seconds between health probes.Default is 240sec.")] + [int] + $ProbeIntervalInSecond, + [Parameter(HelpMessage="The path relative to the origin that is used to determine the health of the origin.")] + [string] + $ProbePath, + [Parameter(HelpMessage="Protocol to use for health probe.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol] + $ProbeProtocol, + [Parameter(HelpMessage="The type of health probe request that is made.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType] + $ProbeRequestType + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters]::New() + + if ($PSBoundParameters.ContainsKey('ProbeIntervalInSecond')) { + $Object.ProbeIntervalInSecond = $ProbeIntervalInSecond + } + if ($PSBoundParameters.ContainsKey('ProbePath')) { + $Object.ProbePath = $ProbePath + } + if ($PSBoundParameters.ContainsKey('ProbeProtocol')) { + $Object.ProbeProtocol = $ProbeProtocol + } + if ($PSBoundParameters.ContainsKey('ProbeRequestType')) { + $Object.ProbeRequestType = $ProbeRequestType + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnManagedHttpsParametersObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnManagedHttpsParametersObject.ps1 new file mode 100644 index 000000000000..4078cc4cb8bc --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnManagedHttpsParametersObject.ps1 @@ -0,0 +1,69 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for CdnManagedHttpsParameters. +.Description +Create an in-memory object for CdnManagedHttpsParameters. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CdnManagedHttpsParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnManagedHttpsParametersObject +#> +function New-AzCdnManagedHttpsParametersObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CdnManagedHttpsParameters')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(Mandatory, HelpMessage="Type of certificate used.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType] + $CertificateSourceParameterCertificateType, + [Parameter(Mandatory, HelpMessage="Defines the source of the SSL certificate.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource] + $CertificateSource, + [Parameter(HelpMessage="TLS protocol version that will be used for Https.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion] + $MinimumTlsVersion, + [Parameter(Mandatory, HelpMessage="Defines the TLS extension protocol that is used for secure delivery.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType] + $ProtocolType + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CdnManagedHttpsParameters]::New() + + if ($PSBoundParameters.ContainsKey('CertificateSourceParameterCertificateType')) { + $Object.CertificateSourceParameterCertificateType = $CertificateSourceParameterCertificateType + } + if ($PSBoundParameters.ContainsKey('CertificateSource')) { + $Object.CertificateSource = $CertificateSource + } + if ($PSBoundParameters.ContainsKey('MinimumTlsVersion')) { + $Object.MinimumTlsVersion = $MinimumTlsVersion + } + if ($PSBoundParameters.ContainsKey('ProtocolType')) { + $Object.ProtocolType = $ProtocolType + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnResourceReferenceObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnResourceReferenceObject.ps1 new file mode 100644 index 000000000000..564f319a68be --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnResourceReferenceObject.ps1 @@ -0,0 +1,47 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for ResourceReference. +.Description +Create an in-memory object for ResourceReference. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnResourceReferenceObject +#> +function New-AzCdnResourceReferenceObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="Resource ID.")] + [string] + $Id + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference]::New() + + if ($PSBoundParameters.ContainsKey('Id')) { + $Object.Id = $Id + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.ps1 new file mode 100644 index 000000000000..1f927dc8ea7e --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.ps1 @@ -0,0 +1,60 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for ResponseBasedOriginErrorDetectionParameters. +.Description +Create an in-memory object for ResponseBasedOriginErrorDetectionParameters. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnResponseBasedOriginErrorDetectionParametersObject +#> +function New-AzCdnResponseBasedOriginErrorDetectionParametersObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParameters')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters[]] + $HttpErrorRange, + [Parameter(HelpMessage="Type of response errors for real user requests for which origin will be deemed unhealthy.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes] + $ResponseBasedDetectedErrorType, + [Parameter(HelpMessage="The percentage of failed requests in the sample where failover should trigger.")] + [int] + $ResponseBasedFailoverThresholdPercentage + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParameters]::New() + + if ($PSBoundParameters.ContainsKey('HttpErrorRange')) { + $Object.HttpErrorRange = $HttpErrorRange + } + if ($PSBoundParameters.ContainsKey('ResponseBasedDetectedErrorType')) { + $Object.ResponseBasedDetectedErrorType = $ResponseBasedDetectedErrorType + } + if ($PSBoundParameters.ContainsKey('ResponseBasedFailoverThresholdPercentage')) { + $Object.ResponseBasedFailoverThresholdPercentage = $ResponseBasedFailoverThresholdPercentage + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnUrlRedirectActionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnUrlRedirectActionObject.ps1 new file mode 100644 index 000000000000..76711be311d7 --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnUrlRedirectActionObject.ps1 @@ -0,0 +1,86 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for UrlRedirectAction. +.Description +Create an in-memory object for UrlRedirectAction. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnUrlRedirectActionObject +#> +function New-AzCdnUrlRedirectActionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectAction')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #.")] + [string] + $ParameterCustomFragment, + [Parameter(HelpMessage="Host to redirect. Leave empty to use the incoming host as the destination host.")] + [string] + $ParameterCustomHostname, + [Parameter(HelpMessage="The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path.")] + [string] + $ParameterCustomPath, + [Parameter(HelpMessage="The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query string. Query string must be in = format. ? and & will be added automatically so do not include them.")] + [string] + $ParameterCustomQueryString, + [Parameter(HelpMessage="Protocol to use for the redirect. The default value is MatchRequest.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol] + $ParameterDestinationProtocol, + [Parameter(Mandatory, HelpMessage="The redirect type the rule will use when redirecting traffic.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType] + $ParameterRedirectType, + [Parameter(Mandatory, HelpMessage="The name of the action for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectAction]::New() + + if ($PSBoundParameters.ContainsKey('ParameterCustomFragment')) { + $Object.ParameterCustomFragment = $ParameterCustomFragment + } + if ($PSBoundParameters.ContainsKey('ParameterCustomHostname')) { + $Object.ParameterCustomHostname = $ParameterCustomHostname + } + if ($PSBoundParameters.ContainsKey('ParameterCustomPath')) { + $Object.ParameterCustomPath = $ParameterCustomPath + } + if ($PSBoundParameters.ContainsKey('ParameterCustomQueryString')) { + $Object.ParameterCustomQueryString = $ParameterCustomQueryString + } + if ($PSBoundParameters.ContainsKey('ParameterDestinationProtocol')) { + $Object.ParameterDestinationProtocol = $ParameterDestinationProtocol + } + if ($PSBoundParameters.ContainsKey('ParameterRedirectType')) { + $Object.ParameterRedirectType = $ParameterRedirectType + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnUrlRewriteActionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnUrlRewriteActionObject.ps1 new file mode 100644 index 000000000000..7ac22bd665fa --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnUrlRewriteActionObject.ps1 @@ -0,0 +1,66 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for UrlRewriteAction. +.Description +Create an in-memory object for UrlRewriteAction. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnUrlRewriteActionObject +#> +function New-AzCdnUrlRewriteActionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteAction')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(Mandatory, HelpMessage="Define the relative URL to which the above requests will be rewritten by.")] + [string] + $ParameterDestination, + [Parameter(HelpMessage="Whether to preserve unmatched path. Default value is true.")] + [bool] + $ParameterPreserveUnmatchedPath, + [Parameter(Mandatory, HelpMessage="define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched.")] + [string] + $ParameterSourcePattern, + [Parameter(Mandatory, HelpMessage="The name of the action for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteAction]::New() + + if ($PSBoundParameters.ContainsKey('ParameterDestination')) { + $Object.ParameterDestination = $ParameterDestination + } + if ($PSBoundParameters.ContainsKey('ParameterPreserveUnmatchedPath')) { + $Object.ParameterPreserveUnmatchedPath = $ParameterPreserveUnmatchedPath + } + if ($PSBoundParameters.ContainsKey('ParameterSourcePattern')) { + $Object.ParameterSourcePattern = $ParameterSourcePattern + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnUrlSigningActionObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnUrlSigningActionObject.ps1 new file mode 100644 index 000000000000..6b1bb4c33658 --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnUrlSigningActionObject.ps1 @@ -0,0 +1,61 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for UrlSigningAction. +.Description +Create an in-memory object for UrlSigningAction. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnUrlSigningActionObject +#> +function New-AzCdnUrlSigningActionObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningAction')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="Algorithm to use for URL signing.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm] + $ParameterAlgorithm, + [Parameter(HelpMessage="Defines which query string parameters in the url to be considered for expires, key id etc. .")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[]] + $ParameterNameOverride, + [Parameter(Mandatory, HelpMessage="The name of the action for the delivery rule.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + $Name + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningAction]::New() + + if ($PSBoundParameters.ContainsKey('ParameterAlgorithm')) { + $Object.ParameterAlgorithm = $ParameterAlgorithm + } + if ($PSBoundParameters.ContainsKey('ParameterNameOverride')) { + $Object.ParameterNameOverride = $ParameterNameOverride + } + if ($PSBoundParameters.ContainsKey('Name')) { + $Object.Name = $Name + } + return $Object + } +} + diff --git a/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnUserManagedHttpsParametersObject.ps1 b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnUserManagedHttpsParametersObject.ps1 new file mode 100644 index 000000000000..2b56b2913698 --- /dev/null +++ b/src/Cdn/custom/autogen-model-cmdlets/New-AzCdnUserManagedHttpsParametersObject.ps1 @@ -0,0 +1,92 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for UserManagedHttpsParameters. +.Description +Create an in-memory object for UserManagedHttpsParameters. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UserManagedHttpsParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnUserManagedHttpsParametersObject +#> +function New-AzCdnUserManagedHttpsParametersObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UserManagedHttpsParameters')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(Mandatory, HelpMessage="Resource group of the user's Key Vault containing the SSL certificate.")] + [string] + $CertificateSourceParameterResourceGroupName, + [Parameter(Mandatory, HelpMessage="The name of Key Vault Secret (representing the full certificate PFX) in Key Vault.")] + [string] + $CertificateSourceParameterSecretName, + [Parameter(HelpMessage="The version(GUID) of Key Vault Secret in Key Vault.")] + [string] + $CertificateSourceParameterSecretVersion, + [Parameter(Mandatory, HelpMessage="Subscription Id of the user's Key Vault containing the SSL certificate.")] + [string] + $CertificateSourceParameterSubscriptionId, + [Parameter(Mandatory, HelpMessage="The name of the user's Key Vault containing the SSL certificate.")] + [string] + $CertificateSourceParameterVaultName, + [Parameter(Mandatory, HelpMessage="Defines the source of the SSL certificate.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource] + $CertificateSource, + [Parameter(HelpMessage="TLS protocol version that will be used for Https.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion] + $MinimumTlsVersion, + [Parameter(Mandatory, HelpMessage="Defines the TLS extension protocol that is used for secure delivery.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType] + $ProtocolType + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UserManagedHttpsParameters]::New() + + if ($PSBoundParameters.ContainsKey('CertificateSourceParameterResourceGroupName')) { + $Object.CertificateSourceParameterResourceGroupName = $CertificateSourceParameterResourceGroupName + } + if ($PSBoundParameters.ContainsKey('CertificateSourceParameterSecretName')) { + $Object.CertificateSourceParameterSecretName = $CertificateSourceParameterSecretName + } + if ($PSBoundParameters.ContainsKey('CertificateSourceParameterSecretVersion')) { + $Object.CertificateSourceParameterSecretVersion = $CertificateSourceParameterSecretVersion + } + if ($PSBoundParameters.ContainsKey('CertificateSourceParameterSubscriptionId')) { + $Object.CertificateSourceParameterSubscriptionId = $CertificateSourceParameterSubscriptionId + } + if ($PSBoundParameters.ContainsKey('CertificateSourceParameterVaultName')) { + $Object.CertificateSourceParameterVaultName = $CertificateSourceParameterVaultName + } + if ($PSBoundParameters.ContainsKey('CertificateSource')) { + $Object.CertificateSource = $CertificateSource + } + if ($PSBoundParameters.ContainsKey('MinimumTlsVersion')) { + $Object.MinimumTlsVersion = $MinimumTlsVersion + } + if ($PSBoundParameters.ContainsKey('ProtocolType')) { + $Object.ProtocolType = $ProtocolType + } + return $Object + } +} + diff --git a/src/Cdn/custom/common/Utils.ps1 b/src/Cdn/custom/common/Utils.ps1 new file mode 100644 index 000000000000..88389a7391ef --- /dev/null +++ b/src/Cdn/custom/common/Utils.ps1 @@ -0,0 +1,8 @@ +function ISFrontDoorCdnProfile([string]$SkuName) { + if ($SkuName -eq [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName]::PremiumAzureFrontDoor -or + $SkuName -eq [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName]::StandardAzureFrontDoor) { + return $true + }else{ + return $false + } +} diff --git a/src/Cdn/examples/Clear-AzCdnEndpointContent.md b/src/Cdn/examples/Clear-AzCdnEndpointContent.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Clear-AzCdnEndpointContent.md @@ -0,0 +1,22 @@ +### 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/examples/Clear-AzFrontDoorCdnEndpointContent.md b/src/Cdn/examples/Clear-AzFrontDoorCdnEndpointContent.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Clear-AzFrontDoorCdnEndpointContent.md @@ -0,0 +1,22 @@ +### 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/examples/Disable-AzCdnCustomDomainCustomHttps.md b/src/Cdn/examples/Disable-AzCdnCustomDomainCustomHttps.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Disable-AzCdnCustomDomainCustomHttps.md @@ -0,0 +1,22 @@ +### 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/examples/Enable-AzCdnCustomDomainCustomHttps.md b/src/Cdn/examples/Enable-AzCdnCustomDomainCustomHttps.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Enable-AzCdnCustomDomainCustomHttps.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzCdnCustomDomain.md b/src/Cdn/examples/Get-AzCdnCustomDomain.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzCdnCustomDomain.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzCdnEdgeNode.md b/src/Cdn/examples/Get-AzCdnEdgeNode.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzCdnEdgeNode.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzCdnEndpoint.md b/src/Cdn/examples/Get-AzCdnEndpoint.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzCdnEndpoint.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzCdnEndpointResourceUsage.md b/src/Cdn/examples/Get-AzCdnEndpointResourceUsage.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzCdnEndpointResourceUsage.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzCdnOrigin.md b/src/Cdn/examples/Get-AzCdnOrigin.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzCdnOrigin.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzCdnOriginGroup.md b/src/Cdn/examples/Get-AzCdnOriginGroup.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzCdnOriginGroup.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzCdnProfile.md b/src/Cdn/examples/Get-AzCdnProfile.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzCdnProfile.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzCdnProfileResourceUsage.md b/src/Cdn/examples/Get-AzCdnProfileResourceUsage.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzCdnProfileResourceUsage.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzCdnProfileSupportedOptimizationType.md b/src/Cdn/examples/Get-AzCdnProfileSupportedOptimizationType.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzCdnProfileSupportedOptimizationType.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzCdnSubscriptionResourceUsage.md b/src/Cdn/examples/Get-AzCdnSubscriptionResourceUsage.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzCdnSubscriptionResourceUsage.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzFrontDoorCdnCustomDomain.md b/src/Cdn/examples/Get-AzFrontDoorCdnCustomDomain.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzFrontDoorCdnCustomDomain.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzFrontDoorCdnEndpoint.md b/src/Cdn/examples/Get-AzFrontDoorCdnEndpoint.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzFrontDoorCdnEndpoint.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzFrontDoorCdnEndpointResourceUsage.md b/src/Cdn/examples/Get-AzFrontDoorCdnEndpointResourceUsage.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzFrontDoorCdnEndpointResourceUsage.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzFrontDoorCdnOrigin.md b/src/Cdn/examples/Get-AzFrontDoorCdnOrigin.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzFrontDoorCdnOrigin.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzFrontDoorCdnOriginGroup.md b/src/Cdn/examples/Get-AzFrontDoorCdnOriginGroup.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzFrontDoorCdnOriginGroup.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzFrontDoorCdnOriginGroupResourceUsage.md b/src/Cdn/examples/Get-AzFrontDoorCdnOriginGroupResourceUsage.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzFrontDoorCdnOriginGroupResourceUsage.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzFrontDoorCdnProfile.md b/src/Cdn/examples/Get-AzFrontDoorCdnProfile.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzFrontDoorCdnProfile.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzFrontDoorCdnProfileResourceUsage.md b/src/Cdn/examples/Get-AzFrontDoorCdnProfileResourceUsage.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzFrontDoorCdnProfileResourceUsage.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzFrontDoorCdnRoute.md b/src/Cdn/examples/Get-AzFrontDoorCdnRoute.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzFrontDoorCdnRoute.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzFrontDoorCdnRule.md b/src/Cdn/examples/Get-AzFrontDoorCdnRule.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzFrontDoorCdnRule.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzFrontDoorCdnRuleSet.md b/src/Cdn/examples/Get-AzFrontDoorCdnRuleSet.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzFrontDoorCdnRuleSet.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzFrontDoorCdnRuleSetResourceUsage.md b/src/Cdn/examples/Get-AzFrontDoorCdnRuleSetResourceUsage.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzFrontDoorCdnRuleSetResourceUsage.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzFrontDoorCdnSecret.md b/src/Cdn/examples/Get-AzFrontDoorCdnSecret.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzFrontDoorCdnSecret.md @@ -0,0 +1,22 @@ +### 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/examples/Get-AzFrontDoorCdnSecurityPolicy.md b/src/Cdn/examples/Get-AzFrontDoorCdnSecurityPolicy.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Get-AzFrontDoorCdnSecurityPolicy.md @@ -0,0 +1,22 @@ +### 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/examples/Import-AzCdnEndpointContent.md b/src/Cdn/examples/Import-AzCdnEndpointContent.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Import-AzCdnEndpointContent.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnCustomDomain.md b/src/Cdn/examples/New-AzCdnCustomDomain.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnCustomDomain.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnDeliveryRuleCookiesConditionObject.md b/src/Cdn/examples/New-AzCdnDeliveryRuleCookiesConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnDeliveryRuleCookiesConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnDeliveryRuleHttpVersionConditionObject.md b/src/Cdn/examples/New-AzCdnDeliveryRuleHttpVersionConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnDeliveryRuleHttpVersionConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnDeliveryRuleIsDeviceConditionObject.md b/src/Cdn/examples/New-AzCdnDeliveryRuleIsDeviceConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnDeliveryRuleIsDeviceConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnDeliveryRuleObject.md b/src/Cdn/examples/New-AzCdnDeliveryRuleObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnDeliveryRuleObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnDeliveryRulePostArgsConditionObject.md b/src/Cdn/examples/New-AzCdnDeliveryRulePostArgsConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnDeliveryRulePostArgsConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnDeliveryRuleQueryStringConditionObject.md b/src/Cdn/examples/New-AzCdnDeliveryRuleQueryStringConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnDeliveryRuleQueryStringConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnDeliveryRuleRemoteAddressConditionObject.md b/src/Cdn/examples/New-AzCdnDeliveryRuleRemoteAddressConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnDeliveryRuleRemoteAddressConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnDeliveryRuleRequestBodyConditionObject.md b/src/Cdn/examples/New-AzCdnDeliveryRuleRequestBodyConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnDeliveryRuleRequestBodyConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnDeliveryRuleRequestHeaderActionObject.md b/src/Cdn/examples/New-AzCdnDeliveryRuleRequestHeaderActionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnDeliveryRuleRequestHeaderActionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnDeliveryRuleRequestHeaderConditionObject.md b/src/Cdn/examples/New-AzCdnDeliveryRuleRequestHeaderConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnDeliveryRuleRequestHeaderConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnDeliveryRuleRequestMethodConditionObject.md b/src/Cdn/examples/New-AzCdnDeliveryRuleRequestMethodConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnDeliveryRuleRequestMethodConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnDeliveryRuleRequestSchemeConditionObject.md b/src/Cdn/examples/New-AzCdnDeliveryRuleRequestSchemeConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnDeliveryRuleRequestSchemeConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnDeliveryRuleRequestUriConditionObject.md b/src/Cdn/examples/New-AzCdnDeliveryRuleRequestUriConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnDeliveryRuleRequestUriConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnDeliveryRuleResponseHeaderActionObject.md b/src/Cdn/examples/New-AzCdnDeliveryRuleResponseHeaderActionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnDeliveryRuleResponseHeaderActionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.md b/src/Cdn/examples/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnDeliveryRuleUrlFileNameConditionObject.md b/src/Cdn/examples/New-AzCdnDeliveryRuleUrlFileNameConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnDeliveryRuleUrlFileNameConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnDeliveryRuleUrlPathConditionObject.md b/src/Cdn/examples/New-AzCdnDeliveryRuleUrlPathConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnDeliveryRuleUrlPathConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnEndpoint.md b/src/Cdn/examples/New-AzCdnEndpoint.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnEndpoint.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnHealthProbeParametersObject.md b/src/Cdn/examples/New-AzCdnHealthProbeParametersObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnHealthProbeParametersObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnManagedHttpsParametersObject.md b/src/Cdn/examples/New-AzCdnManagedHttpsParametersObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnManagedHttpsParametersObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnOrigin.md b/src/Cdn/examples/New-AzCdnOrigin.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnOrigin.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnOriginGroup.md b/src/Cdn/examples/New-AzCdnOriginGroup.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnOriginGroup.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnProfile.md b/src/Cdn/examples/New-AzCdnProfile.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnProfile.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnResourceReferenceObject.md b/src/Cdn/examples/New-AzCdnResourceReferenceObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnResourceReferenceObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.md b/src/Cdn/examples/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnUrlRedirectActionObject.md b/src/Cdn/examples/New-AzCdnUrlRedirectActionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnUrlRedirectActionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnUrlRewriteActionObject.md b/src/Cdn/examples/New-AzCdnUrlRewriteActionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnUrlRewriteActionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnUrlSigningActionObject.md b/src/Cdn/examples/New-AzCdnUrlSigningActionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnUrlSigningActionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzCdnUserManagedHttpsParametersObject.md b/src/Cdn/examples/New-AzCdnUserManagedHttpsParametersObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzCdnUserManagedHttpsParametersObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnCustomDomain.md b/src/Cdn/examples/New-AzFrontDoorCdnCustomDomain.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnCustomDomain.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.md b/src/Cdn/examples/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnEndpoint.md b/src/Cdn/examples/New-AzFrontDoorCdnEndpoint.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnEndpoint.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnOrigin.md b/src/Cdn/examples/New-AzFrontDoorCdnOrigin.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnOrigin.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnOriginGroup.md b/src/Cdn/examples/New-AzFrontDoorCdnOriginGroup.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnOriginGroup.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.md b/src/Cdn/examples/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.md b/src/Cdn/examples/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnProfile.md b/src/Cdn/examples/New-AzFrontDoorCdnProfile.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnProfile.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnResourceReferenceObject.md b/src/Cdn/examples/New-AzFrontDoorCdnResourceReferenceObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnResourceReferenceObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRoute.md b/src/Cdn/examples/New-AzFrontDoorCdnRoute.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRoute.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRule.md b/src/Cdn/examples/New-AzFrontDoorCdnRule.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRule.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleClientPortConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleClientPortConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleClientPortConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleCookiesConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleCookiesConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleCookiesConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleHostNameConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleHostNameConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleHostNameConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleHttpVersionConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleHttpVersionConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleHttpVersionConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleIsDeviceConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleIsDeviceConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleIsDeviceConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRulePostArgsConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRulePostArgsConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRulePostArgsConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleQueryStringConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleQueryStringConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleQueryStringConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleRequestBodyConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleRequestBodyConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleRequestBodyConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleRequestHeaderActionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleRequestHeaderActionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleRequestHeaderActionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleRequestMethodConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleRequestMethodConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleRequestMethodConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleRequestUriConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleRequestUriConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleRequestUriConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleResponseHeaderActionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleResponseHeaderActionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleResponseHeaderActionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleServerPortConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleServerPortConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleServerPortConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleSet.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleSet.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleSet.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleSocketAddrConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleSocketAddrConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleSocketAddrConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleSslProtocolConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleSslProtocolConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleSslProtocolConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleUrlPathConditionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleUrlPathConditionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleUrlPathConditionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleUrlRedirectActionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleUrlRedirectActionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleUrlRedirectActionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleUrlRewriteActionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleUrlRewriteActionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleUrlRewriteActionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnRuleUrlSigningActionObject.md b/src/Cdn/examples/New-AzFrontDoorCdnRuleUrlSigningActionObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnRuleUrlSigningActionObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnSecret.md b/src/Cdn/examples/New-AzFrontDoorCdnSecret.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnSecret.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.md b/src/Cdn/examples/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.md b/src/Cdn/examples/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.md b/src/Cdn/examples/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.md b/src/Cdn/examples/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnSecurityPolicy.md b/src/Cdn/examples/New-AzFrontDoorCdnSecurityPolicy.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnSecurityPolicy.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.md b/src/Cdn/examples/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.md @@ -0,0 +1,22 @@ +### 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/examples/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.md b/src/Cdn/examples/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.md @@ -0,0 +1,22 @@ +### 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/examples/Remove-AzCdnCustomDomain.md b/src/Cdn/examples/Remove-AzCdnCustomDomain.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Remove-AzCdnCustomDomain.md @@ -0,0 +1,22 @@ +### 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/examples/Remove-AzCdnEndpoint.md b/src/Cdn/examples/Remove-AzCdnEndpoint.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Remove-AzCdnEndpoint.md @@ -0,0 +1,22 @@ +### 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/examples/Remove-AzCdnOrigin.md b/src/Cdn/examples/Remove-AzCdnOrigin.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Remove-AzCdnOrigin.md @@ -0,0 +1,22 @@ +### 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/examples/Remove-AzCdnOriginGroup.md b/src/Cdn/examples/Remove-AzCdnOriginGroup.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Remove-AzCdnOriginGroup.md @@ -0,0 +1,22 @@ +### 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/examples/Remove-AzCdnProfile.md b/src/Cdn/examples/Remove-AzCdnProfile.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Remove-AzCdnProfile.md @@ -0,0 +1,22 @@ +### 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/examples/Remove-AzFrontDoorCdnCustomDomain.md b/src/Cdn/examples/Remove-AzFrontDoorCdnCustomDomain.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Remove-AzFrontDoorCdnCustomDomain.md @@ -0,0 +1,22 @@ +### 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/examples/Remove-AzFrontDoorCdnEndpoint.md b/src/Cdn/examples/Remove-AzFrontDoorCdnEndpoint.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Remove-AzFrontDoorCdnEndpoint.md @@ -0,0 +1,22 @@ +### 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/examples/Remove-AzFrontDoorCdnOrigin.md b/src/Cdn/examples/Remove-AzFrontDoorCdnOrigin.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Remove-AzFrontDoorCdnOrigin.md @@ -0,0 +1,22 @@ +### 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/examples/Remove-AzFrontDoorCdnOriginGroup.md b/src/Cdn/examples/Remove-AzFrontDoorCdnOriginGroup.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Remove-AzFrontDoorCdnOriginGroup.md @@ -0,0 +1,22 @@ +### 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/examples/Remove-AzFrontDoorCdnProfile.md b/src/Cdn/examples/Remove-AzFrontDoorCdnProfile.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Remove-AzFrontDoorCdnProfile.md @@ -0,0 +1,22 @@ +### 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/examples/Remove-AzFrontDoorCdnRoute.md b/src/Cdn/examples/Remove-AzFrontDoorCdnRoute.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Remove-AzFrontDoorCdnRoute.md @@ -0,0 +1,22 @@ +### 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/examples/Remove-AzFrontDoorCdnRule.md b/src/Cdn/examples/Remove-AzFrontDoorCdnRule.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Remove-AzFrontDoorCdnRule.md @@ -0,0 +1,22 @@ +### 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/examples/Remove-AzFrontDoorCdnRuleSet.md b/src/Cdn/examples/Remove-AzFrontDoorCdnRuleSet.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Remove-AzFrontDoorCdnRuleSet.md @@ -0,0 +1,22 @@ +### 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/examples/Remove-AzFrontDoorCdnSecret.md b/src/Cdn/examples/Remove-AzFrontDoorCdnSecret.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Remove-AzFrontDoorCdnSecret.md @@ -0,0 +1,22 @@ +### 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/examples/Remove-AzFrontDoorCdnSecurityPolicy.md b/src/Cdn/examples/Remove-AzFrontDoorCdnSecurityPolicy.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Remove-AzFrontDoorCdnSecurityPolicy.md @@ -0,0 +1,22 @@ +### 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/examples/Start-AzCdnEndpoint.md b/src/Cdn/examples/Start-AzCdnEndpoint.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Start-AzCdnEndpoint.md @@ -0,0 +1,22 @@ +### 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/examples/Stop-AzCdnEndpoint.md b/src/Cdn/examples/Stop-AzCdnEndpoint.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Stop-AzCdnEndpoint.md @@ -0,0 +1,22 @@ +### 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/examples/Test-AzCdnEndpointCustomDomain.md b/src/Cdn/examples/Test-AzCdnEndpointCustomDomain.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Test-AzCdnEndpointCustomDomain.md @@ -0,0 +1,22 @@ +### 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/examples/Test-AzCdnNameAvailability.md b/src/Cdn/examples/Test-AzCdnNameAvailability.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Test-AzCdnNameAvailability.md @@ -0,0 +1,22 @@ +### 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/examples/Test-AzCdnProbe.md b/src/Cdn/examples/Test-AzCdnProbe.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Test-AzCdnProbe.md @@ -0,0 +1,22 @@ +### 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/examples/Test-AzFrontDoorCdnEndpointCustomDomain.md b/src/Cdn/examples/Test-AzFrontDoorCdnEndpointCustomDomain.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Test-AzFrontDoorCdnEndpointCustomDomain.md @@ -0,0 +1,22 @@ +### 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/examples/Test-AzFrontDoorCdnEndpointNameAvailability.md b/src/Cdn/examples/Test-AzFrontDoorCdnEndpointNameAvailability.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Test-AzFrontDoorCdnEndpointNameAvailability.md @@ -0,0 +1,22 @@ +### 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/examples/Test-AzFrontDoorCdnProfileHostNameAvailability.md b/src/Cdn/examples/Test-AzFrontDoorCdnProfileHostNameAvailability.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Test-AzFrontDoorCdnProfileHostNameAvailability.md @@ -0,0 +1,22 @@ +### 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/examples/Update-AzCdnEndpoint.md b/src/Cdn/examples/Update-AzCdnEndpoint.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Update-AzCdnEndpoint.md @@ -0,0 +1,22 @@ +### 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/examples/Update-AzCdnOrigin.md b/src/Cdn/examples/Update-AzCdnOrigin.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Update-AzCdnOrigin.md @@ -0,0 +1,22 @@ +### 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/examples/Update-AzCdnOriginGroup.md b/src/Cdn/examples/Update-AzCdnOriginGroup.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Update-AzCdnOriginGroup.md @@ -0,0 +1,22 @@ +### 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/examples/Update-AzCdnProfile.md b/src/Cdn/examples/Update-AzCdnProfile.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Update-AzCdnProfile.md @@ -0,0 +1,22 @@ +### 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/examples/Update-AzFrontDoorCdnCustomDomain.md b/src/Cdn/examples/Update-AzFrontDoorCdnCustomDomain.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Update-AzFrontDoorCdnCustomDomain.md @@ -0,0 +1,22 @@ +### 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/examples/Update-AzFrontDoorCdnCustomDomainValidationToken.md b/src/Cdn/examples/Update-AzFrontDoorCdnCustomDomainValidationToken.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Update-AzFrontDoorCdnCustomDomainValidationToken.md @@ -0,0 +1,22 @@ +### 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/examples/Update-AzFrontDoorCdnEndpoint.md b/src/Cdn/examples/Update-AzFrontDoorCdnEndpoint.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Update-AzFrontDoorCdnEndpoint.md @@ -0,0 +1,22 @@ +### 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/examples/Update-AzFrontDoorCdnOrigin.md b/src/Cdn/examples/Update-AzFrontDoorCdnOrigin.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Update-AzFrontDoorCdnOrigin.md @@ -0,0 +1,22 @@ +### 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/examples/Update-AzFrontDoorCdnOriginGroup.md b/src/Cdn/examples/Update-AzFrontDoorCdnOriginGroup.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Update-AzFrontDoorCdnOriginGroup.md @@ -0,0 +1,22 @@ +### 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/examples/Update-AzFrontDoorCdnProfile.md b/src/Cdn/examples/Update-AzFrontDoorCdnProfile.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Update-AzFrontDoorCdnProfile.md @@ -0,0 +1,22 @@ +### 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/examples/Update-AzFrontDoorCdnRoute.md b/src/Cdn/examples/Update-AzFrontDoorCdnRoute.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Update-AzFrontDoorCdnRoute.md @@ -0,0 +1,22 @@ +### 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/examples/Update-AzFrontDoorCdnRule.md b/src/Cdn/examples/Update-AzFrontDoorCdnRule.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Update-AzFrontDoorCdnRule.md @@ -0,0 +1,22 @@ +### 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/examples/Update-AzFrontDoorCdnSecurityPolicy.md b/src/Cdn/examples/Update-AzFrontDoorCdnSecurityPolicy.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Cdn/examples/Update-AzFrontDoorCdnSecurityPolicy.md @@ -0,0 +1,22 @@ +### 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/export-surface.ps1 b/src/Cdn/export-surface.ps1 new file mode 100644 index 000000000000..439cca46e5b1 --- /dev/null +++ b/src/Cdn/export-surface.ps1 @@ -0,0 +1,41 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $Isolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + return +} + +$dll = Join-Path $PSScriptRoot 'bin\Az.Cdn.private.dll' +if(-not (Test-Path $dll)) { + Write-Error "Unable to find output assembly in '$binFolder'." +} +$null = Import-Module -Name $dll + +$moduleName = 'Az.Cdn' +$exportsFolder = Join-Path $PSScriptRoot 'exports' +$resourcesFolder = Join-Path $PSScriptRoot 'resources' + +Export-CmdletSurface -ModuleName $moduleName -CmdletFolder $exportsFolder -OutputFolder $resourcesFolder -IncludeGeneralParameters $IncludeGeneralParameters.IsPresent -UseExpandedFormat $UseExpandedFormat.IsPresent +Write-Host -ForegroundColor Green "CmdletSurface file(s) created in '$resourcesFolder'" + +Export-ModelSurface -OutputFolder $resourcesFolder -UseExpandedFormat $UseExpandedFormat.IsPresent +Write-Host -ForegroundColor Green "ModelSurface file created in '$resourcesFolder'" + +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/src/Cdn/exports/Clear-AzCdnEndpointContent.ps1 b/src/Cdn/exports/Clear-AzCdnEndpointContent.ps1 new file mode 100644 index 000000000000..1aa6ccffd5c8 --- /dev/null +++ b/src/Cdn/exports/Clear-AzCdnEndpointContent.ps1 @@ -0,0 +1,260 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Removes a content from CDN. +.Description +Removes a content from CDN. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + +CONTENTFILEPATH : Parameters required for content purge. + ContentPath : The path to the content to be purged. Can describe a file path or a wild card directory. + +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/clear-azcdnendpointcontent +#> +function Clear-AzCdnEndpointContent { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='PurgeExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Purge1', Mandatory)] + [Parameter(ParameterSetName='PurgeExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Purge1', Mandatory)] + [Parameter(ParameterSetName='PurgeExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Purge1', Mandatory)] + [Parameter(ParameterSetName='PurgeExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Purge1')] + [Parameter(ParameterSetName='PurgeExpanded1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='PurgeViaIdentity1', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PurgeViaIdentityExpanded1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Purge1', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PurgeViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters] + # Parameters required for content purge. + # To construct, see NOTES section for CONTENTFILEPATH properties and create a hash table. + ${ContentFilePath}, + + [Parameter(ParameterSetName='PurgeExpanded1', Mandatory)] + [Parameter(ParameterSetName='PurgeViaIdentityExpanded1', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The path to the content to be purged. + # Can describe a file path or a wild card directory. + ${ContentPath}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Purge1 = 'Az.Cdn.private\Clear-AzCdnEndpointContent_Purge1'; + PurgeExpanded1 = 'Az.Cdn.private\Clear-AzCdnEndpointContent_PurgeExpanded1'; + PurgeViaIdentity1 = 'Az.Cdn.private\Clear-AzCdnEndpointContent_PurgeViaIdentity1'; + PurgeViaIdentityExpanded1 = 'Az.Cdn.private\Clear-AzCdnEndpointContent_PurgeViaIdentityExpanded1'; + } + if (('Purge1', 'PurgeExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Clear-AzFrontDoorCdnEndpointContent.ps1 b/src/Cdn/exports/Clear-AzFrontDoorCdnEndpointContent.ps1 new file mode 100644 index 000000000000..a6f4a0f68534 --- /dev/null +++ b/src/Cdn/exports/Clear-AzFrontDoorCdnEndpointContent.ps1 @@ -0,0 +1,269 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Removes a content from AzureFrontDoor. +.Description +Removes a content from AzureFrontDoor. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + +CONTENT : Parameters required for content purge. + ContentPath : The path to the content to be purged. Can describe a file path or a wild card directory. + [Domain ]: List of domains. + +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/clear-azfrontdoorcdnendpointcontent +#> +function Clear-AzFrontDoorCdnEndpointContent { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='PurgeExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Purge', Mandatory)] + [Parameter(ParameterSetName='PurgeExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Purge', Mandatory)] + [Parameter(ParameterSetName='PurgeExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Purge', Mandatory)] + [Parameter(ParameterSetName='PurgeExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Purge')] + [Parameter(ParameterSetName='PurgeExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='PurgeViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PurgeViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Purge', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PurgeViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters] + # Parameters required for content purge. + # To construct, see NOTES section for CONTENT properties and create a hash table. + ${Content}, + + [Parameter(ParameterSetName='PurgeExpanded', Mandatory)] + [Parameter(ParameterSetName='PurgeViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The path to the content to be purged. + # Can describe a file path or a wild card directory. + ${ContentPath}, + + [Parameter(ParameterSetName='PurgeExpanded')] + [Parameter(ParameterSetName='PurgeViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # List of domains. + ${Domain}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Purge = 'Az.Cdn.private\Clear-AzFrontDoorCdnEndpointContent_Purge'; + PurgeExpanded = 'Az.Cdn.private\Clear-AzFrontDoorCdnEndpointContent_PurgeExpanded'; + PurgeViaIdentity = 'Az.Cdn.private\Clear-AzFrontDoorCdnEndpointContent_PurgeViaIdentity'; + PurgeViaIdentityExpanded = 'Az.Cdn.private\Clear-AzFrontDoorCdnEndpointContent_PurgeViaIdentityExpanded'; + } + if (('Purge', 'PurgeExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Disable-AzCdnCustomDomainCustomHttps.ps1 b/src/Cdn/exports/Disable-AzCdnCustomDomainCustomHttps.ps1 new file mode 100644 index 000000000000..c5116107d3ff --- /dev/null +++ b/src/Cdn/exports/Disable-AzCdnCustomDomainCustomHttps.ps1 @@ -0,0 +1,225 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Disable https delivery of the custom domain. +.Description +Disable https delivery of the custom domain. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/disable-azcdncustomdomaincustomhttps +#> +function Disable-AzCdnCustomDomainCustomHttps { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain])] +[CmdletBinding(DefaultParameterSetName='Disable', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Disable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the custom domain within an endpoint. + ${CustomDomainName}, + + [Parameter(ParameterSetName='Disable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Disable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Disable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Disable')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DisableViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Disable = 'Az.Cdn.private\Disable-AzCdnCustomDomainCustomHttps_Disable'; + DisableViaIdentity = 'Az.Cdn.private\Disable-AzCdnCustomDomainCustomHttps_DisableViaIdentity'; + } + if (('Disable') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Enable-AzCdnCustomDomainCustomHttps.ps1 b/src/Cdn/exports/Enable-AzCdnCustomDomainCustomHttps.ps1 new file mode 100644 index 000000000000..4a1fea279be4 --- /dev/null +++ b/src/Cdn/exports/Enable-AzCdnCustomDomainCustomHttps.ps1 @@ -0,0 +1,239 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Enable https delivery of the custom domain. +.Description +Enable https delivery of the custom domain. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain +.Notes +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. + +CUSTOMDOMAINHTTPSPARAMETER : The JSON object that contains the properties to secure a custom domain. + CertificateSource : Defines the source of the SSL certificate. + ProtocolType : Defines the TLS extension protocol that is used for secure delivery. + [MinimumTlsVersion ]: TLS protocol version that will be used for Https + +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/enable-azcdncustomdomaincustomhttps +#> +function Enable-AzCdnCustomDomainCustomHttps { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain])] +[CmdletBinding(DefaultParameterSetName='EnableViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Enable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the custom domain within an endpoint. + ${CustomDomainName}, + + [Parameter(ParameterSetName='Enable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Enable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Enable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Enable')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='EnableViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters] + # The JSON object that contains the properties to secure a custom domain. + # To construct, see NOTES section for CUSTOMDOMAINHTTPSPARAMETER properties and create a hash table. + ${CustomDomainHttpsParameter}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Enable = 'Az.Cdn.private\Enable-AzCdnCustomDomainCustomHttps_Enable'; + EnableViaIdentity = 'Az.Cdn.private\Enable-AzCdnCustomDomainCustomHttps_EnableViaIdentity'; + } + if (('Enable') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzCdnCustomDomain.ps1 b/src/Cdn/exports/Get-AzCdnCustomDomain.ps1 new file mode 100644 index 000000000000..51ab70badc7f --- /dev/null +++ b/src/Cdn/exports/Get-AzCdnCustomDomain.ps1 @@ -0,0 +1,225 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets an existing custom domain within an endpoint. +.Description +Gets an existing custom domain within an endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdncustomdomain +#> +function Get-AzCdnCustomDomain { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Alias('CustomDomainName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the custom domain within an endpoint. + ${Name}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get1')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get1 = 'Az.Cdn.private\Get-AzCdnCustomDomain_Get1'; + GetViaIdentity1 = 'Az.Cdn.private\Get-AzCdnCustomDomain_GetViaIdentity1'; + List1 = 'Az.Cdn.private\Get-AzCdnCustomDomain_List1'; + } + if (('Get1', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzCdnEdgeNode.ps1 b/src/Cdn/exports/Get-AzCdnEdgeNode.ps1 new file mode 100644 index 000000000000..92a305e7b204 --- /dev/null +++ b/src/Cdn/exports/Get-AzCdnEdgeNode.ps1 @@ -0,0 +1,156 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users. +.Description +Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnedgenode +#> +function Get-AzCdnEdgeNode { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Cdn.private\Get-AzCdnEdgeNode_List'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzCdnEndpoint.ps1 b/src/Cdn/exports/Get-AzCdnEndpoint.ps1 new file mode 100644 index 000000000000..0e388df9fdbd --- /dev/null +++ b/src/Cdn/exports/Get-AzCdnEndpoint.ps1 @@ -0,0 +1,218 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Description +Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnendpoint +#> +function Get-AzCdnEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get1', Mandatory)] + [Alias('EndpointName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${Name}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get1')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get1 = 'Az.Cdn.private\Get-AzCdnEndpoint_Get1'; + GetViaIdentity1 = 'Az.Cdn.private\Get-AzCdnEndpoint_GetViaIdentity1'; + List1 = 'Az.Cdn.private\Get-AzCdnEndpoint_List1'; + } + if (('Get1', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzCdnEndpointResourceUsage.ps1 b/src/Cdn/exports/Get-AzCdnEndpointResourceUsage.ps1 new file mode 100644 index 000000000000..beac3819176d --- /dev/null +++ b/src/Cdn/exports/Get-AzCdnEndpointResourceUsage.ps1 @@ -0,0 +1,184 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Checks the quota and usage of geo filters and custom domains under the given endpoint. +.Description +Checks the quota and usage of geo filters and custom domains under the given endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnendpointresourceusage +#> +function Get-AzCdnEndpointResourceUsage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List1 = 'Az.Cdn.private\Get-AzCdnEndpointResourceUsage_List1'; + } + if (('List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzCdnOrigin.ps1 b/src/Cdn/exports/Get-AzCdnOrigin.ps1 new file mode 100644 index 000000000000..0019a8b7a676 --- /dev/null +++ b/src/Cdn/exports/Get-AzCdnOrigin.ps1 @@ -0,0 +1,225 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets an existing origin within an endpoint. +.Description +Gets an existing origin within an endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnorigin +#> +function Get-AzCdnOrigin { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Alias('OriginName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin which is unique within the endpoint. + ${Name}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get1')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get1 = 'Az.Cdn.private\Get-AzCdnOrigin_Get1'; + GetViaIdentity1 = 'Az.Cdn.private\Get-AzCdnOrigin_GetViaIdentity1'; + List1 = 'Az.Cdn.private\Get-AzCdnOrigin_List1'; + } + if (('Get1', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzCdnOriginGroup.ps1 b/src/Cdn/exports/Get-AzCdnOriginGroup.ps1 new file mode 100644 index 000000000000..9b831888678f --- /dev/null +++ b/src/Cdn/exports/Get-AzCdnOriginGroup.ps1 @@ -0,0 +1,225 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets an existing origin group within an endpoint. +.Description +Gets an existing origin group within an endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnorigingroup +#> +function Get-AzCdnOriginGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Alias('OriginGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the endpoint. + ${Name}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get1')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get1 = 'Az.Cdn.private\Get-AzCdnOriginGroup_Get1'; + GetViaIdentity1 = 'Az.Cdn.private\Get-AzCdnOriginGroup_GetViaIdentity1'; + List1 = 'Az.Cdn.private\Get-AzCdnOriginGroup_List1'; + } + if (('Get1', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzCdnProfile.ps1 b/src/Cdn/exports/Get-AzCdnProfile.ps1 new file mode 100644 index 000000000000..5d47f41ac01d --- /dev/null +++ b/src/Cdn/exports/Get-AzCdnProfile.ps1 @@ -0,0 +1,202 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis + +.Description + +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Notes +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 : + [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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnprofile +#> +function Get-AzCdnProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + ${SubscriptionId}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + ${ResourceGroupName}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Cdn.custom\Get-AzCdnProfile'; + Get = 'Az.Cdn.custom\Get-AzCdnProfile'; + List1 = 'Az.Cdn.custom\Get-AzCdnProfile'; + GetViaIdentity = 'Az.Cdn.custom\Get-AzCdnProfile'; + } + if (('List', 'Get', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzCdnProfileResourceUsage.ps1 b/src/Cdn/exports/Get-AzCdnProfileResourceUsage.ps1 new file mode 100644 index 000000000000..5102ebdd4f75 --- /dev/null +++ b/src/Cdn/exports/Get-AzCdnProfileResourceUsage.ps1 @@ -0,0 +1,178 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door Premium or CDN profile. +.Description +Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door Premium or CDN profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnprofileresourceusage +#> +function Get-AzCdnProfileResourceUsage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List1 = 'Az.Cdn.private\Get-AzCdnProfileResourceUsage_List1'; + } + if (('List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzCdnProfileSupportedOptimizationType.ps1 b/src/Cdn/exports/Get-AzCdnProfileSupportedOptimizationType.ps1 new file mode 100644 index 000000000000..a02b18545867 --- /dev/null +++ b/src/Cdn/exports/Get-AzCdnProfileSupportedOptimizationType.ps1 @@ -0,0 +1,180 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets the supported optimization types for the current profile. +A user can create an endpoint with an optimization type from the listed values. +.Description +Gets the supported optimization types for the current profile. +A user can create an endpoint with an optimization type from the listed values. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnprofilesupportedoptimizationtype +#> +function Get-AzCdnProfileSupportedOptimizationType { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Cdn.private\Get-AzCdnProfileSupportedOptimizationType_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzCdnSubscriptionResourceUsage.ps1 b/src/Cdn/exports/Get-AzCdnSubscriptionResourceUsage.ps1 new file mode 100644 index 000000000000..7ec3bbd5ad57 --- /dev/null +++ b/src/Cdn/exports/Get-AzCdnSubscriptionResourceUsage.ps1 @@ -0,0 +1,166 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Check the quota and actual usage of the CDN profiles under the given subscription. +.Description +Check the quota and actual usage of the CDN profiles under the given subscription. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnsubscriptionresourceusage +#> +function Get-AzCdnSubscriptionResourceUsage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Cdn.private\Get-AzCdnSubscriptionResourceUsage_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzFrontDoorCdnCustomDomain.ps1 b/src/Cdn/exports/Get-AzFrontDoorCdnCustomDomain.ps1 new file mode 100644 index 000000000000..f9a27b68c5a4 --- /dev/null +++ b/src/Cdn/exports/Get-AzFrontDoorCdnCustomDomain.ps1 @@ -0,0 +1,217 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. +.Description +Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdncustomdomain +#> +function Get-AzFrontDoorCdnCustomDomain { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the domain under the profile which is unique globally. + ${CustomDomainName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzFrontDoorCdnCustomDomain_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzFrontDoorCdnCustomDomain_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzFrontDoorCdnCustomDomain_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzFrontDoorCdnEndpoint.ps1 b/src/Cdn/exports/Get-AzFrontDoorCdnEndpoint.ps1 new file mode 100644 index 000000000000..fad4b8cc5b81 --- /dev/null +++ b/src/Cdn/exports/Get-AzFrontDoorCdnEndpoint.ps1 @@ -0,0 +1,217 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Description +Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnendpoint +#> +function Get-AzFrontDoorCdnEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzFrontDoorCdnEndpoint_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzFrontDoorCdnEndpoint_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzFrontDoorCdnEndpoint_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzFrontDoorCdnEndpointResourceUsage.ps1 b/src/Cdn/exports/Get-AzFrontDoorCdnEndpointResourceUsage.ps1 new file mode 100644 index 000000000000..2389925a0462 --- /dev/null +++ b/src/Cdn/exports/Get-AzFrontDoorCdnEndpointResourceUsage.ps1 @@ -0,0 +1,184 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. +.Description +Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnendpointresourceusage +#> +function Get-AzFrontDoorCdnEndpointResourceUsage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Cdn.private\Get-AzFrontDoorCdnEndpointResourceUsage_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzFrontDoorCdnOrigin.ps1 b/src/Cdn/exports/Get-AzFrontDoorCdnOrigin.ps1 new file mode 100644 index 000000000000..a3cbdbc54641 --- /dev/null +++ b/src/Cdn/exports/Get-AzFrontDoorCdnOrigin.ps1 @@ -0,0 +1,224 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets an existing origin within an origin group. +.Description +Gets an existing origin within an origin group. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnorigin +#> +function Get-AzFrontDoorCdnOrigin { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the profile. + ${OriginGroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin which is unique within the profile. + ${OriginName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzFrontDoorCdnOrigin_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzFrontDoorCdnOrigin_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzFrontDoorCdnOrigin_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzFrontDoorCdnOriginGroup.ps1 b/src/Cdn/exports/Get-AzFrontDoorCdnOriginGroup.ps1 new file mode 100644 index 000000000000..4415afbf8577 --- /dev/null +++ b/src/Cdn/exports/Get-AzFrontDoorCdnOriginGroup.ps1 @@ -0,0 +1,217 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets an existing origin group within a profile. +.Description +Gets an existing origin group within a profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnorigingroup +#> +function Get-AzFrontDoorCdnOriginGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the endpoint. + ${OriginGroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzFrontDoorCdnOriginGroup_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzFrontDoorCdnOriginGroup_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzFrontDoorCdnOriginGroup_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzFrontDoorCdnOriginGroupResourceUsage.ps1 b/src/Cdn/exports/Get-AzFrontDoorCdnOriginGroupResourceUsage.ps1 new file mode 100644 index 000000000000..cde5faca85c4 --- /dev/null +++ b/src/Cdn/exports/Get-AzFrontDoorCdnOriginGroupResourceUsage.ps1 @@ -0,0 +1,184 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN profile. +.Description +Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnorigingroupresourceusage +#> +function Get-AzFrontDoorCdnOriginGroupResourceUsage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the endpoint. + ${OriginGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Cdn.private\Get-AzFrontDoorCdnOriginGroupResourceUsage_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzFrontDoorCdnProfile.ps1 b/src/Cdn/exports/Get-AzFrontDoorCdnProfile.ps1 new file mode 100644 index 000000000000..505b2c43571a --- /dev/null +++ b/src/Cdn/exports/Get-AzFrontDoorCdnProfile.ps1 @@ -0,0 +1,202 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis + +.Description + +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Notes +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 : + [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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnprofile +#> +function Get-AzFrontDoorCdnProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + ${SubscriptionId}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + ${ResourceGroupName}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Cdn.custom\Get-AzFrontDoorCdnProfile'; + Get = 'Az.Cdn.custom\Get-AzFrontDoorCdnProfile'; + List1 = 'Az.Cdn.custom\Get-AzFrontDoorCdnProfile'; + GetViaIdentity = 'Az.Cdn.custom\Get-AzFrontDoorCdnProfile'; + } + if (('List', 'Get', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzFrontDoorCdnProfileResourceUsage.ps1 b/src/Cdn/exports/Get-AzFrontDoorCdnProfileResourceUsage.ps1 new file mode 100644 index 000000000000..0a99f9fce40e --- /dev/null +++ b/src/Cdn/exports/Get-AzFrontDoorCdnProfileResourceUsage.ps1 @@ -0,0 +1,178 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. +.Description +Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnprofileresourceusage +#> +function Get-AzFrontDoorCdnProfileResourceUsage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Cdn.private\Get-AzFrontDoorCdnProfileResourceUsage_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzFrontDoorCdnRoute.ps1 b/src/Cdn/exports/Get-AzFrontDoorCdnRoute.ps1 new file mode 100644 index 000000000000..708dca76749e --- /dev/null +++ b/src/Cdn/exports/Get-AzFrontDoorCdnRoute.ps1 @@ -0,0 +1,225 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. +.Description +Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnroute +#> +function Get-AzFrontDoorCdnRoute { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('RouteName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the routing rule. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzFrontDoorCdnRoute_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzFrontDoorCdnRoute_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzFrontDoorCdnRoute_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzFrontDoorCdnRule.ps1 b/src/Cdn/exports/Get-AzFrontDoorCdnRule.ps1 new file mode 100644 index 000000000000..70e2a8abc0db --- /dev/null +++ b/src/Cdn/exports/Get-AzFrontDoorCdnRule.ps1 @@ -0,0 +1,226 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets an existing delivery rule within a rule set. +.Description +Gets an existing delivery rule within a rule set. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnrule +#> +function Get-AzFrontDoorCdnRule { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('RuleName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the delivery rule which is unique within the endpoint. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Alias('RuleSetName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the rule set under the profile. + ${SetName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzFrontDoorCdnRule_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzFrontDoorCdnRule_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzFrontDoorCdnRule_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzFrontDoorCdnRuleSet.ps1 b/src/Cdn/exports/Get-AzFrontDoorCdnRuleSet.ps1 new file mode 100644 index 000000000000..c8eae93b0080 --- /dev/null +++ b/src/Cdn/exports/Get-AzFrontDoorCdnRuleSet.ps1 @@ -0,0 +1,218 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. +.Description +Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnruleset +#> +function Get-AzFrontDoorCdnRuleSet { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('RuleSetName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the rule set under the profile which is unique globally. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzFrontDoorCdnRuleSet_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzFrontDoorCdnRuleSet_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzFrontDoorCdnRuleSet_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzFrontDoorCdnRuleSetResourceUsage.ps1 b/src/Cdn/exports/Get-AzFrontDoorCdnRuleSetResourceUsage.ps1 new file mode 100644 index 000000000000..09b2543e9424 --- /dev/null +++ b/src/Cdn/exports/Get-AzFrontDoorCdnRuleSetResourceUsage.ps1 @@ -0,0 +1,184 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. +.Description +Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnrulesetresourceusage +#> +function Get-AzFrontDoorCdnRuleSetResourceUsage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the rule set under the profile which is unique globally. + ${RuleSetName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Cdn.private\Get-AzFrontDoorCdnRuleSetResourceUsage_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzFrontDoorCdnSecret.ps1 b/src/Cdn/exports/Get-AzFrontDoorCdnSecret.ps1 new file mode 100644 index 000000000000..8f2b95c209ed --- /dev/null +++ b/src/Cdn/exports/Get-AzFrontDoorCdnSecret.ps1 @@ -0,0 +1,218 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets an existing Secret within a profile. +.Description +Gets an existing Secret within a profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnsecret +#> +function Get-AzFrontDoorCdnSecret { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('SecretName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Secret under the profile. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzFrontDoorCdnSecret_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzFrontDoorCdnSecret_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzFrontDoorCdnSecret_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Get-AzFrontDoorCdnSecurityPolicy.ps1 b/src/Cdn/exports/Get-AzFrontDoorCdnSecurityPolicy.ps1 new file mode 100644 index 000000000000..d5469c295f3c --- /dev/null +++ b/src/Cdn/exports/Get-AzFrontDoorCdnSecurityPolicy.ps1 @@ -0,0 +1,218 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets an existing security policy within a profile. +.Description +Gets an existing security policy within a profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnsecuritypolicy +#> +function Get-AzFrontDoorCdnSecurityPolicy { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('SecurityPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the security policy under the profile. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzFrontDoorCdnSecurityPolicy_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzFrontDoorCdnSecurityPolicy_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzFrontDoorCdnSecurityPolicy_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Import-AzCdnEndpointContent.ps1 b/src/Cdn/exports/Import-AzCdnEndpointContent.ps1 new file mode 100644 index 000000000000..23060aac53c7 --- /dev/null +++ b/src/Cdn/exports/Import-AzCdnEndpointContent.ps1 @@ -0,0 +1,262 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Pre-loads a content to CDN. +Available for Verizon Profiles. +.Description +Pre-loads a content to CDN. +Available for Verizon Profiles. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + +CONTENTFILEPATH : Parameters required for content load. + ContentPath : The path to the content to be loaded. Path should be a relative file URL of the origin. + +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/import-azcdnendpointcontent +#> +function Import-AzCdnEndpointContent { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='LoadExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Load', Mandatory)] + [Parameter(ParameterSetName='LoadExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Load', Mandatory)] + [Parameter(ParameterSetName='LoadExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Load', Mandatory)] + [Parameter(ParameterSetName='LoadExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Load')] + [Parameter(ParameterSetName='LoadExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='LoadViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='LoadViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Load', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='LoadViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters] + # Parameters required for content load. + # To construct, see NOTES section for CONTENTFILEPATH properties and create a hash table. + ${ContentFilePath}, + + [Parameter(ParameterSetName='LoadExpanded', Mandatory)] + [Parameter(ParameterSetName='LoadViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The path to the content to be loaded. + # Path should be a relative file URL of the origin. + ${ContentPath}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Load = 'Az.Cdn.private\Import-AzCdnEndpointContent_Load'; + LoadExpanded = 'Az.Cdn.private\Import-AzCdnEndpointContent_LoadExpanded'; + LoadViaIdentity = 'Az.Cdn.private\Import-AzCdnEndpointContent_LoadViaIdentity'; + LoadViaIdentityExpanded = 'Az.Cdn.private\Import-AzCdnEndpointContent_LoadViaIdentityExpanded'; + } + if (('Load', 'LoadExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnCustomDomain.ps1 b/src/Cdn/exports/New-AzCdnCustomDomain.ps1 new file mode 100644 index 000000000000..2c5428aaea1c --- /dev/null +++ b/src/Cdn/exports/New-AzCdnCustomDomain.ps1 @@ -0,0 +1,210 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates a new custom domain within an endpoint. +.Description +Creates a new custom domain within an endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azcdncustomdomain +#> +function New-AzCdnCustomDomain { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(Mandatory)] + [Alias('CustomDomainName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the custom domain within an endpoint. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host name of the custom domain. + # Must be a domain name. + ${HostName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded1 = 'Az.Cdn.private\New-AzCdnCustomDomain_CreateExpanded1'; + } + if (('CreateExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnDeliveryRuleCookiesConditionObject.ps1 b/src/Cdn/exports/New-AzCdnDeliveryRuleCookiesConditionObject.ps1 new file mode 100644 index 000000000000..4bcacc217939 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnDeliveryRuleCookiesConditionObject.ps1 @@ -0,0 +1,148 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleCookiesCondition. +.Description +Create an in-memory object for DeliveryRuleCookiesCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCookiesCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleCookiesConditionObject +#> +function New-AzCdnDeliveryRuleCookiesConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCookiesCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of Cookies to be matched. + ${ParameterSelector}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleCookiesConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnDeliveryRuleHttpVersionConditionObject.ps1 b/src/Cdn/exports/New-AzCdnDeliveryRuleHttpVersionConditionObject.ps1 new file mode 100644 index 000000000000..3a92024fa12f --- /dev/null +++ b/src/Cdn/exports/New-AzCdnDeliveryRuleHttpVersionConditionObject.ps1 @@ -0,0 +1,135 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleHttpVersionCondition. +.Description +Create an in-memory object for DeliveryRuleHttpVersionCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHttpVersionCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleHttpVersionConditionObject +#> +function New-AzCdnDeliveryRuleHttpVersionConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHttpVersionCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleHttpVersionConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnDeliveryRuleIsDeviceConditionObject.ps1 b/src/Cdn/exports/New-AzCdnDeliveryRuleIsDeviceConditionObject.ps1 new file mode 100644 index 000000000000..b3736626984e --- /dev/null +++ b/src/Cdn/exports/New-AzCdnDeliveryRuleIsDeviceConditionObject.ps1 @@ -0,0 +1,135 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleIsDeviceCondition. +.Description +Create an in-memory object for DeliveryRuleIsDeviceCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleIsDeviceCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleIsDeviceConditionObject +#> +function New-AzCdnDeliveryRuleIsDeviceConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleIsDeviceCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleIsDeviceConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnDeliveryRuleObject.ps1 b/src/Cdn/exports/New-AzCdnDeliveryRuleObject.ps1 new file mode 100644 index 000000000000..e8d8ae652474 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnDeliveryRuleObject.ps1 @@ -0,0 +1,149 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRule. +.Description +Create an in-memory object for DeliveryRule. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRule +.Notes +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. + +ACTION : A list of actions that are executed when all the conditions of a rule are satisfied. + Name : The name of the action for the delivery rule. + +CONDITION : A list of conditions that must be matched for the actions to be executed. + Name : The name of the condition for the delivery rule. +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleObject +#> +function New-AzCdnDeliveryRuleObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRule])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[]] + # A list of actions that are executed when all the conditions of a rule are satisfied. + # To construct, see NOTES section for ACTION properties and create a hash table. + ${Action}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The order in which the rules are applied for the endpoint. + # Possible values {0,1,2,3,………}. + # A rule with a lesser order will be applied before a rule with a greater order. + # Rule with order 0 is a special rule. + # It does not require any condition and actions listed in it will always be applied. + ${Order}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[]] + # A list of conditions that must be matched for the actions to be executed. + # To construct, see NOTES section for CONDITION properties and create a hash table. + ${Condition}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of the rule. + ${Name} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnDeliveryRulePostArgsConditionObject.ps1 b/src/Cdn/exports/New-AzCdnDeliveryRulePostArgsConditionObject.ps1 new file mode 100644 index 000000000000..ffa34bf1c900 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnDeliveryRulePostArgsConditionObject.ps1 @@ -0,0 +1,148 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRulePostArgsCondition. +.Description +Create an in-memory object for DeliveryRulePostArgsCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRulePostArgsCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRulePostArgsConditionObject +#> +function New-AzCdnDeliveryRulePostArgsConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRulePostArgsCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of PostArg to be matched. + ${ParameterSelector}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRulePostArgsConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnDeliveryRuleQueryStringConditionObject.ps1 b/src/Cdn/exports/New-AzCdnDeliveryRuleQueryStringConditionObject.ps1 new file mode 100644 index 000000000000..746a0fb16299 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnDeliveryRuleQueryStringConditionObject.ps1 @@ -0,0 +1,142 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleQueryStringCondition. +.Description +Create an in-memory object for DeliveryRuleQueryStringCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleQueryStringCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleQueryStringConditionObject +#> +function New-AzCdnDeliveryRuleQueryStringConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleQueryStringCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleQueryStringConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnDeliveryRuleRemoteAddressConditionObject.ps1 b/src/Cdn/exports/New-AzCdnDeliveryRuleRemoteAddressConditionObject.ps1 new file mode 100644 index 000000000000..9103645c20ac --- /dev/null +++ b/src/Cdn/exports/New-AzCdnDeliveryRuleRemoteAddressConditionObject.ps1 @@ -0,0 +1,144 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRemoteAddressCondition. +.Description +Create an in-memory object for DeliveryRuleRemoteAddressCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRemoteAddressCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRemoteAddressConditionObject +#> +function New-AzCdnDeliveryRuleRemoteAddressConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRemoteAddressCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # Match values to match against. + # The operator will apply to each value in here with OR semantics. + # If any of them match the variable with the given operator this match condition is considered a match. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleRemoteAddressConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnDeliveryRuleRequestBodyConditionObject.ps1 b/src/Cdn/exports/New-AzCdnDeliveryRuleRequestBodyConditionObject.ps1 new file mode 100644 index 000000000000..2e01926a7480 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnDeliveryRuleRequestBodyConditionObject.ps1 @@ -0,0 +1,142 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestBodyCondition. +.Description +Create an in-memory object for DeliveryRuleRequestBodyCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestBodyCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestBodyConditionObject +#> +function New-AzCdnDeliveryRuleRequestBodyConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestBodyCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleRequestBodyConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnDeliveryRuleRequestHeaderActionObject.ps1 b/src/Cdn/exports/New-AzCdnDeliveryRuleRequestHeaderActionObject.ps1 new file mode 100644 index 000000000000..f26f28a5fe63 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnDeliveryRuleRequestHeaderActionObject.ps1 @@ -0,0 +1,135 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestHeaderAction. +.Description +Create an in-memory object for DeliveryRuleRequestHeaderAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestHeaderActionObject +#> +function New-AzCdnDeliveryRuleRequestHeaderActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction] + # Action to perform. + ${ParameterHeaderAction}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of the header to modify. + ${ParameterHeaderName}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Value for the specified action. + ${ParameterValue} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleRequestHeaderActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnDeliveryRuleRequestHeaderConditionObject.ps1 b/src/Cdn/exports/New-AzCdnDeliveryRuleRequestHeaderConditionObject.ps1 new file mode 100644 index 000000000000..65aa951e3669 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnDeliveryRuleRequestHeaderConditionObject.ps1 @@ -0,0 +1,148 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestHeaderCondition. +.Description +Create an in-memory object for DeliveryRuleRequestHeaderCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestHeaderConditionObject +#> +function New-AzCdnDeliveryRuleRequestHeaderConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of Header to be matched. + ${ParameterSelector}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleRequestHeaderConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnDeliveryRuleRequestMethodConditionObject.ps1 b/src/Cdn/exports/New-AzCdnDeliveryRuleRequestMethodConditionObject.ps1 new file mode 100644 index 000000000000..4d274901945d --- /dev/null +++ b/src/Cdn/exports/New-AzCdnDeliveryRuleRequestMethodConditionObject.ps1 @@ -0,0 +1,135 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestMethodCondition. +.Description +Create an in-memory object for DeliveryRuleRequestMethodCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestMethodCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestMethodConditionObject +#> +function New-AzCdnDeliveryRuleRequestMethodConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestMethodCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleRequestMethodConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnDeliveryRuleRequestSchemeConditionObject.ps1 b/src/Cdn/exports/New-AzCdnDeliveryRuleRequestSchemeConditionObject.ps1 new file mode 100644 index 000000000000..4e397103373f --- /dev/null +++ b/src/Cdn/exports/New-AzCdnDeliveryRuleRequestSchemeConditionObject.ps1 @@ -0,0 +1,135 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestSchemeCondition. +.Description +Create an in-memory object for DeliveryRuleRequestSchemeCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestSchemeCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestSchemeConditionObject +#> +function New-AzCdnDeliveryRuleRequestSchemeConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestSchemeCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleRequestSchemeConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnDeliveryRuleRequestUriConditionObject.ps1 b/src/Cdn/exports/New-AzCdnDeliveryRuleRequestUriConditionObject.ps1 new file mode 100644 index 000000000000..50fdc9b964d6 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnDeliveryRuleRequestUriConditionObject.ps1 @@ -0,0 +1,142 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestUriCondition. +.Description +Create an in-memory object for DeliveryRuleRequestUriCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestUriCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestUriConditionObject +#> +function New-AzCdnDeliveryRuleRequestUriConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestUriCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleRequestUriConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnDeliveryRuleResponseHeaderActionObject.ps1 b/src/Cdn/exports/New-AzCdnDeliveryRuleResponseHeaderActionObject.ps1 new file mode 100644 index 000000000000..061897197025 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnDeliveryRuleResponseHeaderActionObject.ps1 @@ -0,0 +1,135 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleResponseHeaderAction. +.Description +Create an in-memory object for DeliveryRuleResponseHeaderAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleResponseHeaderAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleResponseHeaderActionObject +#> +function New-AzCdnDeliveryRuleResponseHeaderActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleResponseHeaderAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction] + # Action to perform. + ${ParameterHeaderAction}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of the header to modify. + ${ParameterHeaderName}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Value for the specified action. + ${ParameterValue} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleResponseHeaderActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.ps1 b/src/Cdn/exports/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.ps1 new file mode 100644 index 000000000000..ccc0abdfec0f --- /dev/null +++ b/src/Cdn/exports/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.ps1 @@ -0,0 +1,142 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleUrlFileExtensionCondition. +.Description +Create an in-memory object for DeliveryRuleUrlFileExtensionCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileExtensionCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleUrlFileExtensionConditionObject +#> +function New-AzCdnDeliveryRuleUrlFileExtensionConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileExtensionCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleUrlFileExtensionConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnDeliveryRuleUrlFileNameConditionObject.ps1 b/src/Cdn/exports/New-AzCdnDeliveryRuleUrlFileNameConditionObject.ps1 new file mode 100644 index 000000000000..49727e4f83d0 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnDeliveryRuleUrlFileNameConditionObject.ps1 @@ -0,0 +1,142 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleUrlFileNameCondition. +.Description +Create an in-memory object for DeliveryRuleUrlFileNameCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileNameCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleUrlFileNameConditionObject +#> +function New-AzCdnDeliveryRuleUrlFileNameConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileNameCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleUrlFileNameConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnDeliveryRuleUrlPathConditionObject.ps1 b/src/Cdn/exports/New-AzCdnDeliveryRuleUrlPathConditionObject.ps1 new file mode 100644 index 000000000000..f30f4a3f9596 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnDeliveryRuleUrlPathConditionObject.ps1 @@ -0,0 +1,142 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleUrlPathCondition. +.Description +Create an in-memory object for DeliveryRuleUrlPathCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlPathCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleUrlPathConditionObject +#> +function New-AzCdnDeliveryRuleUrlPathConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlPathCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleUrlPathConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnEndpoint.ps1 b/src/Cdn/exports/New-AzCdnEndpoint.ps1 new file mode 100644 index 000000000000..0c0ab7a68237 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnEndpoint.ps1 @@ -0,0 +1,399 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Description +Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint +.Notes +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. + +DELIVERYPOLICYRULE : A list of the delivery rules. + Action : A list of actions that are executed when all the conditions of a rule are satisfied. + Name : The name of the action for the delivery rule. + Order : The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + [Condition ]: A list of conditions that must be matched for the actions to be executed + Name : The name of the condition for the delivery rule. + [Name ]: Name of the rule + +GEOFILTER : List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/ + Action : Action of the geo filter, i.e. allow or block access. + CountryCode : Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US. + RelativePath : Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) + +ORIGIN : The source of the content being delivered via CDN. + Name : Origin name which must be unique within the endpoint. + [Enabled ]: Origin is enabled for load balancing or not. By default, origin is always enabled. + [HostName ]: The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across all origins in an endpoint. + [HttpPort ]: The value of the HTTP port. Must be between 1 and 65535. + [HttpsPort ]: The value of the HTTPS port. Must be between 1 and 65535. + [OriginHostHeader ]: The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + [Priority ]: Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. + [PrivateLinkAlias ]: The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + [PrivateLinkApprovalMessage ]: A custom message to be included in the approval request to connect to the Private Link. + [PrivateLinkLocation ]: The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + [PrivateLinkResourceId ]: The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + [Weight ]: Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + +ORIGINGROUP : The origin groups comprising of origins that are used for load balancing the traffic based on availability. + Name : Origin group name which must be unique within the endpoint. + [HealthProbeSetting ]: Health probe settings to the origin that is used to determine the health of the origin. + [ProbeIntervalInSecond ]: The number of seconds between health probes.Default is 240sec. + [ProbePath ]: The path relative to the origin that is used to determine the health of the origin. + [ProbeProtocol ]: Protocol to use for health probe. + [ProbeRequestType ]: The type of health probe request that is made. + [Origin ]: The source of the content being delivered via CDN within given origin group. + [Id ]: Resource ID. + [ResponseBasedOriginErrorDetectionSetting ]: The JSON object that contains the properties to determine origin health using real requests/responses.This property is currently not supported. + [HttpErrorRange ]: The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + [Begin ]: The inclusive start of the http status code range. + [End ]: The inclusive end of the http status code range. + [ResponseBasedDetectedErrorType ]: Type of response errors for real user requests for which origin will be deemed unhealthy + [ResponseBasedFailoverThresholdPercentage ]: The percentage of failed requests in the sample where failover should trigger. + [TrafficRestorationTimeToHealedOrNewEndpointsInMinute ]: Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + +URLSIGNINGKEY : List of keys used to validate the signed URL hashes. + KeyId : Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + KeySourceParameterResourceGroupName : Resource group of the user's Key Vault containing the secret + KeySourceParameterSecretName : The name of secret in Key Vault. + KeySourceParameterSecretVersion : The version(GUID) of secret in Key Vault. + KeySourceParameterSubscriptionId : Subscription Id of the user's Key Vault containing the secret + KeySourceParameterVaultName : The name of the user's Key Vault containing the secret +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnendpoint +#> +function New-AzCdnEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('EndpointName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource location. + ${Location}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # List of content types on which compression applies. + # The value should be a valid MIME type. + ${ContentTypesToCompress}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${DefaultOriginGroupId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # User-friendly description of the policy. + ${DeliveryPolicyDescription}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[]] + # A list of the delivery rules. + # To construct, see NOTES section for DELIVERYPOLICYRULE properties and create a hash table. + ${DeliveryPolicyRule}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[]] + # List of rules defining the user's geo access within a CDN endpoint. + # Each geo filter defines an access rule to a specified path or content, e.g. + # block APAC for path /pictures/ + # To construct, see NOTES section for GEOFILTER properties and create a hash table. + ${GeoFilter}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether content compression is enabled on CDN. + # Default value is false. + # If compression is enabled, content will be served as compressed if user requests for a compressed version. + # Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. + ${IsCompressionEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether HTTP traffic is allowed on the endpoint. + # Default value is true. + # At least one protocol (HTTP or HTTPS) must be allowed. + ${IsHttpAllowed}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether HTTPS traffic is allowed on the endpoint. + # Default value is true. + # At least one protocol (HTTP or HTTPS) must be allowed. + ${IsHttpsAllowed}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType] + # Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. + # Download, Media services. + # With this information, CDN can apply scenario driven optimization. + ${OptimizationType}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin[]] + # The source of the content being delivered via CDN. + # To construct, see NOTES section for ORIGIN properties and create a hash table. + ${Origin}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup[]] + # The origin groups comprising of origins that are used for load balancing the traffic based on availability. + # To construct, see NOTES section for ORIGINGROUP properties and create a hash table. + ${OriginGroup}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host header value sent to the origin with each request. + # This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. + # Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + ${OriginHostHeader}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # A directory path on the origin that CDN can use to retrieve content from, e.g. + # contoso.cloudapp.net/originpath. + ${OriginPath}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. + # This is relative to the origin path. + # This property is only relevant when using a single origin. + ${ProbePath}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior] + # Defines how CDN caches requests that include query strings. + # You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + ${QueryStringCachingBehavior}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[]] + # List of keys used to validate the signed URL hashes. + # To construct, see NOTES section for URLSIGNINGKEY properties and create a hash table. + ${UrlSigningKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${WebApplicationFirewallPolicyLinkId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded1 = 'Az.Cdn.private\New-AzCdnEndpoint_CreateExpanded1'; + } + if (('CreateExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnHealthProbeParametersObject.ps1 b/src/Cdn/exports/New-AzCdnHealthProbeParametersObject.ps1 new file mode 100644 index 000000000000..133464013f30 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnHealthProbeParametersObject.ps1 @@ -0,0 +1,135 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for HealthProbeParameters. +.Description +Create an in-memory object for HealthProbeParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnHealthProbeParametersObject +#> +function New-AzCdnHealthProbeParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The number of seconds between health probes.Default is 240sec. + ${ProbeIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The path relative to the origin that is used to determine the health of the origin. + ${ProbePath}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol] + # Protocol to use for health probe. + ${ProbeProtocol}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType] + # The type of health probe request that is made. + ${ProbeRequestType} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnHealthProbeParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnManagedHttpsParametersObject.ps1 b/src/Cdn/exports/New-AzCdnManagedHttpsParametersObject.ps1 new file mode 100644 index 000000000000..75147840a3d7 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnManagedHttpsParametersObject.ps1 @@ -0,0 +1,137 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for CdnManagedHttpsParameters. +.Description +Create an in-memory object for CdnManagedHttpsParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CdnManagedHttpsParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnManagedHttpsParametersObject +#> +function New-AzCdnManagedHttpsParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CdnManagedHttpsParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType] + # Type of certificate used. + ${CertificateSourceParameterCertificateType}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource] + # Defines the source of the SSL certificate. + ${CertificateSource}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType] + # Defines the TLS extension protocol that is used for secure delivery. + ${ProtocolType}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion] + # TLS protocol version that will be used for Https. + ${MinimumTlsVersion} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnManagedHttpsParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnOrigin.ps1 b/src/Cdn/exports/New-AzCdnOrigin.ps1 new file mode 100644 index 000000000000..8d6836c07783 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnOrigin.ps1 @@ -0,0 +1,280 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates a new origin within the specified endpoint. +.Description +Creates a new origin within the specified endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnorigin +#> +function New-AzCdnOrigin { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(Mandatory)] + [Alias('OriginName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin that is unique within the endpoint. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Origin is enabled for load balancing or not + ${Enabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The address of the origin. + # Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + ${HostName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The value of the HTTP port. + # Must be between 1 and 65535. + ${HttpPort}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The value of the HTTPS port. + # Must be between 1 and 65535. + ${HttpsPort}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host header value sent to the origin with each request. + # If you leave this blank, the request hostname determines this value. + # Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + # This overrides the host header defined at Endpoint + ${OriginHostHeader}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Priority of origin in given origin group for load balancing. + # Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + ${Priority}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The Alias of the Private Link resource. + # Populating this optional field indicates that this origin is 'Private' + ${PrivateLinkAlias}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # A custom message to be included in the approval request to connect to the Private Link. + ${PrivateLinkApprovalMessage}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The location of the Private Link resource. + # Required only if 'privateLinkResourceId' is populated + ${PrivateLinkLocation}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The Resource Id of the Private Link resource. + # Populating this optional field indicates that this backend is 'Private' + ${PrivateLinkResourceId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Weight of the origin in given origin group for load balancing. + # Must be between 1 and 1000 + ${Weight}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded1 = 'Az.Cdn.private\New-AzCdnOrigin_CreateExpanded1'; + } + if (('CreateExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnOriginGroup.ps1 b/src/Cdn/exports/New-AzCdnOriginGroup.ps1 new file mode 100644 index 000000000000..627d0554598c --- /dev/null +++ b/src/Cdn/exports/New-AzCdnOriginGroup.ps1 @@ -0,0 +1,254 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates a new origin group within the specified endpoint. +.Description +Creates a new origin group within the specified endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup +.Notes +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. + +HEALTHPROBESETTING : Health probe settings to the origin that is used to determine the health of the origin. + [ProbeIntervalInSecond ]: The number of seconds between health probes.Default is 240sec. + [ProbePath ]: The path relative to the origin that is used to determine the health of the origin. + [ProbeProtocol ]: Protocol to use for health probe. + [ProbeRequestType ]: The type of health probe request that is made. + +ORIGIN : The source of the content being delivered via CDN within given origin group. + [Id ]: Resource ID. + +RESPONSEBASEDORIGINERRORDETECTIONSETTING : The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported. + [HttpErrorRange ]: The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + [Begin ]: The inclusive start of the http status code range. + [End ]: The inclusive end of the http status code range. + [ResponseBasedDetectedErrorType ]: Type of response errors for real user requests for which origin will be deemed unhealthy + [ResponseBasedFailoverThresholdPercentage ]: The percentage of failed requests in the sample where failover should trigger. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnorigingroup +#> +function New-AzCdnOriginGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(Mandatory)] + [Alias('OriginGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the endpoint. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters] + # Health probe settings to the origin that is used to determine the health of the origin. + # To construct, see NOTES section for HEALTHPROBESETTING properties and create a hash table. + ${HealthProbeSetting}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]] + # The source of the content being delivered via CDN within given origin group. + # To construct, see NOTES section for ORIGIN properties and create a hash table. + ${Origin}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters] + # The JSON object that contains the properties to determine origin health using real requests/responses. + # This property is currently not supported. + # To construct, see NOTES section for RESPONSEBASEDORIGINERRORDETECTIONSETTING properties and create a hash table. + ${ResponseBasedOriginErrorDetectionSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. + # Default is 10 mins. + # This property is currently not supported. + ${TrafficRestorationTimeToHealedOrNewEndpointsInMinute}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded1 = 'Az.Cdn.private\New-AzCdnOriginGroup_CreateExpanded1'; + } + if (('CreateExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnProfile.ps1 b/src/Cdn/exports/New-AzCdnProfile.ps1 new file mode 100644 index 000000000000..6f39168498e1 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnProfile.ps1 @@ -0,0 +1,218 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +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. +.Description +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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnprofile +#> +function New-AzCdnProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource location. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Send and receive timeout on forwarding request to the origin. + # When timeout is reached, the request fails and returns. + ${OriginResponseTimeoutSecond}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName] + # Name of the pricing tier. + ${SkuName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.custom\New-AzCdnProfile'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnResourceReferenceObject.ps1 b/src/Cdn/exports/New-AzCdnResourceReferenceObject.ps1 new file mode 100644 index 000000000000..f30e3b77517a --- /dev/null +++ b/src/Cdn/exports/New-AzCdnResourceReferenceObject.ps1 @@ -0,0 +1,115 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for ResourceReference. +.Description +Create an in-memory object for ResourceReference. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnResourceReferenceObject +#> +function New-AzCdnResourceReferenceObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${Id} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnResourceReferenceObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.ps1 b/src/Cdn/exports/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.ps1 new file mode 100644 index 000000000000..43dacab7b957 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.ps1 @@ -0,0 +1,137 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for ResponseBasedOriginErrorDetectionParameters. +.Description +Create an in-memory object for ResponseBasedOriginErrorDetectionParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParameters +.Notes +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. + +HTTPERRORRANGE : The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + [Begin ]: The inclusive start of the http status code range. + [End ]: The inclusive end of the http status code range. +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnResponseBasedOriginErrorDetectionParametersObject +#> +function New-AzCdnResponseBasedOriginErrorDetectionParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters[]] + # The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + # To construct, see NOTES section for HTTPERRORRANGE properties and create a hash table. + ${HttpErrorRange}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes] + # Type of response errors for real user requests for which origin will be deemed unhealthy. + ${ResponseBasedDetectedErrorType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The percentage of failed requests in the sample where failover should trigger. + ${ResponseBasedFailoverThresholdPercentage} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnResponseBasedOriginErrorDetectionParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnUrlRedirectActionObject.ps1 b/src/Cdn/exports/New-AzCdnUrlRedirectActionObject.ps1 new file mode 100644 index 000000000000..32c1cf463282 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnUrlRedirectActionObject.ps1 @@ -0,0 +1,163 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for UrlRedirectAction. +.Description +Create an in-memory object for UrlRedirectAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnUrlRedirectActionObject +#> +function New-AzCdnUrlRedirectActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType] + # The redirect type the rule will use when redirecting traffic. + ${ParameterRedirectType}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Fragment to add to the redirect URL. + # Fragment is the part of the URL that comes after #. + # Do not include the #. + ${ParameterCustomFragment}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Host to redirect. + # Leave empty to use the incoming host as the destination host. + ${ParameterCustomHostname}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The full path to redirect. + # Path cannot be empty and must start with /. + # Leave empty to use the incoming path as destination path. + ${ParameterCustomPath}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The set of query strings to be placed in the redirect URL. + # Setting this value would replace any existing query string; leave empty to preserve the incoming query string. + # Query string must be in = format. + # ? and & will be added automatically so do not include them. + ${ParameterCustomQueryString}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol] + # Protocol to use for the redirect. + # The default value is MatchRequest. + ${ParameterDestinationProtocol} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnUrlRedirectActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnUrlRewriteActionObject.ps1 b/src/Cdn/exports/New-AzCdnUrlRewriteActionObject.ps1 new file mode 100644 index 000000000000..ae69fcb540f8 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnUrlRewriteActionObject.ps1 @@ -0,0 +1,136 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for UrlRewriteAction. +.Description +Create an in-memory object for UrlRewriteAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnUrlRewriteActionObject +#> +function New-AzCdnUrlRewriteActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Define the relative URL to which the above requests will be rewritten by. + ${ParameterDestination}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # define a request URI pattern that identifies the type of requests that may be rewritten. + # If value is blank, all strings are matched. + ${ParameterSourcePattern}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Whether to preserve unmatched path. + # Default value is true. + ${ParameterPreserveUnmatchedPath} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnUrlRewriteActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnUrlSigningActionObject.ps1 b/src/Cdn/exports/New-AzCdnUrlSigningActionObject.ps1 new file mode 100644 index 000000000000..81964ab8fd42 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnUrlSigningActionObject.ps1 @@ -0,0 +1,139 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for UrlSigningAction. +.Description +Create an in-memory object for UrlSigningAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningAction +.Notes +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. + +PARAMETERNAMEOVERRIDE : Defines which query string parameters in the url to be considered for expires, key id etc. . + ParamIndicator : Indicates the purpose of the parameter + ParamName : Parameter name +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnUrlSigningActionObject +#> +function New-AzCdnUrlSigningActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm] + # Algorithm to use for URL signing. + ${ParameterAlgorithm}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[]] + # Defines which query string parameters in the url to be considered for expires, key id etc. + # . + # To construct, see NOTES section for PARAMETERNAMEOVERRIDE properties and create a hash table. + ${ParameterNameOverride} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnUrlSigningActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzCdnUserManagedHttpsParametersObject.ps1 b/src/Cdn/exports/New-AzCdnUserManagedHttpsParametersObject.ps1 new file mode 100644 index 000000000000..ab3a67b93181 --- /dev/null +++ b/src/Cdn/exports/New-AzCdnUserManagedHttpsParametersObject.ps1 @@ -0,0 +1,160 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for UserManagedHttpsParameters. +.Description +Create an in-memory object for UserManagedHttpsParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UserManagedHttpsParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnUserManagedHttpsParametersObject +#> +function New-AzCdnUserManagedHttpsParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UserManagedHttpsParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource group of the user's Key Vault containing the SSL certificate. + ${CertificateSourceParameterResourceGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. + ${CertificateSourceParameterSecretName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Subscription Id of the user's Key Vault containing the SSL certificate. + ${CertificateSourceParameterSubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The name of the user's Key Vault containing the SSL certificate. + ${CertificateSourceParameterVaultName}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource] + # Defines the source of the SSL certificate. + ${CertificateSource}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType] + # Defines the TLS extension protocol that is used for secure delivery. + ${ProtocolType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The version(GUID) of Key Vault Secret in Key Vault. + ${CertificateSourceParameterSecretVersion}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion] + # TLS protocol version that will be used for Https. + ${MinimumTlsVersion} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnUserManagedHttpsParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnCustomDomain.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnCustomDomain.ps1 new file mode 100644 index 000000000000..6b52272432e9 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnCustomDomain.ps1 @@ -0,0 +1,233 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates a new domain within the specified profile. +.Description +Creates a new domain within the specified profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain +.Notes +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. + +TLSSETTING : The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + CertificateType : Defines the source of the SSL certificate. + [MinimumTlsVersion ]: TLS protocol version that will be used for Https + [Secret ]: Resource reference to the secret. ie. subs/rg/profile/secret + [Id ]: Resource ID. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdncustomdomain +#> +function New-AzFrontDoorCdnCustomDomain { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the domain under the profile which is unique globally + ${CustomDomainName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${AzureDnsZoneId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host name of the domain. + # Must be a domain name. + ${HostName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${PropertiesPreValidatedCustomDomainResourceId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters] + # The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. + # If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + # To construct, see NOTES section for TLSSETTING properties and create a hash table. + ${TlsSetting}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.private\New-AzFrontDoorCdnCustomDomain_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.ps1 new file mode 100644 index 000000000000..2cedb0f912a5 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.ps1 @@ -0,0 +1,139 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for AFDDomainHttpsParameters. +.Description +Create an in-memory object for AFDDomainHttpsParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainHttpsParameters +.Notes +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. + +SECRET : Resource reference to the secret. ie. subs/rg/profile/secret. + [Id ]: Resource ID. +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnCustomDomainTlsSettingParametersObject +#> +function New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AFDDomainHttpsParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType] + # Defines the source of the SSL certificate. + ${CertificateType}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion] + # TLS protocol version that will be used for Https. + ${MinimumTlsVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference] + # Resource reference to the secret. + # ie. + # subs/rg/profile/secret. + # To construct, see NOTES section for SECRET properties and create a hash table. + ${Secret} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnEndpoint.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnEndpoint.ps1 new file mode 100644 index 000000000000..65a6d27f84d8 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnEndpoint.ps1 @@ -0,0 +1,225 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Description +Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnendpoint +#> +function New-AzFrontDoorCdnEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource location. + ${Location}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope] + # Indicates the endpoint name reuse scope. + # The default value is TenantReuse. + ${AutoGeneratedDomainNameLabelScope}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState] + # Whether to enable use of this rule. + # Permitted values are 'Enabled' or 'Disabled' + ${EnabledState}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.private\New-AzFrontDoorCdnEndpoint_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnOrigin.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnOrigin.ps1 new file mode 100644 index 000000000000..b069b5f54e03 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnOrigin.ps1 @@ -0,0 +1,298 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates a new origin within the specified origin group. +.Description +Creates a new origin within the specified origin group. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnorigin +#> +function New-AzFrontDoorCdnOrigin { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the profile. + ${OriginGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin that is unique within the profile. + ${OriginName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${AzureOriginId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState] + # Whether to enable health probes to be made against backends defined under backendPools. + # Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. + ${EnabledState}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether to enable certificate name check at origin level + ${EnforceCertificateNameCheck}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The address of the origin. + # Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + ${HostName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The value of the HTTP port. + # Must be between 1 and 65535. + ${HttpPort}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The value of the HTTPS port. + # Must be between 1 and 65535. + ${HttpsPort}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host header value sent to the origin with each request. + # If you leave this blank, the request hostname determines this value. + # Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + # This overrides the host header defined at Endpoint + ${OriginHostHeader}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Priority of origin in given origin group for load balancing. + # Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + ${Priority}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${PrivateLinkId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The group id from the provider of resource the shared private link resource is for. + ${SharedPrivateLinkResourceGroupId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The location of the shared private link resource + ${SharedPrivateLinkResourcePrivateLinkLocation}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The request message for requesting approval of the shared private link resource. + ${SharedPrivateLinkResourceRequestMessage}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus] + # Status of the shared private link resource. + # Can be Pending, Approved, Rejected, Disconnected, or Timeout. + ${SharedPrivateLinkResourceStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Weight of the origin in given origin group for load balancing. + # Must be between 1 and 1000 + ${Weight}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.private\New-AzFrontDoorCdnOrigin_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnOriginGroup.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnOriginGroup.ps1 new file mode 100644 index 000000000000..cbf55ff418ef --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnOriginGroup.ps1 @@ -0,0 +1,241 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates a new origin group within the specified profile. +.Description +Creates a new origin group within the specified profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup +.Notes +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. + +HEALTHPROBESETTING : Health probe settings to the origin that is used to determine the health of the origin. + [ProbeIntervalInSecond ]: The number of seconds between health probes.Default is 240sec. + [ProbePath ]: The path relative to the origin that is used to determine the health of the origin. + [ProbeProtocol ]: Protocol to use for health probe. + [ProbeRequestType ]: The type of health probe request that is made. + +LOADBALANCINGSETTING : Load balancing settings for a backend pool + [AdditionalLatencyInMillisecond ]: The additional latency in milliseconds for probes to fall into the lowest latency bucket + [SampleSize ]: The number of samples to consider for load balancing decisions + [SuccessfulSamplesRequired ]: The number of samples within the sample period that must succeed +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnorigingroup +#> +function New-AzFrontDoorCdnOriginGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the endpoint. + ${OriginGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters] + # Health probe settings to the origin that is used to determine the health of the origin. + # To construct, see NOTES section for HEALTHPROBESETTING properties and create a hash table. + ${HealthProbeSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters] + # Load balancing settings for a backend pool + # To construct, see NOTES section for LOADBALANCINGSETTING properties and create a hash table. + ${LoadBalancingSetting}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState] + # Whether to allow session affinity on this host. + # Valid options are 'Enabled' or 'Disabled' + ${SessionAffinityState}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. + # Default is 10 mins. + # This property is currently not supported. + ${TrafficRestorationTimeToHealedOrNewEndpointsInMinute}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.private\New-AzFrontDoorCdnOriginGroup_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.ps1 new file mode 100644 index 000000000000..aed377a8a230 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.ps1 @@ -0,0 +1,135 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for HealthProbeParameters. +.Description +Create an in-memory object for HealthProbeParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnOriginGroupHealthProbeSettingObject +#> +function New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The number of seconds between health probes.Default is 240sec. + ${ProbeIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The path relative to the origin that is used to determine the health of the origin. + ${ProbePath}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol] + # Protocol to use for health probe. + ${ProbeProtocol}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType] + # The type of health probe request that is made. + ${ProbeRequestType} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.ps1 new file mode 100644 index 000000000000..7e86d5e96d06 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.ps1 @@ -0,0 +1,127 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for LoadBalancingSettingsParameters. +.Description +Create an in-memory object for LoadBalancingSettingsParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject +#> +function New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The additional latency in milliseconds for probes to fall into the lowest latency bucket. + ${AdditionalLatencyInMillisecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The number of samples to consider for load balancing decisions. + ${SampleSize}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The number of samples within the sample period that must succeed. + ${SuccessfulSamplesRequired} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnProfile.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnProfile.ps1 new file mode 100644 index 000000000000..649ab1d015c2 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnProfile.ps1 @@ -0,0 +1,218 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +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. +.Description +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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnprofile +#> +function New-AzFrontDoorCdnProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource location. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Send and receive timeout on forwarding request to the origin. + # When timeout is reached, the request fails and returns. + ${OriginResponseTimeoutSecond}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName] + # Name of the pricing tier. + ${SkuName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.custom\New-AzFrontDoorCdnProfile'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnResourceReferenceObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnResourceReferenceObject.ps1 new file mode 100644 index 000000000000..b9b9407d7f80 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnResourceReferenceObject.ps1 @@ -0,0 +1,115 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for ResourceReference. +.Description +Create an in-memory object for ResourceReference. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnResourceReferenceObject +#> +function New-AzFrontDoorCdnResourceReferenceObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${Id} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnResourceReferenceObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRoute.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRoute.ps1 new file mode 100644 index 000000000000..83fedab93e4d --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRoute.ps1 @@ -0,0 +1,318 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. +.Description +Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute +.Notes +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. + +CUSTOMDOMAIN : Domains referenced by this endpoint. + [Id ]: Resource ID. + +RULESET : rule sets referenced by this endpoint. + [Id ]: Resource ID. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnroute +#> +function New-AzFrontDoorCdnRoute { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(Mandatory)] + [Alias('RouteName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the routing rule. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # query parameters to include or exclude (comma separated). + ${CacheConfigurationQueryParameter}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior] + # Defines how Frontdoor caches requests that include query strings. + # You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + ${CacheConfigurationQueryStringCachingBehavior}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # List of content types on which compression applies. + # The value should be a valid MIME type. + ${CompressionSettingContentTypesToCompress}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether content compression is enabled on AzureFrontDoor. + # Default value is false. + # If compression is enabled, content will be served as compressed if user requests for a compressed version. + # Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + ${CompressionSettingIsCompressionEnabled}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[]] + # Domains referenced by this endpoint. + # To construct, see NOTES section for CUSTOMDOMAIN properties and create a hash table. + ${CustomDomain}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState] + # Whether to enable use of this rule. + # Permitted values are 'Enabled' or 'Disabled' + ${EnabledState}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol] + # Protocol this rule will use when forwarding traffic to backends. + ${ForwardingProtocol}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect] + # Whether to automatically redirect HTTP traffic to HTTPS traffic. + # Note that this is a easy way to set up this rule and it will be the first rule that gets executed. + ${HttpsRedirect}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain] + # whether this route will be linked to the default endpoint domain. + ${LinkToDefaultDomain}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${OriginGroupId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. + # contoso.cloudapp.net/originpath. + ${OriginPath}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The route patterns of the rule. + ${PatternsToMatch}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]] + # rule sets referenced by this endpoint. + # To construct, see NOTES section for RULESET properties and create a hash table. + ${RuleSet}, + + [Parameter()] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[]] + # List of supported protocols for this route. + ${SupportedProtocol}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.private\New-AzFrontDoorCdnRoute_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRule.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRule.ps1 new file mode 100644 index 000000000000..a4b8437b4d2d --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRule.ps1 @@ -0,0 +1,248 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates a new delivery rule within the specified rule set. +.Description +Creates a new delivery rule within the specified rule set. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule +.Notes +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. + +ACTION : A list of actions that are executed when all the conditions of a rule are satisfied. + Name : The name of the action for the delivery rule. + +CONDITION : A list of conditions that must be matched for the actions to be executed + Name : The name of the condition for the delivery rule. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnrule +#> +function New-AzFrontDoorCdnRule { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('RuleName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the delivery rule which is unique within the endpoint. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(Mandatory)] + [Alias('RuleSetName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the rule set under the profile. + ${SetName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[]] + # A list of actions that are executed when all the conditions of a rule are satisfied. + # To construct, see NOTES section for ACTION properties and create a hash table. + ${Action}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[]] + # A list of conditions that must be matched for the actions to be executed + # To construct, see NOTES section for CONDITION properties and create a hash table. + ${Condition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior] + # If this rule is a match should the rules engine continue running the remaining rules or stop. + # If not present, defaults to Continue. + ${MatchProcessingBehavior}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The order in which the rules are applied for the endpoint. + # Possible values {0,1,2,3,………}. + # A rule with a lesser order will be applied before a rule with a greater order. + # Rule with order 0 is a special rule. + # It does not require any condition and actions listed in it will always be applied. + ${Order}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.private\New-AzFrontDoorCdnRule_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleClientPortConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleClientPortConditionObject.ps1 new file mode 100644 index 000000000000..567484c2286e --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleClientPortConditionObject.ps1 @@ -0,0 +1,142 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleClientPortCondition. +.Description +Create an in-memory object for DeliveryRuleClientPortCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleClientPortCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleClientPortConditionObject +#> +function New-AzFrontDoorCdnRuleClientPortConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleClientPortCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleClientPortConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleCookiesConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleCookiesConditionObject.ps1 new file mode 100644 index 000000000000..026332e9b00f --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleCookiesConditionObject.ps1 @@ -0,0 +1,148 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleCookiesCondition. +.Description +Create an in-memory object for DeliveryRuleCookiesCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCookiesCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleCookiesConditionObject +#> +function New-AzFrontDoorCdnRuleCookiesConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCookiesCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of Cookies to be matched. + ${ParameterSelector}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleCookiesConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleHostNameConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleHostNameConditionObject.ps1 new file mode 100644 index 000000000000..edc7cd58cefa --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleHostNameConditionObject.ps1 @@ -0,0 +1,142 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleHostNameCondition. +.Description +Create an in-memory object for DeliveryRuleHostNameCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHostNameCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleHostNameConditionObject +#> +function New-AzFrontDoorCdnRuleHostNameConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHostNameCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleHostNameConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleHttpVersionConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleHttpVersionConditionObject.ps1 new file mode 100644 index 000000000000..285be0748f37 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleHttpVersionConditionObject.ps1 @@ -0,0 +1,135 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleHttpVersionCondition. +.Description +Create an in-memory object for DeliveryRuleHttpVersionCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHttpVersionCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleHttpVersionConditionObject +#> +function New-AzFrontDoorCdnRuleHttpVersionConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHttpVersionCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleHttpVersionConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleIsDeviceConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleIsDeviceConditionObject.ps1 new file mode 100644 index 000000000000..d9b8c0c0321b --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleIsDeviceConditionObject.ps1 @@ -0,0 +1,135 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleIsDeviceCondition. +.Description +Create an in-memory object for DeliveryRuleIsDeviceCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleIsDeviceCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleIsDeviceConditionObject +#> +function New-AzFrontDoorCdnRuleIsDeviceConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleIsDeviceCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleIsDeviceConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRulePostArgsConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRulePostArgsConditionObject.ps1 new file mode 100644 index 000000000000..05494f830603 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRulePostArgsConditionObject.ps1 @@ -0,0 +1,148 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRulePostArgsCondition. +.Description +Create an in-memory object for DeliveryRulePostArgsCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRulePostArgsCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRulePostArgsConditionObject +#> +function New-AzFrontDoorCdnRulePostArgsConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRulePostArgsCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of PostArg to be matched. + ${ParameterSelector}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRulePostArgsConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleQueryStringConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleQueryStringConditionObject.ps1 new file mode 100644 index 000000000000..673678c35f66 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleQueryStringConditionObject.ps1 @@ -0,0 +1,142 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleQueryStringCondition. +.Description +Create an in-memory object for DeliveryRuleQueryStringCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleQueryStringCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleQueryStringConditionObject +#> +function New-AzFrontDoorCdnRuleQueryStringConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleQueryStringCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleQueryStringConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.ps1 new file mode 100644 index 000000000000..3021b97b7057 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.ps1 @@ -0,0 +1,144 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRemoteAddressCondition. +.Description +Create an in-memory object for DeliveryRuleRemoteAddressCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRemoteAddressCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRemoteAddressConditionObject +#> +function New-AzFrontDoorCdnRuleRemoteAddressConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRemoteAddressCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # Match values to match against. + # The operator will apply to each value in here with OR semantics. + # If any of them match the variable with the given operator this match condition is considered a match. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleRemoteAddressConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleRequestBodyConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleRequestBodyConditionObject.ps1 new file mode 100644 index 000000000000..75814840ac9c --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleRequestBodyConditionObject.ps1 @@ -0,0 +1,142 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestBodyCondition. +.Description +Create an in-memory object for DeliveryRuleRequestBodyCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestBodyCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestBodyConditionObject +#> +function New-AzFrontDoorCdnRuleRequestBodyConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestBodyCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleRequestBodyConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleRequestHeaderActionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleRequestHeaderActionObject.ps1 new file mode 100644 index 000000000000..3fb782d65e8b --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleRequestHeaderActionObject.ps1 @@ -0,0 +1,135 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestHeaderAction. +.Description +Create an in-memory object for DeliveryRuleRequestHeaderAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestHeaderActionObject +#> +function New-AzFrontDoorCdnRuleRequestHeaderActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction] + # Action to perform. + ${ParameterHeaderAction}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of the header to modify. + ${ParameterHeaderName}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Value for the specified action. + ${ParameterValue} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleRequestHeaderActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.ps1 new file mode 100644 index 000000000000..5ef4c25036c8 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.ps1 @@ -0,0 +1,148 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestHeaderCondition. +.Description +Create an in-memory object for DeliveryRuleRequestHeaderCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestHeaderConditionObject +#> +function New-AzFrontDoorCdnRuleRequestHeaderConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of Header to be matched. + ${ParameterSelector}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleRequestHeaderConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleRequestMethodConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleRequestMethodConditionObject.ps1 new file mode 100644 index 000000000000..6ccf8cd4a5a7 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleRequestMethodConditionObject.ps1 @@ -0,0 +1,135 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestMethodCondition. +.Description +Create an in-memory object for DeliveryRuleRequestMethodCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestMethodCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestMethodConditionObject +#> +function New-AzFrontDoorCdnRuleRequestMethodConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestMethodCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleRequestMethodConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.ps1 new file mode 100644 index 000000000000..e52836033c88 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.ps1 @@ -0,0 +1,135 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestSchemeCondition. +.Description +Create an in-memory object for DeliveryRuleRequestSchemeCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestSchemeCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestSchemeConditionObject +#> +function New-AzFrontDoorCdnRuleRequestSchemeConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestSchemeCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleRequestSchemeConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleRequestUriConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleRequestUriConditionObject.ps1 new file mode 100644 index 000000000000..a1cf92861f14 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleRequestUriConditionObject.ps1 @@ -0,0 +1,142 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestUriCondition. +.Description +Create an in-memory object for DeliveryRuleRequestUriCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestUriCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestUriConditionObject +#> +function New-AzFrontDoorCdnRuleRequestUriConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestUriCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleRequestUriConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleResponseHeaderActionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleResponseHeaderActionObject.ps1 new file mode 100644 index 000000000000..4360ee975d66 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleResponseHeaderActionObject.ps1 @@ -0,0 +1,135 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleResponseHeaderAction. +.Description +Create an in-memory object for DeliveryRuleResponseHeaderAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleResponseHeaderAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleResponseHeaderActionObject +#> +function New-AzFrontDoorCdnRuleResponseHeaderActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleResponseHeaderAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction] + # Action to perform. + ${ParameterHeaderAction}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of the header to modify. + ${ParameterHeaderName}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Value for the specified action. + ${ParameterValue} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleResponseHeaderActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.ps1 new file mode 100644 index 000000000000..8882c05f7189 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.ps1 @@ -0,0 +1,166 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRouteConfigurationOverrideAction. +.Description +Create an in-memory object for DeliveryRuleRouteConfigurationOverrideAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRouteConfigurationOverrideAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject +#> +function New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRouteConfigurationOverrideAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior] + # Caching behavior for the requests. + ${CacheConfigurationCacheBehavior}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The duration for which the content needs to be cached. + # Allowed format is [d.]hh:mm:ss. + ${CacheConfigurationCacheDuration}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled] + # Indicates whether content compression is enabled. + # If compression is enabled, content will be served as compressed if user requests for a compressed version. + # Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + ${CacheConfigurationIsCompressionEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # query parameters to include or exclude (comma separated). + ${CacheConfigurationQueryParameter}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior] + # Defines how Frontdoor caches requests that include query strings. + # You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + ${CacheConfigurationQueryStringCachingBehavior}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${OriginGroupId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol] + # Protocol this rule will use when forwarding traffic to backends. + ${OriginGroupOverrideForwardingProtocol} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleServerPortConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleServerPortConditionObject.ps1 new file mode 100644 index 000000000000..55279495f5ca --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleServerPortConditionObject.ps1 @@ -0,0 +1,142 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleServerPortCondition. +.Description +Create an in-memory object for DeliveryRuleServerPortCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleServerPortCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleServerPortConditionObject +#> +function New-AzFrontDoorCdnRuleServerPortConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleServerPortCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleServerPortConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleSet.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleSet.ps1 new file mode 100644 index 000000000000..84768c40c21c --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleSet.ps1 @@ -0,0 +1,185 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates a new rule set within the specified profile. +.Description +Creates a new rule set within the specified profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnruleset +#> +function New-AzFrontDoorCdnRuleSet { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet])] +[CmdletBinding(DefaultParameterSetName='Create', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('RuleSetName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the rule set under the profile which is unique globally + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Create = 'Az.Cdn.private\New-AzFrontDoorCdnRuleSet_Create'; + } + if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleSocketAddrConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleSocketAddrConditionObject.ps1 new file mode 100644 index 000000000000..c11f649b4acc --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleSocketAddrConditionObject.ps1 @@ -0,0 +1,142 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleSocketAddrCondition. +.Description +Create an in-memory object for DeliveryRuleSocketAddrCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleSocketAddrCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleSocketAddrConditionObject +#> +function New-AzFrontDoorCdnRuleSocketAddrConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleSocketAddrCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleSocketAddrConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleSslProtocolConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleSslProtocolConditionObject.ps1 new file mode 100644 index 000000000000..dfe833c52bae --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleSslProtocolConditionObject.ps1 @@ -0,0 +1,136 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleSslProtocolCondition. +.Description +Create an in-memory object for DeliveryRuleSslProtocolCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleSslProtocolCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleSslProtocolConditionObject +#> +function New-AzFrontDoorCdnRuleSslProtocolConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleSslProtocolCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleSslProtocolConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.ps1 new file mode 100644 index 000000000000..e123b1b39a78 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.ps1 @@ -0,0 +1,142 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleUrlFileExtensionCondition. +.Description +Create an in-memory object for DeliveryRuleUrlFileExtensionCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileExtensionCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlFileExtensionConditionObject +#> +function New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileExtensionCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.ps1 new file mode 100644 index 000000000000..96ec93d39814 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.ps1 @@ -0,0 +1,142 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleUrlFileNameCondition. +.Description +Create an in-memory object for DeliveryRuleUrlFileNameCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileNameCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlFileNameConditionObject +#> +function New-AzFrontDoorCdnRuleUrlFileNameConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileNameCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleUrlFileNameConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleUrlPathConditionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleUrlPathConditionObject.ps1 new file mode 100644 index 000000000000..0ea5b790e3c2 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleUrlPathConditionObject.ps1 @@ -0,0 +1,142 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for DeliveryRuleUrlPathCondition. +.Description +Create an in-memory object for DeliveryRuleUrlPathCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlPathCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlPathConditionObject +#> +function New-AzFrontDoorCdnRuleUrlPathConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlPathCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleUrlPathConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleUrlRedirectActionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleUrlRedirectActionObject.ps1 new file mode 100644 index 000000000000..2dfd6c009e67 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleUrlRedirectActionObject.ps1 @@ -0,0 +1,163 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for UrlRedirectAction. +.Description +Create an in-memory object for UrlRedirectAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlRedirectActionObject +#> +function New-AzFrontDoorCdnRuleUrlRedirectActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType] + # The redirect type the rule will use when redirecting traffic. + ${ParameterRedirectType}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Fragment to add to the redirect URL. + # Fragment is the part of the URL that comes after #. + # Do not include the #. + ${ParameterCustomFragment}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Host to redirect. + # Leave empty to use the incoming host as the destination host. + ${ParameterCustomHostname}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The full path to redirect. + # Path cannot be empty and must start with /. + # Leave empty to use the incoming path as destination path. + ${ParameterCustomPath}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The set of query strings to be placed in the redirect URL. + # Setting this value would replace any existing query string; leave empty to preserve the incoming query string. + # Query string must be in = format. + # ? and & will be added automatically so do not include them. + ${ParameterCustomQueryString}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol] + # Protocol to use for the redirect. + # The default value is MatchRequest. + ${ParameterDestinationProtocol} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleUrlRedirectActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleUrlRewriteActionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleUrlRewriteActionObject.ps1 new file mode 100644 index 000000000000..d7a284bb2a97 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleUrlRewriteActionObject.ps1 @@ -0,0 +1,136 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for UrlRewriteAction. +.Description +Create an in-memory object for UrlRewriteAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlRewriteActionObject +#> +function New-AzFrontDoorCdnRuleUrlRewriteActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Define the relative URL to which the above requests will be rewritten by. + ${ParameterDestination}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # define a request URI pattern that identifies the type of requests that may be rewritten. + # If value is blank, all strings are matched. + ${ParameterSourcePattern}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Whether to preserve unmatched path. + # Default value is true. + ${ParameterPreserveUnmatchedPath} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleUrlRewriteActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnRuleUrlSigningActionObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnRuleUrlSigningActionObject.ps1 new file mode 100644 index 000000000000..5388f68baacd --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnRuleUrlSigningActionObject.ps1 @@ -0,0 +1,139 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for UrlSigningAction. +.Description +Create an in-memory object for UrlSigningAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningAction +.Notes +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. + +PARAMETERNAMEOVERRIDE : Defines which query string parameters in the url to be considered for expires, key id etc. . + ParamIndicator : Indicates the purpose of the parameter + ParamName : Parameter name +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlSigningActionObject +#> +function New-AzFrontDoorCdnRuleUrlSigningActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm] + # Algorithm to use for URL signing. + ${ParameterAlgorithm}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[]] + # Defines which query string parameters in the url to be considered for expires, key id etc. + # . + # To construct, see NOTES section for PARAMETERNAMEOVERRIDE properties and create a hash table. + ${ParameterNameOverride} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleUrlSigningActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnSecret.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnSecret.ps1 new file mode 100644 index 000000000000..4527f5839d73 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnSecret.ps1 @@ -0,0 +1,211 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates a new Secret within the specified profile. +.Description +Creates a new Secret within the specified profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret +.Notes +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. + +PARAMETER : object which contains secret parameters + Type : The type of the secret resource. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnsecret +#> +function New-AzFrontDoorCdnSecret { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('SecretName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Secret under the profile. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters] + # object which contains secret parameters + # To construct, see NOTES section for PARAMETER properties and create a hash table. + ${Parameter}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.private\New-AzFrontDoorCdnSecret_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.ps1 new file mode 100644 index 000000000000..7edd2467c2a1 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.ps1 @@ -0,0 +1,140 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for CustomerCertificateParameters. +.Description +Create an in-memory object for CustomerCertificateParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomerCertificateParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecretCustomerCertificateParametersObject +#> +function New-AzFrontDoorCdnSecretCustomerCertificateParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomerCertificateParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType] + # The type of the secret resource. + ${Type}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${SecretSourceId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Version of the secret to be used. + ${SecretVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The list of SANs. + ${SubjectAlternativeName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Whether to use the latest version for the certificate. + ${UseLatestVersion} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnSecretCustomerCertificateParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.ps1 new file mode 100644 index 000000000000..813c14c6d0f1 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.ps1 @@ -0,0 +1,116 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for AzureFirstPartyManagedCertificateParameters. +.Description +Create an in-memory object for AzureFirstPartyManagedCertificateParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AzureFirstPartyManagedCertificateParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject +#> +function New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AzureFirstPartyManagedCertificateParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType] + # The type of the secret resource. + ${Type} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.ps1 new file mode 100644 index 000000000000..80e7e4dc4152 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.ps1 @@ -0,0 +1,116 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for ManagedCertificateParameters. +.Description +Create an in-memory object for ManagedCertificateParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ManagedCertificateParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecretManagedCertificateParametersObject +#> +function New-AzFrontDoorCdnSecretManagedCertificateParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ManagedCertificateParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType] + # The type of the secret resource. + ${Type} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnSecretManagedCertificateParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.ps1 new file mode 100644 index 000000000000..d2869f495842 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.ps1 @@ -0,0 +1,135 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for UrlSigningKeyParameters. +.Description +Create an in-memory object for UrlSigningKeyParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKeyParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecretUrlSigningKeyParametersObject +#> +function New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKeyParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Defines the customer defined key Id. + # This id will exist in the incoming request to indicate the key used to form the hash. + ${KeyId}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType] + # The type of the secret resource. + ${Type}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${SecretSourceId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Version of the secret to be used. + ${SecretVersion} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnSecurityPolicy.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnSecurityPolicy.ps1 new file mode 100644 index 000000000000..6ed655bb35a7 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnSecurityPolicy.ps1 @@ -0,0 +1,203 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates a new security policy within the specified profile. +.Description +Creates a new security policy within the specified profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnsecuritypolicy +#> +function New-AzFrontDoorCdnSecurityPolicy { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('SecurityPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the security policy under the profile. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters] + # object which contains security policy parameters + ${Parameter}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.private\New-AzFrontDoorCdnSecurityPolicy_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.ps1 new file mode 100644 index 000000000000..cac968e3c110 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.ps1 @@ -0,0 +1,129 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for SecurityPolicyWebApplicationFirewallAssociation. +.Description +Create an in-memory object for SecurityPolicyWebApplicationFirewallAssociation. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallAssociation +.Notes +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. + +DOMAIN : List of domains. + [Id ]: Resource ID. +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject +#> +function New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallAssociation])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[]] + # List of domains. + # To construct, see NOTES section for DOMAIN properties and create a hash table. + ${Domain}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # List of paths. + ${PatternsToMatch} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.ps1 b/src/Cdn/exports/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.ps1 new file mode 100644 index 000000000000..b71a5150eb71 --- /dev/null +++ b/src/Cdn/exports/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.ps1 @@ -0,0 +1,131 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for SecurityPolicyWebApplicationFirewallParameters. +.Description +Create an in-memory object for SecurityPolicyWebApplicationFirewallParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallParameters +.Notes +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. + +ASSOCIATION : Waf associations. + [Domain ]: List of domains. + [Id ]: Resource ID. + [PatternsToMatch ]: List of paths +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnFrontDoorSecurityPolicyWebApplicationFirewallParametersObject +#> +function New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation[]] + # Waf associations. + # To construct, see NOTES section for ASSOCIATION properties and create a hash table. + ${Association}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${WafPolicyId} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/ProxyCmdletDefinitions.ps1 b/src/Cdn/exports/ProxyCmdletDefinitions.ps1 new file mode 100644 index 000000000000..53230819973a --- /dev/null +++ b/src/Cdn/exports/ProxyCmdletDefinitions.ps1 @@ -0,0 +1,24913 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Removes a content from CDN. +.Description +Removes a content from CDN. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + +CONTENTFILEPATH : Parameters required for content purge. + ContentPath : The path to the content to be purged. Can describe a file path or a wild card directory. + +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/clear-azcdnendpointcontent +#> +function Clear-AzCdnEndpointContent { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='PurgeExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Purge1', Mandatory)] + [Parameter(ParameterSetName='PurgeExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Purge1', Mandatory)] + [Parameter(ParameterSetName='PurgeExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Purge1', Mandatory)] + [Parameter(ParameterSetName='PurgeExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Purge1')] + [Parameter(ParameterSetName='PurgeExpanded1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='PurgeViaIdentity1', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PurgeViaIdentityExpanded1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Purge1', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PurgeViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters] + # Parameters required for content purge. + # To construct, see NOTES section for CONTENTFILEPATH properties and create a hash table. + ${ContentFilePath}, + + [Parameter(ParameterSetName='PurgeExpanded1', Mandatory)] + [Parameter(ParameterSetName='PurgeViaIdentityExpanded1', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The path to the content to be purged. + # Can describe a file path or a wild card directory. + ${ContentPath}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Purge1 = 'Az.Cdn.private\Clear-AzCdnEndpointContent_Purge1'; + PurgeExpanded1 = 'Az.Cdn.private\Clear-AzCdnEndpointContent_PurgeExpanded1'; + PurgeViaIdentity1 = 'Az.Cdn.private\Clear-AzCdnEndpointContent_PurgeViaIdentity1'; + PurgeViaIdentityExpanded1 = 'Az.Cdn.private\Clear-AzCdnEndpointContent_PurgeViaIdentityExpanded1'; + } + if (('Purge1', 'PurgeExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Removes a content from AzureFrontDoor. +.Description +Removes a content from AzureFrontDoor. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + +CONTENT : Parameters required for content purge. + ContentPath : The path to the content to be purged. Can describe a file path or a wild card directory. + [Domain ]: List of domains. + +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/clear-azfrontdoorcdnendpointcontent +#> +function Clear-AzFrontDoorCdnEndpointContent { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='PurgeExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Purge', Mandatory)] + [Parameter(ParameterSetName='PurgeExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Purge', Mandatory)] + [Parameter(ParameterSetName='PurgeExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Purge', Mandatory)] + [Parameter(ParameterSetName='PurgeExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Purge')] + [Parameter(ParameterSetName='PurgeExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='PurgeViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PurgeViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Purge', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PurgeViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters] + # Parameters required for content purge. + # To construct, see NOTES section for CONTENT properties and create a hash table. + ${Content}, + + [Parameter(ParameterSetName='PurgeExpanded', Mandatory)] + [Parameter(ParameterSetName='PurgeViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The path to the content to be purged. + # Can describe a file path or a wild card directory. + ${ContentPath}, + + [Parameter(ParameterSetName='PurgeExpanded')] + [Parameter(ParameterSetName='PurgeViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # List of domains. + ${Domain}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Purge = 'Az.Cdn.private\Clear-AzFrontDoorCdnEndpointContent_Purge'; + PurgeExpanded = 'Az.Cdn.private\Clear-AzFrontDoorCdnEndpointContent_PurgeExpanded'; + PurgeViaIdentity = 'Az.Cdn.private\Clear-AzFrontDoorCdnEndpointContent_PurgeViaIdentity'; + PurgeViaIdentityExpanded = 'Az.Cdn.private\Clear-AzFrontDoorCdnEndpointContent_PurgeViaIdentityExpanded'; + } + if (('Purge', 'PurgeExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Disable https delivery of the custom domain. +.Description +Disable https delivery of the custom domain. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/disable-azcdncustomdomaincustomhttps +#> +function Disable-AzCdnCustomDomainCustomHttps { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain])] +[CmdletBinding(DefaultParameterSetName='Disable', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Disable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the custom domain within an endpoint. + ${CustomDomainName}, + + [Parameter(ParameterSetName='Disable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Disable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Disable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Disable')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DisableViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Disable = 'Az.Cdn.private\Disable-AzCdnCustomDomainCustomHttps_Disable'; + DisableViaIdentity = 'Az.Cdn.private\Disable-AzCdnCustomDomainCustomHttps_DisableViaIdentity'; + } + if (('Disable') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Enable https delivery of the custom domain. +.Description +Enable https delivery of the custom domain. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain +.Notes +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. + +CUSTOMDOMAINHTTPSPARAMETER : The JSON object that contains the properties to secure a custom domain. + CertificateSource : Defines the source of the SSL certificate. + ProtocolType : Defines the TLS extension protocol that is used for secure delivery. + [MinimumTlsVersion ]: TLS protocol version that will be used for Https + +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/enable-azcdncustomdomaincustomhttps +#> +function Enable-AzCdnCustomDomainCustomHttps { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain])] +[CmdletBinding(DefaultParameterSetName='EnableViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Enable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the custom domain within an endpoint. + ${CustomDomainName}, + + [Parameter(ParameterSetName='Enable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Enable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Enable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Enable')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='EnableViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters] + # The JSON object that contains the properties to secure a custom domain. + # To construct, see NOTES section for CUSTOMDOMAINHTTPSPARAMETER properties and create a hash table. + ${CustomDomainHttpsParameter}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Enable = 'Az.Cdn.private\Enable-AzCdnCustomDomainCustomHttps_Enable'; + EnableViaIdentity = 'Az.Cdn.private\Enable-AzCdnCustomDomainCustomHttps_EnableViaIdentity'; + } + if (('Enable') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Gets an existing custom domain within an endpoint. +.Description +Gets an existing custom domain within an endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdncustomdomain +#> +function Get-AzCdnCustomDomain { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Alias('CustomDomainName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the custom domain within an endpoint. + ${Name}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get1')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get1 = 'Az.Cdn.private\Get-AzCdnCustomDomain_Get1'; + GetViaIdentity1 = 'Az.Cdn.private\Get-AzCdnCustomDomain_GetViaIdentity1'; + List1 = 'Az.Cdn.private\Get-AzCdnCustomDomain_List1'; + } + if (('Get1', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users. +.Description +Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnedgenode +#> +function Get-AzCdnEdgeNode { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Cdn.private\Get-AzCdnEdgeNode_List'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Checks the quota and usage of geo filters and custom domains under the given endpoint. +.Description +Checks the quota and usage of geo filters and custom domains under the given endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnendpointresourceusage +#> +function Get-AzCdnEndpointResourceUsage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List1 = 'Az.Cdn.private\Get-AzCdnEndpointResourceUsage_List1'; + } + if (('List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Description +Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnendpoint +#> +function Get-AzCdnEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get1', Mandatory)] + [Alias('EndpointName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${Name}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get1')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get1 = 'Az.Cdn.private\Get-AzCdnEndpoint_Get1'; + GetViaIdentity1 = 'Az.Cdn.private\Get-AzCdnEndpoint_GetViaIdentity1'; + List1 = 'Az.Cdn.private\Get-AzCdnEndpoint_List1'; + } + if (('Get1', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Gets an existing origin group within an endpoint. +.Description +Gets an existing origin group within an endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnorigingroup +#> +function Get-AzCdnOriginGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Alias('OriginGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the endpoint. + ${Name}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get1')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get1 = 'Az.Cdn.private\Get-AzCdnOriginGroup_Get1'; + GetViaIdentity1 = 'Az.Cdn.private\Get-AzCdnOriginGroup_GetViaIdentity1'; + List1 = 'Az.Cdn.private\Get-AzCdnOriginGroup_List1'; + } + if (('Get1', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Gets an existing origin within an endpoint. +.Description +Gets an existing origin within an endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnorigin +#> +function Get-AzCdnOrigin { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Alias('OriginName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin which is unique within the endpoint. + ${Name}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get1')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get1 = 'Az.Cdn.private\Get-AzCdnOrigin_Get1'; + GetViaIdentity1 = 'Az.Cdn.private\Get-AzCdnOrigin_GetViaIdentity1'; + List1 = 'Az.Cdn.private\Get-AzCdnOrigin_List1'; + } + if (('Get1', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door Premium or CDN profile. +.Description +Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door Premium or CDN profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnprofileresourceusage +#> +function Get-AzCdnProfileResourceUsage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List1 = 'Az.Cdn.private\Get-AzCdnProfileResourceUsage_List1'; + } + if (('List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Gets the supported optimization types for the current profile. +A user can create an endpoint with an optimization type from the listed values. +.Description +Gets the supported optimization types for the current profile. +A user can create an endpoint with an optimization type from the listed values. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnprofilesupportedoptimizationtype +#> +function Get-AzCdnProfileSupportedOptimizationType { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Cdn.private\Get-AzCdnProfileSupportedOptimizationType_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Check the quota and actual usage of the CDN profiles under the given subscription. +.Description +Check the quota and actual usage of the CDN profiles under the given subscription. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnsubscriptionresourceusage +#> +function Get-AzCdnSubscriptionResourceUsage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Cdn.private\Get-AzCdnSubscriptionResourceUsage_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. +.Description +Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdncustomdomain +#> +function Get-AzFrontDoorCdnCustomDomain { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the domain under the profile which is unique globally. + ${CustomDomainName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzFrontDoorCdnCustomDomain_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzFrontDoorCdnCustomDomain_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzFrontDoorCdnCustomDomain_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. +.Description +Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnendpointresourceusage +#> +function Get-AzFrontDoorCdnEndpointResourceUsage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Cdn.private\Get-AzFrontDoorCdnEndpointResourceUsage_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Description +Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnendpoint +#> +function Get-AzFrontDoorCdnEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzFrontDoorCdnEndpoint_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzFrontDoorCdnEndpoint_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzFrontDoorCdnEndpoint_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN profile. +.Description +Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnorigingroupresourceusage +#> +function Get-AzFrontDoorCdnOriginGroupResourceUsage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the endpoint. + ${OriginGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Cdn.private\Get-AzFrontDoorCdnOriginGroupResourceUsage_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Gets an existing origin group within a profile. +.Description +Gets an existing origin group within a profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnorigingroup +#> +function Get-AzFrontDoorCdnOriginGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the endpoint. + ${OriginGroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzFrontDoorCdnOriginGroup_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzFrontDoorCdnOriginGroup_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzFrontDoorCdnOriginGroup_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Gets an existing origin within an origin group. +.Description +Gets an existing origin within an origin group. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnorigin +#> +function Get-AzFrontDoorCdnOrigin { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the profile. + ${OriginGroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin which is unique within the profile. + ${OriginName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzFrontDoorCdnOrigin_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzFrontDoorCdnOrigin_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzFrontDoorCdnOrigin_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. +.Description +Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnprofileresourceusage +#> +function Get-AzFrontDoorCdnProfileResourceUsage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Cdn.private\Get-AzFrontDoorCdnProfileResourceUsage_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. +.Description +Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnroute +#> +function Get-AzFrontDoorCdnRoute { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('RouteName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the routing rule. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzFrontDoorCdnRoute_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzFrontDoorCdnRoute_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzFrontDoorCdnRoute_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. +.Description +Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnrulesetresourceusage +#> +function Get-AzFrontDoorCdnRuleSetResourceUsage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the rule set under the profile which is unique globally. + ${RuleSetName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Cdn.private\Get-AzFrontDoorCdnRuleSetResourceUsage_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. +.Description +Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnruleset +#> +function Get-AzFrontDoorCdnRuleSet { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('RuleSetName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the rule set under the profile which is unique globally. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzFrontDoorCdnRuleSet_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzFrontDoorCdnRuleSet_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzFrontDoorCdnRuleSet_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Gets an existing delivery rule within a rule set. +.Description +Gets an existing delivery rule within a rule set. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnrule +#> +function Get-AzFrontDoorCdnRule { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('RuleName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the delivery rule which is unique within the endpoint. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Alias('RuleSetName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the rule set under the profile. + ${SetName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzFrontDoorCdnRule_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzFrontDoorCdnRule_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzFrontDoorCdnRule_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Gets an existing Secret within a profile. +.Description +Gets an existing Secret within a profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnsecret +#> +function Get-AzFrontDoorCdnSecret { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('SecretName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Secret under the profile. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzFrontDoorCdnSecret_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzFrontDoorCdnSecret_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzFrontDoorCdnSecret_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Gets an existing security policy within a profile. +.Description +Gets an existing security policy within a profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnsecuritypolicy +#> +function Get-AzFrontDoorCdnSecurityPolicy { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('SecurityPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the security policy under the profile. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzFrontDoorCdnSecurityPolicy_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzFrontDoorCdnSecurityPolicy_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzFrontDoorCdnSecurityPolicy_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Pre-loads a content to CDN. +Available for Verizon Profiles. +.Description +Pre-loads a content to CDN. +Available for Verizon Profiles. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + +CONTENTFILEPATH : Parameters required for content load. + ContentPath : The path to the content to be loaded. Path should be a relative file URL of the origin. + +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/import-azcdnendpointcontent +#> +function Import-AzCdnEndpointContent { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='LoadExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Load', Mandatory)] + [Parameter(ParameterSetName='LoadExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Load', Mandatory)] + [Parameter(ParameterSetName='LoadExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Load', Mandatory)] + [Parameter(ParameterSetName='LoadExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Load')] + [Parameter(ParameterSetName='LoadExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='LoadViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='LoadViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Load', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='LoadViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters] + # Parameters required for content load. + # To construct, see NOTES section for CONTENTFILEPATH properties and create a hash table. + ${ContentFilePath}, + + [Parameter(ParameterSetName='LoadExpanded', Mandatory)] + [Parameter(ParameterSetName='LoadViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The path to the content to be loaded. + # Path should be a relative file URL of the origin. + ${ContentPath}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Load = 'Az.Cdn.private\Import-AzCdnEndpointContent_Load'; + LoadExpanded = 'Az.Cdn.private\Import-AzCdnEndpointContent_LoadExpanded'; + LoadViaIdentity = 'Az.Cdn.private\Import-AzCdnEndpointContent_LoadViaIdentity'; + LoadViaIdentityExpanded = 'Az.Cdn.private\Import-AzCdnEndpointContent_LoadViaIdentityExpanded'; + } + if (('Load', 'LoadExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Creates a new custom domain within an endpoint. +.Description +Creates a new custom domain within an endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azcdncustomdomain +#> +function New-AzCdnCustomDomain { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(Mandatory)] + [Alias('CustomDomainName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the custom domain within an endpoint. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host name of the custom domain. + # Must be a domain name. + ${HostName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded1 = 'Az.Cdn.private\New-AzCdnCustomDomain_CreateExpanded1'; + } + if (('CreateExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Description +Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint +.Notes +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. + +DELIVERYPOLICYRULE : A list of the delivery rules. + Action : A list of actions that are executed when all the conditions of a rule are satisfied. + Name : The name of the action for the delivery rule. + Order : The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + [Condition ]: A list of conditions that must be matched for the actions to be executed + Name : The name of the condition for the delivery rule. + [Name ]: Name of the rule + +GEOFILTER : List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/ + Action : Action of the geo filter, i.e. allow or block access. + CountryCode : Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US. + RelativePath : Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) + +ORIGIN : The source of the content being delivered via CDN. + Name : Origin name which must be unique within the endpoint. + [Enabled ]: Origin is enabled for load balancing or not. By default, origin is always enabled. + [HostName ]: The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across all origins in an endpoint. + [HttpPort ]: The value of the HTTP port. Must be between 1 and 65535. + [HttpsPort ]: The value of the HTTPS port. Must be between 1 and 65535. + [OriginHostHeader ]: The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + [Priority ]: Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. + [PrivateLinkAlias ]: The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + [PrivateLinkApprovalMessage ]: A custom message to be included in the approval request to connect to the Private Link. + [PrivateLinkLocation ]: The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + [PrivateLinkResourceId ]: The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + [Weight ]: Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + +ORIGINGROUP : The origin groups comprising of origins that are used for load balancing the traffic based on availability. + Name : Origin group name which must be unique within the endpoint. + [HealthProbeSetting ]: Health probe settings to the origin that is used to determine the health of the origin. + [ProbeIntervalInSecond ]: The number of seconds between health probes.Default is 240sec. + [ProbePath ]: The path relative to the origin that is used to determine the health of the origin. + [ProbeProtocol ]: Protocol to use for health probe. + [ProbeRequestType ]: The type of health probe request that is made. + [Origin ]: The source of the content being delivered via CDN within given origin group. + [Id ]: Resource ID. + [ResponseBasedOriginErrorDetectionSetting ]: The JSON object that contains the properties to determine origin health using real requests/responses.This property is currently not supported. + [HttpErrorRange ]: The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + [Begin ]: The inclusive start of the http status code range. + [End ]: The inclusive end of the http status code range. + [ResponseBasedDetectedErrorType ]: Type of response errors for real user requests for which origin will be deemed unhealthy + [ResponseBasedFailoverThresholdPercentage ]: The percentage of failed requests in the sample where failover should trigger. + [TrafficRestorationTimeToHealedOrNewEndpointsInMinute ]: Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + +URLSIGNINGKEY : List of keys used to validate the signed URL hashes. + KeyId : Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + KeySourceParameterResourceGroupName : Resource group of the user's Key Vault containing the secret + KeySourceParameterSecretName : The name of secret in Key Vault. + KeySourceParameterSecretVersion : The version(GUID) of secret in Key Vault. + KeySourceParameterSubscriptionId : Subscription Id of the user's Key Vault containing the secret + KeySourceParameterVaultName : The name of the user's Key Vault containing the secret +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnendpoint +#> +function New-AzCdnEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('EndpointName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource location. + ${Location}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # List of content types on which compression applies. + # The value should be a valid MIME type. + ${ContentTypesToCompress}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${DefaultOriginGroupId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # User-friendly description of the policy. + ${DeliveryPolicyDescription}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[]] + # A list of the delivery rules. + # To construct, see NOTES section for DELIVERYPOLICYRULE properties and create a hash table. + ${DeliveryPolicyRule}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[]] + # List of rules defining the user's geo access within a CDN endpoint. + # Each geo filter defines an access rule to a specified path or content, e.g. + # block APAC for path /pictures/ + # To construct, see NOTES section for GEOFILTER properties and create a hash table. + ${GeoFilter}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether content compression is enabled on CDN. + # Default value is false. + # If compression is enabled, content will be served as compressed if user requests for a compressed version. + # Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. + ${IsCompressionEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether HTTP traffic is allowed on the endpoint. + # Default value is true. + # At least one protocol (HTTP or HTTPS) must be allowed. + ${IsHttpAllowed}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether HTTPS traffic is allowed on the endpoint. + # Default value is true. + # At least one protocol (HTTP or HTTPS) must be allowed. + ${IsHttpsAllowed}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType] + # Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. + # Download, Media services. + # With this information, CDN can apply scenario driven optimization. + ${OptimizationType}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin[]] + # The source of the content being delivered via CDN. + # To construct, see NOTES section for ORIGIN properties and create a hash table. + ${Origin}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup[]] + # The origin groups comprising of origins that are used for load balancing the traffic based on availability. + # To construct, see NOTES section for ORIGINGROUP properties and create a hash table. + ${OriginGroup}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host header value sent to the origin with each request. + # This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. + # Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + ${OriginHostHeader}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # A directory path on the origin that CDN can use to retrieve content from, e.g. + # contoso.cloudapp.net/originpath. + ${OriginPath}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. + # This is relative to the origin path. + # This property is only relevant when using a single origin. + ${ProbePath}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior] + # Defines how CDN caches requests that include query strings. + # You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + ${QueryStringCachingBehavior}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[]] + # List of keys used to validate the signed URL hashes. + # To construct, see NOTES section for URLSIGNINGKEY properties and create a hash table. + ${UrlSigningKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${WebApplicationFirewallPolicyLinkId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded1 = 'Az.Cdn.private\New-AzCdnEndpoint_CreateExpanded1'; + } + if (('CreateExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Creates a new origin group within the specified endpoint. +.Description +Creates a new origin group within the specified endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup +.Notes +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. + +HEALTHPROBESETTING : Health probe settings to the origin that is used to determine the health of the origin. + [ProbeIntervalInSecond ]: The number of seconds between health probes.Default is 240sec. + [ProbePath ]: The path relative to the origin that is used to determine the health of the origin. + [ProbeProtocol ]: Protocol to use for health probe. + [ProbeRequestType ]: The type of health probe request that is made. + +ORIGIN : The source of the content being delivered via CDN within given origin group. + [Id ]: Resource ID. + +RESPONSEBASEDORIGINERRORDETECTIONSETTING : The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported. + [HttpErrorRange ]: The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + [Begin ]: The inclusive start of the http status code range. + [End ]: The inclusive end of the http status code range. + [ResponseBasedDetectedErrorType ]: Type of response errors for real user requests for which origin will be deemed unhealthy + [ResponseBasedFailoverThresholdPercentage ]: The percentage of failed requests in the sample where failover should trigger. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnorigingroup +#> +function New-AzCdnOriginGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(Mandatory)] + [Alias('OriginGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the endpoint. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters] + # Health probe settings to the origin that is used to determine the health of the origin. + # To construct, see NOTES section for HEALTHPROBESETTING properties and create a hash table. + ${HealthProbeSetting}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]] + # The source of the content being delivered via CDN within given origin group. + # To construct, see NOTES section for ORIGIN properties and create a hash table. + ${Origin}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters] + # The JSON object that contains the properties to determine origin health using real requests/responses. + # This property is currently not supported. + # To construct, see NOTES section for RESPONSEBASEDORIGINERRORDETECTIONSETTING properties and create a hash table. + ${ResponseBasedOriginErrorDetectionSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. + # Default is 10 mins. + # This property is currently not supported. + ${TrafficRestorationTimeToHealedOrNewEndpointsInMinute}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded1 = 'Az.Cdn.private\New-AzCdnOriginGroup_CreateExpanded1'; + } + if (('CreateExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Creates a new origin within the specified endpoint. +.Description +Creates a new origin within the specified endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnorigin +#> +function New-AzCdnOrigin { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(Mandatory)] + [Alias('OriginName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin that is unique within the endpoint. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Origin is enabled for load balancing or not + ${Enabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The address of the origin. + # Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + ${HostName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The value of the HTTP port. + # Must be between 1 and 65535. + ${HttpPort}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The value of the HTTPS port. + # Must be between 1 and 65535. + ${HttpsPort}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host header value sent to the origin with each request. + # If you leave this blank, the request hostname determines this value. + # Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + # This overrides the host header defined at Endpoint + ${OriginHostHeader}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Priority of origin in given origin group for load balancing. + # Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + ${Priority}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The Alias of the Private Link resource. + # Populating this optional field indicates that this origin is 'Private' + ${PrivateLinkAlias}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # A custom message to be included in the approval request to connect to the Private Link. + ${PrivateLinkApprovalMessage}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The location of the Private Link resource. + # Required only if 'privateLinkResourceId' is populated + ${PrivateLinkLocation}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The Resource Id of the Private Link resource. + # Populating this optional field indicates that this backend is 'Private' + ${PrivateLinkResourceId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Weight of the origin in given origin group for load balancing. + # Must be between 1 and 1000 + ${Weight}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded1 = 'Az.Cdn.private\New-AzCdnOrigin_CreateExpanded1'; + } + if (('CreateExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Creates a new domain within the specified profile. +.Description +Creates a new domain within the specified profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain +.Notes +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. + +TLSSETTING : The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + CertificateType : Defines the source of the SSL certificate. + [MinimumTlsVersion ]: TLS protocol version that will be used for Https + [Secret ]: Resource reference to the secret. ie. subs/rg/profile/secret + [Id ]: Resource ID. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdncustomdomain +#> +function New-AzFrontDoorCdnCustomDomain { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the domain under the profile which is unique globally + ${CustomDomainName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${AzureDnsZoneId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host name of the domain. + # Must be a domain name. + ${HostName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${PropertiesPreValidatedCustomDomainResourceId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters] + # The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. + # If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + # To construct, see NOTES section for TLSSETTING properties and create a hash table. + ${TlsSetting}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.private\New-AzFrontDoorCdnCustomDomain_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Description +Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnendpoint +#> +function New-AzFrontDoorCdnEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource location. + ${Location}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope] + # Indicates the endpoint name reuse scope. + # The default value is TenantReuse. + ${AutoGeneratedDomainNameLabelScope}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState] + # Whether to enable use of this rule. + # Permitted values are 'Enabled' or 'Disabled' + ${EnabledState}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.private\New-AzFrontDoorCdnEndpoint_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Creates a new origin group within the specified profile. +.Description +Creates a new origin group within the specified profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup +.Notes +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. + +HEALTHPROBESETTING : Health probe settings to the origin that is used to determine the health of the origin. + [ProbeIntervalInSecond ]: The number of seconds between health probes.Default is 240sec. + [ProbePath ]: The path relative to the origin that is used to determine the health of the origin. + [ProbeProtocol ]: Protocol to use for health probe. + [ProbeRequestType ]: The type of health probe request that is made. + +LOADBALANCINGSETTING : Load balancing settings for a backend pool + [AdditionalLatencyInMillisecond ]: The additional latency in milliseconds for probes to fall into the lowest latency bucket + [SampleSize ]: The number of samples to consider for load balancing decisions + [SuccessfulSamplesRequired ]: The number of samples within the sample period that must succeed +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnorigingroup +#> +function New-AzFrontDoorCdnOriginGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the endpoint. + ${OriginGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters] + # Health probe settings to the origin that is used to determine the health of the origin. + # To construct, see NOTES section for HEALTHPROBESETTING properties and create a hash table. + ${HealthProbeSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters] + # Load balancing settings for a backend pool + # To construct, see NOTES section for LOADBALANCINGSETTING properties and create a hash table. + ${LoadBalancingSetting}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState] + # Whether to allow session affinity on this host. + # Valid options are 'Enabled' or 'Disabled' + ${SessionAffinityState}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. + # Default is 10 mins. + # This property is currently not supported. + ${TrafficRestorationTimeToHealedOrNewEndpointsInMinute}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.private\New-AzFrontDoorCdnOriginGroup_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Creates a new origin within the specified origin group. +.Description +Creates a new origin within the specified origin group. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnorigin +#> +function New-AzFrontDoorCdnOrigin { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the profile. + ${OriginGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin that is unique within the profile. + ${OriginName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${AzureOriginId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState] + # Whether to enable health probes to be made against backends defined under backendPools. + # Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. + ${EnabledState}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether to enable certificate name check at origin level + ${EnforceCertificateNameCheck}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The address of the origin. + # Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + ${HostName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The value of the HTTP port. + # Must be between 1 and 65535. + ${HttpPort}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The value of the HTTPS port. + # Must be between 1 and 65535. + ${HttpsPort}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host header value sent to the origin with each request. + # If you leave this blank, the request hostname determines this value. + # Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + # This overrides the host header defined at Endpoint + ${OriginHostHeader}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Priority of origin in given origin group for load balancing. + # Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + ${Priority}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${PrivateLinkId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The group id from the provider of resource the shared private link resource is for. + ${SharedPrivateLinkResourceGroupId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The location of the shared private link resource + ${SharedPrivateLinkResourcePrivateLinkLocation}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The request message for requesting approval of the shared private link resource. + ${SharedPrivateLinkResourceRequestMessage}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus] + # Status of the shared private link resource. + # Can be Pending, Approved, Rejected, Disconnected, or Timeout. + ${SharedPrivateLinkResourceStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Weight of the origin in given origin group for load balancing. + # Must be between 1 and 1000 + ${Weight}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.private\New-AzFrontDoorCdnOrigin_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. +.Description +Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute +.Notes +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. + +CUSTOMDOMAIN : Domains referenced by this endpoint. + [Id ]: Resource ID. + +RULESET : rule sets referenced by this endpoint. + [Id ]: Resource ID. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnroute +#> +function New-AzFrontDoorCdnRoute { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(Mandatory)] + [Alias('RouteName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the routing rule. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # query parameters to include or exclude (comma separated). + ${CacheConfigurationQueryParameter}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior] + # Defines how Frontdoor caches requests that include query strings. + # You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + ${CacheConfigurationQueryStringCachingBehavior}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # List of content types on which compression applies. + # The value should be a valid MIME type. + ${CompressionSettingContentTypesToCompress}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether content compression is enabled on AzureFrontDoor. + # Default value is false. + # If compression is enabled, content will be served as compressed if user requests for a compressed version. + # Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + ${CompressionSettingIsCompressionEnabled}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[]] + # Domains referenced by this endpoint. + # To construct, see NOTES section for CUSTOMDOMAIN properties and create a hash table. + ${CustomDomain}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState] + # Whether to enable use of this rule. + # Permitted values are 'Enabled' or 'Disabled' + ${EnabledState}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol] + # Protocol this rule will use when forwarding traffic to backends. + ${ForwardingProtocol}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect] + # Whether to automatically redirect HTTP traffic to HTTPS traffic. + # Note that this is a easy way to set up this rule and it will be the first rule that gets executed. + ${HttpsRedirect}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain] + # whether this route will be linked to the default endpoint domain. + ${LinkToDefaultDomain}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${OriginGroupId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. + # contoso.cloudapp.net/originpath. + ${OriginPath}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The route patterns of the rule. + ${PatternsToMatch}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]] + # rule sets referenced by this endpoint. + # To construct, see NOTES section for RULESET properties and create a hash table. + ${RuleSet}, + + [Parameter()] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[]] + # List of supported protocols for this route. + ${SupportedProtocol}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.private\New-AzFrontDoorCdnRoute_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Creates a new rule set within the specified profile. +.Description +Creates a new rule set within the specified profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnruleset +#> +function New-AzFrontDoorCdnRuleSet { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet])] +[CmdletBinding(DefaultParameterSetName='Create', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('RuleSetName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the rule set under the profile which is unique globally + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Create = 'Az.Cdn.private\New-AzFrontDoorCdnRuleSet_Create'; + } + if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Creates a new delivery rule within the specified rule set. +.Description +Creates a new delivery rule within the specified rule set. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule +.Notes +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. + +ACTION : A list of actions that are executed when all the conditions of a rule are satisfied. + Name : The name of the action for the delivery rule. + +CONDITION : A list of conditions that must be matched for the actions to be executed + Name : The name of the condition for the delivery rule. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnrule +#> +function New-AzFrontDoorCdnRule { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('RuleName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the delivery rule which is unique within the endpoint. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(Mandatory)] + [Alias('RuleSetName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the rule set under the profile. + ${SetName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[]] + # A list of actions that are executed when all the conditions of a rule are satisfied. + # To construct, see NOTES section for ACTION properties and create a hash table. + ${Action}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[]] + # A list of conditions that must be matched for the actions to be executed + # To construct, see NOTES section for CONDITION properties and create a hash table. + ${Condition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior] + # If this rule is a match should the rules engine continue running the remaining rules or stop. + # If not present, defaults to Continue. + ${MatchProcessingBehavior}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The order in which the rules are applied for the endpoint. + # Possible values {0,1,2,3,………}. + # A rule with a lesser order will be applied before a rule with a greater order. + # Rule with order 0 is a special rule. + # It does not require any condition and actions listed in it will always be applied. + ${Order}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.private\New-AzFrontDoorCdnRule_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Creates a new Secret within the specified profile. +.Description +Creates a new Secret within the specified profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret +.Notes +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. + +PARAMETER : object which contains secret parameters + Type : The type of the secret resource. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnsecret +#> +function New-AzFrontDoorCdnSecret { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('SecretName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Secret under the profile. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters] + # object which contains secret parameters + # To construct, see NOTES section for PARAMETER properties and create a hash table. + ${Parameter}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.private\New-AzFrontDoorCdnSecret_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Creates a new security policy within the specified profile. +.Description +Creates a new security policy within the specified profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnsecuritypolicy +#> +function New-AzFrontDoorCdnSecurityPolicy { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('SecurityPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the security policy under the profile. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters] + # object which contains security policy parameters + ${Parameter}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.private\New-AzFrontDoorCdnSecurityPolicy_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Deletes an existing custom domain within an endpoint. +.Description +Deletes an existing custom domain within an endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdncustomdomain +#> +function Remove-AzCdnCustomDomain { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Alias('CustomDomainName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the custom domain within an endpoint. + ${Name}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete1 = 'Az.Cdn.private\Remove-AzCdnCustomDomain_Delete1'; + DeleteViaIdentity1 = 'Az.Cdn.private\Remove-AzCdnCustomDomain_DeleteViaIdentity1'; + } + if (('Delete1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Description +Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnendpoint +#> +function Remove-AzCdnEndpoint { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Alias('EndpointName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${Name}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete1 = 'Az.Cdn.private\Remove-AzCdnEndpoint_Delete1'; + DeleteViaIdentity1 = 'Az.Cdn.private\Remove-AzCdnEndpoint_DeleteViaIdentity1'; + } + if (('Delete1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Deletes an existing origin group within an endpoint. +.Description +Deletes an existing origin group within an endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnorigingroup +#> +function Remove-AzCdnOriginGroup { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Alias('OriginGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the endpoint. + ${Name}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete1 = 'Az.Cdn.private\Remove-AzCdnOriginGroup_Delete1'; + DeleteViaIdentity1 = 'Az.Cdn.private\Remove-AzCdnOriginGroup_DeleteViaIdentity1'; + } + if (('Delete1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Deletes an existing origin within an endpoint. +.Description +Deletes an existing origin within an endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnorigin +#> +function Remove-AzCdnOrigin { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Alias('OriginName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin which is unique within the endpoint. + ${Name}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete1 = 'Az.Cdn.private\Remove-AzCdnOrigin_Delete1'; + DeleteViaIdentity1 = 'Az.Cdn.private\Remove-AzCdnOrigin_DeleteViaIdentity1'; + } + if (('Delete1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. +.Description +Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdncustomdomain +#> +function Remove-AzFrontDoorCdnCustomDomain { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the domain under the profile which is unique globally. + ${CustomDomainName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzFrontDoorCdnCustomDomain_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzFrontDoorCdnCustomDomain_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Description +Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnendpoint +#> +function Remove-AzFrontDoorCdnEndpoint { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzFrontDoorCdnEndpoint_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzFrontDoorCdnEndpoint_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Deletes an existing origin group within a profile. +.Description +Deletes an existing origin group within a profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnorigingroup +#> +function Remove-AzFrontDoorCdnOriginGroup { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the profile. + ${OriginGroupName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzFrontDoorCdnOriginGroup_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzFrontDoorCdnOriginGroup_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Deletes an existing origin within an origin group. +.Description +Deletes an existing origin within an origin group. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnorigin +#> +function Remove-AzFrontDoorCdnOrigin { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the profile. + ${OriginGroupName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin which is unique within the profile. + ${OriginName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzFrontDoorCdnOrigin_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzFrontDoorCdnOrigin_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. +.Description +Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnroute +#> +function Remove-AzFrontDoorCdnRoute { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('RouteName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the routing rule. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzFrontDoorCdnRoute_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzFrontDoorCdnRoute_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. +.Description +Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnruleset +#> +function Remove-AzFrontDoorCdnRuleSet { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('RuleSetName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the rule set under the profile which is unique globally. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzFrontDoorCdnRuleSet_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzFrontDoorCdnRuleSet_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Deletes an existing delivery rule within a rule set. +.Description +Deletes an existing delivery rule within a rule set. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnrule +#> +function Remove-AzFrontDoorCdnRule { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('RuleName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the delivery rule which is unique within the endpoint. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('RuleSetName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the rule set under the profile. + ${SetName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzFrontDoorCdnRule_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzFrontDoorCdnRule_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Deletes an existing Secret within profile. +.Description +Deletes an existing Secret within profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnsecret +#> +function Remove-AzFrontDoorCdnSecret { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('SecretName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Secret under the profile. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzFrontDoorCdnSecret_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzFrontDoorCdnSecret_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Deletes an existing security policy within profile. +.Description +Deletes an existing security policy within profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnsecuritypolicy +#> +function Remove-AzFrontDoorCdnSecurityPolicy { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('SecurityPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the security policy under the profile. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzFrontDoorCdnSecurityPolicy_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzFrontDoorCdnSecurityPolicy_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Starts an existing CDN endpoint that is on a stopped state. +.Description +Starts an existing CDN endpoint that is on a stopped state. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/start-azcdnendpoint +#> +function Start-AzCdnEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint])] +[CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Start', Mandatory)] + [Alias('EndpointName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${Name}, + + [Parameter(ParameterSetName='Start', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Start', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Start')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='StartViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Start = 'Az.Cdn.private\Start-AzCdnEndpoint_Start'; + StartViaIdentity = 'Az.Cdn.private\Start-AzCdnEndpoint_StartViaIdentity'; + } + if (('Start') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Stops an existing running CDN endpoint. +.Description +Stops an existing running CDN endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/stop-azcdnendpoint +#> +function Stop-AzCdnEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint])] +[CmdletBinding(DefaultParameterSetName='Stop', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Stop', Mandatory)] + [Alias('EndpointName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${Name}, + + [Parameter(ParameterSetName='Stop', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Stop', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Stop')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='StopViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Stop = 'Az.Cdn.private\Stop-AzCdnEndpoint_Stop'; + StopViaIdentity = 'Az.Cdn.private\Stop-AzCdnEndpoint_StopViaIdentity'; + } + if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. +.Description +Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/test-azcdnendpointcustomdomain +#> +function Test-AzCdnEndpointCustomDomain { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput])] +[CmdletBinding(DefaultParameterSetName='ValidateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='ValidateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='ValidateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='ValidateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='ValidateExpanded1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='ValidateViaIdentityExpanded1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host name of the custom domain. + # Must be a domain name. + ${HostName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + ValidateExpanded1 = 'Az.Cdn.private\Test-AzCdnEndpointCustomDomain_ValidateExpanded1'; + ValidateViaIdentityExpanded1 = 'Az.Cdn.private\Test-AzCdnEndpointCustomDomain_ValidateViaIdentityExpanded1'; + } + if (('ValidateExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Check the availability of a resource name. +This is needed for resources where name is globally unique, such as a CDN endpoint. +.Description +Check the availability of a resource name. +This is needed for resources where name is globally unique, such as a CDN endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput +.Link +https://docs.microsoft.com/powershell/module/az.cdn/test-azcdnnameavailability +#> +function Test-AzCdnNameAvailability { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput])] +[CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='CheckExpanded1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The resource name to validate. + ${Name}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType] + # The type of the resource whose name is to be validated. + ${Type}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CheckExpanded = 'Az.Cdn.private\Test-AzCdnNameAvailability_CheckExpanded'; + CheckExpanded1 = 'Az.Cdn.private\Test-AzCdnNameAvailability_CheckExpanded1'; + } + if (('CheckExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Check if the probe path is a valid path and the file can be accessed. +Probe path is the path to a file hosted on the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. +This path is relative to the origin path specified in the endpoint configuration. +.Description +Check if the probe path is a valid path and the file can be accessed. +Probe path is the path to a file hosted on the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. +This path is relative to the origin path specified in the endpoint configuration. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutput +.Link +https://docs.microsoft.com/powershell/module/az.cdn/test-azcdnprobe +#> +function Test-AzCdnProbe { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutput])] +[CmdletBinding(DefaultParameterSetName='ValidateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The probe URL to validate. + ${ProbeUrl}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + ValidateExpanded = 'Az.Cdn.private\Test-AzCdnProbe_ValidateExpanded'; + } + if (('ValidateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api isn't work for apex domain. +.Description +Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api isn't work for apex domain. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/test-azfrontdoorcdnendpointcustomdomain +#> +function Test-AzFrontDoorCdnEndpointCustomDomain { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput])] +[CmdletBinding(DefaultParameterSetName='ValidateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='ValidateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='ValidateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='ValidateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='ValidateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='ValidateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host name of the custom domain. + # Must be a domain name. + ${HostName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + ValidateExpanded = 'Az.Cdn.private\Test-AzFrontDoorCdnEndpointCustomDomain_ValidateExpanded'; + ValidateViaIdentityExpanded = 'Az.Cdn.private\Test-AzFrontDoorCdnEndpointCustomDomain_ValidateViaIdentityExpanded'; + } + if (('ValidateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Check the availability of a resource name. +This is needed for resources where name is globally unique, such as a afdx endpoint. +.Description +Check the availability of a resource name. +This is needed for resources where name is globally unique, such as a afdx endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutput +.Link +https://docs.microsoft.com/powershell/module/az.cdn/test-azfrontdoorcdnendpointnameavailability +#> +function Test-AzFrontDoorCdnEndpointNameAvailability { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutput])] +[CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The resource name to validate. + ${Name}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType] + # The type of the resource whose name is to be validated. + ${Type}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope] + # Indicates the endpoint name reuse scope. + # The default value is TenantReuse. + ${AutoGeneratedDomainNameLabelScope}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CheckExpanded = 'Az.Cdn.private\Test-AzFrontDoorCdnEndpointNameAvailability_CheckExpanded'; + } + if (('CheckExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Check the name availability of a host name. +.Description +Check the name availability of a host name. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/test-azfrontdoorcdnprofilehostnameavailability +#> +function Test-AzFrontDoorCdnProfileHostNameAvailability { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput])] +[CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='CheckExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='CheckExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='CheckExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CheckViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host name to validate. + ${HostName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CheckExpanded = 'Az.Cdn.private\Test-AzFrontDoorCdnProfileHostNameAvailability_CheckExpanded'; + CheckViaIdentityExpanded = 'Az.Cdn.private\Test-AzFrontDoorCdnProfileHostNameAvailability_CheckViaIdentityExpanded'; + } + if (('CheckExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +Only tags can be updated after creating an endpoint. +To update origins, use the Update Origin operation. +To update origin groups, use the Update Origin group operation. +To update custom domains, use the Update Custom Domain operation. +.Description +Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +Only tags can be updated after creating an endpoint. +To update origins, use the Update Origin operation. +To update origin groups, use the Update Origin group operation. +To update custom domains, use the Update Custom Domain operation. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint +.Notes +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. + +DELIVERYPOLICYRULE : A list of the delivery rules. + Action : A list of actions that are executed when all the conditions of a rule are satisfied. + Name : The name of the action for the delivery rule. + Order : The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + [Condition ]: A list of conditions that must be matched for the actions to be executed + Name : The name of the condition for the delivery rule. + [Name ]: Name of the rule + +GEOFILTER : List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/ + Action : Action of the geo filter, i.e. allow or block access. + CountryCode : Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US. + RelativePath : Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) + +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. + [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. + +URLSIGNINGKEY : List of keys used to validate the signed URL hashes. + KeyId : Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + KeySourceParameterResourceGroupName : Resource group of the user's Key Vault containing the secret + KeySourceParameterSecretName : The name of secret in Key Vault. + KeySourceParameterSecretVersion : The version(GUID) of secret in Key Vault. + KeySourceParameterSubscriptionId : Subscription Id of the user's Key Vault containing the secret + KeySourceParameterVaultName : The name of the user's Key Vault containing the secret +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azcdnendpoint +#> +function Update-AzCdnEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Alias('EndpointName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # List of content types on which compression applies. + # The value should be a valid MIME type. + ${ContentTypesToCompress}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${DefaultOriginGroupId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # User-friendly description of the policy. + ${DeliveryPolicyDescription}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[]] + # A list of the delivery rules. + # To construct, see NOTES section for DELIVERYPOLICYRULE properties and create a hash table. + ${DeliveryPolicyRule}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[]] + # List of rules defining the user's geo access within a CDN endpoint. + # Each geo filter defines an access rule to a specified path or content, e.g. + # block APAC for path /pictures/ + # To construct, see NOTES section for GEOFILTER properties and create a hash table. + ${GeoFilter}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether content compression is enabled on CDN. + # Default value is false. + # If compression is enabled, content will be served as compressed if user requests for a compressed version. + # Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. + ${IsCompressionEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether HTTP traffic is allowed on the endpoint. + # Default value is true. + # At least one protocol (HTTP or HTTPS) must be allowed. + ${IsHttpAllowed}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether HTTPS traffic is allowed on the endpoint. + # Default value is true. + # At least one protocol (HTTP or HTTPS) must be allowed. + ${IsHttpsAllowed}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType] + # Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. + # Download, Media services. + # With this information, CDN can apply scenario driven optimization. + ${OptimizationType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host header value sent to the origin with each request. + # This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. + # Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + ${OriginHostHeader}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # A directory path on the origin that CDN can use to retrieve content from, e.g. + # contoso.cloudapp.net/originpath. + ${OriginPath}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. + # This is relative to the origin path. + # This property is only relevant when using a single origin. + ${ProbePath}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior] + # Defines how CDN caches requests that include query strings. + # You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + ${QueryStringCachingBehavior}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags]))] + [System.Collections.Hashtable] + # Endpoint tags. + ${Tag}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[]] + # List of keys used to validate the signed URL hashes. + # To construct, see NOTES section for URLSIGNINGKEY properties and create a hash table. + ${UrlSigningKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${WebApplicationFirewallPolicyLinkId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded1 = 'Az.Cdn.private\Update-AzCdnEndpoint_UpdateExpanded1'; + UpdateViaIdentityExpanded1 = 'Az.Cdn.private\Update-AzCdnEndpoint_UpdateViaIdentityExpanded1'; + } + if (('UpdateExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Updates an existing origin group within an endpoint. +.Description +Updates an existing origin group within an endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup +.Notes +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. + +HEALTHPROBESETTING : Health probe settings to the origin that is used to determine the health of the origin. + [ProbeIntervalInSecond ]: The number of seconds between health probes.Default is 240sec. + [ProbePath ]: The path relative to the origin that is used to determine the health of the origin. + [ProbeProtocol ]: Protocol to use for health probe. + [ProbeRequestType ]: The type of health probe request that is made. + +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. + [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. + +ORIGIN : The source of the content being delivered via CDN within given origin group. + [Id ]: Resource ID. + +RESPONSEBASEDORIGINERRORDETECTIONSETTING : The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported. + [HttpErrorRange ]: The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + [Begin ]: The inclusive start of the http status code range. + [End ]: The inclusive end of the http status code range. + [ResponseBasedDetectedErrorType ]: Type of response errors for real user requests for which origin will be deemed unhealthy + [ResponseBasedFailoverThresholdPercentage ]: The percentage of failed requests in the sample where failover should trigger. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azcdnorigingroup +#> +function Update-AzCdnOriginGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Alias('OriginGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the endpoint. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters] + # Health probe settings to the origin that is used to determine the health of the origin. + # To construct, see NOTES section for HEALTHPROBESETTING properties and create a hash table. + ${HealthProbeSetting}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]] + # The source of the content being delivered via CDN within given origin group. + # To construct, see NOTES section for ORIGIN properties and create a hash table. + ${Origin}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters] + # The JSON object that contains the properties to determine origin health using real requests/responses. + # This property is currently not supported. + # To construct, see NOTES section for RESPONSEBASEDORIGINERRORDETECTIONSETTING properties and create a hash table. + ${ResponseBasedOriginErrorDetectionSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. + # Default is 10 mins. + # This property is currently not supported. + ${TrafficRestorationTimeToHealedOrNewEndpointsInMinute}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded1 = 'Az.Cdn.private\Update-AzCdnOriginGroup_UpdateExpanded1'; + UpdateViaIdentityExpanded1 = 'Az.Cdn.private\Update-AzCdnOriginGroup_UpdateViaIdentityExpanded1'; + } + if (('UpdateExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Updates an existing origin within an endpoint. +.Description +Updates an existing origin within an endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azcdnorigin +#> +function Update-AzCdnOrigin { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Alias('OriginName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin which is unique within the endpoint. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Origin is enabled for load balancing or not + ${Enabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The address of the origin. + # Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + ${HostName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The value of the HTTP port. + # Must be between 1 and 65535. + ${HttpPort}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The value of the HTTPS port. + # Must be between 1 and 65535. + ${HttpsPort}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host header value sent to the origin with each request. + # If you leave this blank, the request hostname determines this value. + # Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + # This overrides the host header defined at Endpoint + ${OriginHostHeader}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Priority of origin in given origin group for load balancing. + # Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + ${Priority}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The Alias of the Private Link resource. + # Populating this optional field indicates that this origin is 'Private' + ${PrivateLinkAlias}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # A custom message to be included in the approval request to connect to the Private Link. + ${PrivateLinkApprovalMessage}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The location of the Private Link resource. + # Required only if 'privateLinkResourceId' is populated + ${PrivateLinkLocation}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The Resource Id of the Private Link resource. + # Populating this optional field indicates that this backend is 'Private' + ${PrivateLinkResourceId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Weight of the origin in given origin group for load balancing. + # Must be between 1 and 1000 + ${Weight}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded1 = 'Az.Cdn.private\Update-AzCdnOrigin_UpdateExpanded1'; + UpdateViaIdentityExpanded1 = 'Az.Cdn.private\Update-AzCdnOrigin_UpdateViaIdentityExpanded1'; + } + if (('UpdateExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Updates the domain validation token. +.Description +Updates the domain validation token. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdncustomdomainvalidationtoken +#> +function Update-AzFrontDoorCdnCustomDomainValidationToken { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Refresh', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Refresh', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the domain under the profile which is unique globally. + ${CustomDomainName}, + + [Parameter(ParameterSetName='Refresh', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Refresh', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Refresh')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RefreshViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Refresh = 'Az.Cdn.private\Update-AzFrontDoorCdnCustomDomainValidationToken_Refresh'; + RefreshViaIdentity = 'Az.Cdn.private\Update-AzFrontDoorCdnCustomDomainValidationToken_RefreshViaIdentity'; + } + if (('Refresh') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Updates an existing domain within a profile. +.Description +Updates an existing domain within a profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain +.Notes +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. + [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. + +TLSSETTING : The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + CertificateType : Defines the source of the SSL certificate. + [MinimumTlsVersion ]: TLS protocol version that will be used for Https + [Secret ]: Resource reference to the secret. ie. subs/rg/profile/secret + [Id ]: Resource ID. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdncustomdomain +#> +function Update-AzFrontDoorCdnCustomDomain { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the domain under the profile which is unique globally + ${CustomDomainName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${AzureDnsZoneId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${PropertiesPreValidatedCustomDomainResourceId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters] + # The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. + # If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + # To construct, see NOTES section for TLSSETTING properties and create a hash table. + ${TlsSetting}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnCustomDomain_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnCustomDomain_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +Only tags can be updated after creating an endpoint. +To update origins, use the Update Origin operation. +To update origin groups, use the Update Origin group operation. +To update domains, use the Update Custom Domain operation. +.Description +Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +Only tags can be updated after creating an endpoint. +To update origins, use the Update Origin operation. +To update origin groups, use the Update Origin group operation. +To update domains, use the Update Custom Domain operation. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnendpoint +#> +function Update-AzFrontDoorCdnEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState] + # Whether to enable use of this rule. + # Permitted values are 'Enabled' or 'Disabled' + ${EnabledState}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags]))] + [System.Collections.Hashtable] + # Endpoint tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnEndpoint_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnEndpoint_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Updates an existing origin group within a profile. +.Description +Updates an existing origin group within a profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup +.Notes +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. + +HEALTHPROBESETTING : Health probe settings to the origin that is used to determine the health of the origin. + [ProbeIntervalInSecond ]: The number of seconds between health probes.Default is 240sec. + [ProbePath ]: The path relative to the origin that is used to determine the health of the origin. + [ProbeProtocol ]: Protocol to use for health probe. + [ProbeRequestType ]: The type of health probe request that is made. + +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. + [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. + +LOADBALANCINGSETTING : Load balancing settings for a backend pool + [AdditionalLatencyInMillisecond ]: The additional latency in milliseconds for probes to fall into the lowest latency bucket + [SampleSize ]: The number of samples to consider for load balancing decisions + [SuccessfulSamplesRequired ]: The number of samples within the sample period that must succeed +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnorigingroup +#> +function Update-AzFrontDoorCdnOriginGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the profile. + ${OriginGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters] + # Health probe settings to the origin that is used to determine the health of the origin. + # To construct, see NOTES section for HEALTHPROBESETTING properties and create a hash table. + ${HealthProbeSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters] + # Load balancing settings for a backend pool + # To construct, see NOTES section for LOADBALANCINGSETTING properties and create a hash table. + ${LoadBalancingSetting}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState] + # Whether to allow session affinity on this host. + # Valid options are 'Enabled' or 'Disabled' + ${SessionAffinityState}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. + # Default is 10 mins. + # This property is currently not supported. + ${TrafficRestorationTimeToHealedOrNewEndpointsInMinute}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnOriginGroup_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnOriginGroup_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Updates an existing origin within an origin group. +.Description +Updates an existing origin within an origin group. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnorigin +#> +function Update-AzFrontDoorCdnOrigin { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the profile. + ${OriginGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin which is unique within the profile. + ${OriginName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${AzureOriginId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState] + # Whether to enable health probes to be made against backends defined under backendPools. + # Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. + ${EnabledState}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether to enable certificate name check at origin level + ${EnforceCertificateNameCheck}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The address of the origin. + # Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + ${HostName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The value of the HTTP port. + # Must be between 1 and 65535. + ${HttpPort}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The value of the HTTPS port. + # Must be between 1 and 65535. + ${HttpsPort}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host header value sent to the origin with each request. + # If you leave this blank, the request hostname determines this value. + # Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + # This overrides the host header defined at Endpoint + ${OriginHostHeader}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Priority of origin in given origin group for load balancing. + # Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + ${Priority}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${PrivateLinkId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The group id from the provider of resource the shared private link resource is for. + ${SharedPrivateLinkResourceGroupId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The location of the shared private link resource + ${SharedPrivateLinkResourcePrivateLinkLocation}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The request message for requesting approval of the shared private link resource. + ${SharedPrivateLinkResourceRequestMessage}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus] + # Status of the shared private link resource. + # Can be Pending, Approved, Rejected, Disconnected, or Timeout. + ${SharedPrivateLinkResourceStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Weight of the origin in given origin group for load balancing. + # Must be between 1 and 1000 + ${Weight}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnOrigin_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnOrigin_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. +.Description +Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute +.Notes +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. + +CUSTOMDOMAIN : Domains referenced by this endpoint. + [Id ]: Resource ID. + +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. + [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. + +RULESET : rule sets referenced by this endpoint. + [Id ]: Resource ID. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnroute +#> +function Update-AzFrontDoorCdnRoute { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('RouteName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the routing rule. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # query parameters to include or exclude (comma separated). + ${CacheConfigurationQueryParameter}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior] + # Defines how Frontdoor caches requests that include query strings. + # You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + ${CacheConfigurationQueryStringCachingBehavior}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # List of content types on which compression applies. + # The value should be a valid MIME type. + ${CompressionSettingContentTypesToCompress}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether content compression is enabled on AzureFrontDoor. + # Default value is false. + # If compression is enabled, content will be served as compressed if user requests for a compressed version. + # Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + ${CompressionSettingIsCompressionEnabled}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[]] + # Domains referenced by this endpoint. + # To construct, see NOTES section for CUSTOMDOMAIN properties and create a hash table. + ${CustomDomain}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState] + # Whether to enable use of this rule. + # Permitted values are 'Enabled' or 'Disabled' + ${EnabledState}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol] + # Protocol this rule will use when forwarding traffic to backends. + ${ForwardingProtocol}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect] + # Whether to automatically redirect HTTP traffic to HTTPS traffic. + # Note that this is a easy way to set up this rule and it will be the first rule that gets executed. + ${HttpsRedirect}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain] + # whether this route will be linked to the default endpoint domain. + ${LinkToDefaultDomain}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${OriginGroupId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. + # contoso.cloudapp.net/originpath. + ${OriginPath}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The route patterns of the rule. + ${PatternsToMatch}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]] + # rule sets referenced by this endpoint. + # To construct, see NOTES section for RULESET properties and create a hash table. + ${RuleSet}, + + [Parameter()] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[]] + # List of supported protocols for this route. + ${SupportedProtocol}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnRoute_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnRoute_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Updates an existing delivery rule within a rule set. +.Description +Updates an existing delivery rule within a rule set. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule +.Notes +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. + +ACTION : A list of actions that are executed when all the conditions of a rule are satisfied. + Name : The name of the action for the delivery rule. + +CONDITION : A list of conditions that must be matched for the actions to be executed + Name : The name of the condition for the delivery rule. + +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnrule +#> +function Update-AzFrontDoorCdnRule { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('RuleName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the delivery rule which is unique within the endpoint. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('RuleSetName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the rule set under the profile. + ${SetName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[]] + # A list of actions that are executed when all the conditions of a rule are satisfied. + # To construct, see NOTES section for ACTION properties and create a hash table. + ${Action}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[]] + # A list of conditions that must be matched for the actions to be executed + # To construct, see NOTES section for CONDITION properties and create a hash table. + ${Condition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior] + # If this rule is a match should the rules engine continue running the remaining rules or stop. + # If not present, defaults to Continue. + ${MatchProcessingBehavior}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The order in which the rules are applied for the endpoint. + # Possible values {0,1,2,3,………}. + # A rule with a lesser order will be applied before a rule with a greater order. + # Rule with order 0 is a special rule. + # It does not require any condition and actions listed in it will always be applied. + ${Order}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnRule_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnRule_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Updates an existing security policy within a profile. +.Description +Updates an existing security policy within a profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnsecuritypolicy +#> +function Update-AzFrontDoorCdnSecurityPolicy { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy])] +[CmdletBinding(DefaultParameterSetName='PatchExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='PatchExpanded', Mandatory)] + [Alias('SecurityPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the security policy under the profile. + ${Name}, + + [Parameter(ParameterSetName='PatchExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='PatchExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='PatchExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='PatchViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters] + # object which contains security policy parameters + ${Parameter}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + PatchExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnSecurityPolicy_PatchExpanded'; + PatchViaIdentityExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnSecurityPolicy_PatchViaIdentityExpanded'; + } + if (('PatchExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis + +.Description + +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Notes +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 : + [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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnprofile +#> +function Get-AzCdnProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + ${SubscriptionId}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + ${ResourceGroupName}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Cdn.custom\Get-AzCdnProfile'; + Get = 'Az.Cdn.custom\Get-AzCdnProfile'; + List1 = 'Az.Cdn.custom\Get-AzCdnProfile'; + GetViaIdentity = 'Az.Cdn.custom\Get-AzCdnProfile'; + } + if (('List', 'Get', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis + +.Description + +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Notes +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 : + [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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnprofile +#> +function Get-AzFrontDoorCdnProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + ${SubscriptionId}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + ${ResourceGroupName}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.Cdn.custom\Get-AzFrontDoorCdnProfile'; + Get = 'Az.Cdn.custom\Get-AzFrontDoorCdnProfile'; + List1 = 'Az.Cdn.custom\Get-AzFrontDoorCdnProfile'; + GetViaIdentity = 'Az.Cdn.custom\Get-AzFrontDoorCdnProfile'; + } + if (('List', 'Get', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleCookiesCondition. +.Description +Create an in-memory object for DeliveryRuleCookiesCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCookiesCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleCookiesConditionObject +#> +function New-AzCdnDeliveryRuleCookiesConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCookiesCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of Cookies to be matched. + ${ParameterSelector}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleCookiesConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleHttpVersionCondition. +.Description +Create an in-memory object for DeliveryRuleHttpVersionCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHttpVersionCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleHttpVersionConditionObject +#> +function New-AzCdnDeliveryRuleHttpVersionConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHttpVersionCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleHttpVersionConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleIsDeviceCondition. +.Description +Create an in-memory object for DeliveryRuleIsDeviceCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleIsDeviceCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleIsDeviceConditionObject +#> +function New-AzCdnDeliveryRuleIsDeviceConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleIsDeviceCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleIsDeviceConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRule. +.Description +Create an in-memory object for DeliveryRule. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRule +.Notes +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. + +ACTION : A list of actions that are executed when all the conditions of a rule are satisfied. + Name : The name of the action for the delivery rule. + +CONDITION : A list of conditions that must be matched for the actions to be executed. + Name : The name of the condition for the delivery rule. +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleObject +#> +function New-AzCdnDeliveryRuleObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRule])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[]] + # A list of actions that are executed when all the conditions of a rule are satisfied. + # To construct, see NOTES section for ACTION properties and create a hash table. + ${Action}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The order in which the rules are applied for the endpoint. + # Possible values {0,1,2,3,………}. + # A rule with a lesser order will be applied before a rule with a greater order. + # Rule with order 0 is a special rule. + # It does not require any condition and actions listed in it will always be applied. + ${Order}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[]] + # A list of conditions that must be matched for the actions to be executed. + # To construct, see NOTES section for CONDITION properties and create a hash table. + ${Condition}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of the rule. + ${Name} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRulePostArgsCondition. +.Description +Create an in-memory object for DeliveryRulePostArgsCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRulePostArgsCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRulePostArgsConditionObject +#> +function New-AzCdnDeliveryRulePostArgsConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRulePostArgsCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of PostArg to be matched. + ${ParameterSelector}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRulePostArgsConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleQueryStringCondition. +.Description +Create an in-memory object for DeliveryRuleQueryStringCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleQueryStringCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleQueryStringConditionObject +#> +function New-AzCdnDeliveryRuleQueryStringConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleQueryStringCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleQueryStringConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRemoteAddressCondition. +.Description +Create an in-memory object for DeliveryRuleRemoteAddressCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRemoteAddressCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRemoteAddressConditionObject +#> +function New-AzCdnDeliveryRuleRemoteAddressConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRemoteAddressCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # Match values to match against. + # The operator will apply to each value in here with OR semantics. + # If any of them match the variable with the given operator this match condition is considered a match. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleRemoteAddressConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestBodyCondition. +.Description +Create an in-memory object for DeliveryRuleRequestBodyCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestBodyCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestBodyConditionObject +#> +function New-AzCdnDeliveryRuleRequestBodyConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestBodyCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleRequestBodyConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestHeaderAction. +.Description +Create an in-memory object for DeliveryRuleRequestHeaderAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestHeaderActionObject +#> +function New-AzCdnDeliveryRuleRequestHeaderActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction] + # Action to perform. + ${ParameterHeaderAction}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of the header to modify. + ${ParameterHeaderName}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Value for the specified action. + ${ParameterValue} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleRequestHeaderActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestHeaderCondition. +.Description +Create an in-memory object for DeliveryRuleRequestHeaderCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestHeaderConditionObject +#> +function New-AzCdnDeliveryRuleRequestHeaderConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of Header to be matched. + ${ParameterSelector}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleRequestHeaderConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestMethodCondition. +.Description +Create an in-memory object for DeliveryRuleRequestMethodCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestMethodCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestMethodConditionObject +#> +function New-AzCdnDeliveryRuleRequestMethodConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestMethodCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleRequestMethodConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestSchemeCondition. +.Description +Create an in-memory object for DeliveryRuleRequestSchemeCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestSchemeCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestSchemeConditionObject +#> +function New-AzCdnDeliveryRuleRequestSchemeConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestSchemeCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleRequestSchemeConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestUriCondition. +.Description +Create an in-memory object for DeliveryRuleRequestUriCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestUriCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestUriConditionObject +#> +function New-AzCdnDeliveryRuleRequestUriConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestUriCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleRequestUriConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleResponseHeaderAction. +.Description +Create an in-memory object for DeliveryRuleResponseHeaderAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleResponseHeaderAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleResponseHeaderActionObject +#> +function New-AzCdnDeliveryRuleResponseHeaderActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleResponseHeaderAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction] + # Action to perform. + ${ParameterHeaderAction}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of the header to modify. + ${ParameterHeaderName}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Value for the specified action. + ${ParameterValue} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleResponseHeaderActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleUrlFileExtensionCondition. +.Description +Create an in-memory object for DeliveryRuleUrlFileExtensionCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileExtensionCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleUrlFileExtensionConditionObject +#> +function New-AzCdnDeliveryRuleUrlFileExtensionConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileExtensionCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleUrlFileExtensionConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleUrlFileNameCondition. +.Description +Create an in-memory object for DeliveryRuleUrlFileNameCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileNameCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleUrlFileNameConditionObject +#> +function New-AzCdnDeliveryRuleUrlFileNameConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileNameCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleUrlFileNameConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleUrlPathCondition. +.Description +Create an in-memory object for DeliveryRuleUrlPathCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlPathCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleUrlPathConditionObject +#> +function New-AzCdnDeliveryRuleUrlPathConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlPathCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnDeliveryRuleUrlPathConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for HealthProbeParameters. +.Description +Create an in-memory object for HealthProbeParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnHealthProbeParametersObject +#> +function New-AzCdnHealthProbeParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The number of seconds between health probes.Default is 240sec. + ${ProbeIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The path relative to the origin that is used to determine the health of the origin. + ${ProbePath}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol] + # Protocol to use for health probe. + ${ProbeProtocol}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType] + # The type of health probe request that is made. + ${ProbeRequestType} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnHealthProbeParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for CdnManagedHttpsParameters. +.Description +Create an in-memory object for CdnManagedHttpsParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CdnManagedHttpsParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnManagedHttpsParametersObject +#> +function New-AzCdnManagedHttpsParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CdnManagedHttpsParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType] + # Type of certificate used. + ${CertificateSourceParameterCertificateType}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource] + # Defines the source of the SSL certificate. + ${CertificateSource}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType] + # Defines the TLS extension protocol that is used for secure delivery. + ${ProtocolType}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion] + # TLS protocol version that will be used for Https. + ${MinimumTlsVersion} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnManagedHttpsParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +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. +.Description +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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnprofile +#> +function New-AzCdnProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource location. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Send and receive timeout on forwarding request to the origin. + # When timeout is reached, the request fails and returns. + ${OriginResponseTimeoutSecond}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName] + # Name of the pricing tier. + ${SkuName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.custom\New-AzCdnProfile'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for ResourceReference. +.Description +Create an in-memory object for ResourceReference. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnResourceReferenceObject +#> +function New-AzCdnResourceReferenceObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${Id} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnResourceReferenceObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for ResponseBasedOriginErrorDetectionParameters. +.Description +Create an in-memory object for ResponseBasedOriginErrorDetectionParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParameters +.Notes +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. + +HTTPERRORRANGE : The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + [Begin ]: The inclusive start of the http status code range. + [End ]: The inclusive end of the http status code range. +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnResponseBasedOriginErrorDetectionParametersObject +#> +function New-AzCdnResponseBasedOriginErrorDetectionParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters[]] + # The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + # To construct, see NOTES section for HTTPERRORRANGE properties and create a hash table. + ${HttpErrorRange}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes] + # Type of response errors for real user requests for which origin will be deemed unhealthy. + ${ResponseBasedDetectedErrorType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The percentage of failed requests in the sample where failover should trigger. + ${ResponseBasedFailoverThresholdPercentage} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnResponseBasedOriginErrorDetectionParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for UrlRedirectAction. +.Description +Create an in-memory object for UrlRedirectAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnUrlRedirectActionObject +#> +function New-AzCdnUrlRedirectActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType] + # The redirect type the rule will use when redirecting traffic. + ${ParameterRedirectType}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Fragment to add to the redirect URL. + # Fragment is the part of the URL that comes after #. + # Do not include the #. + ${ParameterCustomFragment}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Host to redirect. + # Leave empty to use the incoming host as the destination host. + ${ParameterCustomHostname}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The full path to redirect. + # Path cannot be empty and must start with /. + # Leave empty to use the incoming path as destination path. + ${ParameterCustomPath}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The set of query strings to be placed in the redirect URL. + # Setting this value would replace any existing query string; leave empty to preserve the incoming query string. + # Query string must be in = format. + # ? and & will be added automatically so do not include them. + ${ParameterCustomQueryString}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol] + # Protocol to use for the redirect. + # The default value is MatchRequest. + ${ParameterDestinationProtocol} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnUrlRedirectActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for UrlRewriteAction. +.Description +Create an in-memory object for UrlRewriteAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnUrlRewriteActionObject +#> +function New-AzCdnUrlRewriteActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Define the relative URL to which the above requests will be rewritten by. + ${ParameterDestination}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # define a request URI pattern that identifies the type of requests that may be rewritten. + # If value is blank, all strings are matched. + ${ParameterSourcePattern}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Whether to preserve unmatched path. + # Default value is true. + ${ParameterPreserveUnmatchedPath} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnUrlRewriteActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for UrlSigningAction. +.Description +Create an in-memory object for UrlSigningAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningAction +.Notes +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. + +PARAMETERNAMEOVERRIDE : Defines which query string parameters in the url to be considered for expires, key id etc. . + ParamIndicator : Indicates the purpose of the parameter + ParamName : Parameter name +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnUrlSigningActionObject +#> +function New-AzCdnUrlSigningActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm] + # Algorithm to use for URL signing. + ${ParameterAlgorithm}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[]] + # Defines which query string parameters in the url to be considered for expires, key id etc. + # . + # To construct, see NOTES section for PARAMETERNAMEOVERRIDE properties and create a hash table. + ${ParameterNameOverride} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnUrlSigningActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for UserManagedHttpsParameters. +.Description +Create an in-memory object for UserManagedHttpsParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UserManagedHttpsParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnUserManagedHttpsParametersObject +#> +function New-AzCdnUserManagedHttpsParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UserManagedHttpsParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource group of the user's Key Vault containing the SSL certificate. + ${CertificateSourceParameterResourceGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. + ${CertificateSourceParameterSecretName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Subscription Id of the user's Key Vault containing the SSL certificate. + ${CertificateSourceParameterSubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The name of the user's Key Vault containing the SSL certificate. + ${CertificateSourceParameterVaultName}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource] + # Defines the source of the SSL certificate. + ${CertificateSource}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType] + # Defines the TLS extension protocol that is used for secure delivery. + ${ProtocolType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The version(GUID) of Key Vault Secret in Key Vault. + ${CertificateSourceParameterSecretVersion}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion] + # TLS protocol version that will be used for Https. + ${MinimumTlsVersion} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzCdnUserManagedHttpsParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for AFDDomainHttpsParameters. +.Description +Create an in-memory object for AFDDomainHttpsParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainHttpsParameters +.Notes +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. + +SECRET : Resource reference to the secret. ie. subs/rg/profile/secret. + [Id ]: Resource ID. +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnCustomDomainTlsSettingParametersObject +#> +function New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AFDDomainHttpsParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType] + # Defines the source of the SSL certificate. + ${CertificateType}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion] + # TLS protocol version that will be used for Https. + ${MinimumTlsVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference] + # Resource reference to the secret. + # ie. + # subs/rg/profile/secret. + # To construct, see NOTES section for SECRET properties and create a hash table. + ${Secret} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for HealthProbeParameters. +.Description +Create an in-memory object for HealthProbeParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnOriginGroupHealthProbeSettingObject +#> +function New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The number of seconds between health probes.Default is 240sec. + ${ProbeIntervalInSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The path relative to the origin that is used to determine the health of the origin. + ${ProbePath}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol] + # Protocol to use for health probe. + ${ProbeProtocol}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType] + # The type of health probe request that is made. + ${ProbeRequestType} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for LoadBalancingSettingsParameters. +.Description +Create an in-memory object for LoadBalancingSettingsParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject +#> +function New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The additional latency in milliseconds for probes to fall into the lowest latency bucket. + ${AdditionalLatencyInMillisecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The number of samples to consider for load balancing decisions. + ${SampleSize}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The number of samples within the sample period that must succeed. + ${SuccessfulSamplesRequired} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +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. +.Description +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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnprofile +#> +function New-AzFrontDoorCdnProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource location. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Send and receive timeout on forwarding request to the origin. + # When timeout is reached, the request fails and returns. + ${OriginResponseTimeoutSecond}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName] + # Name of the pricing tier. + ${SkuName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Cdn.custom\New-AzFrontDoorCdnProfile'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for ResourceReference. +.Description +Create an in-memory object for ResourceReference. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnResourceReferenceObject +#> +function New-AzFrontDoorCdnResourceReferenceObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${Id} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnResourceReferenceObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleClientPortCondition. +.Description +Create an in-memory object for DeliveryRuleClientPortCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleClientPortCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleClientPortConditionObject +#> +function New-AzFrontDoorCdnRuleClientPortConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleClientPortCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleClientPortConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleCookiesCondition. +.Description +Create an in-memory object for DeliveryRuleCookiesCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCookiesCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleCookiesConditionObject +#> +function New-AzFrontDoorCdnRuleCookiesConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCookiesCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of Cookies to be matched. + ${ParameterSelector}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleCookiesConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleHostNameCondition. +.Description +Create an in-memory object for DeliveryRuleHostNameCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHostNameCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleHostNameConditionObject +#> +function New-AzFrontDoorCdnRuleHostNameConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHostNameCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleHostNameConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleHttpVersionCondition. +.Description +Create an in-memory object for DeliveryRuleHttpVersionCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHttpVersionCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleHttpVersionConditionObject +#> +function New-AzFrontDoorCdnRuleHttpVersionConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleHttpVersionCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleHttpVersionConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleIsDeviceCondition. +.Description +Create an in-memory object for DeliveryRuleIsDeviceCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleIsDeviceCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleIsDeviceConditionObject +#> +function New-AzFrontDoorCdnRuleIsDeviceConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleIsDeviceCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleIsDeviceConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRulePostArgsCondition. +.Description +Create an in-memory object for DeliveryRulePostArgsCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRulePostArgsCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRulePostArgsConditionObject +#> +function New-AzFrontDoorCdnRulePostArgsConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRulePostArgsCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of PostArg to be matched. + ${ParameterSelector}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRulePostArgsConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleQueryStringCondition. +.Description +Create an in-memory object for DeliveryRuleQueryStringCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleQueryStringCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleQueryStringConditionObject +#> +function New-AzFrontDoorCdnRuleQueryStringConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleQueryStringCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleQueryStringConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRemoteAddressCondition. +.Description +Create an in-memory object for DeliveryRuleRemoteAddressCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRemoteAddressCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRemoteAddressConditionObject +#> +function New-AzFrontDoorCdnRuleRemoteAddressConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRemoteAddressCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # Match values to match against. + # The operator will apply to each value in here with OR semantics. + # If any of them match the variable with the given operator this match condition is considered a match. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleRemoteAddressConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestBodyCondition. +.Description +Create an in-memory object for DeliveryRuleRequestBodyCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestBodyCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestBodyConditionObject +#> +function New-AzFrontDoorCdnRuleRequestBodyConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestBodyCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleRequestBodyConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestHeaderAction. +.Description +Create an in-memory object for DeliveryRuleRequestHeaderAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestHeaderActionObject +#> +function New-AzFrontDoorCdnRuleRequestHeaderActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction] + # Action to perform. + ${ParameterHeaderAction}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of the header to modify. + ${ParameterHeaderName}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Value for the specified action. + ${ParameterValue} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleRequestHeaderActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestHeaderCondition. +.Description +Create an in-memory object for DeliveryRuleRequestHeaderCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestHeaderConditionObject +#> +function New-AzFrontDoorCdnRuleRequestHeaderConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestHeaderCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of Header to be matched. + ${ParameterSelector}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleRequestHeaderConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestMethodCondition. +.Description +Create an in-memory object for DeliveryRuleRequestMethodCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestMethodCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestMethodConditionObject +#> +function New-AzFrontDoorCdnRuleRequestMethodConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestMethodCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleRequestMethodConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestSchemeCondition. +.Description +Create an in-memory object for DeliveryRuleRequestSchemeCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestSchemeCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestSchemeConditionObject +#> +function New-AzFrontDoorCdnRuleRequestSchemeConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestSchemeCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleRequestSchemeConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRequestUriCondition. +.Description +Create an in-memory object for DeliveryRuleRequestUriCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestUriCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestUriConditionObject +#> +function New-AzFrontDoorCdnRuleRequestUriConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRequestUriCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleRequestUriConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleResponseHeaderAction. +.Description +Create an in-memory object for DeliveryRuleResponseHeaderAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleResponseHeaderAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleResponseHeaderActionObject +#> +function New-AzFrontDoorCdnRuleResponseHeaderActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleResponseHeaderAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction] + # Action to perform. + ${ParameterHeaderAction}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Name of the header to modify. + ${ParameterHeaderName}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Value for the specified action. + ${ParameterValue} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleResponseHeaderActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleRouteConfigurationOverrideAction. +.Description +Create an in-memory object for DeliveryRuleRouteConfigurationOverrideAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRouteConfigurationOverrideAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject +#> +function New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleRouteConfigurationOverrideAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior] + # Caching behavior for the requests. + ${CacheConfigurationCacheBehavior}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The duration for which the content needs to be cached. + # Allowed format is [d.]hh:mm:ss. + ${CacheConfigurationCacheDuration}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled] + # Indicates whether content compression is enabled. + # If compression is enabled, content will be served as compressed if user requests for a compressed version. + # Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + ${CacheConfigurationIsCompressionEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # query parameters to include or exclude (comma separated). + ${CacheConfigurationQueryParameter}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior] + # Defines how Frontdoor caches requests that include query strings. + # You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + ${CacheConfigurationQueryStringCachingBehavior}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${OriginGroupId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol] + # Protocol this rule will use when forwarding traffic to backends. + ${OriginGroupOverrideForwardingProtocol} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleServerPortCondition. +.Description +Create an in-memory object for DeliveryRuleServerPortCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleServerPortCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleServerPortConditionObject +#> +function New-AzFrontDoorCdnRuleServerPortConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleServerPortCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleServerPortConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleSocketAddrCondition. +.Description +Create an in-memory object for DeliveryRuleSocketAddrCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleSocketAddrCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleSocketAddrConditionObject +#> +function New-AzFrontDoorCdnRuleSocketAddrConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleSocketAddrCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleSocketAddrConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleSslProtocolCondition. +.Description +Create an in-memory object for DeliveryRuleSslProtocolCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleSslProtocolCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleSslProtocolConditionObject +#> +function New-AzFrontDoorCdnRuleSslProtocolConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleSslProtocolCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleSslProtocolConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleUrlFileExtensionCondition. +.Description +Create an in-memory object for DeliveryRuleUrlFileExtensionCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileExtensionCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlFileExtensionConditionObject +#> +function New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileExtensionCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleUrlFileNameCondition. +.Description +Create an in-memory object for DeliveryRuleUrlFileNameCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileNameCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlFileNameConditionObject +#> +function New-AzFrontDoorCdnRuleUrlFileNameConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlFileNameCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleUrlFileNameConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for DeliveryRuleUrlPathCondition. +.Description +Create an in-memory object for DeliveryRuleUrlPathCondition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlPathCondition +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlPathConditionObject +#> +function New-AzFrontDoorCdnRuleUrlPathConditionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleUrlPathCondition])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator] + # Describes operator to be matched. + ${ParameterOperator}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable] + # The name of the condition for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The match value for the condition of the delivery rule. + ${ParameterMatchValue}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Describes if this is negate condition or not. + ${ParameterNegateCondition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]] + # List of transforms. + ${ParameterTransform} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleUrlPathConditionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for UrlRedirectAction. +.Description +Create an in-memory object for UrlRedirectAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlRedirectActionObject +#> +function New-AzFrontDoorCdnRuleUrlRedirectActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType] + # The redirect type the rule will use when redirecting traffic. + ${ParameterRedirectType}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Fragment to add to the redirect URL. + # Fragment is the part of the URL that comes after #. + # Do not include the #. + ${ParameterCustomFragment}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Host to redirect. + # Leave empty to use the incoming host as the destination host. + ${ParameterCustomHostname}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The full path to redirect. + # Path cannot be empty and must start with /. + # Leave empty to use the incoming path as destination path. + ${ParameterCustomPath}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The set of query strings to be placed in the redirect URL. + # Setting this value would replace any existing query string; leave empty to preserve the incoming query string. + # Query string must be in = format. + # ? and & will be added automatically so do not include them. + ${ParameterCustomQueryString}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol] + # Protocol to use for the redirect. + # The default value is MatchRequest. + ${ParameterDestinationProtocol} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleUrlRedirectActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for UrlRewriteAction. +.Description +Create an in-memory object for UrlRewriteAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteAction +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlRewriteActionObject +#> +function New-AzFrontDoorCdnRuleUrlRewriteActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Define the relative URL to which the above requests will be rewritten by. + ${ParameterDestination}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # define a request URI pattern that identifies the type of requests that may be rewritten. + # If value is blank, all strings are matched. + ${ParameterSourcePattern}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Whether to preserve unmatched path. + # Default value is true. + ${ParameterPreserveUnmatchedPath} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleUrlRewriteActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for UrlSigningAction. +.Description +Create an in-memory object for UrlSigningAction. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningAction +.Notes +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. + +PARAMETERNAMEOVERRIDE : Defines which query string parameters in the url to be considered for expires, key id etc. . + ParamIndicator : Indicates the purpose of the parameter + ParamName : Parameter name +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlSigningActionObject +#> +function New-AzFrontDoorCdnRuleUrlSigningActionObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningAction])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction] + # The name of the action for the delivery rule. + ${Name}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm] + # Algorithm to use for URL signing. + ${ParameterAlgorithm}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[]] + # Defines which query string parameters in the url to be considered for expires, key id etc. + # . + # To construct, see NOTES section for PARAMETERNAMEOVERRIDE properties and create a hash table. + ${ParameterNameOverride} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnRuleUrlSigningActionObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for CustomerCertificateParameters. +.Description +Create an in-memory object for CustomerCertificateParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomerCertificateParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecretCustomerCertificateParametersObject +#> +function New-AzFrontDoorCdnSecretCustomerCertificateParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomerCertificateParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType] + # The type of the secret resource. + ${Type}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${SecretSourceId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Version of the secret to be used. + ${SecretVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The list of SANs. + ${SubjectAlternativeName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Boolean] + # Whether to use the latest version for the certificate. + ${UseLatestVersion} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnSecretCustomerCertificateParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for AzureFirstPartyManagedCertificateParameters. +.Description +Create an in-memory object for AzureFirstPartyManagedCertificateParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AzureFirstPartyManagedCertificateParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject +#> +function New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AzureFirstPartyManagedCertificateParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType] + # The type of the secret resource. + ${Type} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for ManagedCertificateParameters. +.Description +Create an in-memory object for ManagedCertificateParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ManagedCertificateParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecretManagedCertificateParametersObject +#> +function New-AzFrontDoorCdnSecretManagedCertificateParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ManagedCertificateParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType] + # The type of the secret resource. + ${Type} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnSecretManagedCertificateParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for UrlSigningKeyParameters. +.Description +Create an in-memory object for UrlSigningKeyParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKeyParameters +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecretUrlSigningKeyParametersObject +#> +function New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKeyParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Defines the customer defined key Id. + # This id will exist in the incoming request to indicate the key used to form the hash. + ${KeyId}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType] + # The type of the secret resource. + ${Type}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${SecretSourceId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Version of the secret to be used. + ${SecretVersion} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for SecurityPolicyWebApplicationFirewallAssociation. +.Description +Create an in-memory object for SecurityPolicyWebApplicationFirewallAssociation. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallAssociation +.Notes +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. + +DOMAIN : List of domains. + [Id ]: Resource ID. +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject +#> +function New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallAssociation])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[]] + # List of domains. + # To construct, see NOTES section for DOMAIN properties and create a hash table. + ${Domain}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # List of paths. + ${PatternsToMatch} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for SecurityPolicyWebApplicationFirewallParameters. +.Description +Create an in-memory object for SecurityPolicyWebApplicationFirewallParameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallParameters +.Notes +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. + +ASSOCIATION : Waf associations. + [Domain ]: List of domains. + [Id ]: Resource ID. + [PatternsToMatch ]: List of paths +.Link +https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnFrontDoorSecurityPolicyWebApplicationFirewallParametersObject +#> +function New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallParameters])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation[]] + # Waf associations. + # To construct, see NOTES section for ASSOCIATION properties and create a hash table. + ${Association}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${WafPolicyId} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Cdn.custom\New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +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. +.Description +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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnprofile +#> +function Remove-AzCdnProfile { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.custom\Remove-AzCdnProfile'; + DeleteViaIdentity = 'Az.Cdn.custom\Remove-AzCdnProfile'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +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. +.Description +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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnprofile +#> +function Remove-AzFrontDoorCdnProfile { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.custom\Remove-AzFrontDoorCdnProfile'; + DeleteViaIdentity = 'Az.Cdn.custom\Remove-AzFrontDoorCdnProfile'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +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. +.Description +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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azcdnprofile +#> +function Update-AzCdnProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Send and receive timeout on forwarding request to the origin. + # When timeout is reached, the request fails and returns. + ${OriginResponseTimeoutSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags]))] + [System.Collections.Hashtable] + # Profile tags + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Cdn.custom\Update-AzCdnProfile'; + UpdateViaIdentityExpanded = 'Az.Cdn.custom\Update-AzCdnProfile'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +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. +.Description +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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnprofile +#> +function Update-AzFrontDoorCdnProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Send and receive timeout on forwarding request to the origin. + # When timeout is reached, the request fails and returns. + ${OriginResponseTimeoutSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags]))] + [System.Collections.Hashtable] + # Profile tags + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Cdn.custom\Update-AzFrontDoorCdnProfile'; + UpdateViaIdentityExpanded = 'Az.Cdn.custom\Update-AzFrontDoorCdnProfile'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/README.md b/src/Cdn/exports/README.md new file mode 100644 index 000000000000..205c399553f1 --- /dev/null +++ b/src/Cdn/exports/README.md @@ -0,0 +1,20 @@ +# Exports +This directory contains the cmdlets *exported by* `Az.Cdn`. No other cmdlets in this repository are directly exported. What that means is the `Az.Cdn` module will run [Export-ModuleMember](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/export-modulemember) on the cmldets in this directory. The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation. + +## Info +- Modifiable: no +- Generated: all +- Committed: no +- Packaged: yes + +## Details +The cmdlets generated here are created every time you run `build-module.ps1`. These cmdlets are a merge of all (excluding `InternalExport`) cmdlets from the private binary (`..\bin\Az.Cdn.private.dll`) and from the `..\custom\Az.Cdn.custom.psm1` module. Cmdlets that are *not merged* from those directories are decorated with the `InternalExport` attribute. This happens when you set the cmdlet to **hide** from configuration. For more information on hiding, see [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) or the [README.md](..\internal/README.md) in the `..\internal` folder. + +## Purpose +We generate script cmdlets out of the binary cmdlets and custom cmdlets. The format of script cmdlets are simplistic; thus, easier to generate at build time. Generating the cmdlets is required as to allow merging of generated binary, hand-written binary, and hand-written custom cmdlets. For Azure cmdlets, having script cmdlets simplifies the mechanism for exporting Azure profiles. + +## Structure +The cmdlets generated here will flat in the directory (no sub-folders) as long as there are no Azure profiles specified for any cmdlets. Azure profiles (the `Profiles` attribute) is only applied when generating with the `--azure` attribute (or `azure: true` in the configuration). When Azure profiles are applied, the folder structure has a folder per profile. Each profile folder has only those cmdlets that apply to that profile. + +## Usage +When `./Az.Cdn.psm1` is loaded, it dynamically exports cmdlets here based on the folder structure and on the selected profile. If there are no sub-folders, it exports all cmdlets at the root of this folder. If there are sub-folders, it checks to see the selected profile. If no profile is selected, it exports the cmdlets in the last sub-folder (alphabetically). If a profile is selected, it exports the cmdlets in the sub-folder that matches the profile name. If there is no sub-folder that matches the profile name, it exports no cmdlets and writes a warning message. \ No newline at end of file diff --git a/src/Cdn/exports/Remove-AzCdnCustomDomain.ps1 b/src/Cdn/exports/Remove-AzCdnCustomDomain.ps1 new file mode 100644 index 000000000000..b1405f887807 --- /dev/null +++ b/src/Cdn/exports/Remove-AzCdnCustomDomain.ps1 @@ -0,0 +1,238 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Deletes an existing custom domain within an endpoint. +.Description +Deletes an existing custom domain within an endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdncustomdomain +#> +function Remove-AzCdnCustomDomain { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Alias('CustomDomainName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the custom domain within an endpoint. + ${Name}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete1 = 'Az.Cdn.private\Remove-AzCdnCustomDomain_Delete1'; + DeleteViaIdentity1 = 'Az.Cdn.private\Remove-AzCdnCustomDomain_DeleteViaIdentity1'; + } + if (('Delete1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Remove-AzCdnEndpoint.ps1 b/src/Cdn/exports/Remove-AzCdnEndpoint.ps1 new file mode 100644 index 000000000000..7ea21d77710d --- /dev/null +++ b/src/Cdn/exports/Remove-AzCdnEndpoint.ps1 @@ -0,0 +1,232 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Description +Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnendpoint +#> +function Remove-AzCdnEndpoint { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Alias('EndpointName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${Name}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete1 = 'Az.Cdn.private\Remove-AzCdnEndpoint_Delete1'; + DeleteViaIdentity1 = 'Az.Cdn.private\Remove-AzCdnEndpoint_DeleteViaIdentity1'; + } + if (('Delete1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Remove-AzCdnOrigin.ps1 b/src/Cdn/exports/Remove-AzCdnOrigin.ps1 new file mode 100644 index 000000000000..6377ed36b65b --- /dev/null +++ b/src/Cdn/exports/Remove-AzCdnOrigin.ps1 @@ -0,0 +1,238 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Deletes an existing origin within an endpoint. +.Description +Deletes an existing origin within an endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnorigin +#> +function Remove-AzCdnOrigin { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Alias('OriginName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin which is unique within the endpoint. + ${Name}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete1 = 'Az.Cdn.private\Remove-AzCdnOrigin_Delete1'; + DeleteViaIdentity1 = 'Az.Cdn.private\Remove-AzCdnOrigin_DeleteViaIdentity1'; + } + if (('Delete1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Remove-AzCdnOriginGroup.ps1 b/src/Cdn/exports/Remove-AzCdnOriginGroup.ps1 new file mode 100644 index 000000000000..84eecbfea4f9 --- /dev/null +++ b/src/Cdn/exports/Remove-AzCdnOriginGroup.ps1 @@ -0,0 +1,238 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Deletes an existing origin group within an endpoint. +.Description +Deletes an existing origin group within an endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnorigingroup +#> +function Remove-AzCdnOriginGroup { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Alias('OriginGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the endpoint. + ${Name}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete1 = 'Az.Cdn.private\Remove-AzCdnOriginGroup_Delete1'; + DeleteViaIdentity1 = 'Az.Cdn.private\Remove-AzCdnOriginGroup_DeleteViaIdentity1'; + } + if (('Delete1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Remove-AzCdnProfile.ps1 b/src/Cdn/exports/Remove-AzCdnProfile.ps1 new file mode 100644 index 000000000000..b0e6ab8f49df --- /dev/null +++ b/src/Cdn/exports/Remove-AzCdnProfile.ps1 @@ -0,0 +1,228 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +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. +.Description +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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnprofile +#> +function Remove-AzCdnProfile { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.custom\Remove-AzCdnProfile'; + DeleteViaIdentity = 'Az.Cdn.custom\Remove-AzCdnProfile'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Remove-AzFrontDoorCdnCustomDomain.ps1 b/src/Cdn/exports/Remove-AzFrontDoorCdnCustomDomain.ps1 new file mode 100644 index 000000000000..30907e71a945 --- /dev/null +++ b/src/Cdn/exports/Remove-AzFrontDoorCdnCustomDomain.ps1 @@ -0,0 +1,231 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. +.Description +Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdncustomdomain +#> +function Remove-AzFrontDoorCdnCustomDomain { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the domain under the profile which is unique globally. + ${CustomDomainName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzFrontDoorCdnCustomDomain_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzFrontDoorCdnCustomDomain_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Remove-AzFrontDoorCdnEndpoint.ps1 b/src/Cdn/exports/Remove-AzFrontDoorCdnEndpoint.ps1 new file mode 100644 index 000000000000..da6599f3e3df --- /dev/null +++ b/src/Cdn/exports/Remove-AzFrontDoorCdnEndpoint.ps1 @@ -0,0 +1,231 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Description +Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnendpoint +#> +function Remove-AzFrontDoorCdnEndpoint { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzFrontDoorCdnEndpoint_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzFrontDoorCdnEndpoint_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Remove-AzFrontDoorCdnOrigin.ps1 b/src/Cdn/exports/Remove-AzFrontDoorCdnOrigin.ps1 new file mode 100644 index 000000000000..683aa7b03fa9 --- /dev/null +++ b/src/Cdn/exports/Remove-AzFrontDoorCdnOrigin.ps1 @@ -0,0 +1,237 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Deletes an existing origin within an origin group. +.Description +Deletes an existing origin within an origin group. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnorigin +#> +function Remove-AzFrontDoorCdnOrigin { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the profile. + ${OriginGroupName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin which is unique within the profile. + ${OriginName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzFrontDoorCdnOrigin_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzFrontDoorCdnOrigin_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Remove-AzFrontDoorCdnOriginGroup.ps1 b/src/Cdn/exports/Remove-AzFrontDoorCdnOriginGroup.ps1 new file mode 100644 index 000000000000..33d287f627cb --- /dev/null +++ b/src/Cdn/exports/Remove-AzFrontDoorCdnOriginGroup.ps1 @@ -0,0 +1,231 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Deletes an existing origin group within a profile. +.Description +Deletes an existing origin group within a profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnorigingroup +#> +function Remove-AzFrontDoorCdnOriginGroup { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the profile. + ${OriginGroupName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzFrontDoorCdnOriginGroup_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzFrontDoorCdnOriginGroup_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Remove-AzFrontDoorCdnProfile.ps1 b/src/Cdn/exports/Remove-AzFrontDoorCdnProfile.ps1 new file mode 100644 index 000000000000..8abe5911c3d7 --- /dev/null +++ b/src/Cdn/exports/Remove-AzFrontDoorCdnProfile.ps1 @@ -0,0 +1,228 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +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. +.Description +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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnprofile +#> +function Remove-AzFrontDoorCdnProfile { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.custom\Remove-AzFrontDoorCdnProfile'; + DeleteViaIdentity = 'Az.Cdn.custom\Remove-AzFrontDoorCdnProfile'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Remove-AzFrontDoorCdnRoute.ps1 b/src/Cdn/exports/Remove-AzFrontDoorCdnRoute.ps1 new file mode 100644 index 000000000000..344547029c69 --- /dev/null +++ b/src/Cdn/exports/Remove-AzFrontDoorCdnRoute.ps1 @@ -0,0 +1,238 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. +.Description +Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnroute +#> +function Remove-AzFrontDoorCdnRoute { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('RouteName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the routing rule. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzFrontDoorCdnRoute_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzFrontDoorCdnRoute_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Remove-AzFrontDoorCdnRule.ps1 b/src/Cdn/exports/Remove-AzFrontDoorCdnRule.ps1 new file mode 100644 index 000000000000..c0dd2db645a0 --- /dev/null +++ b/src/Cdn/exports/Remove-AzFrontDoorCdnRule.ps1 @@ -0,0 +1,239 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Deletes an existing delivery rule within a rule set. +.Description +Deletes an existing delivery rule within a rule set. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnrule +#> +function Remove-AzFrontDoorCdnRule { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('RuleName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the delivery rule which is unique within the endpoint. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('RuleSetName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the rule set under the profile. + ${SetName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzFrontDoorCdnRule_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzFrontDoorCdnRule_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Remove-AzFrontDoorCdnRuleSet.ps1 b/src/Cdn/exports/Remove-AzFrontDoorCdnRuleSet.ps1 new file mode 100644 index 000000000000..f67ee79b2e1c --- /dev/null +++ b/src/Cdn/exports/Remove-AzFrontDoorCdnRuleSet.ps1 @@ -0,0 +1,232 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. +.Description +Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnruleset +#> +function Remove-AzFrontDoorCdnRuleSet { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('RuleSetName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the rule set under the profile which is unique globally. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzFrontDoorCdnRuleSet_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzFrontDoorCdnRuleSet_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Remove-AzFrontDoorCdnSecret.ps1 b/src/Cdn/exports/Remove-AzFrontDoorCdnSecret.ps1 new file mode 100644 index 000000000000..9b1ba9623833 --- /dev/null +++ b/src/Cdn/exports/Remove-AzFrontDoorCdnSecret.ps1 @@ -0,0 +1,232 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Deletes an existing Secret within profile. +.Description +Deletes an existing Secret within profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnsecret +#> +function Remove-AzFrontDoorCdnSecret { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('SecretName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Secret under the profile. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzFrontDoorCdnSecret_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzFrontDoorCdnSecret_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Remove-AzFrontDoorCdnSecurityPolicy.ps1 b/src/Cdn/exports/Remove-AzFrontDoorCdnSecurityPolicy.ps1 new file mode 100644 index 000000000000..ee987f8f5bce --- /dev/null +++ b/src/Cdn/exports/Remove-AzFrontDoorCdnSecurityPolicy.ps1 @@ -0,0 +1,232 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Deletes an existing security policy within profile. +.Description +Deletes an existing security policy within profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnsecuritypolicy +#> +function Remove-AzFrontDoorCdnSecurityPolicy { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('SecurityPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the security policy under the profile. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzFrontDoorCdnSecurityPolicy_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzFrontDoorCdnSecurityPolicy_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Start-AzCdnEndpoint.ps1 b/src/Cdn/exports/Start-AzCdnEndpoint.ps1 new file mode 100644 index 000000000000..93af0db2f9fb --- /dev/null +++ b/src/Cdn/exports/Start-AzCdnEndpoint.ps1 @@ -0,0 +1,226 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Starts an existing CDN endpoint that is on a stopped state. +.Description +Starts an existing CDN endpoint that is on a stopped state. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/start-azcdnendpoint +#> +function Start-AzCdnEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint])] +[CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Start', Mandatory)] + [Alias('EndpointName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${Name}, + + [Parameter(ParameterSetName='Start', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Start', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Start')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='StartViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Start = 'Az.Cdn.private\Start-AzCdnEndpoint_Start'; + StartViaIdentity = 'Az.Cdn.private\Start-AzCdnEndpoint_StartViaIdentity'; + } + if (('Start') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Stop-AzCdnEndpoint.ps1 b/src/Cdn/exports/Stop-AzCdnEndpoint.ps1 new file mode 100644 index 000000000000..345296e6a7ec --- /dev/null +++ b/src/Cdn/exports/Stop-AzCdnEndpoint.ps1 @@ -0,0 +1,226 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Stops an existing running CDN endpoint. +.Description +Stops an existing running CDN endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/stop-azcdnendpoint +#> +function Stop-AzCdnEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint])] +[CmdletBinding(DefaultParameterSetName='Stop', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Stop', Mandatory)] + [Alias('EndpointName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${Name}, + + [Parameter(ParameterSetName='Stop', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Stop', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Stop')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='StopViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Stop = 'Az.Cdn.private\Stop-AzCdnEndpoint_Stop'; + StopViaIdentity = 'Az.Cdn.private\Stop-AzCdnEndpoint_StopViaIdentity'; + } + if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Test-AzCdnEndpointCustomDomain.ps1 b/src/Cdn/exports/Test-AzCdnEndpointCustomDomain.ps1 new file mode 100644 index 000000000000..f1d9018df762 --- /dev/null +++ b/src/Cdn/exports/Test-AzCdnEndpointCustomDomain.ps1 @@ -0,0 +1,220 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. +.Description +Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/test-azcdnendpointcustomdomain +#> +function Test-AzCdnEndpointCustomDomain { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput])] +[CmdletBinding(DefaultParameterSetName='ValidateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='ValidateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='ValidateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='ValidateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='ValidateExpanded1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='ValidateViaIdentityExpanded1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host name of the custom domain. + # Must be a domain name. + ${HostName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + ValidateExpanded1 = 'Az.Cdn.private\Test-AzCdnEndpointCustomDomain_ValidateExpanded1'; + ValidateViaIdentityExpanded1 = 'Az.Cdn.private\Test-AzCdnEndpointCustomDomain_ValidateViaIdentityExpanded1'; + } + if (('ValidateExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Test-AzCdnNameAvailability.ps1 b/src/Cdn/exports/Test-AzCdnNameAvailability.ps1 new file mode 100644 index 000000000000..195e2ea95d0a --- /dev/null +++ b/src/Cdn/exports/Test-AzCdnNameAvailability.ps1 @@ -0,0 +1,182 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Check the availability of a resource name. +This is needed for resources where name is globally unique, such as a CDN endpoint. +.Description +Check the availability of a resource name. +This is needed for resources where name is globally unique, such as a CDN endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput +.Link +https://docs.microsoft.com/powershell/module/az.cdn/test-azcdnnameavailability +#> +function Test-AzCdnNameAvailability { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput])] +[CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='CheckExpanded1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The resource name to validate. + ${Name}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType] + # The type of the resource whose name is to be validated. + ${Type}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CheckExpanded = 'Az.Cdn.private\Test-AzCdnNameAvailability_CheckExpanded'; + CheckExpanded1 = 'Az.Cdn.private\Test-AzCdnNameAvailability_CheckExpanded1'; + } + if (('CheckExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Test-AzCdnProbe.ps1 b/src/Cdn/exports/Test-AzCdnProbe.ps1 new file mode 100644 index 000000000000..727f3df80b7a --- /dev/null +++ b/src/Cdn/exports/Test-AzCdnProbe.ps1 @@ -0,0 +1,176 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Check if the probe path is a valid path and the file can be accessed. +Probe path is the path to a file hosted on the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. +This path is relative to the origin path specified in the endpoint configuration. +.Description +Check if the probe path is a valid path and the file can be accessed. +Probe path is the path to a file hosted on the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. +This path is relative to the origin path specified in the endpoint configuration. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutput +.Link +https://docs.microsoft.com/powershell/module/az.cdn/test-azcdnprobe +#> +function Test-AzCdnProbe { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutput])] +[CmdletBinding(DefaultParameterSetName='ValidateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The probe URL to validate. + ${ProbeUrl}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + ValidateExpanded = 'Az.Cdn.private\Test-AzCdnProbe_ValidateExpanded'; + } + if (('ValidateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Test-AzFrontDoorCdnEndpointCustomDomain.ps1 b/src/Cdn/exports/Test-AzFrontDoorCdnEndpointCustomDomain.ps1 new file mode 100644 index 000000000000..218612b2dad7 --- /dev/null +++ b/src/Cdn/exports/Test-AzFrontDoorCdnEndpointCustomDomain.ps1 @@ -0,0 +1,220 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api isn't work for apex domain. +.Description +Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api isn't work for apex domain. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/test-azfrontdoorcdnendpointcustomdomain +#> +function Test-AzFrontDoorCdnEndpointCustomDomain { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput])] +[CmdletBinding(DefaultParameterSetName='ValidateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='ValidateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='ValidateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='ValidateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='ValidateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='ValidateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host name of the custom domain. + # Must be a domain name. + ${HostName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + ValidateExpanded = 'Az.Cdn.private\Test-AzFrontDoorCdnEndpointCustomDomain_ValidateExpanded'; + ValidateViaIdentityExpanded = 'Az.Cdn.private\Test-AzFrontDoorCdnEndpointCustomDomain_ValidateViaIdentityExpanded'; + } + if (('ValidateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Test-AzFrontDoorCdnEndpointNameAvailability.ps1 b/src/Cdn/exports/Test-AzFrontDoorCdnEndpointNameAvailability.ps1 new file mode 100644 index 000000000000..e0c4d21b4fe0 --- /dev/null +++ b/src/Cdn/exports/Test-AzFrontDoorCdnEndpointNameAvailability.ps1 @@ -0,0 +1,195 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Check the availability of a resource name. +This is needed for resources where name is globally unique, such as a afdx endpoint. +.Description +Check the availability of a resource name. +This is needed for resources where name is globally unique, such as a afdx endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutput +.Link +https://docs.microsoft.com/powershell/module/az.cdn/test-azfrontdoorcdnendpointnameavailability +#> +function Test-AzFrontDoorCdnEndpointNameAvailability { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutput])] +[CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The resource name to validate. + ${Name}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType] + # The type of the resource whose name is to be validated. + ${Type}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope] + # Indicates the endpoint name reuse scope. + # The default value is TenantReuse. + ${AutoGeneratedDomainNameLabelScope}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CheckExpanded = 'Az.Cdn.private\Test-AzFrontDoorCdnEndpointNameAvailability_CheckExpanded'; + } + if (('CheckExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Test-AzFrontDoorCdnProfileHostNameAvailability.ps1 b/src/Cdn/exports/Test-AzFrontDoorCdnProfileHostNameAvailability.ps1 new file mode 100644 index 000000000000..552c51cec1de --- /dev/null +++ b/src/Cdn/exports/Test-AzFrontDoorCdnProfileHostNameAvailability.ps1 @@ -0,0 +1,213 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Check the name availability of a host name. +.Description +Check the name availability of a host name. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/test-azfrontdoorcdnprofilehostnameavailability +#> +function Test-AzFrontDoorCdnProfileHostNameAvailability { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput])] +[CmdletBinding(DefaultParameterSetName='CheckExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='CheckExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='CheckExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='CheckExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CheckViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host name to validate. + ${HostName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CheckExpanded = 'Az.Cdn.private\Test-AzFrontDoorCdnProfileHostNameAvailability_CheckExpanded'; + CheckViaIdentityExpanded = 'Az.Cdn.private\Test-AzFrontDoorCdnProfileHostNameAvailability_CheckViaIdentityExpanded'; + } + if (('CheckExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Update-AzCdnEndpoint.ps1 b/src/Cdn/exports/Update-AzCdnEndpoint.ps1 new file mode 100644 index 000000000000..b9787468dc26 --- /dev/null +++ b/src/Cdn/exports/Update-AzCdnEndpoint.ps1 @@ -0,0 +1,379 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +Only tags can be updated after creating an endpoint. +To update origins, use the Update Origin operation. +To update origin groups, use the Update Origin group operation. +To update custom domains, use the Update Custom Domain operation. +.Description +Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +Only tags can be updated after creating an endpoint. +To update origins, use the Update Origin operation. +To update origin groups, use the Update Origin group operation. +To update custom domains, use the Update Custom Domain operation. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint +.Notes +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. + +DELIVERYPOLICYRULE : A list of the delivery rules. + Action : A list of actions that are executed when all the conditions of a rule are satisfied. + Name : The name of the action for the delivery rule. + Order : The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + [Condition ]: A list of conditions that must be matched for the actions to be executed + Name : The name of the condition for the delivery rule. + [Name ]: Name of the rule + +GEOFILTER : List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/ + Action : Action of the geo filter, i.e. allow or block access. + CountryCode : Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US. + RelativePath : Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) + +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. + [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. + +URLSIGNINGKEY : List of keys used to validate the signed URL hashes. + KeyId : Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + KeySourceParameterResourceGroupName : Resource group of the user's Key Vault containing the secret + KeySourceParameterSecretName : The name of secret in Key Vault. + KeySourceParameterSecretVersion : The version(GUID) of secret in Key Vault. + KeySourceParameterSubscriptionId : Subscription Id of the user's Key Vault containing the secret + KeySourceParameterVaultName : The name of the user's Key Vault containing the secret +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azcdnendpoint +#> +function Update-AzCdnEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Alias('EndpointName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # List of content types on which compression applies. + # The value should be a valid MIME type. + ${ContentTypesToCompress}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${DefaultOriginGroupId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # User-friendly description of the policy. + ${DeliveryPolicyDescription}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[]] + # A list of the delivery rules. + # To construct, see NOTES section for DELIVERYPOLICYRULE properties and create a hash table. + ${DeliveryPolicyRule}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[]] + # List of rules defining the user's geo access within a CDN endpoint. + # Each geo filter defines an access rule to a specified path or content, e.g. + # block APAC for path /pictures/ + # To construct, see NOTES section for GEOFILTER properties and create a hash table. + ${GeoFilter}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether content compression is enabled on CDN. + # Default value is false. + # If compression is enabled, content will be served as compressed if user requests for a compressed version. + # Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. + ${IsCompressionEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether HTTP traffic is allowed on the endpoint. + # Default value is true. + # At least one protocol (HTTP or HTTPS) must be allowed. + ${IsHttpAllowed}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether HTTPS traffic is allowed on the endpoint. + # Default value is true. + # At least one protocol (HTTP or HTTPS) must be allowed. + ${IsHttpsAllowed}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType] + # Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. + # Download, Media services. + # With this information, CDN can apply scenario driven optimization. + ${OptimizationType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host header value sent to the origin with each request. + # This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. + # Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + ${OriginHostHeader}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # A directory path on the origin that CDN can use to retrieve content from, e.g. + # contoso.cloudapp.net/originpath. + ${OriginPath}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. + # This is relative to the origin path. + # This property is only relevant when using a single origin. + ${ProbePath}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior] + # Defines how CDN caches requests that include query strings. + # You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + ${QueryStringCachingBehavior}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags]))] + [System.Collections.Hashtable] + # Endpoint tags. + ${Tag}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[]] + # List of keys used to validate the signed URL hashes. + # To construct, see NOTES section for URLSIGNINGKEY properties and create a hash table. + ${UrlSigningKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${WebApplicationFirewallPolicyLinkId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded1 = 'Az.Cdn.private\Update-AzCdnEndpoint_UpdateExpanded1'; + UpdateViaIdentityExpanded1 = 'Az.Cdn.private\Update-AzCdnEndpoint_UpdateViaIdentityExpanded1'; + } + if (('UpdateExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Update-AzCdnOrigin.ps1 b/src/Cdn/exports/Update-AzCdnOrigin.ps1 new file mode 100644 index 000000000000..7b5f16e38073 --- /dev/null +++ b/src/Cdn/exports/Update-AzCdnOrigin.ps1 @@ -0,0 +1,309 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Updates an existing origin within an endpoint. +.Description +Updates an existing origin within an endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azcdnorigin +#> +function Update-AzCdnOrigin { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Alias('OriginName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin which is unique within the endpoint. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Origin is enabled for load balancing or not + ${Enabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The address of the origin. + # Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + ${HostName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The value of the HTTP port. + # Must be between 1 and 65535. + ${HttpPort}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The value of the HTTPS port. + # Must be between 1 and 65535. + ${HttpsPort}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host header value sent to the origin with each request. + # If you leave this blank, the request hostname determines this value. + # Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + # This overrides the host header defined at Endpoint + ${OriginHostHeader}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Priority of origin in given origin group for load balancing. + # Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + ${Priority}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The Alias of the Private Link resource. + # Populating this optional field indicates that this origin is 'Private' + ${PrivateLinkAlias}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # A custom message to be included in the approval request to connect to the Private Link. + ${PrivateLinkApprovalMessage}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The location of the Private Link resource. + # Required only if 'privateLinkResourceId' is populated + ${PrivateLinkLocation}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The Resource Id of the Private Link resource. + # Populating this optional field indicates that this backend is 'Private' + ${PrivateLinkResourceId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Weight of the origin in given origin group for load balancing. + # Must be between 1 and 1000 + ${Weight}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded1 = 'Az.Cdn.private\Update-AzCdnOrigin_UpdateExpanded1'; + UpdateViaIdentityExpanded1 = 'Az.Cdn.private\Update-AzCdnOrigin_UpdateViaIdentityExpanded1'; + } + if (('UpdateExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Update-AzCdnOriginGroup.ps1 b/src/Cdn/exports/Update-AzCdnOriginGroup.ps1 new file mode 100644 index 000000000000..34a280573ee6 --- /dev/null +++ b/src/Cdn/exports/Update-AzCdnOriginGroup.ps1 @@ -0,0 +1,279 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Updates an existing origin group within an endpoint. +.Description +Updates an existing origin group within an endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup +.Notes +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. + +HEALTHPROBESETTING : Health probe settings to the origin that is used to determine the health of the origin. + [ProbeIntervalInSecond ]: The number of seconds between health probes.Default is 240sec. + [ProbePath ]: The path relative to the origin that is used to determine the health of the origin. + [ProbeProtocol ]: Protocol to use for health probe. + [ProbeRequestType ]: The type of health probe request that is made. + +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. + [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. + +ORIGIN : The source of the content being delivered via CDN within given origin group. + [Id ]: Resource ID. + +RESPONSEBASEDORIGINERRORDETECTIONSETTING : The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported. + [HttpErrorRange ]: The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + [Begin ]: The inclusive start of the http status code range. + [End ]: The inclusive end of the http status code range. + [ResponseBasedDetectedErrorType ]: Type of response errors for real user requests for which origin will be deemed unhealthy + [ResponseBasedFailoverThresholdPercentage ]: The percentage of failed requests in the sample where failover should trigger. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azcdnorigingroup +#> +function Update-AzCdnOriginGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Alias('OriginGroupName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the endpoint. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='UpdateExpanded1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters] + # Health probe settings to the origin that is used to determine the health of the origin. + # To construct, see NOTES section for HEALTHPROBESETTING properties and create a hash table. + ${HealthProbeSetting}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]] + # The source of the content being delivered via CDN within given origin group. + # To construct, see NOTES section for ORIGIN properties and create a hash table. + ${Origin}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters] + # The JSON object that contains the properties to determine origin health using real requests/responses. + # This property is currently not supported. + # To construct, see NOTES section for RESPONSEBASEDORIGINERRORDETECTIONSETTING properties and create a hash table. + ${ResponseBasedOriginErrorDetectionSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. + # Default is 10 mins. + # This property is currently not supported. + ${TrafficRestorationTimeToHealedOrNewEndpointsInMinute}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded1 = 'Az.Cdn.private\Update-AzCdnOriginGroup_UpdateExpanded1'; + UpdateViaIdentityExpanded1 = 'Az.Cdn.private\Update-AzCdnOriginGroup_UpdateViaIdentityExpanded1'; + } + if (('UpdateExpanded1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Update-AzCdnProfile.ps1 b/src/Cdn/exports/Update-AzCdnProfile.ps1 new file mode 100644 index 000000000000..a8e3eb2a640c --- /dev/null +++ b/src/Cdn/exports/Update-AzCdnProfile.ps1 @@ -0,0 +1,234 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +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. +.Description +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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azcdnprofile +#> +function Update-AzCdnProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Send and receive timeout on forwarding request to the origin. + # When timeout is reached, the request fails and returns. + ${OriginResponseTimeoutSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags]))] + [System.Collections.Hashtable] + # Profile tags + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Cdn.custom\Update-AzCdnProfile'; + UpdateViaIdentityExpanded = 'Az.Cdn.custom\Update-AzCdnProfile'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Update-AzFrontDoorCdnCustomDomain.ps1 b/src/Cdn/exports/Update-AzFrontDoorCdnCustomDomain.ps1 new file mode 100644 index 000000000000..89d8ce83be60 --- /dev/null +++ b/src/Cdn/exports/Update-AzFrontDoorCdnCustomDomain.ps1 @@ -0,0 +1,251 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Updates an existing domain within a profile. +.Description +Updates an existing domain within a profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain +.Notes +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. + [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. + +TLSSETTING : The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + CertificateType : Defines the source of the SSL certificate. + [MinimumTlsVersion ]: TLS protocol version that will be used for Https + [Secret ]: Resource reference to the secret. ie. subs/rg/profile/secret + [Id ]: Resource ID. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdncustomdomain +#> +function Update-AzFrontDoorCdnCustomDomain { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the domain under the profile which is unique globally + ${CustomDomainName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${AzureDnsZoneId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${PropertiesPreValidatedCustomDomainResourceId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters] + # The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. + # If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + # To construct, see NOTES section for TLSSETTING properties and create a hash table. + ${TlsSetting}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnCustomDomain_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnCustomDomain_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Update-AzFrontDoorCdnCustomDomainValidationToken.ps1 b/src/Cdn/exports/Update-AzFrontDoorCdnCustomDomainValidationToken.ps1 new file mode 100644 index 000000000000..4a41409ac835 --- /dev/null +++ b/src/Cdn/exports/Update-AzFrontDoorCdnCustomDomainValidationToken.ps1 @@ -0,0 +1,231 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Updates the domain validation token. +.Description +Updates the domain validation token. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdncustomdomainvalidationtoken +#> +function Update-AzFrontDoorCdnCustomDomainValidationToken { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Refresh', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Refresh', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the domain under the profile which is unique globally. + ${CustomDomainName}, + + [Parameter(ParameterSetName='Refresh', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Refresh', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Refresh')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RefreshViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Refresh = 'Az.Cdn.private\Update-AzFrontDoorCdnCustomDomainValidationToken_Refresh'; + RefreshViaIdentity = 'Az.Cdn.private\Update-AzFrontDoorCdnCustomDomainValidationToken_RefreshViaIdentity'; + } + if (('Refresh') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Update-AzFrontDoorCdnEndpoint.ps1 b/src/Cdn/exports/Update-AzFrontDoorCdnEndpoint.ps1 new file mode 100644 index 000000000000..2b88d2d97dd9 --- /dev/null +++ b/src/Cdn/exports/Update-AzFrontDoorCdnEndpoint.ps1 @@ -0,0 +1,248 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +Only tags can be updated after creating an endpoint. +To update origins, use the Update Origin operation. +To update origin groups, use the Update Origin group operation. +To update domains, use the Update Custom Domain operation. +.Description +Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +Only tags can be updated after creating an endpoint. +To update origins, use the Update Origin operation. +To update origin groups, use the Update Origin group operation. +To update domains, use the Update Custom Domain operation. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnendpoint +#> +function Update-AzFrontDoorCdnEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState] + # Whether to enable use of this rule. + # Permitted values are 'Enabled' or 'Disabled' + ${EnabledState}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags]))] + [System.Collections.Hashtable] + # Endpoint tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnEndpoint_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnEndpoint_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Update-AzFrontDoorCdnOrigin.ps1 b/src/Cdn/exports/Update-AzFrontDoorCdnOrigin.ps1 new file mode 100644 index 000000000000..97efc055eff8 --- /dev/null +++ b/src/Cdn/exports/Update-AzFrontDoorCdnOrigin.ps1 @@ -0,0 +1,327 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Updates an existing origin within an origin group. +.Description +Updates an existing origin within an origin group. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnorigin +#> +function Update-AzFrontDoorCdnOrigin { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the profile. + ${OriginGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin which is unique within the profile. + ${OriginName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${AzureOriginId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState] + # Whether to enable health probes to be made against backends defined under backendPools. + # Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. + ${EnabledState}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether to enable certificate name check at origin level + ${EnforceCertificateNameCheck}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The address of the origin. + # Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + ${HostName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The value of the HTTP port. + # Must be between 1 and 65535. + ${HttpPort}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The value of the HTTPS port. + # Must be between 1 and 65535. + ${HttpsPort}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The host header value sent to the origin with each request. + # If you leave this blank, the request hostname determines this value. + # Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + # This overrides the host header defined at Endpoint + ${OriginHostHeader}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Priority of origin in given origin group for load balancing. + # Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + ${Priority}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${PrivateLinkId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The group id from the provider of resource the shared private link resource is for. + ${SharedPrivateLinkResourceGroupId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The location of the shared private link resource + ${SharedPrivateLinkResourcePrivateLinkLocation}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # The request message for requesting approval of the shared private link resource. + ${SharedPrivateLinkResourceRequestMessage}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus] + # Status of the shared private link resource. + # Can be Pending, Approved, Rejected, Disconnected, or Timeout. + ${SharedPrivateLinkResourceStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Weight of the origin in given origin group for load balancing. + # Must be between 1 and 1000 + ${Weight}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnOrigin_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnOrigin_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Update-AzFrontDoorCdnOriginGroup.ps1 b/src/Cdn/exports/Update-AzFrontDoorCdnOriginGroup.ps1 new file mode 100644 index 000000000000..05e900790603 --- /dev/null +++ b/src/Cdn/exports/Update-AzFrontDoorCdnOriginGroup.ps1 @@ -0,0 +1,266 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Updates an existing origin group within a profile. +.Description +Updates an existing origin group within a profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup +.Notes +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. + +HEALTHPROBESETTING : Health probe settings to the origin that is used to determine the health of the origin. + [ProbeIntervalInSecond ]: The number of seconds between health probes.Default is 240sec. + [ProbePath ]: The path relative to the origin that is used to determine the health of the origin. + [ProbeProtocol ]: Protocol to use for health probe. + [ProbeRequestType ]: The type of health probe request that is made. + +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. + [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. + +LOADBALANCINGSETTING : Load balancing settings for a backend pool + [AdditionalLatencyInMillisecond ]: The additional latency in milliseconds for probes to fall into the lowest latency bucket + [SampleSize ]: The number of samples to consider for load balancing decisions + [SuccessfulSamplesRequired ]: The number of samples within the sample period that must succeed +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnorigingroup +#> +function Update-AzFrontDoorCdnOriginGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the origin group which is unique within the profile. + ${OriginGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters] + # Health probe settings to the origin that is used to determine the health of the origin. + # To construct, see NOTES section for HEALTHPROBESETTING properties and create a hash table. + ${HealthProbeSetting}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters] + # Load balancing settings for a backend pool + # To construct, see NOTES section for LOADBALANCINGSETTING properties and create a hash table. + ${LoadBalancingSetting}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState] + # Whether to allow session affinity on this host. + # Valid options are 'Enabled' or 'Disabled' + ${SessionAffinityState}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. + # Default is 10 mins. + # This property is currently not supported. + ${TrafficRestorationTimeToHealedOrNewEndpointsInMinute}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnOriginGroup_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnOriginGroup_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Update-AzFrontDoorCdnProfile.ps1 b/src/Cdn/exports/Update-AzFrontDoorCdnProfile.ps1 new file mode 100644 index 000000000000..89868cd2b64d --- /dev/null +++ b/src/Cdn/exports/Update-AzFrontDoorCdnProfile.ps1 @@ -0,0 +1,234 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +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. +.Description +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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnprofile +#> +function Update-AzFrontDoorCdnProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Send and receive timeout on forwarding request to the origin. + # When timeout is reached, the request fails and returns. + ${OriginResponseTimeoutSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags]))] + [System.Collections.Hashtable] + # Profile tags + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Cdn.custom\Update-AzFrontDoorCdnProfile'; + UpdateViaIdentityExpanded = 'Az.Cdn.custom\Update-AzFrontDoorCdnProfile'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Update-AzFrontDoorCdnRoute.ps1 b/src/Cdn/exports/Update-AzFrontDoorCdnRoute.ps1 new file mode 100644 index 000000000000..cf2775313fe9 --- /dev/null +++ b/src/Cdn/exports/Update-AzFrontDoorCdnRoute.ps1 @@ -0,0 +1,343 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. +.Description +Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute +.Notes +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. + +CUSTOMDOMAIN : Domains referenced by this endpoint. + [Id ]: Resource ID. + +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. + [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. + +RULESET : rule sets referenced by this endpoint. + [Id ]: Resource ID. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnroute +#> +function Update-AzFrontDoorCdnRoute { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the endpoint under the profile which is unique globally. + ${EndpointName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('RouteName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the routing rule. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # query parameters to include or exclude (comma separated). + ${CacheConfigurationQueryParameter}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior] + # Defines how Frontdoor caches requests that include query strings. + # You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + ${CacheConfigurationQueryStringCachingBehavior}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # List of content types on which compression applies. + # The value should be a valid MIME type. + ${CompressionSettingContentTypesToCompress}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether content compression is enabled on AzureFrontDoor. + # Default value is false. + # If compression is enabled, content will be served as compressed if user requests for a compressed version. + # Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + ${CompressionSettingIsCompressionEnabled}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[]] + # Domains referenced by this endpoint. + # To construct, see NOTES section for CUSTOMDOMAIN properties and create a hash table. + ${CustomDomain}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState] + # Whether to enable use of this rule. + # Permitted values are 'Enabled' or 'Disabled' + ${EnabledState}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol] + # Protocol this rule will use when forwarding traffic to backends. + ${ForwardingProtocol}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect] + # Whether to automatically redirect HTTP traffic to HTTPS traffic. + # Note that this is a easy way to set up this rule and it will be the first rule that gets executed. + ${HttpsRedirect}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain] + # whether this route will be linked to the default endpoint domain. + ${LinkToDefaultDomain}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${OriginGroupId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. + # contoso.cloudapp.net/originpath. + ${OriginPath}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String[]] + # The route patterns of the rule. + ${PatternsToMatch}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]] + # rule sets referenced by this endpoint. + # To construct, see NOTES section for RULESET properties and create a hash table. + ${RuleSet}, + + [Parameter()] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[]] + # List of supported protocols for this route. + ${SupportedProtocol}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnRoute_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnRoute_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Update-AzFrontDoorCdnRule.ps1 b/src/Cdn/exports/Update-AzFrontDoorCdnRule.ps1 new file mode 100644 index 000000000000..c50c584e4dc7 --- /dev/null +++ b/src/Cdn/exports/Update-AzFrontDoorCdnRule.ps1 @@ -0,0 +1,273 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Updates an existing delivery rule within a rule set. +.Description +Updates an existing delivery rule within a rule set. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule +.Notes +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. + +ACTION : A list of actions that are executed when all the conditions of a rule are satisfied. + Name : The name of the action for the delivery rule. + +CONDITION : A list of conditions that must be matched for the actions to be executed + Name : The name of the condition for the delivery rule. + +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnrule +#> +function Update-AzFrontDoorCdnRule { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('RuleName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the delivery rule which is unique within the endpoint. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('RuleSetName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the rule set under the profile. + ${SetName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[]] + # A list of actions that are executed when all the conditions of a rule are satisfied. + # To construct, see NOTES section for ACTION properties and create a hash table. + ${Action}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[]] + # A list of conditions that must be matched for the actions to be executed + # To construct, see NOTES section for CONDITION properties and create a hash table. + ${Condition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior] + # If this rule is a match should the rules engine continue running the remaining rules or stop. + # If not present, defaults to Continue. + ${MatchProcessingBehavior}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # The order in which the rules are applied for the endpoint. + # Possible values {0,1,2,3,………}. + # A rule with a lesser order will be applied before a rule with a greater order. + # Rule with order 0 is a special rule. + # It does not require any condition and actions listed in it will always be applied. + ${Order}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnRule_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnRule_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/exports/Update-AzFrontDoorCdnSecurityPolicy.ps1 b/src/Cdn/exports/Update-AzFrontDoorCdnSecurityPolicy.ps1 new file mode 100644 index 000000000000..ed8c9c8c9756 --- /dev/null +++ b/src/Cdn/exports/Update-AzFrontDoorCdnSecurityPolicy.ps1 @@ -0,0 +1,232 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Updates an existing security policy within a profile. +.Description +Updates an existing security policy within a profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnsecuritypolicy +#> +function Update-AzFrontDoorCdnSecurityPolicy { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy])] +[CmdletBinding(DefaultParameterSetName='PatchExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='PatchExpanded', Mandatory)] + [Alias('SecurityPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the security policy under the profile. + ${Name}, + + [Parameter(ParameterSetName='PatchExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='PatchExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='PatchExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='PatchViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters] + # object which contains security policy parameters + ${Parameter}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + PatchExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnSecurityPolicy_PatchExpanded'; + PatchViaIdentityExpanded = 'Az.Cdn.private\Update-AzFrontDoorCdnSecurityPolicy_PatchViaIdentityExpanded'; + } + if (('PatchExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Cdn/generate-help.ps1 b/src/Cdn/generate-help.ps1 new file mode 100644 index 000000000000..c1565fc48235 --- /dev/null +++ b/src/Cdn/generate-help.ps1 @@ -0,0 +1,74 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $Isolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + return +} + +$exportsFolder = Join-Path $PSScriptRoot 'exports' +if(-not (Test-Path $exportsFolder)) { + Write-Error "Exports folder '$exportsFolder' was not found." +} + +$directories = Get-ChildItem -Directory -Path $exportsFolder +$hasProfiles = ($directories | Measure-Object).Count -gt 0 +if(-not $hasProfiles) { + $directories = Get-Item -Path $exportsFolder +} + +$docsFolder = Join-Path $PSScriptRoot 'docs' +if(Test-Path $docsFolder) { + $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue +} +$null = New-Item -ItemType Directory -Force -Path $docsFolder -ErrorAction SilentlyContinue +$examplesFolder = Join-Path $PSScriptRoot 'examples' + +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.Cdn.psd1') +$modulePath = $modulePsd1.FullName +$moduleName = $modulePsd1.BaseName + +# Load DLL to use build-time cmdlets +Import-Module -Name $modulePath +Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.Cdn.private.dll') +$instance = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module]::Instance +# Module info is shared per profile +$moduleInfo = Get-Module -Name $moduleName + +foreach($directory in $directories) +{ + if($hasProfiles) { + Select-AzProfile -Name $directory.Name + } + # Reload module per profile + Import-Module -Name $modulePath -Force + + $cmdletNames = Get-ScriptCmdlet -ScriptFolder $directory.FullName + $cmdletHelpInfo = $cmdletNames | ForEach-Object { Get-Help -Name $_ -Full } + $cmdletFunctionInfo = Get-ScriptCmdlet -ScriptFolder $directory.FullName -AsFunctionInfo + + $docsPath = Join-Path $docsFolder $directory.Name + $null = New-Item -ItemType Directory -Force -Path $docsPath -ErrorAction SilentlyContinue + $examplesPath = Join-Path $examplesFolder $directory.Name + + Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath + Write-Host -ForegroundColor Green "Created documentation in '$docsPath'" +} + +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/src/Cdn/generate-info.json b/src/Cdn/generate-info.json new file mode 100644 index 000000000000..fa4d1d48902b --- /dev/null +++ b/src/Cdn/generate-info.json @@ -0,0 +1,8 @@ +{ + "autorest_powershell": "3.0.486", + "autorest_modelerfour": "4.15.414", + "autorest": "`-- (empty)", + "autorest_core": "3.8.4", + "swagger_commit": "b5c12286510fae45b196457d82f9ad70b967987a", + "node": "v14.15.5" +} diff --git a/src/Cdn/generated/Module.cs b/src/Cdn/generated/Module.cs new file mode 100644 index 000000000000..d33fa36ab7bc --- /dev/null +++ b/src/Cdn/generated/Module.cs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using SendAsyncStepDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>; + using PipelineChangeDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>; + using GetParameterDelegate = global::System.Func; + using ModuleLoadPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>; + using ArgumentCompleterDelegate = global::System.Func; + using GetTelemetryIdDelegate = global::System.Func; + using TelemetryDelegate = global::System.Action; + using NewRequestPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>; + using SignalDelegate = global::System.Func, global::System.Threading.Tasks.Task>; + using EventListenerDelegate = global::System.Func, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Management.Automation.InvocationInfo, string, string, string, global::System.Exception, global::System.Threading.Tasks.Task>; + using NextDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>; + + /// A class that contains the module-common code and data. + public partial class Module + { + /// The currently selected profile. + public string Profile = global::System.String.Empty; + + public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler(); + + /// the ISendAsync pipeline instance + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline _pipeline; + + /// the ISendAsync pipeline instance (when proxy is enabled) + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline _pipelineWithProxy; + + public bool _useProxy = false; + + public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy(); + + /// Gets completion data for azure specific fields + public ArgumentCompleterDelegate ArgumentCompleter { get; set; } + + /// The instance of the Client API + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn ClientAPI { get; set; } + + /// A delegate that gets called for each signalled event + public EventListenerDelegate EventListener { get; set; } + + /// The delegate to call to get parameter data from a common module. + public GetParameterDelegate GetParameterValue { get; set; } + + /// The delegate to get the telemetry Id. + public GetTelemetryIdDelegate GetTelemetryId { get; set; } + + /// Backing field for property. + private static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module _instance; + + /// the singleton of this module class + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module()); + + /// The Name of this module + public string Name => @"Az.Cdn"; + + /// The delegate to call when this module is loaded (supporting a commmon module). + public ModuleLoadPipelineDelegate OnModuleLoad { get; set; } + + /// The delegate to call before each new request (supporting a commmon module). + public NewRequestPipelineDelegate OnNewRequest { get; set; } + + /// The name of the currently selected Azure profile + public global::System.String ProfileName { get; set; } + + /// The ResourceID for this module (azure arm). + public string ResourceId => @"Az.Cdn"; + + /// The delegate for creating a telemetry. + public TelemetryDelegate Telemetry { get; set; } + + /// The from the cmdlet + /// The HttpPipeline for the request + + partial void AfterCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline pipeline); + + /// The from the cmdlet + /// The HttpPipeline for the request + + partial void BeforeCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline pipeline); + + partial void CustomInit(); + + /// Creates an instance of the HttpPipeline for each call. + /// The from the cmdlet + /// the cmdlet's correlation id. + /// the cmdlet's process record correlation id. + /// the cmdlet's parameterset name. + /// a dict for extensible parameters + /// An instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline for the remote call. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline CreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string processRecordId, string parameterSetName = null, global::System.Collections.Generic.IDictionary extensibleParameters = null) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline pipeline = null; + BeforeCreatePipeline(invocationInfo, ref pipeline); + pipeline = (pipeline ?? (_useProxy ? _pipelineWithProxy : _pipeline)).Clone(); + AfterCreatePipeline(invocationInfo, ref pipeline); + pipeline.Append(new Runtime.CmdInfoHandler(processRecordId, invocationInfo, parameterSetName).SendAsync); + OnNewRequest?.Invoke( invocationInfo, correlationId,processRecordId, (step)=> { pipeline.Prepend(step); } , (step)=> { pipeline.Append(step); } ); + return pipeline; + } + + /// Gets parameters from a common module. + /// The from the cmdlet + /// the cmdlet's correlation id. + /// The name of the parameter to get the value for. + /// + /// The parameter value from the common module. (Note: this should be type converted on the way back) + /// + public object GetParameter(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string parameterName) => GetParameterValue?.Invoke( ResourceId, Name, invocationInfo, correlationId,parameterName ); + + /// Initialization steps performed after the module is loaded. + public void Init() + { + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); + CustomInit(); + } + + /// Creates the module instance. + private Module() + { + /// constructor + ClientAPI = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn(); + _handler.Proxy = _webProxy; + _pipeline = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient())); + _pipelineWithProxy = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient(_handler))); + } + + /// The HTTP Proxy to use. + /// The HTTP Proxy Credentials + /// True if the proxy should use default credentials + public void SetProxyConfiguration(global::System.Uri proxy, global::System.Management.Automation.PSCredential proxyCredential, bool proxyUseDefaultCredentials) + { + _useProxy = proxy != null; + if (proxy == null) + { + return; + } + // set the proxy configuration + _webProxy.Address = proxy; + _webProxy.BypassProxyOnLocal = false; + if (proxyUseDefaultCredentials) + { + _webProxy.Credentials = null; + _webProxy.UseDefaultCredentials = true; + } + else + { + _webProxy.UseDefaultCredentials = false; + _webProxy.Credentials = proxyCredential ?.GetNetworkCredential(); + } + } + + /// Called to dispatch events to the common module listener + /// The ID of the event + /// The cancellation token for the event + /// A delegate to get the detailed event data + /// The callback for the event dispatcher + /// The from the cmdlet + /// the cmdlet's parameterset name. + /// the cmdlet's correlation id. + /// the cmdlet's process record correlation id. + /// the exception that is being thrown (if available) + /// + /// A that will be complete when handling of the event is completed. + /// + public async global::System.Threading.Tasks.Task Signal(string id, global::System.Threading.CancellationToken token, global::System.Func getEventData, SignalDelegate signal, global::System.Management.Automation.InvocationInfo invocationInfo, string parameterSetName, string correlationId, string processRecordId, global::System.Exception exception) + { + using( NoSynchronizationContext ) + { + await EventListener?.Invoke(id,token,getEventData, signal, invocationInfo, parameterSetName, correlationId,processRecordId,exception); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Cdn.cs b/src/Cdn/generated/api/Cdn.cs new file mode 100644 index 000000000000..d5cd81eee16d --- /dev/null +++ b/src/Cdn/generated/api/Cdn.cs @@ -0,0 +1,23247 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Low-level API implementation for the Cdn service. + /// Use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must make sure that requests made + /// to these resources are secure. + /// + public partial class Cdn + { + + /// Creates a new domain within the specified profile. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the domain under the profile which is unique globally + /// Azure Subscription ID. + /// Domain properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdCustomDomainsCreate(string resourceGroupName, string profileName, string customDomainName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/customDomains/" + + global::System.Uri.EscapeDataString(customDomainName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdCustomDomainsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Creates a new domain within the specified profile. + /// + /// Domain properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdCustomDomainsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/customDomains/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var customDomainName = _match.Groups["customDomainName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/customDomains/" + + customDomainName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdCustomDomainsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdCustomDomainsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomain.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the domain under the profile which is unique globally + /// Azure Subscription ID. + /// Domain properties + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdCustomDomainsCreate_Validate(string resourceGroupName, string profileName, string customDomainName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(customDomainName),customDomainName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group + /// and profile. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the domain under the profile which is unique globally. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdCustomDomainsDelete(string resourceGroupName, string profileName, string customDomainName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/customDomains/" + + global::System.Uri.EscapeDataString(customDomainName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdCustomDomainsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group + /// and profile. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdCustomDomainsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/customDomains/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var customDomainName = _match.Groups["customDomainName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/customDomains/" + + customDomainName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdCustomDomainsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdCustomDomainsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the domain under the profile which is unique globally. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdCustomDomainsDelete_Validate(string resourceGroupName, string profileName, string customDomainName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(customDomainName),customDomainName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group + /// and profile. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the domain under the profile which is unique globally. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdCustomDomainsGet(string resourceGroupName, string profileName, string customDomainName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/customDomains/" + + global::System.Uri.EscapeDataString(customDomainName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdCustomDomainsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group + /// and profile. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdCustomDomainsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/customDomains/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var customDomainName = _match.Groups["customDomainName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/customDomains/" + + customDomainName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdCustomDomainsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdCustomDomainsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomain.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the domain under the profile which is unique globally. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdCustomDomainsGet_Validate(string resourceGroupName, string profileName, string customDomainName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(customDomainName),customDomainName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Lists existing AzureFrontDoor domains. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile or CDN profile which + /// is unique within the resource group. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdCustomDomainsListByProfile(string resourceGroupName, string profileName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/customDomains" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdCustomDomainsListByProfile_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists existing AzureFrontDoor domains. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdCustomDomainsListByProfileViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/customDomains$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/customDomains" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdCustomDomainsListByProfile_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdCustomDomainsListByProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile or CDN profile which + /// is unique within the resource group. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdCustomDomainsListByProfile_Validate(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Updates the domain validation token. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the domain under the profile which is unique globally. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdCustomDomainsRefreshValidationToken(string resourceGroupName, string profileName, string customDomainName, string subscriptionId, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/customDomains/" + + global::System.Uri.EscapeDataString(customDomainName) + + "/refreshValidationToken" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdCustomDomainsRefreshValidationToken_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates the domain validation token. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdCustomDomainsRefreshValidationTokenViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/customDomains/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}/refreshValidationToken'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var customDomainName = _match.Groups["customDomainName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/customDomains/" + + customDomainName + + "/refreshValidationToken" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdCustomDomainsRefreshValidationToken_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdCustomDomainsRefreshValidationToken_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the domain under the profile which is unique globally. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdCustomDomainsRefreshValidationToken_Validate(string resourceGroupName, string profileName, string customDomainName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(customDomainName),customDomainName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Updates an existing domain within a profile. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the domain under the profile which is unique globally + /// Azure Subscription ID. + /// Domain properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdCustomDomainsUpdate(string resourceGroupName, string profileName, string customDomainName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/customDomains/" + + global::System.Uri.EscapeDataString(customDomainName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdCustomDomainsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates an existing domain within a profile. + /// + /// Domain properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdCustomDomainsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/customDomains/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var customDomainName = _match.Groups["customDomainName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/customDomains/" + + customDomainName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdCustomDomainsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdCustomDomainsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomain.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the domain under the profile which is unique globally + /// Azure Subscription ID. + /// Domain properties + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdCustomDomainsUpdate_Validate(string resourceGroupName, string profileName, string customDomainName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(customDomainName),customDomainName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group + /// and profile. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// Endpoint properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdEndpointsCreate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/afdEndpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdEndpointsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group + /// and profile. + /// + /// + /// Endpoint properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdEndpointsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/afdEndpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/afdEndpoints/" + + endpointName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdEndpointsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdEndpointsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// Endpoint properties + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdEndpointsCreate_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource + /// group and profile. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdEndpointsDelete(string resourceGroupName, string profileName, string endpointName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/afdEndpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdEndpointsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource + /// group and profile. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdEndpointsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/afdEndpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/afdEndpoints/" + + endpointName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdEndpointsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdEndpointsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdEndpointsDelete_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group + /// and profile. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdEndpointsGet(string resourceGroupName, string profileName, string endpointName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/afdEndpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdEndpointsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group + /// and profile. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdEndpointsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/afdEndpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/afdEndpoints/" + + endpointName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdEndpointsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdEndpointsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdEndpointsGet_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Lists existing AzureFrontDoor endpoints. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdEndpointsListByProfile(string resourceGroupName, string profileName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/afdEndpoints" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdEndpointsListByProfile_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists existing AzureFrontDoor endpoints. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdEndpointsListByProfileViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/afdEndpoints$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/afdEndpoints" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdEndpointsListByProfile_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdEndpointsListByProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdEndpointsListByProfile_Validate(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdEndpointsListResourceUsage(string resourceGroupName, string profileName, string endpointName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/afdEndpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/usages" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdEndpointsListResourceUsage_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdEndpointsListResourceUsageViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/afdEndpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/usages'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/afdEndpoints/" + + endpointName + + "/usages" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdEndpointsListResourceUsage_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdEndpointsListResourceUsage_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UsagesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdEndpointsListResourceUsage_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Removes a content from AzureFrontDoor. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// The list of paths to the content and the list of linked domains to be purged. Path can be a full URL, + /// e.g. '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes + /// all folders and files in the directory. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdEndpointsPurgeContent(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/afdEndpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/purge" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdEndpointsPurgeContent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Removes a content from AzureFrontDoor. + /// + /// The list of paths to the content and the list of linked domains to be purged. Path can be a full URL, + /// e.g. '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes + /// all folders and files in the directory. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdEndpointsPurgeContentViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/afdEndpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/purge'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/afdEndpoints/" + + endpointName + + "/purge" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdEndpointsPurgeContent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdEndpointsPurgeContent_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// The list of paths to the content and the list of linked domains to be purged. Path can be a full URL, + /// e.g. '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes + /// all folders and files in the directory. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdEndpointsPurgeContent_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource + /// group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. + /// To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// Endpoint update properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdEndpointsUpdate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/afdEndpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdEndpointsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource + /// group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. + /// To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation. + /// + /// + /// Endpoint update properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdEndpointsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/afdEndpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/afdEndpoints/" + + endpointName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdEndpointsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdEndpointsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// Endpoint update properties + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdEndpointsUpdate_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api isn't work for apex + /// domain. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// Custom domain to be validated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdEndpointsValidateCustomDomain(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/afdEndpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/validateCustomDomain" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdEndpointsValidateCustomDomain_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api isn't work for apex + /// domain. + /// + /// + /// Custom domain to be validated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdEndpointsValidateCustomDomainViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/afdEndpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/validateCustomDomain'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/afdEndpoints/" + + endpointName + + "/validateCustomDomain" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdEndpointsValidateCustomDomain_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdEndpointsValidateCustomDomain_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateCustomDomainOutput.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// Custom domain to be validated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdEndpointsValidateCustomDomain_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Creates a new origin group within the specified profile. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the endpoint. + /// Azure Subscription ID. + /// Origin group properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginGroupsCreate(string resourceGroupName, string profileName, string originGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/originGroups/" + + global::System.Uri.EscapeDataString(originGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginGroupsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Creates a new origin group within the specified profile. + /// + /// Origin group properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginGroupsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/originGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var originGroupName = _match.Groups["originGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/originGroups/" + + originGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginGroupsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginGroupsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the endpoint. + /// Azure Subscription ID. + /// Origin group properties + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginGroupsCreate_Validate(string resourceGroupName, string profileName, string originGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(originGroupName),originGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes an existing origin group within a profile. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the profile. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginGroupsDelete(string resourceGroupName, string profileName, string originGroupName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/originGroups/" + + global::System.Uri.EscapeDataString(originGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginGroupsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes an existing origin group within a profile. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginGroupsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/originGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var originGroupName = _match.Groups["originGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/originGroups/" + + originGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginGroupsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginGroupsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the profile. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginGroupsDelete_Validate(string resourceGroupName, string profileName, string originGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(originGroupName),originGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Gets an existing origin group within a profile. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the endpoint. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginGroupsGet(string resourceGroupName, string profileName, string originGroupName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/originGroups/" + + global::System.Uri.EscapeDataString(originGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginGroupsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets an existing origin group within a profile. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginGroupsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/originGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var originGroupName = _match.Groups["originGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/originGroups/" + + originGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginGroupsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginGroupsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the endpoint. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginGroupsGet_Validate(string resourceGroupName, string profileName, string originGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(originGroupName),originGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Lists all of the existing origin groups within a profile. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginGroupsListByProfile(string resourceGroupName, string profileName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/originGroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginGroupsListByProfile_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the existing origin groups within a profile. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginGroupsListByProfileViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/originGroups$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/originGroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginGroupsListByProfile_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginGroupsListByProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginGroupsListByProfile_Validate(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN profile. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the endpoint. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginGroupsListResourceUsage(string resourceGroupName, string profileName, string originGroupName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/originGroups/" + + global::System.Uri.EscapeDataString(originGroupName) + + "/usages" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginGroupsListResourceUsage_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN profile. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginGroupsListResourceUsageViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/originGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/usages'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var originGroupName = _match.Groups["originGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/originGroups/" + + originGroupName + + "/usages" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginGroupsListResourceUsage_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginGroupsListResourceUsage_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UsagesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the endpoint. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginGroupsListResourceUsage_Validate(string resourceGroupName, string profileName, string originGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(originGroupName),originGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Updates an existing origin group within a profile. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the profile. + /// Azure Subscription ID. + /// Origin group properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginGroupsUpdate(string resourceGroupName, string profileName, string originGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/originGroups/" + + global::System.Uri.EscapeDataString(originGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginGroupsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates an existing origin group within a profile. + /// + /// Origin group properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginGroupsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/originGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var originGroupName = _match.Groups["originGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/originGroups/" + + originGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginGroupsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginGroupsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the profile. + /// Azure Subscription ID. + /// Origin group properties + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginGroupsUpdate_Validate(string resourceGroupName, string profileName, string originGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(originGroupName),originGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Creates a new origin within the specified origin group. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the profile. + /// Name of the origin that is unique within the profile. + /// Azure Subscription ID. + /// Origin properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginsCreate(string resourceGroupName, string profileName, string originGroupName, string originName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/originGroups/" + + global::System.Uri.EscapeDataString(originGroupName) + + "/origins/" + + global::System.Uri.EscapeDataString(originName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Creates a new origin within the specified origin group. + /// + /// Origin properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/originGroups/(?[^/]+)/origins/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var originGroupName = _match.Groups["originGroupName"].Value; + var originName = _match.Groups["originName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/originGroups/" + + originGroupName + + "/origins/" + + originName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOrigin.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the profile. + /// Name of the origin that is unique within the profile. + /// Azure Subscription ID. + /// Origin properties + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginsCreate_Validate(string resourceGroupName, string profileName, string originGroupName, string originName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(originGroupName),originGroupName); + await eventListener.AssertNotNull(nameof(originName),originName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes an existing origin within an origin group. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the profile. + /// Name of the origin which is unique within the profile. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginsDelete(string resourceGroupName, string profileName, string originGroupName, string originName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/originGroups/" + + global::System.Uri.EscapeDataString(originGroupName) + + "/origins/" + + global::System.Uri.EscapeDataString(originName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes an existing origin within an origin group. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/originGroups/(?[^/]+)/origins/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var originGroupName = _match.Groups["originGroupName"].Value; + var originName = _match.Groups["originName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/originGroups/" + + originGroupName + + "/origins/" + + originName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the profile. + /// Name of the origin which is unique within the profile. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginsDelete_Validate(string resourceGroupName, string profileName, string originGroupName, string originName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(originGroupName),originGroupName); + await eventListener.AssertNotNull(nameof(originName),originName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Gets an existing origin within an origin group. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the profile. + /// Name of the origin which is unique within the profile. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginsGet(string resourceGroupName, string profileName, string originGroupName, string originName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/originGroups/" + + global::System.Uri.EscapeDataString(originGroupName) + + "/origins/" + + global::System.Uri.EscapeDataString(originName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets an existing origin within an origin group. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/originGroups/(?[^/]+)/origins/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var originGroupName = _match.Groups["originGroupName"].Value; + var originName = _match.Groups["originName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/originGroups/" + + originGroupName + + "/origins/" + + originName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOrigin.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the profile. + /// Name of the origin which is unique within the profile. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginsGet_Validate(string resourceGroupName, string profileName, string originGroupName, string originName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(originGroupName),originGroupName); + await eventListener.AssertNotNull(nameof(originName),originName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Lists all of the existing origins within an origin group. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the profile. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginsListByOriginGroup(string resourceGroupName, string profileName, string originGroupName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/originGroups/" + + global::System.Uri.EscapeDataString(originGroupName) + + "/origins" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginsListByOriginGroup_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the existing origins within an origin group. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginsListByOriginGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/originGroups/(?[^/]+)/origins$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var originGroupName = _match.Groups["originGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/originGroups/" + + originGroupName + + "/origins" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginsListByOriginGroup_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginsListByOriginGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the profile. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginsListByOriginGroup_Validate(string resourceGroupName, string profileName, string originGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(originGroupName),originGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Updates an existing origin within an origin group. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the profile. + /// Name of the origin which is unique within the profile. + /// Azure Subscription ID. + /// Origin properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginsUpdate(string resourceGroupName, string profileName, string originGroupName, string originName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/originGroups/" + + global::System.Uri.EscapeDataString(originGroupName) + + "/origins/" + + global::System.Uri.EscapeDataString(originName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates an existing origin within an origin group. + /// + /// Origin properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdOriginsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/originGroups/(?[^/]+)/origins/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var originGroupName = _match.Groups["originGroupName"].Value; + var originName = _match.Groups["originName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/originGroups/" + + originGroupName + + "/origins/" + + originName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdOriginsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOrigin.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the origin group which is unique within the profile. + /// Name of the origin which is unique within the profile. + /// Azure Subscription ID. + /// Origin properties + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdOriginsUpdate_Validate(string resourceGroupName, string profileName, string originGroupName, string originName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(originGroupName),originGroupName); + await eventListener.AssertNotNull(nameof(originName),originName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Check the name availability of a host name. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique + /// within the resource group. + /// Azure Subscription ID. + /// Custom domain to be validated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdProfilesCheckHostNameAvailability(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/checkHostNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdProfilesCheckHostNameAvailability_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Check the name availability of a host name. + /// + /// Custom domain to be validated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdProfilesCheckHostNameAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkHostNameAvailability'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/checkHostNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdProfilesCheckHostNameAvailability_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdProfilesCheckHostNameAvailability_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckNameAvailabilityOutput.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique + /// within the resource group. + /// Azure Subscription ID. + /// Custom domain to be validated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdProfilesCheckHostNameAvailability_Validate(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInput body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique + /// within the resource group. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdProfilesListResourceUsage(string resourceGroupName, string profileName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/usages" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdProfilesListResourceUsage_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AfdProfilesListResourceUsageViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/usages'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/usages" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AfdProfilesListResourceUsage_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdProfilesListResourceUsage_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UsagesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique + /// within the resource group. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AfdProfilesListResourceUsage_Validate(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Check the availability of a resource name. This is needed for resources where name is globally unique, such as a afdx + /// endpoint. + /// + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Input to check. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CheckEndpointNameAvailability(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/checkEndpointNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CheckEndpointNameAvailability_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Check the availability of a resource name. This is needed for resources where name is globally unique, such as a afdx + /// endpoint. + /// + /// + /// Input to check. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CheckEndpointNameAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/checkEndpointNameAvailability'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/checkEndpointNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CheckEndpointNameAvailability_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CheckEndpointNameAvailability_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckEndpointNameAvailabilityOutput.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Input to check. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CheckEndpointNameAvailability_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInput body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Check the availability of a resource name. This is needed for resources where name is globally unique, such as a CDN endpoint. + /// + /// Input to check. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CheckNameAvailability(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Cdn/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CheckNameAvailability_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Check the availability of a resource name. This is needed for resources where name is globally unique, such as a CDN endpoint. + /// + /// + /// Input to check. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CheckNameAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Cdn$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Cdn/checkNameAvailability'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Cdn/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CheckNameAvailability_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Check the availability of a resource name. This is needed for resources where name is globally unique, such as a CDN endpoint. + /// + /// Azure Subscription ID. + /// Input to check. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CheckNameAvailabilityWithSubscription(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Cdn/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CheckNameAvailabilityWithSubscription_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Check the availability of a resource name. This is needed for resources where name is globally unique, such as a CDN endpoint. + /// + /// + /// Input to check. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CheckNameAvailabilityWithSubscriptionViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Cdn$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkNameAvailability'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.Cdn/checkNameAvailability" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CheckNameAvailabilityWithSubscription_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CheckNameAvailabilityWithSubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckNameAvailabilityOutput.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// Azure Subscription ID. + /// Input to check. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CheckNameAvailabilityWithSubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInput body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CheckNameAvailability_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckNameAvailabilityOutput.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Input to check. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CheckNameAvailability_Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInput body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Creates a new custom domain within an endpoint. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the custom domain within an endpoint. + /// Azure Subscription ID. + /// Properties required to create a new custom domain. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CustomDomainsCreate(string resourceGroupName, string profileName, string endpointName, string customDomainName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/customDomains/" + + global::System.Uri.EscapeDataString(customDomainName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CustomDomainsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Creates a new custom domain within an endpoint. + /// + /// Properties required to create a new custom domain. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CustomDomainsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)/customDomains/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var customDomainName = _match.Groups["customDomainName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/customDomains/" + + customDomainName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CustomDomainsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CustomDomainsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomain.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the custom domain within an endpoint. + /// Azure Subscription ID. + /// Properties required to create a new custom domain. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CustomDomainsCreate_Validate(string resourceGroupName, string profileName, string endpointName, string customDomainName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParameters body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(customDomainName),customDomainName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes an existing custom domain within an endpoint. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the custom domain within an endpoint. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CustomDomainsDelete(string resourceGroupName, string profileName, string endpointName, string customDomainName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/customDomains/" + + global::System.Uri.EscapeDataString(customDomainName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CustomDomainsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes an existing custom domain within an endpoint. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CustomDomainsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)/customDomains/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var customDomainName = _match.Groups["customDomainName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/customDomains/" + + customDomainName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CustomDomainsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CustomDomainsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the custom domain within an endpoint. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CustomDomainsDelete_Validate(string resourceGroupName, string profileName, string endpointName, string customDomainName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(customDomainName),customDomainName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Disable https delivery of the custom domain. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the custom domain within an endpoint. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CustomDomainsDisableCustomHttps(string resourceGroupName, string profileName, string endpointName, string customDomainName, string subscriptionId, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/customDomains/" + + global::System.Uri.EscapeDataString(customDomainName) + + "/disableCustomHttps" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CustomDomainsDisableCustomHttps_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Disable https delivery of the custom domain. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CustomDomainsDisableCustomHttpsViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)/customDomains/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var customDomainName = _match.Groups["customDomainName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/customDomains/" + + customDomainName + + "/disableCustomHttps" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CustomDomainsDisableCustomHttps_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CustomDomainsDisableCustomHttps_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomain.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the custom domain within an endpoint. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CustomDomainsDisableCustomHttps_Validate(string resourceGroupName, string profileName, string endpointName, string customDomainName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(customDomainName),customDomainName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Enable https delivery of the custom domain. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the custom domain within an endpoint. + /// Azure Subscription ID. + /// The configuration specifying how to enable HTTPS for the custom domain - using CDN managed certificate + /// or user's own certificate. If not specified, enabling ssl uses CDN managed certificate by default. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CustomDomainsEnableCustomHttps(string resourceGroupName, string profileName, string endpointName, string customDomainName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/customDomains/" + + global::System.Uri.EscapeDataString(customDomainName) + + "/enableCustomHttps" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CustomDomainsEnableCustomHttps_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Enable https delivery of the custom domain. + /// + /// The configuration specifying how to enable HTTPS for the custom domain - using CDN managed certificate + /// or user's own certificate. If not specified, enabling ssl uses CDN managed certificate by default. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CustomDomainsEnableCustomHttpsViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)/customDomains/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var customDomainName = _match.Groups["customDomainName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/customDomains/" + + customDomainName + + "/enableCustomHttps" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CustomDomainsEnableCustomHttps_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 202 (Accepted). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CustomDomainsEnableCustomHttps_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.Accepted: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onAccepted(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomain.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the custom domain within an endpoint. + /// Azure Subscription ID. + /// The configuration specifying how to enable HTTPS for the custom domain - using CDN managed certificate + /// or user's own certificate. If not specified, enabling ssl uses CDN managed certificate by default. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CustomDomainsEnableCustomHttps_Validate(string resourceGroupName, string profileName, string endpointName, string customDomainName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(customDomainName),customDomainName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Gets an existing custom domain within an endpoint. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the custom domain within an endpoint. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CustomDomainsGet(string resourceGroupName, string profileName, string endpointName, string customDomainName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/customDomains/" + + global::System.Uri.EscapeDataString(customDomainName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CustomDomainsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets an existing custom domain within an endpoint. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CustomDomainsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)/customDomains/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var customDomainName = _match.Groups["customDomainName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/customDomains/" + + customDomainName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CustomDomainsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CustomDomainsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomain.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the custom domain within an endpoint. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CustomDomainsGet_Validate(string resourceGroupName, string profileName, string endpointName, string customDomainName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(customDomainName),customDomainName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Lists all of the existing custom domains within an endpoint. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CustomDomainsListByEndpoint(string resourceGroupName, string profileName, string endpointName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/customDomains" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CustomDomainsListByEndpoint_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the existing custom domains within an endpoint. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CustomDomainsListByEndpointViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)/customDomains$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/customDomains" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CustomDomainsListByEndpoint_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CustomDomainsListByEndpoint_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CustomDomainsListByEndpoint_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EdgeNodesList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Cdn/edgenodes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EdgeNodesList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EdgeNodesListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Cdn/edgenodes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Cdn/edgenodes'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Cdn/edgenodes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EdgeNodesList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EdgeNodesList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EdgenodeResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EdgeNodesList_Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + + } + } + + /// + /// Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// Endpoint properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsCreate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. + /// + /// + /// Endpoint properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Endpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// Endpoint properties + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsCreate_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and + /// profile. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsDelete(string resourceGroupName, string profileName, string endpointName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and + /// profile. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsDelete_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsGet(string resourceGroupName, string profileName, string endpointName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Endpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsGet_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Lists existing CDN endpoints. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsListByProfile(string resourceGroupName, string profileName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsListByProfile_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists existing CDN endpoints. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsListByProfileViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsListByProfile_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsListByProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsListByProfile_Validate(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Checks the quota and usage of geo filters and custom domains under the given endpoint. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsListResourceUsage(string resourceGroupName, string profileName, string endpointName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/checkResourceUsage" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsListResourceUsage_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Checks the quota and usage of geo filters and custom domains under the given endpoint. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsListResourceUsageViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/checkResourceUsage'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/checkResourceUsage" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsListResourceUsage_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsListResourceUsage_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceUsageListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsListResourceUsage_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Pre-loads a content to CDN. Available for Verizon Profiles. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// The path to the content to be loaded. Path should be a full URL, e.g. ‘/pictures/city.png' which loads + /// a single file + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsLoadContent(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/load" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsLoadContent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Pre-loads a content to CDN. Available for Verizon Profiles. + /// + /// The path to the content to be loaded. Path should be a full URL, e.g. ‘/pictures/city.png' which loads + /// a single file + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsLoadContentViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/load" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsLoadContent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsLoadContent_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// The path to the content to be loaded. Path should be a full URL, e.g. ‘/pictures/city.png' which loads + /// a single file + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsLoadContent_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Removes a content from CDN. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' which removes + /// a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsPurgeContent(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/purge" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsPurgeContent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Removes a content from CDN. + /// + /// The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' which removes + /// a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsPurgeContentViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/purge" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsPurgeContent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsPurgeContent_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// The path to the content to be purged. Path can be a full URL, e.g. '/pictures/city.png' which removes + /// a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsPurgeContent_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Starts an existing CDN endpoint that is on a stopped state. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsStart(string resourceGroupName, string profileName, string endpointName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/start" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsStart_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Starts an existing CDN endpoint that is on a stopped state. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsStartViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/start'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/start" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsStart_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsStart_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Endpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsStart_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Stops an existing running CDN endpoint. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsStop(string resourceGroupName, string profileName, string endpointName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/stop" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsStop_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Stops an existing running CDN endpoint. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsStopViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/stop'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/stop" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsStop_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsStop_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Endpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsStop_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and + /// profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update + /// origin groups, use the Update Origin group operation. To update custom domains, use the Update Custom Domain operation. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// Endpoint update properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsUpdate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and + /// profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update + /// origin groups, use the Update Origin group operation. To update custom domains, use the Update Custom Domain operation. + /// + /// + /// Endpoint update properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Endpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// Endpoint update properties + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsUpdate_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// Custom domain to be validated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsValidateCustomDomain(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/validateCustomDomain" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsValidateCustomDomain_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. + /// + /// + /// Custom domain to be validated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task EndpointsValidateCustomDomainViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/validateCustomDomain" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsValidateCustomDomain_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsValidateCustomDomain_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateCustomDomainOutput.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// Custom domain to be validated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task EndpointsValidateCustomDomain_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get all available location names for AFD log analytics report. + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. which is unique within the resource group. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LogAnalyticsGetLogAnalyticsLocations(string subscriptionId, string resourceGroupName, string profileName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/getLogAnalyticsLocations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LogAnalyticsGetLogAnalyticsLocations_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get all available location names for AFD log analytics report. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LogAnalyticsGetLogAnalyticsLocationsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/getLogAnalyticsLocations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsLocations'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/getLogAnalyticsLocations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LogAnalyticsGetLogAnalyticsLocations_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LogAnalyticsGetLogAnalyticsLocations_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ContinentsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. which is unique within the resource group. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LogAnalyticsGetLogAnalyticsLocations_Validate(string subscriptionId, string resourceGroupName, string profileName, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + } + } + + /// Get log report for AFD profile + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. which is unique within the resource group. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LogAnalyticsGetLogAnalyticsMetrics(string subscriptionId, string resourceGroupName, string profileName, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric[] metrics, global::System.DateTime dateTimeBegin, global::System.DateTime dateTimeEnd, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity granularity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy[] groupBy, string[] continents, string[] countryOrRegions, string[] customDomains, string[] protocols, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/getLogAnalyticsMetrics" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null != metrics && metrics.Length > 0 ? "metrics=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(metrics, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + "dateTimeBegin=" + dateTimeBegin.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + + "&" + + "dateTimeEnd=" + dateTimeEnd.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + + "&" + + "granularity=" + global::System.Uri.EscapeDataString(granularity) + + "&" + + (null != groupBy && groupBy.Length > 0 ? "groupBy=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(groupBy, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + (null != continents && continents.Length > 0 ? "continents=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(continents, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + (null != countryOrRegions && countryOrRegions.Length > 0 ? "countryOrRegions=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(countryOrRegions, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + (null != customDomains && customDomains.Length > 0 ? "customDomains=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(customDomains, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + (null != protocols && protocols.Length > 0 ? "protocols=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(protocols, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LogAnalyticsGetLogAnalyticsMetrics_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get log report for AFD profile + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LogAnalyticsGetLogAnalyticsMetricsViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric[] metrics, global::System.DateTime dateTimeBegin, global::System.DateTime dateTimeEnd, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity granularity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy[] groupBy, string[] continents, string[] countryOrRegions, string[] customDomains, string[] protocols, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/getLogAnalyticsMetrics$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsMetrics'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/getLogAnalyticsMetrics" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null != metrics && metrics.Length > 0 ? "metrics=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(metrics, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + "dateTimeBegin=" + dateTimeBegin.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + + "&" + + "dateTimeEnd=" + dateTimeEnd.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + + "&" + + "granularity=" + global::System.Uri.EscapeDataString(granularity) + + "&" + + (null != groupBy && groupBy.Length > 0 ? "groupBy=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(groupBy, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + (null != continents && continents.Length > 0 ? "continents=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(continents, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + (null != countryOrRegions && countryOrRegions.Length > 0 ? "countryOrRegions=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(countryOrRegions, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + (null != customDomains && customDomains.Length > 0 ? "customDomains=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(customDomains, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + (null != protocols && protocols.Length > 0 ? "protocols=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(protocols, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LogAnalyticsGetLogAnalyticsMetrics_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LogAnalyticsGetLogAnalyticsMetrics_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. which is unique within the resource group. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LogAnalyticsGetLogAnalyticsMetrics_Validate(string subscriptionId, string resourceGroupName, string profileName, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric[] metrics, global::System.DateTime dateTimeBegin, global::System.DateTime dateTimeEnd, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity granularity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy[] groupBy, string[] continents, string[] countryOrRegions, string[] customDomains, string[] protocols, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(metrics), metrics); + if (metrics != null ) { + for (int __i = 0; __i < metrics.Length; __i++) { + await eventListener.AssertEnum($"metrics[{__i}]",metrics[__i],@"clientRequestCount", @"clientRequestTraffic", @"clientRequestBandwidth", @"originRequestTraffic", @"originRequestBandwidth", @"totalLatency"); + } + } + await eventListener.AssertNotNull(nameof(granularity),granularity); + await eventListener.AssertEnum(nameof(granularity),granularity,@"PT5M", @"PT1H", @"P1D"); + if (groupBy != null ) { + for (int __i = 0; __i < groupBy.Length; __i++) { + await eventListener.AssertEnum($"groupBy[{__i}]",groupBy[__i],@"httpStatusCode", @"protocol", @"cacheStatus", @"countryOrRegion", @"customDomain"); + } + } + await eventListener.AssertNotNull(nameof(customDomains), customDomains); + await eventListener.AssertNotNull(nameof(protocols), protocols); + } + } + + /// Get log analytics ranking report for AFD profile + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. which is unique within the resource group. + /// + /// + /// + /// + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LogAnalyticsGetLogAnalyticsRankings(string subscriptionId, string resourceGroupName, string profileName, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking[] rankings, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric[] metrics, int maxRanking, global::System.DateTime dateTimeBegin, global::System.DateTime dateTimeEnd, string[] customDomains, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/getLogAnalyticsRankings" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null != rankings && rankings.Length > 0 ? "rankings=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(rankings, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + (null != metrics && metrics.Length > 0 ? "metrics=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(metrics, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + "maxRanking=" + global::System.Uri.EscapeDataString(maxRanking.ToString()) + + "&" + + "dateTimeBegin=" + dateTimeBegin.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + + "&" + + "dateTimeEnd=" + dateTimeEnd.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + + "&" + + (null != customDomains && customDomains.Length > 0 ? "customDomains=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(customDomains, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LogAnalyticsGetLogAnalyticsRankings_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get log analytics ranking report for AFD profile + /// + /// + /// + /// + /// + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LogAnalyticsGetLogAnalyticsRankingsViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking[] rankings, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric[] metrics, int maxRanking, global::System.DateTime dateTimeBegin, global::System.DateTime dateTimeEnd, string[] customDomains, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/getLogAnalyticsRankings$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsRankings'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/getLogAnalyticsRankings" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null != rankings && rankings.Length > 0 ? "rankings=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(rankings, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + (null != metrics && metrics.Length > 0 ? "metrics=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(metrics, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + "maxRanking=" + global::System.Uri.EscapeDataString(maxRanking.ToString()) + + "&" + + "dateTimeBegin=" + dateTimeBegin.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + + "&" + + "dateTimeEnd=" + dateTimeEnd.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + + "&" + + (null != customDomains && customDomains.Length > 0 ? "customDomains=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(customDomains, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LogAnalyticsGetLogAnalyticsRankings_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LogAnalyticsGetLogAnalyticsRankings_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RankingsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. which is unique within the resource group. + /// + /// + /// + /// + /// + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LogAnalyticsGetLogAnalyticsRankings_Validate(string subscriptionId, string resourceGroupName, string profileName, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking[] rankings, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric[] metrics, int maxRanking, global::System.DateTime dateTimeBegin, global::System.DateTime dateTimeEnd, string[] customDomains, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(rankings), rankings); + if (rankings != null ) { + for (int __i = 0; __i < rankings.Length; __i++) { + await eventListener.AssertEnum($"rankings[{__i}]",rankings[__i],@"url", @"referrer", @"browser", @"userAgent", @"countryOrRegion"); + } + } + await eventListener.AssertNotNull(nameof(metrics), metrics); + if (metrics != null ) { + for (int __i = 0; __i < metrics.Length; __i++) { + await eventListener.AssertEnum($"metrics[{__i}]",metrics[__i],@"clientRequestCount", @"clientRequestTraffic", @"hitCount", @"missCount", @"userErrorCount", @"errorCount"); + } + } + } + } + + /// Get all endpoints and custom domains available for AFD log report + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. which is unique within the resource group. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LogAnalyticsGetLogAnalyticsResources(string subscriptionId, string resourceGroupName, string profileName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/getLogAnalyticsResources" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LogAnalyticsGetLogAnalyticsResources_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get all endpoints and custom domains available for AFD log report + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LogAnalyticsGetLogAnalyticsResourcesViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/getLogAnalyticsResources$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsResources'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/getLogAnalyticsResources" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LogAnalyticsGetLogAnalyticsResources_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LogAnalyticsGetLogAnalyticsResources_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourcesResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. which is unique within the resource group. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LogAnalyticsGetLogAnalyticsResources_Validate(string subscriptionId, string resourceGroupName, string profileName, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + } + } + + /// Get Waf related log analytics report for AFD profile. + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. which is unique within the resource group. + /// + /// + /// + /// + /// + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LogAnalyticsGetWafLogAnalyticsMetrics(string subscriptionId, string resourceGroupName, string profileName, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric[] metrics, global::System.DateTime dateTimeBegin, global::System.DateTime dateTimeEnd, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity granularity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction[] actions, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy[] groupBy, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType[] ruleTypes, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/getWafLogAnalyticsMetrics" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null != metrics && metrics.Length > 0 ? "metrics=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(metrics, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + "dateTimeBegin=" + dateTimeBegin.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + + "&" + + "dateTimeEnd=" + dateTimeEnd.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + + "&" + + "granularity=" + global::System.Uri.EscapeDataString(granularity) + + "&" + + (null != actions && actions.Length > 0 ? "actions=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(actions, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + (null != groupBy && groupBy.Length > 0 ? "groupBy=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(groupBy, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + (null != ruleTypes && ruleTypes.Length > 0 ? "ruleTypes=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(ruleTypes, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LogAnalyticsGetWafLogAnalyticsMetrics_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get Waf related log analytics report for AFD profile. + /// + /// + /// + /// + /// + /// + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LogAnalyticsGetWafLogAnalyticsMetricsViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric[] metrics, global::System.DateTime dateTimeBegin, global::System.DateTime dateTimeEnd, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity granularity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction[] actions, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy[] groupBy, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType[] ruleTypes, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/getWafLogAnalyticsMetrics$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getWafLogAnalyticsMetrics'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/getWafLogAnalyticsMetrics" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null != metrics && metrics.Length > 0 ? "metrics=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(metrics, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + "dateTimeBegin=" + dateTimeBegin.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + + "&" + + "dateTimeEnd=" + dateTimeEnd.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + + "&" + + "granularity=" + global::System.Uri.EscapeDataString(granularity) + + "&" + + (null != actions && actions.Length > 0 ? "actions=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(actions, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + (null != groupBy && groupBy.Length > 0 ? "groupBy=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(groupBy, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + (null != ruleTypes && ruleTypes.Length > 0 ? "ruleTypes=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(ruleTypes, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LogAnalyticsGetWafLogAnalyticsMetrics_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LogAnalyticsGetWafLogAnalyticsMetrics_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafMetricsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. which is unique within the resource group. + /// + /// + /// + /// + /// + /// + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LogAnalyticsGetWafLogAnalyticsMetrics_Validate(string subscriptionId, string resourceGroupName, string profileName, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric[] metrics, global::System.DateTime dateTimeBegin, global::System.DateTime dateTimeEnd, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity granularity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction[] actions, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy[] groupBy, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType[] ruleTypes, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(metrics), metrics); + if (metrics != null ) { + for (int __i = 0; __i < metrics.Length; __i++) { + await eventListener.AssertEnum($"metrics[{__i}]",metrics[__i],@"clientRequestCount"); + } + } + await eventListener.AssertNotNull(nameof(granularity),granularity); + await eventListener.AssertEnum(nameof(granularity),granularity,@"PT5M", @"PT1H", @"P1D"); + if (actions != null ) { + for (int __i = 0; __i < actions.Length; __i++) { + await eventListener.AssertEnum($"actions[{__i}]",actions[__i],@"allow", @"block", @"log", @"redirect"); + } + } + if (groupBy != null ) { + for (int __i = 0; __i < groupBy.Length; __i++) { + await eventListener.AssertEnum($"groupBy[{__i}]",groupBy[__i],@"httpStatusCode", @"customDomain"); + } + } + if (ruleTypes != null ) { + for (int __i = 0; __i < ruleTypes.Length; __i++) { + await eventListener.AssertEnum($"ruleTypes[{__i}]",ruleTypes[__i],@"managed", @"custom", @"bot"); + } + } + } + } + + /// Get WAF log analytics charts for AFD profile + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. which is unique within the resource group. + /// + /// + /// + /// + /// + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LogAnalyticsGetWafLogAnalyticsRankings(string subscriptionId, string resourceGroupName, string profileName, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric[] metrics, global::System.DateTime dateTimeBegin, global::System.DateTime dateTimeEnd, int maxRanking, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType[] rankings, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction[] actions, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType[] ruleTypes, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/getWafLogAnalyticsRankings" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null != metrics && metrics.Length > 0 ? "metrics=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(metrics, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + "dateTimeBegin=" + dateTimeBegin.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + + "&" + + "dateTimeEnd=" + dateTimeEnd.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + + "&" + + "maxRanking=" + global::System.Uri.EscapeDataString(maxRanking.ToString()) + + "&" + + (null != rankings && rankings.Length > 0 ? "rankings=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(rankings, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + (null != actions && actions.Length > 0 ? "actions=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(actions, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + (null != ruleTypes && ruleTypes.Length > 0 ? "ruleTypes=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(ruleTypes, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LogAnalyticsGetWafLogAnalyticsRankings_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get WAF log analytics charts for AFD profile + /// + /// + /// + /// + /// + /// + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task LogAnalyticsGetWafLogAnalyticsRankingsViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric[] metrics, global::System.DateTime dateTimeBegin, global::System.DateTime dateTimeEnd, int maxRanking, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType[] rankings, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction[] actions, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType[] ruleTypes, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/getWafLogAnalyticsRankings$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getWafLogAnalyticsRankings'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/getWafLogAnalyticsRankings" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null != metrics && metrics.Length > 0 ? "metrics=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(metrics, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + "dateTimeBegin=" + dateTimeBegin.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + + "&" + + "dateTimeEnd=" + dateTimeEnd.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + + "&" + + "maxRanking=" + global::System.Uri.EscapeDataString(maxRanking.ToString()) + + "&" + + (null != rankings && rankings.Length > 0 ? "rankings=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(rankings, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + (null != actions && actions.Length > 0 ? "actions=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(actions, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + + "&" + + (null != ruleTypes && ruleTypes.Length > 0 ? "ruleTypes=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(ruleTypes, (current, each) => current + "," + ( global::System.Uri.EscapeDataString(null == each ? global::System.String.Empty : each.ToString()) ))) : global::System.String.Empty) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.LogAnalyticsGetWafLogAnalyticsRankings_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LogAnalyticsGetWafLogAnalyticsRankings_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafRankingsResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. which is unique within the resource group. + /// + /// + /// + /// + /// + /// + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task LogAnalyticsGetWafLogAnalyticsRankings_Validate(string subscriptionId, string resourceGroupName, string profileName, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric[] metrics, global::System.DateTime dateTimeBegin, global::System.DateTime dateTimeEnd, int maxRanking, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType[] rankings, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction[] actions, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType[] ruleTypes, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(metrics), metrics); + if (metrics != null ) { + for (int __i = 0; __i < metrics.Length; __i++) { + await eventListener.AssertEnum($"metrics[{__i}]",metrics[__i],@"clientRequestCount"); + } + } + await eventListener.AssertNotNull(nameof(rankings), rankings); + if (rankings != null ) { + for (int __i = 0; __i < rankings.Length; __i++) { + await eventListener.AssertEnum($"rankings[{__i}]",rankings[__i],@"action", @"ruleGroup", @"ruleId", @"userAgent", @"clientIp", @"url", @"countryOrRegion", @"ruleType"); + } + } + if (actions != null ) { + for (int __i = 0; __i < actions.Length; __i++) { + await eventListener.AssertEnum($"actions[{__i}]",actions[__i],@"allow", @"block", @"log", @"redirect"); + } + } + if (ruleTypes != null ) { + for (int __i = 0; __i < ruleTypes.Length; __i++) { + await eventListener.AssertEnum($"ruleTypes[{__i}]",ruleTypes[__i],@"managed", @"custom", @"bot"); + } + } + } + } + + /// Lists all of the available CDN REST API operations. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Cdn/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the available CDN REST API operations. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.Cdn/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.Cdn/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.Cdn/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OperationsListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + + } + } + + /// Creates a new origin group within the specified endpoint. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the origin group which is unique within the endpoint. + /// Azure Subscription ID. + /// Origin group properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginGroupsCreate(string resourceGroupName, string profileName, string endpointName, string originGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/originGroups/" + + global::System.Uri.EscapeDataString(originGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginGroupsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Creates a new origin group within the specified endpoint. + /// + /// Origin group properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginGroupsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)/originGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var originGroupName = _match.Groups["originGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/originGroups/" + + originGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginGroupsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginGroupsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the origin group which is unique within the endpoint. + /// Azure Subscription ID. + /// Origin group properties + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginGroupsCreate_Validate(string resourceGroupName, string profileName, string endpointName, string originGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(originGroupName),originGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes an existing origin group within an endpoint. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the origin group which is unique within the endpoint. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginGroupsDelete(string resourceGroupName, string profileName, string endpointName, string originGroupName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/originGroups/" + + global::System.Uri.EscapeDataString(originGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginGroupsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes an existing origin group within an endpoint. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginGroupsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)/originGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var originGroupName = _match.Groups["originGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/originGroups/" + + originGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginGroupsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginGroupsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the origin group which is unique within the endpoint. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginGroupsDelete_Validate(string resourceGroupName, string profileName, string endpointName, string originGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(originGroupName),originGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Gets an existing origin group within an endpoint. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the origin group which is unique within the endpoint. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginGroupsGet(string resourceGroupName, string profileName, string endpointName, string originGroupName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/originGroups/" + + global::System.Uri.EscapeDataString(originGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginGroupsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets an existing origin group within an endpoint. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginGroupsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)/originGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var originGroupName = _match.Groups["originGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/originGroups/" + + originGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginGroupsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginGroupsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the origin group which is unique within the endpoint. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginGroupsGet_Validate(string resourceGroupName, string profileName, string endpointName, string originGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(originGroupName),originGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Lists all of the existing origin groups within an endpoint. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginGroupsListByEndpoint(string resourceGroupName, string profileName, string endpointName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/originGroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginGroupsListByEndpoint_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the existing origin groups within an endpoint. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginGroupsListByEndpointViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)/originGroups$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/originGroups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginGroupsListByEndpoint_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginGroupsListByEndpoint_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginGroupsListByEndpoint_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Updates an existing origin group within an endpoint. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the origin group which is unique within the endpoint. + /// Azure Subscription ID. + /// Origin group properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginGroupsUpdate(string resourceGroupName, string profileName, string endpointName, string originGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/originGroups/" + + global::System.Uri.EscapeDataString(originGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginGroupsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates an existing origin group within an endpoint. + /// + /// Origin group properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginGroupsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)/originGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var originGroupName = _match.Groups["originGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/originGroups/" + + originGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginGroupsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginGroupsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the origin group which is unique within the endpoint. + /// Azure Subscription ID. + /// Origin group properties + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginGroupsUpdate_Validate(string resourceGroupName, string profileName, string endpointName, string originGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(originGroupName),originGroupName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Creates a new origin within the specified endpoint. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the origin that is unique within the endpoint. + /// Azure Subscription ID. + /// Origin properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginsCreate(string resourceGroupName, string profileName, string endpointName, string originName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/origins/" + + global::System.Uri.EscapeDataString(originName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Creates a new origin within the specified endpoint. + /// + /// Origin properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)/origins/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var originName = _match.Groups["originName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/origins/" + + originName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Origin.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the origin that is unique within the endpoint. + /// Azure Subscription ID. + /// Origin properties + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginsCreate_Validate(string resourceGroupName, string profileName, string endpointName, string originName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(originName),originName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes an existing origin within an endpoint. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the origin which is unique within the endpoint. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginsDelete(string resourceGroupName, string profileName, string endpointName, string originName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/origins/" + + global::System.Uri.EscapeDataString(originName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes an existing origin within an endpoint. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)/origins/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var originName = _match.Groups["originName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/origins/" + + originName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the origin which is unique within the endpoint. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginsDelete_Validate(string resourceGroupName, string profileName, string endpointName, string originName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(originName),originName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Gets an existing origin within an endpoint. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the origin which is unique within the endpoint. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginsGet(string resourceGroupName, string profileName, string endpointName, string originName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/origins/" + + global::System.Uri.EscapeDataString(originName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets an existing origin within an endpoint. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)/origins/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var originName = _match.Groups["originName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/origins/" + + originName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Origin.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the origin which is unique within the endpoint. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginsGet_Validate(string resourceGroupName, string profileName, string endpointName, string originName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(originName),originName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Lists all of the existing origins within an endpoint. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginsListByEndpoint(string resourceGroupName, string profileName, string endpointName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/origins" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginsListByEndpoint_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the existing origins within an endpoint. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginsListByEndpointViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)/origins$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/origins" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginsListByEndpoint_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginsListByEndpoint_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginsListByEndpoint_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Updates an existing origin within an endpoint. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the origin which is unique within the endpoint. + /// Azure Subscription ID. + /// Origin properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginsUpdate(string resourceGroupName, string profileName, string endpointName, string originName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/origins/" + + global::System.Uri.EscapeDataString(originName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates an existing origin within an endpoint. + /// + /// Origin properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OriginsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/endpoints/(?[^/]+)/origins/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var originName = _match.Groups["originName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/endpoints/" + + endpointName + + "/origins/" + + originName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OriginsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Origin.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the origin which is unique within the endpoint. + /// Azure Subscription ID. + /// Origin properties + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OriginsUpdate_Validate(string resourceGroupName, string profileName, string endpointName, string originName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(originName),originName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// 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. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique + /// within the resource group. + /// Azure Subscription ID. + /// Profile properties needed to create a new profile. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProfilesCreate(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProfilesCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// 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. + /// + /// + /// Profile properties needed to create a new profile. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProfilesCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProfilesCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProfilesCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Profile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique + /// within the resource group. + /// Azure Subscription ID. + /// Profile properties needed to create a new profile. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProfilesCreate_Validate(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// 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. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique + /// within the resource group. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProfilesDelete(string resourceGroupName, string profileName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProfilesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// 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. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProfilesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProfilesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProfilesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique + /// within the resource group. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProfilesDelete_Validate(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// 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. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProfilesGenerateSsoUri(string resourceGroupName, string profileName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/generateSsoUri" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProfilesGenerateSsoUri_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// 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. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProfilesGenerateSsoUriViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/generateSsoUri" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProfilesGenerateSsoUri_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProfilesGenerateSsoUri_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SsoUri.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProfilesGenerateSsoUri_Validate(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the + /// specified subscription and resource group. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique + /// within the resource group. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProfilesGet(string resourceGroupName, string profileName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProfilesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the + /// specified subscription and resource group. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProfilesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProfilesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProfilesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Profile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique + /// within the resource group. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProfilesGet_Validate(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure subscription. + /// + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProfilesList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Cdn/profiles" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProfilesList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group. + /// + /// Name of the Resource group within the Azure subscription. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProfilesListByResourceGroup(string resourceGroupName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProfilesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProfilesListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProfilesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProfilesListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProfilesListByResourceGroup_Validate(string resourceGroupName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door Premium or + /// CDN profile. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique + /// within the resource group. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProfilesListResourceUsage(string resourceGroupName, string profileName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/checkResourceUsage" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProfilesListResourceUsage_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door Premium or + /// CDN profile. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProfilesListResourceUsageViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkResourceUsage'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/checkResourceUsage" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProfilesListResourceUsage_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProfilesListResourceUsage_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceUsageListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique + /// within the resource group. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProfilesListResourceUsage_Validate(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization type + /// from the listed values. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique + /// within the resource group. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProfilesListSupportedOptimizationTypes(string resourceGroupName, string profileName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/getSupportedOptimizationTypes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProfilesListSupportedOptimizationTypes_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization type + /// from the listed values. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProfilesListSupportedOptimizationTypesViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getSupportedOptimizationTypes'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/getSupportedOptimizationTypes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProfilesListSupportedOptimizationTypes_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProfilesListSupportedOptimizationTypes_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SupportedOptimizationTypesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique + /// within the resource group. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProfilesListSupportedOptimizationTypes_Validate(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure subscription. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProfilesListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Cdn/profiles$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/profiles'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.Cdn/profiles" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProfilesList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProfilesList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProfilesList_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// 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. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique + /// within the resource group. + /// Azure Subscription ID. + /// Profile properties needed to update an existing profile. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProfilesUpdate(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProfilesUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// 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. + /// + /// + /// Profile properties needed to update an existing profile. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ProfilesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProfilesUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProfilesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Profile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique + /// within the resource group. + /// Azure Subscription ID. + /// Profile properties needed to update an existing profile. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ProfilesUpdate_Validate(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Check the quota and actual usage of the CDN profiles under the given subscription. + /// + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ResourceUsageList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Cdn/checkResourceUsage" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ResourceUsageList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Check the quota and actual usage of the CDN profiles under the given subscription. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ResourceUsageListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Cdn$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkResourceUsage'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.Cdn/checkResourceUsage" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ResourceUsageList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ResourceUsageList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceUsageListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ResourceUsageList_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor + /// endpoint. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the routing rule. + /// Azure Subscription ID. + /// Route properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RoutesCreate(string resourceGroupName, string profileName, string endpointName, string routeName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/afdEndpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/routes/" + + global::System.Uri.EscapeDataString(routeName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RoutesCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor + /// endpoint. + /// + /// + /// Route properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RoutesCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/afdEndpoints/(?[^/]+)/routes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var routeName = _match.Groups["routeName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/afdEndpoints/" + + endpointName + + "/routes/" + + routeName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RoutesCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RoutesCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Route.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the routing rule. + /// Azure Subscription ID. + /// Route properties + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RoutesCreate_Validate(string resourceGroupName, string profileName, string endpointName, string routeName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(routeName),routeName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and + /// AzureFrontDoor endpoint. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the routing rule. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RoutesDelete(string resourceGroupName, string profileName, string endpointName, string routeName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/afdEndpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/routes/" + + global::System.Uri.EscapeDataString(routeName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RoutesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and + /// AzureFrontDoor endpoint. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RoutesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/afdEndpoints/(?[^/]+)/routes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var routeName = _match.Groups["routeName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/afdEndpoints/" + + endpointName + + "/routes/" + + routeName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RoutesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RoutesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the routing rule. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RoutesDelete_Validate(string resourceGroupName, string profileName, string endpointName, string routeName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(routeName),routeName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor + /// endpoint. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the routing rule. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RoutesGet(string resourceGroupName, string profileName, string endpointName, string routeName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/afdEndpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/routes/" + + global::System.Uri.EscapeDataString(routeName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RoutesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor + /// endpoint. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RoutesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/afdEndpoints/(?[^/]+)/routes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var routeName = _match.Groups["routeName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/afdEndpoints/" + + endpointName + + "/routes/" + + routeName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RoutesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RoutesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Route.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the routing rule. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RoutesGet_Validate(string resourceGroupName, string profileName, string endpointName, string routeName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(routeName),routeName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Lists all of the existing origins within a profile. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RoutesListByEndpoint(string resourceGroupName, string profileName, string endpointName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/afdEndpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/routes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RoutesListByEndpoint_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the existing origins within a profile. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RoutesListByEndpointViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/afdEndpoints/(?[^/]+)/routes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/afdEndpoints/" + + endpointName + + "/routes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RoutesListByEndpoint_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RoutesListByEndpoint_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RoutesListByEndpoint_Validate(string resourceGroupName, string profileName, string endpointName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Updates an existing route with the specified route name under the specified subscription, resource group, profile, and + /// AzureFrontDoor endpoint. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the routing rule. + /// Azure Subscription ID. + /// Route update properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RoutesUpdate(string resourceGroupName, string profileName, string endpointName, string routeName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/afdEndpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "/routes/" + + global::System.Uri.EscapeDataString(routeName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RoutesUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Updates an existing route with the specified route name under the specified subscription, resource group, profile, and + /// AzureFrontDoor endpoint. + /// + /// + /// Route update properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RoutesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/afdEndpoints/(?[^/]+)/routes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + var routeName = _match.Groups["routeName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/afdEndpoints/" + + endpointName + + "/routes/" + + routeName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RoutesUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RoutesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Route.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the endpoint under the profile which is unique globally. + /// Name of the routing rule. + /// Azure Subscription ID. + /// Route update properties + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RoutesUpdate_Validate(string resourceGroupName, string profileName, string endpointName, string routeName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(routeName),routeName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Creates a new rule set within the specified profile. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the rule set under the profile which is unique globally + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RuleSetsCreate(string resourceGroupName, string profileName, string ruleSetName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/ruleSets/" + + global::System.Uri.EscapeDataString(ruleSetName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RuleSetsCreate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Creates a new rule set within the specified profile. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RuleSetsCreateViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/ruleSets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var ruleSetName = _match.Groups["ruleSetName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/ruleSets/" + + ruleSetName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RuleSetsCreate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RuleSetsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the rule set under the profile which is unique globally + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RuleSetsCreate_Validate(string resourceGroupName, string profileName, string ruleSetName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(ruleSetName),ruleSetName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource + /// group and profile. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the rule set under the profile which is unique globally. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RuleSetsDelete(string resourceGroupName, string profileName, string ruleSetName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/ruleSets/" + + global::System.Uri.EscapeDataString(ruleSetName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RuleSetsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource + /// group and profile. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RuleSetsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/ruleSets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var ruleSetName = _match.Groups["ruleSetName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/ruleSets/" + + ruleSetName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RuleSetsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RuleSetsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the rule set under the profile which is unique globally. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RuleSetsDelete_Validate(string resourceGroupName, string profileName, string ruleSetName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(ruleSetName),ruleSetName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group + /// and profile. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the rule set under the profile which is unique globally. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RuleSetsGet(string resourceGroupName, string profileName, string ruleSetName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/ruleSets/" + + global::System.Uri.EscapeDataString(ruleSetName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RuleSetsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group + /// and profile. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RuleSetsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/ruleSets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var ruleSetName = _match.Groups["ruleSetName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/ruleSets/" + + ruleSetName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RuleSetsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RuleSetsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the rule set under the profile which is unique globally. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RuleSetsGet_Validate(string resourceGroupName, string profileName, string ruleSetName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(ruleSetName),ruleSetName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Lists existing AzureFrontDoor rule sets within a profile. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RuleSetsListByProfile(string resourceGroupName, string profileName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/ruleSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RuleSetsListByProfile_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists existing AzureFrontDoor rule sets within a profile. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RuleSetsListByProfileViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/ruleSets$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/ruleSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RuleSetsListByProfile_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RuleSetsListByProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleSetListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RuleSetsListByProfile_Validate(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// + /// Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the rule set under the profile which is unique globally. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RuleSetsListResourceUsage(string resourceGroupName, string profileName, string ruleSetName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/ruleSets/" + + global::System.Uri.EscapeDataString(ruleSetName) + + "/usages" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RuleSetsListResourceUsage_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RuleSetsListResourceUsageViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/ruleSets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/usages'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var ruleSetName = _match.Groups["ruleSetName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/ruleSets/" + + ruleSetName + + "/usages" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RuleSetsListResourceUsage_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RuleSetsListResourceUsage_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UsagesListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the rule set under the profile which is unique globally. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RuleSetsListResourceUsage_Validate(string resourceGroupName, string profileName, string ruleSetName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(ruleSetName),ruleSetName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Creates a new delivery rule within the specified rule set. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the rule set under the profile. + /// Name of the delivery rule which is unique within the endpoint. + /// Azure Subscription ID. + /// The delivery rule properties. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RulesCreate(string resourceGroupName, string profileName, string ruleSetName, string ruleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/ruleSets/" + + global::System.Uri.EscapeDataString(ruleSetName) + + "/rules/" + + global::System.Uri.EscapeDataString(ruleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RulesCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Creates a new delivery rule within the specified rule set. + /// + /// The delivery rule properties. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RulesCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/ruleSets/(?[^/]+)/rules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var ruleSetName = _match.Groups["ruleSetName"].Value; + var ruleName = _match.Groups["ruleName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/ruleSets/" + + ruleSetName + + "/rules/" + + ruleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RulesCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RulesCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Rule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the rule set under the profile. + /// Name of the delivery rule which is unique within the endpoint. + /// Azure Subscription ID. + /// The delivery rule properties. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RulesCreate_Validate(string resourceGroupName, string profileName, string ruleSetName, string ruleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(ruleSetName),ruleSetName); + await eventListener.AssertNotNull(nameof(ruleName),ruleName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes an existing delivery rule within a rule set. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the rule set under the profile. + /// Name of the delivery rule which is unique within the endpoint. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RulesDelete(string resourceGroupName, string profileName, string ruleSetName, string ruleName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/ruleSets/" + + global::System.Uri.EscapeDataString(ruleSetName) + + "/rules/" + + global::System.Uri.EscapeDataString(ruleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RulesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes an existing delivery rule within a rule set. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RulesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/ruleSets/(?[^/]+)/rules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var ruleSetName = _match.Groups["ruleSetName"].Value; + var ruleName = _match.Groups["ruleName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/ruleSets/" + + ruleSetName + + "/rules/" + + ruleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RulesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RulesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the rule set under the profile. + /// Name of the delivery rule which is unique within the endpoint. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RulesDelete_Validate(string resourceGroupName, string profileName, string ruleSetName, string ruleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(ruleSetName),ruleSetName); + await eventListener.AssertNotNull(nameof(ruleName),ruleName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Gets an existing delivery rule within a rule set. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the rule set under the profile. + /// Name of the delivery rule which is unique within the endpoint. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RulesGet(string resourceGroupName, string profileName, string ruleSetName, string ruleName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/ruleSets/" + + global::System.Uri.EscapeDataString(ruleSetName) + + "/rules/" + + global::System.Uri.EscapeDataString(ruleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RulesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets an existing delivery rule within a rule set. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RulesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/ruleSets/(?[^/]+)/rules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var ruleSetName = _match.Groups["ruleSetName"].Value; + var ruleName = _match.Groups["ruleName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/ruleSets/" + + ruleSetName + + "/rules/" + + ruleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RulesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RulesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Rule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the rule set under the profile. + /// Name of the delivery rule which is unique within the endpoint. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RulesGet_Validate(string resourceGroupName, string profileName, string ruleSetName, string ruleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(ruleSetName),ruleSetName); + await eventListener.AssertNotNull(nameof(ruleName),ruleName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Lists all of the existing delivery rules within a rule set. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the rule set under the profile. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RulesListByRuleSet(string resourceGroupName, string profileName, string ruleSetName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/ruleSets/" + + global::System.Uri.EscapeDataString(ruleSetName) + + "/rules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RulesListByRuleSet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the existing delivery rules within a rule set. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RulesListByRuleSetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/ruleSets/(?[^/]+)/rules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var ruleSetName = _match.Groups["ruleSetName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/ruleSets/" + + ruleSetName + + "/rules" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RulesListByRuleSet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RulesListByRuleSet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the rule set under the profile. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RulesListByRuleSet_Validate(string resourceGroupName, string profileName, string ruleSetName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(ruleSetName),ruleSetName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Updates an existing delivery rule within a rule set. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the rule set under the profile. + /// Name of the delivery rule which is unique within the endpoint. + /// Azure Subscription ID. + /// Delivery rule properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RulesUpdate(string resourceGroupName, string profileName, string ruleSetName, string ruleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/ruleSets/" + + global::System.Uri.EscapeDataString(ruleSetName) + + "/rules/" + + global::System.Uri.EscapeDataString(ruleName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RulesUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates an existing delivery rule within a rule set. + /// + /// Delivery rule properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task RulesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/ruleSets/(?[^/]+)/rules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var ruleSetName = _match.Groups["ruleSetName"].Value; + var ruleName = _match.Groups["ruleName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/ruleSets/" + + ruleSetName + + "/rules/" + + ruleName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.RulesUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RulesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Rule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the rule set under the profile. + /// Name of the delivery rule which is unique within the endpoint. + /// Azure Subscription ID. + /// Delivery rule properties + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task RulesUpdate_Validate(string resourceGroupName, string profileName, string ruleSetName, string ruleName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(ruleSetName),ruleSetName); + await eventListener.AssertNotNull(nameof(ruleName),ruleName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Creates a new Secret within the specified profile. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the Secret under the profile. + /// Azure Subscription ID. + /// The Secret properties. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecretsCreate(string resourceGroupName, string profileName, string secretName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/secrets/" + + global::System.Uri.EscapeDataString(secretName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecretsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Creates a new Secret within the specified profile. + /// + /// The Secret properties. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecretsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/secrets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var secretName = _match.Groups["secretName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/secrets/" + + secretName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecretsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecretsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Secret.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the Secret under the profile. + /// Azure Subscription ID. + /// The Secret properties. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecretsCreate_Validate(string resourceGroupName, string profileName, string secretName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(secretName),secretName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes an existing Secret within profile. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the Secret under the profile. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecretsDelete(string resourceGroupName, string profileName, string secretName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/secrets/" + + global::System.Uri.EscapeDataString(secretName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecretsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes an existing Secret within profile. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecretsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/secrets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var secretName = _match.Groups["secretName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/secrets/" + + secretName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecretsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecretsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the Secret under the profile. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecretsDelete_Validate(string resourceGroupName, string profileName, string secretName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(secretName),secretName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Gets an existing Secret within a profile. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the Secret under the profile. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecretsGet(string resourceGroupName, string profileName, string secretName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/secrets/" + + global::System.Uri.EscapeDataString(secretName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecretsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets an existing Secret within a profile. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecretsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/secrets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var secretName = _match.Groups["secretName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/secrets/" + + secretName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecretsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecretsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Secret.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the Secret under the profile. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecretsGet_Validate(string resourceGroupName, string profileName, string secretName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(secretName),secretName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Lists existing AzureFrontDoor secrets. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecretsListByProfile(string resourceGroupName, string profileName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/secrets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecretsListByProfile_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists existing AzureFrontDoor secrets. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecretsListByProfileViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/secrets$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/secrets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecretsListByProfile_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecretsListByProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecretsListByProfile_Validate(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Creates a new security policy within the specified profile. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the security policy under the profile. + /// Azure Subscription ID. + /// The security policy properties. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecurityPoliciesCreate(string resourceGroupName, string profileName, string securityPolicyName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/securityPolicies/" + + global::System.Uri.EscapeDataString(securityPolicyName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecurityPoliciesCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Creates a new security policy within the specified profile. + /// + /// The security policy properties. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecurityPoliciesCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/securityPolicies/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var securityPolicyName = _match.Groups["securityPolicyName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/securityPolicies/" + + securityPolicyName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecurityPoliciesCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecurityPoliciesCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicy.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the security policy under the profile. + /// Azure Subscription ID. + /// The security policy properties. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecurityPoliciesCreate_Validate(string resourceGroupName, string profileName, string securityPolicyName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(securityPolicyName),securityPolicyName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes an existing security policy within profile. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the security policy under the profile. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecurityPoliciesDelete(string resourceGroupName, string profileName, string securityPolicyName, string subscriptionId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/securityPolicies/" + + global::System.Uri.EscapeDataString(securityPolicyName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecurityPoliciesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes an existing security policy within profile. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecurityPoliciesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/securityPolicies/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var securityPolicyName = _match.Groups["securityPolicyName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/securityPolicies/" + + securityPolicyName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecurityPoliciesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecurityPoliciesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the security policy under the profile. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecurityPoliciesDelete_Validate(string resourceGroupName, string profileName, string securityPolicyName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(securityPolicyName),securityPolicyName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Gets an existing security policy within a profile. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the security policy under the profile. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecurityPoliciesGet(string resourceGroupName, string profileName, string securityPolicyName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/securityPolicies/" + + global::System.Uri.EscapeDataString(securityPolicyName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecurityPoliciesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets an existing security policy within a profile. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecurityPoliciesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/securityPolicies/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var securityPolicyName = _match.Groups["securityPolicyName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/securityPolicies/" + + securityPolicyName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecurityPoliciesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecurityPoliciesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicy.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the security policy under the profile. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecurityPoliciesGet_Validate(string resourceGroupName, string profileName, string securityPolicyName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(securityPolicyName),securityPolicyName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Lists security policies associated with the profile + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Azure Subscription ID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecurityPoliciesListByProfile(string resourceGroupName, string profileName, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/securityPolicies" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecurityPoliciesListByProfile_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists security policies associated with the profile + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecurityPoliciesListByProfileViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/securityPolicies$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/securityPolicies" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecurityPoliciesListByProfile_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecurityPoliciesListByProfile_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Azure Subscription ID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecurityPoliciesListByProfile_Validate(string resourceGroupName, string profileName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + } + } + + /// Updates an existing security policy within a profile. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the security policy under the profile. + /// Azure Subscription ID. + /// Security policy update properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecurityPoliciesPatch(string resourceGroupName, string profileName, string securityPolicyName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Cdn/profiles/" + + global::System.Uri.EscapeDataString(profileName) + + "/securityPolicies/" + + global::System.Uri.EscapeDataString(securityPolicyName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecurityPoliciesPatch_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Updates an existing security policy within a profile. + /// + /// Security policy update properties + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SecurityPoliciesPatchViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Cdn/profiles/(?[^/]+)/securityPolicies/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}'"); + } + + // replace URI parameters with values from identity + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var profileName = _match.Groups["profileName"].Value; + var securityPolicyName = _match.Groups["securityPolicyName"].Value; + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Cdn/profiles/" + + profileName + + "/securityPolicies/" + + securityPolicyName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SecurityPoliciesPatch_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecurityPoliciesPatch_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicy.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within + /// the resource group. + /// Name of the security policy under the profile. + /// Azure Subscription ID. + /// Security policy update properties + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SecurityPoliciesPatch_Validate(string resourceGroupName, string profileName, string securityPolicyName, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(profileName),profileName); + await eventListener.AssertNotNull(nameof(securityPolicyName),securityPolicyName); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Check if the probe path is a valid path and the file can be accessed. Probe path is the path to a file hosted on the origin + /// server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative to the origin path + /// specified in the endpoint configuration. + /// + /// Azure Subscription ID. + /// Input to check. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ValidateProbe(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Cdn/validateProbe" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ValidateProbe_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Check if the probe path is a valid path and the file can be accessed. Probe path is the path to a file hosted on the origin + /// server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative to the origin path + /// specified in the endpoint configuration. + /// + /// + /// Input to check. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ValidateProbeViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Cdn$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateProbe'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.Cdn/validateProbe" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ValidateProbe_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ValidateProbe_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateProbeOutput.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Azure Subscription ID. + /// Input to check. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ValidateProbe_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInput body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Validate a Secret in the profile. + /// Azure Subscription ID. + /// The Secret source. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ValidateSecret(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.Cdn/validateSecret" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ValidateSecret_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Validate a Secret in the profile. + /// + /// The Secret source. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ValidateSecretViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + var apiVersion = @"2021-06-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.Cdn$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateSecret'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.Cdn/validateSecret" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ValidateSecret_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ValidateSecret_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateSecretOutput.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// Azure Subscription ID. + /// The Secret source. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ValidateSecret_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput body, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Any.PowerShell.cs b/src/Cdn/generated/api/Models/Any.PowerShell.cs new file mode 100644 index 000000000000..5e60506d0432 --- /dev/null +++ b/src/Cdn/generated/api/Models/Any.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Any object + [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] + public partial class Any + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Any(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Any(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IAny DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Any(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IAny DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Any(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IAny FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Any object + [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] + public partial interface IAny + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Any.TypeConverter.cs b/src/Cdn/generated/api/Models/Any.TypeConverter.cs new file mode 100644 index 000000000000..ce4dbe67e846 --- /dev/null +++ b/src/Cdn/generated/api/Models/Any.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AnyTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IAny ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IAny).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Any.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Any.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Any.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Any.cs b/src/Cdn/generated/api/Models/Any.cs new file mode 100644 index 000000000000..4369fc8fd66d --- /dev/null +++ b/src/Cdn/generated/api/Models/Any.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Any object + public partial class Any : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IAny, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IAnyInternal + { + + /// Creates an new instance. + public Any() + { + + } + } + /// Any object + public partial interface IAny : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + + } + /// Any object + internal partial interface IAnyInternal + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Any.json.cs b/src/Cdn/generated/api/Models/Any.json.cs new file mode 100644 index 000000000000..23f49b84801c --- /dev/null +++ b/src/Cdn/generated/api/Models/Any.json.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Any object + public partial class Any + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal Any(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IAny. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IAny. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new Any(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ActivatedResourceReference.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ActivatedResourceReference.PowerShell.cs new file mode 100644 index 000000000000..a2f3b78a56c8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ActivatedResourceReference.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Reference to another resource along with its state. + [System.ComponentModel.TypeConverter(typeof(ActivatedResourceReferenceTypeConverter))] + public partial class ActivatedResourceReference + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ActivatedResourceReference(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReferenceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReferenceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("IsActive")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReferenceInternal)this).IsActive = (bool?) content.GetValueForProperty("IsActive",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReferenceInternal)this).IsActive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ActivatedResourceReference(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReferenceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReferenceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("IsActive")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReferenceInternal)this).IsActive = (bool?) content.GetValueForProperty("IsActive",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReferenceInternal)this).IsActive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ActivatedResourceReference(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ActivatedResourceReference(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Reference to another resource along with its state. + [System.ComponentModel.TypeConverter(typeof(ActivatedResourceReferenceTypeConverter))] + public partial interface IActivatedResourceReference + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ActivatedResourceReference.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ActivatedResourceReference.TypeConverter.cs new file mode 100644 index 000000000000..e07982b7f8f6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ActivatedResourceReference.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ActivatedResourceReferenceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ActivatedResourceReference.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ActivatedResourceReference.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ActivatedResourceReference.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ActivatedResourceReference.cs b/src/Cdn/generated/api/Models/Api20210601/ActivatedResourceReference.cs new file mode 100644 index 000000000000..fb4b529ed9f5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ActivatedResourceReference.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Reference to another resource along with its state. + public partial class ActivatedResourceReference : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReferenceInternal + { + + /// Backing field for property. + private string _id; + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Backing field for property. + private bool? _isActive; + + /// Whether the resource is active or inactive + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? IsActive { get => this._isActive; } + + /// Internal Acessors for IsActive + bool? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReferenceInternal.IsActive { get => this._isActive; set { {_isActive = value;} } } + + /// Creates an new instance. + public ActivatedResourceReference() + { + + } + } + /// Reference to another resource along with its state. + public partial interface IActivatedResourceReference : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + /// Whether the resource is active or inactive + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Whether the resource is active or inactive", + SerializedName = @"isActive", + PossibleTypes = new [] { typeof(bool) })] + bool? IsActive { get; } + + } + /// Reference to another resource along with its state. + internal partial interface IActivatedResourceReferenceInternal + + { + /// Resource ID. + string Id { get; set; } + /// Whether the resource is active or inactive + bool? IsActive { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ActivatedResourceReference.json.cs b/src/Cdn/generated/api/Models/Api20210601/ActivatedResourceReference.json.cs new file mode 100644 index 000000000000..6bc7da96916c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ActivatedResourceReference.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Reference to another resource along with its state. + public partial class ActivatedResourceReference + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ActivatedResourceReference(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_isActive = If( json?.PropertyT("isActive"), out var __jsonIsActive) ? (bool?)__jsonIsActive : IsActive;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ActivatedResourceReference(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._isActive ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._isActive) : null, "isActive" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomain.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomain.PowerShell.cs new file mode 100644 index 000000000000..f3faa907d4e1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomain.PowerShell.cs @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + /// + [System.ComponentModel.TypeConverter(typeof(AfdDomainTypeConverter))] + public partial class AfdDomain + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdDomain(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("AzureDnsZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).AzureDnsZone = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AzureDnsZone",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).AzureDnsZone, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("PropertiesPreValidatedCustomDomainResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).PropertiesPreValidatedCustomDomainResourceId = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("PropertiesPreValidatedCustomDomainResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).PropertiesPreValidatedCustomDomainResourceId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("TlsSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).TlsSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters) content.GetValueForProperty("TlsSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).TlsSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainHttpsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("ValidationProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ValidationProperty = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties) content.GetValueForProperty("ValidationProperty",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ValidationProperty, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DomainValidationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("DomainValidationState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).DomainValidationState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState?) content.GetValueForProperty("DomainValidationState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).DomainValidationState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState.CreateFrom); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("AzureDnsZoneId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).AzureDnsZoneId = (string) content.GetValueForProperty("AzureDnsZoneId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).AzureDnsZoneId, global::System.Convert.ToString); + } + if (content.Contains("PropertiesPreValidatedCustomDomainResourceIdId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).PropertiesPreValidatedCustomDomainResourceIdId = (string) content.GetValueForProperty("PropertiesPreValidatedCustomDomainResourceIdId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).PropertiesPreValidatedCustomDomainResourceIdId, global::System.Convert.ToString); + } + if (content.Contains("ValidationPropertyValidationToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ValidationPropertyValidationToken = (string) content.GetValueForProperty("ValidationPropertyValidationToken",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ValidationPropertyValidationToken, global::System.Convert.ToString); + } + if (content.Contains("ValidationPropertyExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ValidationPropertyExpirationDate = (string) content.GetValueForProperty("ValidationPropertyExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ValidationPropertyExpirationDate, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdDomain(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("AzureDnsZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).AzureDnsZone = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AzureDnsZone",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).AzureDnsZone, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("PropertiesPreValidatedCustomDomainResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).PropertiesPreValidatedCustomDomainResourceId = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("PropertiesPreValidatedCustomDomainResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).PropertiesPreValidatedCustomDomainResourceId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("TlsSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).TlsSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters) content.GetValueForProperty("TlsSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).TlsSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainHttpsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("ValidationProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ValidationProperty = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties) content.GetValueForProperty("ValidationProperty",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ValidationProperty, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DomainValidationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("DomainValidationState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).DomainValidationState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState?) content.GetValueForProperty("DomainValidationState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).DomainValidationState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState.CreateFrom); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("AzureDnsZoneId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).AzureDnsZoneId = (string) content.GetValueForProperty("AzureDnsZoneId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).AzureDnsZoneId, global::System.Convert.ToString); + } + if (content.Contains("PropertiesPreValidatedCustomDomainResourceIdId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).PropertiesPreValidatedCustomDomainResourceIdId = (string) content.GetValueForProperty("PropertiesPreValidatedCustomDomainResourceIdId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).PropertiesPreValidatedCustomDomainResourceIdId, global::System.Convert.ToString); + } + if (content.Contains("ValidationPropertyValidationToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ValidationPropertyValidationToken = (string) content.GetValueForProperty("ValidationPropertyValidationToken",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ValidationPropertyValidationToken, global::System.Convert.ToString); + } + if (content.Contains("ValidationPropertyExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ValidationPropertyExpirationDate = (string) content.GetValueForProperty("ValidationPropertyExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal)this).ValidationPropertyExpirationDate, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdDomain(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdDomain(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + [System.ComponentModel.TypeConverter(typeof(AfdDomainTypeConverter))] + public partial interface IAfdDomain + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomain.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomain.TypeConverter.cs new file mode 100644 index 000000000000..b3b2247f1768 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomain.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdDomainTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdDomain.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdDomain.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdDomain.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomain.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomain.cs new file mode 100644 index 000000000000..f8183171379d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomain.cs @@ -0,0 +1,319 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + /// + public partial class AfdDomain : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(); + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string AzureDnsZoneId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).AzureDnsZoneId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).AzureDnsZoneId = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus; } + + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState? DomainValidationState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)Property).DomainValidationState; } + + /// The host name of the domain. Must be a domain name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string HostName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)Property).HostName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)Property).HostName = value ?? null; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; } + + /// Internal Acessors for AzureDnsZone + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal.AzureDnsZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).AzureDnsZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).AzureDnsZone = value; } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal.DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus = value; } + + /// Internal Acessors for DomainValidationState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal.DomainValidationState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)Property).DomainValidationState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)Property).DomainValidationState = value; } + + /// Internal Acessors for ProfileName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal.ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).ProfileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).ProfileName = value; } + + /// Internal Acessors for PropertiesPreValidatedCustomDomainResourceId + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal.PropertiesPreValidatedCustomDomainResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for ValidationProperty + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal.ValidationProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)Property).ValidationProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)Property).ValidationProperty = value; } + + /// Internal Acessors for ValidationPropertyExpirationDate + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal.ValidationPropertyExpirationDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)Property).ValidationPropertyExpirationDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)Property).ValidationPropertyExpirationDate = value; } + + /// Internal Acessors for ValidationPropertyValidationToken + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainInternal.ValidationPropertyValidationToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)Property).ValidationPropertyValidationToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)Property).ValidationPropertyValidationToken = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type = value; } + + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; } + + /// The name of the profile which holds the domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).ProfileName; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PropertiesPreValidatedCustomDomainResourceIdId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).PreValidatedCustomDomainResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).PreValidatedCustomDomainResourceId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainProperties _property; + + /// The JSON object that contains the properties of the domain to create. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainProperties()); set => this._property = value; } + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.FormatTable] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// Read only system data + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own + /// certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters TlsSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).TlsSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).TlsSetting = value ?? null /* model class */; } + + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; } + + /// The date time that the token expires + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ValidationPropertyExpirationDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)Property).ValidationPropertyExpirationDate; } + + /// Challenge used for DNS TXT record or file based validation + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ValidationPropertyValidationToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)Property).ValidationPropertyValidationToken; } + + /// Creates an new instance. + public AfdDomain() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + public partial interface IAfdDomain : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource + { + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string AzureDnsZoneId { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"", + SerializedName = @"deploymentStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; } + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation.", + SerializedName = @"domainValidationState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState? DomainValidationState { get; } + /// The host name of the domain. Must be a domain name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host name of the domain. Must be a domain name.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; set; } + /// The name of the profile which holds the domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the profile which holds the domain.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + string ProfileName { get; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string PropertiesPreValidatedCustomDomainResourceIdId { get; set; } + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; } + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own + /// certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default.", + SerializedName = @"tlsSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters TlsSetting { get; set; } + /// The date time that the token expires + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date time that the token expires", + SerializedName = @"expirationDate", + PossibleTypes = new [] { typeof(string) })] + string ValidationPropertyExpirationDate { get; } + /// Challenge used for DNS TXT record or file based validation + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Challenge used for DNS TXT record or file based validation", + SerializedName = @"validationToken", + PossibleTypes = new [] { typeof(string) })] + string ValidationPropertyValidationToken { get; } + + } + /// Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + internal partial interface IAfdDomainInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal + { + /// Resource reference to the Azure DNS zone + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference AzureDnsZone { get; set; } + /// Resource ID. + string AzureDnsZoneId { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; set; } + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState? DomainValidationState { get; set; } + /// The host name of the domain. Must be a domain name. + string HostName { get; set; } + /// The name of the profile which holds the domain. + string ProfileName { get; set; } + /// + /// Resource reference to the Azure resource where custom domain ownership was prevalidated + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference PropertiesPreValidatedCustomDomainResourceId { get; set; } + /// Resource ID. + string PropertiesPreValidatedCustomDomainResourceIdId { get; set; } + /// The JSON object that contains the properties of the domain to create. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainProperties Property { get; set; } + /// Provisioning status + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; set; } + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own + /// certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters TlsSetting { get; set; } + /// Values the customer needs to validate domain ownership + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties ValidationProperty { get; set; } + /// The date time that the token expires + string ValidationPropertyExpirationDate { get; set; } + /// Challenge used for DNS TXT record or file based validation + string ValidationPropertyValidationToken { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomain.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomain.json.cs new file mode 100644 index 000000000000..306fd34eb5dd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomain.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + /// + public partial class AfdDomain + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdDomain(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdDomain(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainHttpsParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainHttpsParameters.PowerShell.cs new file mode 100644 index 000000000000..6bde2949231f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainHttpsParameters.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties to secure a domain. + [System.ComponentModel.TypeConverter(typeof(AfdDomainHttpsParametersTypeConverter))] + public partial class AfdDomainHttpsParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdDomainHttpsParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CertificateType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParametersInternal)this).CertificateType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType) content.GetValueForProperty("CertificateType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParametersInternal)this).CertificateType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType.CreateFrom); + } + if (content.Contains("MinimumTlsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParametersInternal)this).MinimumTlsVersion = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion?) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParametersInternal)this).MinimumTlsVersion, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion.CreateFrom); + } + if (content.Contains("Secret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParametersInternal)this).Secret = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("Secret",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParametersInternal)this).Secret, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdDomainHttpsParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CertificateType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParametersInternal)this).CertificateType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType) content.GetValueForProperty("CertificateType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParametersInternal)this).CertificateType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType.CreateFrom); + } + if (content.Contains("MinimumTlsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParametersInternal)this).MinimumTlsVersion = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion?) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParametersInternal)this).MinimumTlsVersion, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion.CreateFrom); + } + if (content.Contains("Secret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParametersInternal)this).Secret = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("Secret",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParametersInternal)this).Secret, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdDomainHttpsParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdDomainHttpsParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties to secure a domain. + [System.ComponentModel.TypeConverter(typeof(AfdDomainHttpsParametersTypeConverter))] + public partial interface IAfdDomainHttpsParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainHttpsParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainHttpsParameters.TypeConverter.cs new file mode 100644 index 000000000000..4cea0781989d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainHttpsParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdDomainHttpsParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdDomainHttpsParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdDomainHttpsParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdDomainHttpsParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainHttpsParameters.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainHttpsParameters.cs new file mode 100644 index 000000000000..777d22d99e86 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainHttpsParameters.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties to secure a domain. + public partial class AfdDomainHttpsParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParametersInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType _certificateType; + + /// Defines the source of the SSL certificate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType CertificateType { get => this._certificateType; set => this._certificateType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion? _minimumTlsVersion; + + /// TLS protocol version that will be used for Https + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion? MinimumTlsVersion { get => this._minimumTlsVersion; set => this._minimumTlsVersion = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference _secret; + + /// Resource reference to the secret. ie. subs/rg/profile/secret + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Secret { get => (this._secret = this._secret ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set => this._secret = value; } + + /// Creates an new instance. + public AfdDomainHttpsParameters() + { + + } + } + /// The JSON object that contains the properties to secure a domain. + public partial interface IAfdDomainHttpsParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Defines the source of the SSL certificate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Defines the source of the SSL certificate.", + SerializedName = @"certificateType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType CertificateType { get; set; } + /// TLS protocol version that will be used for Https + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"TLS protocol version that will be used for Https", + SerializedName = @"minimumTlsVersion", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion? MinimumTlsVersion { get; set; } + /// Resource reference to the secret. ie. subs/rg/profile/secret + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource reference to the secret. ie. subs/rg/profile/secret", + SerializedName = @"secret", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Secret { get; set; } + + } + /// The JSON object that contains the properties to secure a domain. + internal partial interface IAfdDomainHttpsParametersInternal + + { + /// Defines the source of the SSL certificate. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType CertificateType { get; set; } + /// TLS protocol version that will be used for Https + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion? MinimumTlsVersion { get; set; } + /// Resource reference to the secret. ie. subs/rg/profile/secret + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Secret { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainHttpsParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainHttpsParameters.json.cs new file mode 100644 index 000000000000..67072da926ec --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainHttpsParameters.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties to secure a domain. + public partial class AfdDomainHttpsParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdDomainHttpsParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_certificateType = If( json?.PropertyT("certificateType"), out var __jsonCertificateType) ? (string)__jsonCertificateType : (string)CertificateType;} + {_minimumTlsVersion = If( json?.PropertyT("minimumTlsVersion"), out var __jsonMinimumTlsVersion) ? (string)__jsonMinimumTlsVersion : (string)MinimumTlsVersion;} + {_secret = If( json?.PropertyT("secret"), out var __jsonSecret) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonSecret) : Secret;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdDomainHttpsParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._certificateType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._certificateType.ToString()) : null, "certificateType" ,container.Add ); + AddIf( null != (((object)this._minimumTlsVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._minimumTlsVersion.ToString()) : null, "minimumTlsVersion" ,container.Add ); + AddIf( null != this._secret ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._secret.ToJson(null,serializationMode) : null, "secret" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainListResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainListResult.PowerShell.cs new file mode 100644 index 000000000000..f9c06c390350 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Result of the request to list domains. It contains a list of domain objects and a URL link to get the next set of results. + /// + [System.ComponentModel.TypeConverter(typeof(AfdDomainListResultTypeConverter))] + public partial class AfdDomainListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdDomainListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdDomainListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdDomainListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdDomainListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the request to list domains. It contains a list of domain objects and a URL link to get the next set of results. + [System.ComponentModel.TypeConverter(typeof(AfdDomainListResultTypeConverter))] + public partial interface IAfdDomainListResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainListResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainListResult.TypeConverter.cs new file mode 100644 index 000000000000..7d8d36188802 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdDomainListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdDomainListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdDomainListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdDomainListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainListResult.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainListResult.cs new file mode 100644 index 000000000000..9d0171c29f99 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainListResult.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list domains. It contains a list of domain objects and a URL link to get the next set of results. + /// + public partial class AfdDomainListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResultInternal + { + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of domain objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain[] _value; + + /// List of AzureFrontDoor domains within a profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain[] Value { get => this._value; } + + /// Creates an new instance. + public AfdDomainListResult() + { + + } + } + /// Result of the request to list domains. It contains a list of domain objects and a URL link to get the next set of results. + public partial interface IAfdDomainListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// URL to get the next set of domain objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL to get the next set of domain objects if there are any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// List of AzureFrontDoor domains within a profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of AzureFrontDoor domains within a profile.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain[] Value { get; } + + } + /// Result of the request to list domains. It contains a list of domain objects and a URL link to get the next set of results. + internal partial interface IAfdDomainListResultInternal + + { + /// URL to get the next set of domain objects if there are any. + string NextLink { get; set; } + /// List of AzureFrontDoor domains within a profile. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainListResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainListResult.json.cs new file mode 100644 index 000000000000..c0c1df0dedc2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainListResult.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list domains. It contains a list of domain objects and a URL link to get the next set of results. + /// + public partial class AfdDomainListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdDomainListResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomain.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdDomainListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainProperties.PowerShell.cs new file mode 100644 index 000000000000..8f222284ebb4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainProperties.PowerShell.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties of the domain to create. + [System.ComponentModel.TypeConverter(typeof(AfdDomainPropertiesTypeConverter))] + public partial class AfdDomainProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdDomainProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ValidationProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).ValidationProperty = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties) content.GetValueForProperty("ValidationProperty",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).ValidationProperty, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DomainValidationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("DomainValidationState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).DomainValidationState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState?) content.GetValueForProperty("DomainValidationState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).DomainValidationState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState.CreateFrom); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("AzureDnsZoneId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AzureDnsZoneId = (string) content.GetValueForProperty("AzureDnsZoneId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AzureDnsZoneId, global::System.Convert.ToString); + } + if (content.Contains("PreValidatedCustomDomainResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).PreValidatedCustomDomainResourceId = (string) content.GetValueForProperty("PreValidatedCustomDomainResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).PreValidatedCustomDomainResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureDnsZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AzureDnsZone = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AzureDnsZone",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AzureDnsZone, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("TlsSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).TlsSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters) content.GetValueForProperty("TlsSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).TlsSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainHttpsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("ValidationPropertyValidationToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).ValidationPropertyValidationToken = (string) content.GetValueForProperty("ValidationPropertyValidationToken",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).ValidationPropertyValidationToken, global::System.Convert.ToString); + } + if (content.Contains("ValidationPropertyExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).ValidationPropertyExpirationDate = (string) content.GetValueForProperty("ValidationPropertyExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).ValidationPropertyExpirationDate, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdDomainProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ValidationProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).ValidationProperty = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties) content.GetValueForProperty("ValidationProperty",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).ValidationProperty, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DomainValidationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("DomainValidationState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).DomainValidationState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState?) content.GetValueForProperty("DomainValidationState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).DomainValidationState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState.CreateFrom); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("AzureDnsZoneId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AzureDnsZoneId = (string) content.GetValueForProperty("AzureDnsZoneId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AzureDnsZoneId, global::System.Convert.ToString); + } + if (content.Contains("PreValidatedCustomDomainResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).PreValidatedCustomDomainResourceId = (string) content.GetValueForProperty("PreValidatedCustomDomainResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).PreValidatedCustomDomainResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureDnsZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AzureDnsZone = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AzureDnsZone",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AzureDnsZone, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("TlsSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).TlsSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters) content.GetValueForProperty("TlsSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).TlsSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainHttpsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("ValidationPropertyValidationToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).ValidationPropertyValidationToken = (string) content.GetValueForProperty("ValidationPropertyValidationToken",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).ValidationPropertyValidationToken, global::System.Convert.ToString); + } + if (content.Contains("ValidationPropertyExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).ValidationPropertyExpirationDate = (string) content.GetValueForProperty("ValidationPropertyExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal)this).ValidationPropertyExpirationDate, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdDomainProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdDomainProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties of the domain to create. + [System.ComponentModel.TypeConverter(typeof(AfdDomainPropertiesTypeConverter))] + public partial interface IAfdDomainProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainProperties.TypeConverter.cs new file mode 100644 index 000000000000..f6813ddd8738 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdDomainPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdDomainProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdDomainProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdDomainProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainProperties.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainProperties.cs new file mode 100644 index 000000000000..f0115e3ac9e8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainProperties.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the domain to create. + public partial class AfdDomainProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParameters __afdDomainUpdatePropertiesParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainUpdatePropertiesParameters(); + + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(); + + /// + /// Resource reference to the Azure resource where custom domain ownership was prevalidated + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)__afdDomainUpdatePropertiesParameters).AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)__afdDomainUpdatePropertiesParameters).AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId = value ?? null /* model class */; } + + /// Resource reference to the Azure DNS zone + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference AzureDnsZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)__afdDomainUpdatePropertiesParameters).AzureDnsZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)__afdDomainUpdatePropertiesParameters).AzureDnsZone = value ?? null /* model class */; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string AzureDnsZoneId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)__afdDomainUpdatePropertiesParameters).AzureDnsZoneId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)__afdDomainUpdatePropertiesParameters).AzureDnsZoneId = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState? _domainValidationState; + + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState? DomainValidationState { get => this._domainValidationState; } + + /// Backing field for property. + private string _hostName; + + /// The host name of the domain. Must be a domain name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string HostName { get => this._hostName; set => this._hostName = value; } + + /// Internal Acessors for DomainValidationState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal.DomainValidationState { get => this._domainValidationState; set { {_domainValidationState = value;} } } + + /// Internal Acessors for ValidationProperty + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal.ValidationProperty { get => (this._validationProperty = this._validationProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DomainValidationProperties()); set { {_validationProperty = value;} } } + + /// Internal Acessors for ValidationPropertyExpirationDate + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal.ValidationPropertyExpirationDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationPropertiesInternal)ValidationProperty).ExpirationDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationPropertiesInternal)ValidationProperty).ExpirationDate = value; } + + /// Internal Acessors for ValidationPropertyValidationToken + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainPropertiesInternal.ValidationPropertyValidationToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationPropertiesInternal)ValidationProperty).ValidationToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationPropertiesInternal)ValidationProperty).ValidationToken = value; } + + /// Internal Acessors for ProfileName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal.ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)__afdDomainUpdatePropertiesParameters).ProfileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)__afdDomainUpdatePropertiesParameters).ProfileName = value; } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState = value; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string PreValidatedCustomDomainResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)__afdDomainUpdatePropertiesParameters).PreValidatedCustomDomainResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)__afdDomainUpdatePropertiesParameters).PreValidatedCustomDomainResourceId = value ?? null; } + + /// The name of the profile which holds the domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)__afdDomainUpdatePropertiesParameters).ProfileName; } + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState; } + + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own + /// certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters TlsSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)__afdDomainUpdatePropertiesParameters).TlsSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)__afdDomainUpdatePropertiesParameters).TlsSetting = value ?? null /* model class */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties _validationProperty; + + /// Values the customer needs to validate domain ownership + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties ValidationProperty { get => (this._validationProperty = this._validationProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DomainValidationProperties()); } + + /// The date time that the token expires + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ValidationPropertyExpirationDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationPropertiesInternal)ValidationProperty).ExpirationDate; } + + /// Challenge used for DNS TXT record or file based validation + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ValidationPropertyValidationToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationPropertiesInternal)ValidationProperty).ValidationToken; } + + /// Creates an new instance. + public AfdDomainProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__afdDomainUpdatePropertiesParameters), __afdDomainUpdatePropertiesParameters); + await eventListener.AssertObjectIsValid(nameof(__afdDomainUpdatePropertiesParameters), __afdDomainUpdatePropertiesParameters); + await eventListener.AssertNotNull(nameof(__afdStateProperties), __afdStateProperties); + await eventListener.AssertObjectIsValid(nameof(__afdStateProperties), __afdStateProperties); + } + } + /// The JSON object that contains the properties of the domain to create. + public partial interface IAfdDomainProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties + { + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation.", + SerializedName = @"domainValidationState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState? DomainValidationState { get; } + /// The host name of the domain. Must be a domain name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The host name of the domain. Must be a domain name.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; set; } + /// The date time that the token expires + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date time that the token expires", + SerializedName = @"expirationDate", + PossibleTypes = new [] { typeof(string) })] + string ValidationPropertyExpirationDate { get; } + /// Challenge used for DNS TXT record or file based validation + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Challenge used for DNS TXT record or file based validation", + SerializedName = @"validationToken", + PossibleTypes = new [] { typeof(string) })] + string ValidationPropertyValidationToken { get; } + + } + /// The JSON object that contains the properties of the domain to create. + internal partial interface IAfdDomainPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal + { + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState? DomainValidationState { get; set; } + /// The host name of the domain. Must be a domain name. + string HostName { get; set; } + /// Values the customer needs to validate domain ownership + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties ValidationProperty { get; set; } + /// The date time that the token expires + string ValidationPropertyExpirationDate { get; set; } + /// Challenge used for DNS TXT record or file based validation + string ValidationPropertyValidationToken { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainProperties.json.cs new file mode 100644 index 000000000000..fa38abeeccb2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainProperties.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the domain to create. + public partial class AfdDomainProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdDomainProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __afdDomainUpdatePropertiesParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainUpdatePropertiesParameters(json); + __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(json); + {_validationProperty = If( json?.PropertyT("validationProperties"), out var __jsonValidationProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DomainValidationProperties.FromJson(__jsonValidationProperties) : ValidationProperty;} + {_domainValidationState = If( json?.PropertyT("domainValidationState"), out var __jsonDomainValidationState) ? (string)__jsonDomainValidationState : (string)DomainValidationState;} + {_hostName = If( json?.PropertyT("hostName"), out var __jsonHostName) ? (string)__jsonHostName : (string)HostName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdDomainProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __afdDomainUpdatePropertiesParameters?.ToJson(container, serializationMode); + __afdStateProperties?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._validationProperty ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._validationProperty.ToJson(null,serializationMode) : null, "validationProperties" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._domainValidationState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._domainValidationState.ToString()) : null, "domainValidationState" ,container.Add ); + } + AddIf( null != (((object)this._hostName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._hostName.ToString()) : null, "hostName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdateParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..106da7dec8a3 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdateParameters.PowerShell.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The domain JSON object required for domain creation or update. + [System.ComponentModel.TypeConverter(typeof(AfdDomainUpdateParametersTypeConverter))] + public partial class AfdDomainUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdDomainUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainUpdatePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("AzureDnsZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).AzureDnsZone = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AzureDnsZone",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).AzureDnsZone, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("PropertiesPreValidatedCustomDomainResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).PropertiesPreValidatedCustomDomainResourceId = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("PropertiesPreValidatedCustomDomainResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).PropertiesPreValidatedCustomDomainResourceId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("TlsSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).TlsSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters) content.GetValueForProperty("TlsSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).TlsSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainHttpsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("AzureDnsZoneId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).AzureDnsZoneId = (string) content.GetValueForProperty("AzureDnsZoneId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).AzureDnsZoneId, global::System.Convert.ToString); + } + if (content.Contains("PropertiesPreValidatedCustomDomainResourceIdId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).PropertiesPreValidatedCustomDomainResourceIdId = (string) content.GetValueForProperty("PropertiesPreValidatedCustomDomainResourceIdId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).PropertiesPreValidatedCustomDomainResourceIdId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdDomainUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainUpdatePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("AzureDnsZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).AzureDnsZone = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AzureDnsZone",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).AzureDnsZone, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("PropertiesPreValidatedCustomDomainResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).PropertiesPreValidatedCustomDomainResourceId = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("PropertiesPreValidatedCustomDomainResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).PropertiesPreValidatedCustomDomainResourceId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("TlsSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).TlsSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters) content.GetValueForProperty("TlsSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).TlsSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainHttpsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("AzureDnsZoneId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).AzureDnsZoneId = (string) content.GetValueForProperty("AzureDnsZoneId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).AzureDnsZoneId, global::System.Convert.ToString); + } + if (content.Contains("PropertiesPreValidatedCustomDomainResourceIdId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).PropertiesPreValidatedCustomDomainResourceIdId = (string) content.GetValueForProperty("PropertiesPreValidatedCustomDomainResourceIdId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal)this).PropertiesPreValidatedCustomDomainResourceIdId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdDomainUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdDomainUpdateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The domain JSON object required for domain creation or update. + [System.ComponentModel.TypeConverter(typeof(AfdDomainUpdateParametersTypeConverter))] + public partial interface IAfdDomainUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdateParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdateParameters.TypeConverter.cs new file mode 100644 index 000000000000..5a95c1bd6a93 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdateParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdDomainUpdateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdDomainUpdateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdDomainUpdateParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdDomainUpdateParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdateParameters.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdateParameters.cs new file mode 100644 index 000000000000..7d509f02779f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdateParameters.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The domain JSON object required for domain creation or update. + public partial class AfdDomainUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal + { + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string AzureDnsZoneId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).AzureDnsZoneId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).AzureDnsZoneId = value ?? null; } + + /// Internal Acessors for AzureDnsZone + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal.AzureDnsZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).AzureDnsZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).AzureDnsZone = value; } + + /// Internal Acessors for ProfileName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal.ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).ProfileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).ProfileName = value; } + + /// Internal Acessors for PropertiesPreValidatedCustomDomainResourceId + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal.PropertiesPreValidatedCustomDomainResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainUpdatePropertiesParameters()); set { {_property = value;} } } + + /// The name of the profile which holds the domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).ProfileName; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PropertiesPreValidatedCustomDomainResourceIdId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).PreValidatedCustomDomainResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).PreValidatedCustomDomainResourceId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParameters _property; + + /// The JSON object that contains the properties of the domain to create. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParameters Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainUpdatePropertiesParameters()); set => this._property = value; } + + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own + /// certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters TlsSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).TlsSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)Property).TlsSetting = value ?? null /* model class */; } + + /// Creates an new instance. + public AfdDomainUpdateParameters() + { + + } + } + /// The domain JSON object required for domain creation or update. + public partial interface IAfdDomainUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string AzureDnsZoneId { get; set; } + /// The name of the profile which holds the domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the profile which holds the domain.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + string ProfileName { get; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string PropertiesPreValidatedCustomDomainResourceIdId { get; set; } + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own + /// certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default.", + SerializedName = @"tlsSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters TlsSetting { get; set; } + + } + /// The domain JSON object required for domain creation or update. + internal partial interface IAfdDomainUpdateParametersInternal + + { + /// Resource reference to the Azure DNS zone + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference AzureDnsZone { get; set; } + /// Resource ID. + string AzureDnsZoneId { get; set; } + /// The name of the profile which holds the domain. + string ProfileName { get; set; } + /// + /// Resource reference to the Azure resource where custom domain ownership was prevalidated + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference PropertiesPreValidatedCustomDomainResourceId { get; set; } + /// Resource ID. + string PropertiesPreValidatedCustomDomainResourceIdId { get; set; } + /// The JSON object that contains the properties of the domain to create. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParameters Property { get; set; } + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own + /// certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters TlsSetting { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdateParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdateParameters.json.cs new file mode 100644 index 000000000000..2858bf7d1b4c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdateParameters.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The domain JSON object required for domain creation or update. + public partial class AfdDomainUpdateParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdDomainUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainUpdatePropertiesParameters.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdDomainUpdateParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdatePropertiesParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdatePropertiesParameters.PowerShell.cs new file mode 100644 index 000000000000..b34d5696d088 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdatePropertiesParameters.PowerShell.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties of the domain to create. + [System.ComponentModel.TypeConverter(typeof(AfdDomainUpdatePropertiesParametersTypeConverter))] + public partial class AfdDomainUpdatePropertiesParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdDomainUpdatePropertiesParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AzureDnsZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AzureDnsZone = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AzureDnsZone",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AzureDnsZone, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("TlsSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).TlsSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters) content.GetValueForProperty("TlsSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).TlsSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainHttpsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("AzureDnsZoneId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AzureDnsZoneId = (string) content.GetValueForProperty("AzureDnsZoneId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AzureDnsZoneId, global::System.Convert.ToString); + } + if (content.Contains("PreValidatedCustomDomainResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).PreValidatedCustomDomainResourceId = (string) content.GetValueForProperty("PreValidatedCustomDomainResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).PreValidatedCustomDomainResourceId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdDomainUpdatePropertiesParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AzureDnsZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AzureDnsZone = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AzureDnsZone",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AzureDnsZone, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("TlsSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).TlsSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters) content.GetValueForProperty("TlsSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).TlsSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainHttpsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("AzureDnsZoneId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AzureDnsZoneId = (string) content.GetValueForProperty("AzureDnsZoneId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).AzureDnsZoneId, global::System.Convert.ToString); + } + if (content.Contains("PreValidatedCustomDomainResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).PreValidatedCustomDomainResourceId = (string) content.GetValueForProperty("PreValidatedCustomDomainResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal)this).PreValidatedCustomDomainResourceId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdDomainUpdatePropertiesParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdDomainUpdatePropertiesParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties of the domain to create. + [System.ComponentModel.TypeConverter(typeof(AfdDomainUpdatePropertiesParametersTypeConverter))] + public partial interface IAfdDomainUpdatePropertiesParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdatePropertiesParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdatePropertiesParameters.TypeConverter.cs new file mode 100644 index 000000000000..a04cad1c8193 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdatePropertiesParameters.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdDomainUpdatePropertiesParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdDomainUpdatePropertiesParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdDomainUpdatePropertiesParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdDomainUpdatePropertiesParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdatePropertiesParameters.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdatePropertiesParameters.cs new file mode 100644 index 000000000000..678ab037e0b7 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdatePropertiesParameters.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the domain to create. + public partial class AfdDomainUpdatePropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal + { + + /// + /// Backing field for property. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference _afdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId; + + /// + /// Resource reference to the Azure resource where custom domain ownership was prevalidated + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId { get => (this._afdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId = this._afdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set => this._afdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference _azureDnsZone; + + /// Resource reference to the Azure DNS zone + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference AzureDnsZone { get => (this._azureDnsZone = this._azureDnsZone ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set => this._azureDnsZone = value; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string AzureDnsZoneId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)AzureDnsZone).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)AzureDnsZone).Id = value ?? null; } + + /// + /// Internal Acessors for AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal.AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId { get => (this._afdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId = this._afdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set { {_afdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId = value;} } } + + /// Internal Acessors for AzureDnsZone + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal.AzureDnsZone { get => (this._azureDnsZone = this._azureDnsZone ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set { {_azureDnsZone = value;} } } + + /// Internal Acessors for ProfileName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParametersInternal.ProfileName { get => this._profileName; set { {_profileName = value;} } } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PreValidatedCustomDomainResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId).Id = value ?? null; } + + /// Backing field for property. + private string _profileName; + + /// The name of the profile which holds the domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ProfileName { get => this._profileName; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters _tlsSetting; + + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own + /// certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters TlsSetting { get => (this._tlsSetting = this._tlsSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainHttpsParameters()); set => this._tlsSetting = value; } + + /// Creates an new instance. + public AfdDomainUpdatePropertiesParameters() + { + + } + } + /// The JSON object that contains the properties of the domain to create. + public partial interface IAfdDomainUpdatePropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string AzureDnsZoneId { get; set; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string PreValidatedCustomDomainResourceId { get; set; } + /// The name of the profile which holds the domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the profile which holds the domain.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + string ProfileName { get; } + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own + /// certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default.", + SerializedName = @"tlsSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters TlsSetting { get; set; } + + } + /// The JSON object that contains the properties of the domain to create. + internal partial interface IAfdDomainUpdatePropertiesParametersInternal + + { + /// + /// Resource reference to the Azure resource where custom domain ownership was prevalidated + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId { get; set; } + /// Resource reference to the Azure DNS zone + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference AzureDnsZone { get; set; } + /// Resource ID. + string AzureDnsZoneId { get; set; } + /// Resource ID. + string PreValidatedCustomDomainResourceId { get; set; } + /// The name of the profile which holds the domain. + string ProfileName { get; set; } + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own + /// certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters TlsSetting { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdatePropertiesParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdatePropertiesParameters.json.cs new file mode 100644 index 000000000000..369f71973fa4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdDomainUpdatePropertiesParameters.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the domain to create. + public partial class AfdDomainUpdatePropertiesParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdDomainUpdatePropertiesParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_azureDnsZone = If( json?.PropertyT("azureDnsZone"), out var __jsonAzureDnsZone) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonAzureDnsZone) : AzureDnsZone;} + {_afdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId = If( json?.PropertyT("preValidatedCustomDomainResourceId"), out var __jsonPreValidatedCustomDomainResourceId) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonPreValidatedCustomDomainResourceId) : AfdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId;} + {_profileName = If( json?.PropertyT("profileName"), out var __jsonProfileName) ? (string)__jsonProfileName : (string)ProfileName;} + {_tlsSetting = If( json?.PropertyT("tlsSettings"), out var __jsonTlsSettings) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainHttpsParameters.FromJson(__jsonTlsSettings) : TlsSetting;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdatePropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdDomainUpdatePropertiesParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._azureDnsZone ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._azureDnsZone.ToJson(null,serializationMode) : null, "azureDnsZone" ,container.Add ); + AddIf( null != this._afdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._afdDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId.ToJson(null,serializationMode) : null, "preValidatedCustomDomainResourceId" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._profileName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._profileName.ToString()) : null, "profileName" ,container.Add ); + } + AddIf( null != this._tlsSetting ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._tlsSetting.ToJson(null,serializationMode) : null, "tlsSettings" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpoint.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpoint.PowerShell.cs new file mode 100644 index 000000000000..def15ee6fc10 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpoint.PowerShell.cs @@ -0,0 +1,310 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + /// caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format .azureedge.net. + /// + [System.ComponentModel.TypeConverter(typeof(AfdEndpointTypeConverter))] + public partial class AfdEndpoint + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdEndpoint(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("AutoGeneratedDomainNameLabelScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).AutoGeneratedDomainNameLabelScope = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope?) content.GetValueForProperty("AutoGeneratedDomainNameLabelScope",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).AutoGeneratedDomainNameLabelScope, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdEndpoint(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("AutoGeneratedDomainNameLabelScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).AutoGeneratedDomainNameLabelScope = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope?) content.GetValueForProperty("AutoGeneratedDomainNameLabelScope",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal)this).AutoGeneratedDomainNameLabelScope, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdEndpoint(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdEndpoint(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + /// caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format .azureedge.net. + [System.ComponentModel.TypeConverter(typeof(AfdEndpointTypeConverter))] + public partial interface IAfdEndpoint + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpoint.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpoint.TypeConverter.cs new file mode 100644 index 000000000000..c4603aceff99 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpoint.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdEndpointTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdEndpoint.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdEndpoint.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdEndpoint.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpoint.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpoint.cs new file mode 100644 index 000000000000..b2b118141d3c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpoint.cs @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + /// caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format .azureedge.net. + /// + public partial class AfdEndpoint : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResource(); + + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesInternal)Property).AutoGeneratedDomainNameLabelScope; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesInternal)Property).AutoGeneratedDomainNameLabelScope = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope)""); } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus; } + + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)Property).EnabledState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)Property).EnabledState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); } + + /// + /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string HostName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesInternal)Property).HostName; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Id; } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal.DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus = value; } + + /// Internal Acessors for HostName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal.HostName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesInternal)Property).HostName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesInternal)Property).HostName = value; } + + /// Internal Acessors for ProfileName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal.ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)Property).ProfileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)Property).ProfileName = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Type = value; } + + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Name; } + + /// The name of the profile which holds the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)Property).ProfileName; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointProperties _property; + + /// The JSON object that contains the properties required to create an endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointProperties()); set => this._property = value; } + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.FormatTable] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// Read only system data + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemData; } + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Type; } + + /// Creates an new instance. + public AfdEndpoint() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + /// caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format .azureedge.net. + public partial interface IAfdEndpoint : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResource + { + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the endpoint name reuse scope. The default value is TenantReuse.", + SerializedName = @"autoGeneratedDomainNameLabelScope", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"", + SerializedName = @"deploymentStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; } + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'", + SerializedName = @"enabledState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get; set; } + /// + /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; } + /// The name of the profile which holds the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the profile which holds the endpoint.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + string ProfileName { get; } + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; } + + } + /// CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + /// caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format .azureedge.net. + internal partial interface IAfdEndpointInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal + { + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; set; } + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get; set; } + /// + /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + /// + string HostName { get; set; } + /// The name of the profile which holds the endpoint. + string ProfileName { get; set; } + /// The JSON object that contains the properties required to create an endpoint. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointProperties Property { get; set; } + /// Provisioning status + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpoint.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpoint.json.cs new file mode 100644 index 000000000000..ff68c9c38239 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpoint.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + /// caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format .azureedge.net. + /// + public partial class AfdEndpoint + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdEndpoint(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdEndpoint(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointListResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointListResult.PowerShell.cs new file mode 100644 index 000000000000..7e8e2e3ae296 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointListResult.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of + /// results. + /// + [System.ComponentModel.TypeConverter(typeof(AfdEndpointListResultTypeConverter))] + public partial class AfdEndpointListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdEndpointListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdEndpointListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdEndpointListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdEndpointListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of + /// results. + [System.ComponentModel.TypeConverter(typeof(AfdEndpointListResultTypeConverter))] + public partial interface IAfdEndpointListResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointListResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointListResult.TypeConverter.cs new file mode 100644 index 000000000000..35b0afa98a42 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdEndpointListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdEndpointListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdEndpointListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdEndpointListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointListResult.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointListResult.cs new file mode 100644 index 000000000000..2e4606682f73 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointListResult.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of + /// results. + /// + public partial class AfdEndpointListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResultInternal + { + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of endpoint objects if there is any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint[] _value; + + /// List of AzureFrontDoor endpoints within a profile + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint[] Value { get => this._value; } + + /// Creates an new instance. + public AfdEndpointListResult() + { + + } + } + /// Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of + /// results. + public partial interface IAfdEndpointListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// URL to get the next set of endpoint objects if there is any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL to get the next set of endpoint objects if there is any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// List of AzureFrontDoor endpoints within a profile + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of AzureFrontDoor endpoints within a profile", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint[] Value { get; } + + } + /// Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of + /// results. + internal partial interface IAfdEndpointListResultInternal + + { + /// URL to get the next set of endpoint objects if there is any. + string NextLink { get; set; } + /// List of AzureFrontDoor endpoints within a profile + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointListResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointListResult.json.cs new file mode 100644 index 000000000000..89b99dd22ea4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointListResult.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of + /// results. + /// + public partial class AfdEndpointListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdEndpointListResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpoint.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdEndpointListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointProperties.PowerShell.cs new file mode 100644 index 000000000000..c9b597d5274f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointProperties.PowerShell.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties required to create an endpoint. + [System.ComponentModel.TypeConverter(typeof(AfdEndpointPropertiesTypeConverter))] + public partial class AfdEndpointProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdEndpointProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("AutoGeneratedDomainNameLabelScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesInternal)this).AutoGeneratedDomainNameLabelScope = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope?) content.GetValueForProperty("AutoGeneratedDomainNameLabelScope",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesInternal)this).AutoGeneratedDomainNameLabelScope, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope.CreateFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdEndpointProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("AutoGeneratedDomainNameLabelScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesInternal)this).AutoGeneratedDomainNameLabelScope = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope?) content.GetValueForProperty("AutoGeneratedDomainNameLabelScope",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesInternal)this).AutoGeneratedDomainNameLabelScope, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope.CreateFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdEndpointProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdEndpointProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties required to create an endpoint. + [System.ComponentModel.TypeConverter(typeof(AfdEndpointPropertiesTypeConverter))] + public partial interface IAfdEndpointProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointProperties.TypeConverter.cs new file mode 100644 index 000000000000..8251624c207b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdEndpointPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdEndpointProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdEndpointProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdEndpointProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointProperties.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointProperties.cs new file mode 100644 index 000000000000..040e4081b5b6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointProperties.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties required to create an endpoint. + public partial class AfdEndpointProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParameters __afdEndpointPropertiesUpdateParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointPropertiesUpdateParameters(); + + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope? _autoGeneratedDomainNameLabelScope; + + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get => this._autoGeneratedDomainNameLabelScope; set => this._autoGeneratedDomainNameLabelScope = value; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus; } + + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)__afdEndpointPropertiesUpdateParameters).EnabledState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)__afdEndpointPropertiesUpdateParameters).EnabledState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); } + + /// Backing field for property. + private string _hostName; + + /// + /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string HostName { get => this._hostName; } + + /// Internal Acessors for HostName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesInternal.HostName { get => this._hostName; set { {_hostName = value;} } } + + /// Internal Acessors for ProfileName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal.ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)__afdEndpointPropertiesUpdateParameters).ProfileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)__afdEndpointPropertiesUpdateParameters).ProfileName = value; } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState = value; } + + /// The name of the profile which holds the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)__afdEndpointPropertiesUpdateParameters).ProfileName; } + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState; } + + /// Creates an new instance. + public AfdEndpointProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__afdEndpointPropertiesUpdateParameters), __afdEndpointPropertiesUpdateParameters); + await eventListener.AssertObjectIsValid(nameof(__afdEndpointPropertiesUpdateParameters), __afdEndpointPropertiesUpdateParameters); + await eventListener.AssertNotNull(nameof(__afdStateProperties), __afdStateProperties); + await eventListener.AssertObjectIsValid(nameof(__afdStateProperties), __afdStateProperties); + } + } + /// The JSON object that contains the properties required to create an endpoint. + public partial interface IAfdEndpointProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties + { + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the endpoint name reuse scope. The default value is TenantReuse.", + SerializedName = @"autoGeneratedDomainNameLabelScope", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } + /// + /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; } + + } + /// The JSON object that contains the properties required to create an endpoint. + internal partial interface IAfdEndpointPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal + { + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } + /// + /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + /// + string HostName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointProperties.json.cs new file mode 100644 index 000000000000..9c722ce51cc4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointProperties.json.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties required to create an endpoint. + public partial class AfdEndpointProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdEndpointProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __afdEndpointPropertiesUpdateParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointPropertiesUpdateParameters(json); + __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(json); + {_hostName = If( json?.PropertyT("hostName"), out var __jsonHostName) ? (string)__jsonHostName : (string)HostName;} + {_autoGeneratedDomainNameLabelScope = If( json?.PropertyT("autoGeneratedDomainNameLabelScope"), out var __jsonAutoGeneratedDomainNameLabelScope) ? (string)__jsonAutoGeneratedDomainNameLabelScope : (string)AutoGeneratedDomainNameLabelScope;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdEndpointProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __afdEndpointPropertiesUpdateParameters?.ToJson(container, serializationMode); + __afdStateProperties?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._hostName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._hostName.ToString()) : null, "hostName" ,container.Add ); + } + AddIf( null != (((object)this._autoGeneratedDomainNameLabelScope)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._autoGeneratedDomainNameLabelScope.ToString()) : null, "autoGeneratedDomainNameLabelScope" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointPropertiesUpdateParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointPropertiesUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..d08971fe85d2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointPropertiesUpdateParameters.PowerShell.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object containing endpoint update parameters. + [System.ComponentModel.TypeConverter(typeof(AfdEndpointPropertiesUpdateParametersTypeConverter))] + public partial class AfdEndpointPropertiesUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdEndpointPropertiesUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdEndpointPropertiesUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdEndpointPropertiesUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdEndpointPropertiesUpdateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object containing endpoint update parameters. + [System.ComponentModel.TypeConverter(typeof(AfdEndpointPropertiesUpdateParametersTypeConverter))] + public partial interface IAfdEndpointPropertiesUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointPropertiesUpdateParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointPropertiesUpdateParameters.TypeConverter.cs new file mode 100644 index 000000000000..6407aa7e8158 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointPropertiesUpdateParameters.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdEndpointPropertiesUpdateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdEndpointPropertiesUpdateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdEndpointPropertiesUpdateParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdEndpointPropertiesUpdateParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointPropertiesUpdateParameters.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointPropertiesUpdateParameters.cs new file mode 100644 index 000000000000..46d00896e79b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointPropertiesUpdateParameters.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object containing endpoint update parameters. + public partial class AfdEndpointPropertiesUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? _enabledState; + + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get => this._enabledState; set => this._enabledState = value; } + + /// Internal Acessors for ProfileName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal.ProfileName { get => this._profileName; set { {_profileName = value;} } } + + /// Backing field for property. + private string _profileName; + + /// The name of the profile which holds the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ProfileName { get => this._profileName; } + + /// Creates an new instance. + public AfdEndpointPropertiesUpdateParameters() + { + + } + } + /// The JSON object containing endpoint update parameters. + public partial interface IAfdEndpointPropertiesUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'", + SerializedName = @"enabledState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get; set; } + /// The name of the profile which holds the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the profile which holds the endpoint.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + string ProfileName { get; } + + } + /// The JSON object containing endpoint update parameters. + internal partial interface IAfdEndpointPropertiesUpdateParametersInternal + + { + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get; set; } + /// The name of the profile which holds the endpoint. + string ProfileName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointPropertiesUpdateParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointPropertiesUpdateParameters.json.cs new file mode 100644 index 000000000000..816db288b7b0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointPropertiesUpdateParameters.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object containing endpoint update parameters. + public partial class AfdEndpointPropertiesUpdateParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdEndpointPropertiesUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_profileName = If( json?.PropertyT("profileName"), out var __jsonProfileName) ? (string)__jsonProfileName : (string)ProfileName;} + {_enabledState = If( json?.PropertyT("enabledState"), out var __jsonEnabledState) ? (string)__jsonEnabledState : (string)EnabledState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdEndpointPropertiesUpdateParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._profileName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._profileName.ToString()) : null, "profileName" ,container.Add ); + } + AddIf( null != (((object)this._enabledState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._enabledState.ToString()) : null, "enabledState" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..70787f5cbddc --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParameters.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Properties required to create or update an endpoint. + [System.ComponentModel.TypeConverter(typeof(AfdEndpointUpdateParametersTypeConverter))] + public partial class AfdEndpointUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdEndpointUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointPropertiesUpdateParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointUpdateParametersTagsTypeConverter.ConvertFrom); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal)this).ProfileName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdEndpointUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointPropertiesUpdateParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointUpdateParametersTagsTypeConverter.ConvertFrom); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal)this).ProfileName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdEndpointUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdEndpointUpdateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties required to create or update an endpoint. + [System.ComponentModel.TypeConverter(typeof(AfdEndpointUpdateParametersTypeConverter))] + public partial interface IAfdEndpointUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParameters.TypeConverter.cs new file mode 100644 index 000000000000..957b46a0b5c7 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdEndpointUpdateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdEndpointUpdateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdEndpointUpdateParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdEndpointUpdateParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParameters.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParameters.cs new file mode 100644 index 000000000000..aed2362ca4d9 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParameters.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Properties required to create or update an endpoint. + public partial class AfdEndpointUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal + { + + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)Property).EnabledState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)Property).EnabledState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); } + + /// Internal Acessors for ProfileName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal.ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)Property).ProfileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)Property).ProfileName = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointPropertiesUpdateParameters()); set { {_property = value;} } } + + /// The name of the profile which holds the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParametersInternal)Property).ProfileName; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParameters _property; + + /// The JSON object containing endpoint update parameters. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParameters Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointPropertiesUpdateParameters()); set => this._property = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags _tag; + + /// Endpoint tags. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointUpdateParametersTags()); set => this._tag = value; } + + /// Creates an new instance. + public AfdEndpointUpdateParameters() + { + + } + } + /// Properties required to create or update an endpoint. + public partial interface IAfdEndpointUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'", + SerializedName = @"enabledState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get; set; } + /// The name of the profile which holds the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the profile which holds the endpoint.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + string ProfileName { get; } + /// Endpoint tags. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Endpoint tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags Tag { get; set; } + + } + /// Properties required to create or update an endpoint. + internal partial interface IAfdEndpointUpdateParametersInternal + + { + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get; set; } + /// The name of the profile which holds the endpoint. + string ProfileName { get; set; } + /// The JSON object containing endpoint update parameters. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointPropertiesUpdateParameters Property { get; set; } + /// Endpoint tags. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParameters.json.cs new file mode 100644 index 000000000000..d33de63b08b1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParameters.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Properties required to create or update an endpoint. + public partial class AfdEndpointUpdateParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdEndpointUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointPropertiesUpdateParameters.FromJson(__jsonProperties) : Property;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointUpdateParametersTags.FromJson(__jsonTags) : Tag;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdEndpointUpdateParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.PowerShell.cs new file mode 100644 index 000000000000..a90ed3a90298 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.PowerShell.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Endpoint tags. + [System.ComponentModel.TypeConverter(typeof(AfdEndpointUpdateParametersTagsTypeConverter))] + public partial class AfdEndpointUpdateParametersTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdEndpointUpdateParametersTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdEndpointUpdateParametersTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdEndpointUpdateParametersTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdEndpointUpdateParametersTags(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Endpoint tags. + [System.ComponentModel.TypeConverter(typeof(AfdEndpointUpdateParametersTagsTypeConverter))] + public partial interface IAfdEndpointUpdateParametersTags + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.TypeConverter.cs new file mode 100644 index 000000000000..690f9a442547 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdEndpointUpdateParametersTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdEndpointUpdateParametersTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdEndpointUpdateParametersTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdEndpointUpdateParametersTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.cs new file mode 100644 index 000000000000..e410ecc3dff7 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Endpoint tags. + public partial class AfdEndpointUpdateParametersTags : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTagsInternal + { + + /// Creates an new instance. + public AfdEndpointUpdateParametersTags() + { + + } + } + /// Endpoint tags. + public partial interface IAfdEndpointUpdateParametersTags : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray + { + + } + /// Endpoint tags. + internal partial interface IAfdEndpointUpdateParametersTagsInternal + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.dictionary.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.dictionary.cs new file mode 100644 index 000000000000..7828f072ad3b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class AfdEndpointUpdateParametersTags : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointUpdateParametersTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.json.cs new file mode 100644 index 000000000000..4a18369fd27f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdEndpointUpdateParametersTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Endpoint tags. + public partial class AfdEndpointUpdateParametersTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + /// + internal AfdEndpointUpdateParametersTags(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdEndpointUpdateParametersTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdErrorResponse.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdErrorResponse.PowerShell.cs new file mode 100644 index 000000000000..bf8c0b0755be --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdErrorResponse.PowerShell.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + [System.ComponentModel.TypeConverter(typeof(AfdErrorResponseTypeConverter))] + public partial class AfdErrorResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdErrorResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdErrorResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdErrorResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdErrorResponse(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + [System.ComponentModel.TypeConverter(typeof(AfdErrorResponseTypeConverter))] + public partial interface IAfdErrorResponse + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdErrorResponse.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdErrorResponse.TypeConverter.cs new file mode 100644 index 000000000000..8cb50d91441d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdErrorResponse.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdErrorResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdErrorResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdErrorResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdErrorResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdErrorResponse.cs b/src/Cdn/generated/api/Models/Api20210601/AfdErrorResponse.cs new file mode 100644 index 000000000000..21ac9887c291 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdErrorResponse.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + public partial class AfdErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal + { + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Detail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail _error; + + /// The error object. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetail()); set => this._error = value; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).AdditionalInfo = value; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Code = value; } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Detail = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetail()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Message = value; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Target = value; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Target; } + + /// Creates an new instance. + public AfdErrorResponse() + { + + } + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + public partial interface IAfdErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[] Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + internal partial interface IAfdErrorResponseInternal + + { + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[] Detail { get; set; } + /// The error object. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail Error { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdErrorResponse.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdErrorResponse.json.cs new file mode 100644 index 000000000000..cc09e273d0c6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdErrorResponse.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + public partial class AfdErrorResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetail.FromJson(__jsonError) : Error;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdErrorResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOrigin.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOrigin.PowerShell.cs new file mode 100644 index 000000000000..590c22246001 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOrigin.PowerShell.cs @@ -0,0 +1,406 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not + /// have the requested content cached, they attempt to fetch it from one or more of the configured origins. + /// + [System.ComponentModel.TypeConverter(typeof(AfdOriginTypeConverter))] + public partial class AfdOrigin + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdOrigin(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("SharedPrivateLinkResourceStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourceStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus?) content.GetValueForProperty("SharedPrivateLinkResourceStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourceStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus.CreateFrom); + } + if (content.Contains("AzureOrigin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).AzureOrigin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AzureOrigin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).AzureOrigin, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SharedPrivateLinkResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties) content.GetValueForProperty("SharedPrivateLinkResource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SharedPrivateLinkResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("OriginGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).OriginGroupName = (string) content.GetValueForProperty("OriginGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).OriginGroupName, global::System.Convert.ToString); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EnforceCertificateNameCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).EnforceCertificateNameCheck = (bool?) content.GetValueForProperty("EnforceCertificateNameCheck",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).EnforceCertificateNameCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("AzureOriginId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).AzureOriginId = (string) content.GetValueForProperty("AzureOriginId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).AzureOriginId, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourcePrivateLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourcePrivateLink = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("SharedPrivateLinkResourcePrivateLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourcePrivateLink, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SharedPrivateLinkResourcePrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourcePrivateLinkLocation = (string) content.GetValueForProperty("SharedPrivateLinkResourcePrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourcePrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourceGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourceGroupId = (string) content.GetValueForProperty("SharedPrivateLinkResourceGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourceGroupId, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourceRequestMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourceRequestMessage = (string) content.GetValueForProperty("SharedPrivateLinkResourceRequestMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourceRequestMessage, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).PrivateLinkId = (string) content.GetValueForProperty("PrivateLinkId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).PrivateLinkId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdOrigin(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("SharedPrivateLinkResourceStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourceStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus?) content.GetValueForProperty("SharedPrivateLinkResourceStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourceStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus.CreateFrom); + } + if (content.Contains("AzureOrigin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).AzureOrigin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AzureOrigin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).AzureOrigin, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SharedPrivateLinkResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties) content.GetValueForProperty("SharedPrivateLinkResource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SharedPrivateLinkResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("OriginGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).OriginGroupName = (string) content.GetValueForProperty("OriginGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).OriginGroupName, global::System.Convert.ToString); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EnforceCertificateNameCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).EnforceCertificateNameCheck = (bool?) content.GetValueForProperty("EnforceCertificateNameCheck",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).EnforceCertificateNameCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("AzureOriginId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).AzureOriginId = (string) content.GetValueForProperty("AzureOriginId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).AzureOriginId, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourcePrivateLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourcePrivateLink = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("SharedPrivateLinkResourcePrivateLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourcePrivateLink, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SharedPrivateLinkResourcePrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourcePrivateLinkLocation = (string) content.GetValueForProperty("SharedPrivateLinkResourcePrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourcePrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourceGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourceGroupId = (string) content.GetValueForProperty("SharedPrivateLinkResourceGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourceGroupId, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourceRequestMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourceRequestMessage = (string) content.GetValueForProperty("SharedPrivateLinkResourceRequestMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).SharedPrivateLinkResourceRequestMessage, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).PrivateLinkId = (string) content.GetValueForProperty("PrivateLinkId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal)this).PrivateLinkId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdOrigin(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdOrigin(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not + /// have the requested content cached, they attempt to fetch it from one or more of the configured origins. + [System.ComponentModel.TypeConverter(typeof(AfdOriginTypeConverter))] + public partial interface IAfdOrigin + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOrigin.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOrigin.TypeConverter.cs new file mode 100644 index 000000000000..297373d6f5e6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOrigin.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdOriginTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdOrigin.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdOrigin.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdOrigin.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOrigin.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOrigin.cs new file mode 100644 index 000000000000..92fac5779d3c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOrigin.cs @@ -0,0 +1,457 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not + /// have the requested content cached, they attempt to fetch it from one or more of the configured origins. + /// + public partial class AfdOrigin : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(); + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string AzureOriginId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).AzureOriginId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).AzureOriginId = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus; } + + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled + /// if there is a single enabled backend in single enabled backend pool. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).EnabledState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).EnabledState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); } + + /// Whether to enable certificate name check at origin level + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? EnforceCertificateNameCheck { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).EnforceCertificateNameCheck; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).EnforceCertificateNameCheck = value ?? default(bool); } + + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string HostName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).HostName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).HostName = value ?? null; } + + /// The value of the HTTP port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? HttpPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).HttpPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).HttpPort = value ?? default(int); } + + /// The value of the HTTPS port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? HttpsPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).HttpsPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).HttpsPort = value ?? default(int); } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; } + + /// Internal Acessors for AzureOrigin + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal.AzureOrigin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).AzureOrigin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).AzureOrigin = value; } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal.DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus = value; } + + /// Internal Acessors for OriginGroupName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal.OriginGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).OriginGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).OriginGroupName = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for SharedPrivateLinkResource + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal.SharedPrivateLinkResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResource = value; } + + /// Internal Acessors for SharedPrivateLinkResourcePrivateLink + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginInternal.SharedPrivateLinkResourcePrivateLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourcePrivateLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourcePrivateLink = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type = value; } + + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; } + + /// The name of the origin group which contains this origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).OriginGroupName; } + + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginHostHeader { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).OriginHostHeader; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).OriginHostHeader = value ?? null; } + + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? Priority { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).Priority; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).Priority = value ?? default(int); } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PrivateLinkId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).PrivateLinkId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).PrivateLinkId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginProperties _property; + + /// The JSON object that contains the properties of the origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginProperties()); set => this._property = value; } + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.FormatTable] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// The group id from the provider of resource the shared private link resource is for. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string SharedPrivateLinkResourceGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourceGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourceGroupId = value ?? null; } + + /// The location of the shared private link resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string SharedPrivateLinkResourcePrivateLinkLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourcePrivateLinkLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourcePrivateLinkLocation = value ?? null; } + + /// + /// The request message for requesting approval of the shared private link resource. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string SharedPrivateLinkResourceRequestMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourceRequestMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourceRequestMessage = value ?? null; } + + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus? SharedPrivateLinkResourceStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourceStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourceStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus)""); } + + /// Read only system data + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; } + + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? Weight { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).Weight; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).Weight = value ?? default(int); } + + /// Creates an new instance. + public AfdOrigin() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not + /// have the requested content cached, they attempt to fetch it from one or more of the configured origins. + public partial interface IAfdOrigin : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource + { + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string AzureOriginId { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"", + SerializedName = @"deploymentStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; } + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled + /// if there is a single enabled backend in single enabled backend pool. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool.", + SerializedName = @"enabledState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get; set; } + /// Whether to enable certificate name check at origin level + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable certificate name check at origin level", + SerializedName = @"enforceCertificateNameCheck", + PossibleTypes = new [] { typeof(bool) })] + bool? EnforceCertificateNameCheck { get; set; } + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; set; } + /// The value of the HTTP port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTP port. Must be between 1 and 65535.", + SerializedName = @"httpPort", + PossibleTypes = new [] { typeof(int) })] + int? HttpPort { get; set; } + /// The value of the HTTPS port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTPS port. Must be between 1 and 65535.", + SerializedName = @"httpsPort", + PossibleTypes = new [] { typeof(int) })] + int? HttpsPort { get; set; } + /// The name of the origin group which contains this origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the origin group which contains this origin.", + SerializedName = @"originGroupName", + PossibleTypes = new [] { typeof(string) })] + string OriginGroupName { get; } + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + string OriginHostHeader { get; set; } + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5", + SerializedName = @"priority", + PossibleTypes = new [] { typeof(int) })] + int? Priority { get; set; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkId { get; set; } + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; } + /// + /// The group id from the provider of resource the shared private link resource is for. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The group id from the provider of resource the shared private link resource is for.", + SerializedName = @"groupId", + PossibleTypes = new [] { typeof(string) })] + string SharedPrivateLinkResourceGroupId { get; set; } + /// The location of the shared private link resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location of the shared private link resource", + SerializedName = @"privateLinkLocation", + PossibleTypes = new [] { typeof(string) })] + string SharedPrivateLinkResourcePrivateLinkLocation { get; set; } + /// + /// The request message for requesting approval of the shared private link resource. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The request message for requesting approval of the shared private link resource.", + SerializedName = @"requestMessage", + PossibleTypes = new [] { typeof(string) })] + string SharedPrivateLinkResourceRequestMessage { get; set; } + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus? SharedPrivateLinkResourceStatus { get; set; } + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Weight of the origin in given origin group for load balancing. Must be between 1 and 1000", + SerializedName = @"weight", + PossibleTypes = new [] { typeof(int) })] + int? Weight { get; set; } + + } + /// CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not + /// have the requested content cached, they attempt to fetch it from one or more of the configured origins. + internal partial interface IAfdOriginInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal + { + /// Resource reference to the Azure origin resource. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference AzureOrigin { get; set; } + /// Resource ID. + string AzureOriginId { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; set; } + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled + /// if there is a single enabled backend in single enabled backend pool. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get; set; } + /// Whether to enable certificate name check at origin level + bool? EnforceCertificateNameCheck { get; set; } + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + string HostName { get; set; } + /// The value of the HTTP port. Must be between 1 and 65535. + int? HttpPort { get; set; } + /// The value of the HTTPS port. Must be between 1 and 65535. + int? HttpsPort { get; set; } + /// The name of the origin group which contains this origin. + string OriginGroupName { get; set; } + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + string OriginHostHeader { get; set; } + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + int? Priority { get; set; } + /// Resource ID. + string PrivateLinkId { get; set; } + /// The JSON object that contains the properties of the origin. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginProperties Property { get; set; } + /// Provisioning status + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; set; } + /// The properties of the private link resource for private origin. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties SharedPrivateLinkResource { get; set; } + /// + /// The group id from the provider of resource the shared private link resource is for. + /// + string SharedPrivateLinkResourceGroupId { get; set; } + /// The resource id of the resource the shared private link resource is for. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference SharedPrivateLinkResourcePrivateLink { get; set; } + /// The location of the shared private link resource + string SharedPrivateLinkResourcePrivateLinkLocation { get; set; } + /// + /// The request message for requesting approval of the shared private link resource. + /// + string SharedPrivateLinkResourceRequestMessage { get; set; } + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus? SharedPrivateLinkResourceStatus { get; set; } + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + int? Weight { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOrigin.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOrigin.json.cs new file mode 100644 index 000000000000..b58db349d388 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOrigin.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not + /// have the requested content cached, they attempt to fetch it from one or more of the configured origins. + /// + public partial class AfdOrigin + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdOrigin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdOrigin(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroup.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroup.PowerShell.cs new file mode 100644 index 000000000000..b044cb340edd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroup.PowerShell.cs @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + /// + [System.ComponentModel.TypeConverter(typeof(AfdOriginGroupTypeConverter))] + public partial class AfdOriginGroup + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdOriginGroup(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("LoadBalancingSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).LoadBalancingSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters) content.GetValueForProperty("LoadBalancingSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).LoadBalancingSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SessionAffinityState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).SessionAffinityState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("SessionAffinityState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).SessionAffinityState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdOriginGroup(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("LoadBalancingSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).LoadBalancingSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters) content.GetValueForProperty("LoadBalancingSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).LoadBalancingSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SessionAffinityState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).SessionAffinityState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("SessionAffinityState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).SessionAffinityState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdOriginGroup(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdOriginGroup(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + [System.ComponentModel.TypeConverter(typeof(AfdOriginGroupTypeConverter))] + public partial interface IAfdOriginGroup + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroup.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroup.TypeConverter.cs new file mode 100644 index 000000000000..387c92b597c5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroup.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdOriginGroupTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdOriginGroup.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdOriginGroup.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdOriginGroup.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroup.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroup.cs new file mode 100644 index 000000000000..8e9187c332ff --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroup.cs @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + /// + public partial class AfdOriginGroup : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(); + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus; } + + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).HealthProbeSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).HealthProbeSetting = value ?? null /* model class */; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; } + + /// Load balancing settings for a backend pool + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters LoadBalancingSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).LoadBalancingSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).LoadBalancingSetting = value ?? null /* model class */; } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal.DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus = value; } + + /// Internal Acessors for ProfileName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal.ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).ProfileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).ProfileName = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type = value; } + + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; } + + /// The name of the profile which holds the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).ProfileName; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupProperties _property; + + /// The JSON object that contains the properties of the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupProperties()); set => this._property = value; } + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.FormatTable] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? SessionAffinityState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).SessionAffinityState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).SessionAffinityState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); } + + /// Read only system data + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).TrafficRestorationTimeToHealedOrNewEndpointsInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = value ?? default(int); } + + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public AfdOriginGroup() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + public partial interface IAfdOriginGroup : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"", + SerializedName = @"deploymentStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; } + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health probe settings to the origin that is used to determine the health of the origin.", + SerializedName = @"healthProbeSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get; set; } + /// Load balancing settings for a backend pool + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Load balancing settings for a backend pool", + SerializedName = @"loadBalancingSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters LoadBalancingSetting { get; set; } + /// The name of the profile which holds the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the profile which holds the origin group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + string ProfileName { get; } + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; } + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'", + SerializedName = @"sessionAffinityState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? SessionAffinityState { get; set; } + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.", + SerializedName = @"trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + PossibleTypes = new [] { typeof(int) })] + int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get; set; } + + } + /// AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + internal partial interface IAfdOriginGroupInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; set; } + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get; set; } + /// Load balancing settings for a backend pool + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters LoadBalancingSetting { get; set; } + /// The name of the profile which holds the origin group. + string ProfileName { get; set; } + /// The JSON object that contains the properties of the origin group. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupProperties Property { get; set; } + /// Provisioning status + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; set; } + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? SessionAffinityState { get; set; } + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroup.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroup.json.cs new file mode 100644 index 000000000000..e2155030a395 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroup.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + /// + public partial class AfdOriginGroup + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdOriginGroup(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdOriginGroup(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupListResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupListResult.PowerShell.cs new file mode 100644 index 000000000000..e9afb9a23ba3 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupListResult.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next + /// set of results. + /// + [System.ComponentModel.TypeConverter(typeof(AfdOriginGroupListResultTypeConverter))] + public partial class AfdOriginGroupListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdOriginGroupListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdOriginGroupListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdOriginGroupListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdOriginGroupListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next + /// set of results. + [System.ComponentModel.TypeConverter(typeof(AfdOriginGroupListResultTypeConverter))] + public partial interface IAfdOriginGroupListResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupListResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupListResult.TypeConverter.cs new file mode 100644 index 000000000000..87ce20c9c416 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdOriginGroupListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdOriginGroupListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdOriginGroupListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdOriginGroupListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupListResult.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupListResult.cs new file mode 100644 index 000000000000..6e24fc5bfaac --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupListResult.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next + /// set of results. + /// + public partial class AfdOriginGroupListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResultInternal + { + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of origin objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup[] _value; + + /// List of CDN origin groups within an endpoint + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup[] Value { get => this._value; } + + /// Creates an new instance. + public AfdOriginGroupListResult() + { + + } + } + /// Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next + /// set of results. + public partial interface IAfdOriginGroupListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// URL to get the next set of origin objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL to get the next set of origin objects if there are any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// List of CDN origin groups within an endpoint + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of CDN origin groups within an endpoint", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup[] Value { get; } + + } + /// Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next + /// set of results. + internal partial interface IAfdOriginGroupListResultInternal + + { + /// URL to get the next set of origin objects if there are any. + string NextLink { get; set; } + /// List of CDN origin groups within an endpoint + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupListResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupListResult.json.cs new file mode 100644 index 000000000000..ae8844624683 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupListResult.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next + /// set of results. + /// + public partial class AfdOriginGroupListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdOriginGroupListResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroup.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdOriginGroupListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupProperties.PowerShell.cs new file mode 100644 index 000000000000..0779950a395d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupProperties.PowerShell.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties of the origin group. + [System.ComponentModel.TypeConverter(typeof(AfdOriginGroupPropertiesTypeConverter))] + public partial class AfdOriginGroupProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdOriginGroupProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("LoadBalancingSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).LoadBalancingSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters) content.GetValueForProperty("LoadBalancingSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).LoadBalancingSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SessionAffinityState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).SessionAffinityState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("SessionAffinityState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).SessionAffinityState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdOriginGroupProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("LoadBalancingSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).LoadBalancingSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters) content.GetValueForProperty("LoadBalancingSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).LoadBalancingSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SessionAffinityState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).SessionAffinityState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("SessionAffinityState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).SessionAffinityState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdOriginGroupProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdOriginGroupProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties of the origin group. + [System.ComponentModel.TypeConverter(typeof(AfdOriginGroupPropertiesTypeConverter))] + public partial interface IAfdOriginGroupProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupProperties.TypeConverter.cs new file mode 100644 index 000000000000..a53d32c811fc --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdOriginGroupPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdOriginGroupProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdOriginGroupProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdOriginGroupProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupProperties.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupProperties.cs new file mode 100644 index 000000000000..41ada7d7b475 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupProperties.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the origin group. + public partial class AfdOriginGroupProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParameters __afdOriginGroupUpdatePropertiesParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupUpdatePropertiesParameters(); + + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(); + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus; } + + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)__afdOriginGroupUpdatePropertiesParameters).HealthProbeSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)__afdOriginGroupUpdatePropertiesParameters).HealthProbeSetting = value ?? null /* model class */; } + + /// Load balancing settings for a backend pool + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters LoadBalancingSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)__afdOriginGroupUpdatePropertiesParameters).LoadBalancingSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)__afdOriginGroupUpdatePropertiesParameters).LoadBalancingSetting = value ?? null /* model class */; } + + /// Internal Acessors for ProfileName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal.ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)__afdOriginGroupUpdatePropertiesParameters).ProfileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)__afdOriginGroupUpdatePropertiesParameters).ProfileName = value; } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState = value; } + + /// The name of the profile which holds the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)__afdOriginGroupUpdatePropertiesParameters).ProfileName; } + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState; } + + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? SessionAffinityState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)__afdOriginGroupUpdatePropertiesParameters).SessionAffinityState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)__afdOriginGroupUpdatePropertiesParameters).SessionAffinityState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); } + + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)__afdOriginGroupUpdatePropertiesParameters).TrafficRestorationTimeToHealedOrNewEndpointsInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)__afdOriginGroupUpdatePropertiesParameters).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = value ?? default(int); } + + /// Creates an new instance. + public AfdOriginGroupProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__afdOriginGroupUpdatePropertiesParameters), __afdOriginGroupUpdatePropertiesParameters); + await eventListener.AssertObjectIsValid(nameof(__afdOriginGroupUpdatePropertiesParameters), __afdOriginGroupUpdatePropertiesParameters); + await eventListener.AssertNotNull(nameof(__afdStateProperties), __afdStateProperties); + await eventListener.AssertObjectIsValid(nameof(__afdStateProperties), __afdStateProperties); + } + } + /// The JSON object that contains the properties of the origin group. + public partial interface IAfdOriginGroupProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties + { + + } + /// The JSON object that contains the properties of the origin group. + internal partial interface IAfdOriginGroupPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupProperties.json.cs new file mode 100644 index 000000000000..a3f2d553efe8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupProperties.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the origin group. + public partial class AfdOriginGroupProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdOriginGroupProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __afdOriginGroupUpdatePropertiesParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupUpdatePropertiesParameters(json); + __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdOriginGroupProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __afdOriginGroupUpdatePropertiesParameters?.ToJson(container, serializationMode); + __afdStateProperties?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdateParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..280c168d47ea --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdateParameters.PowerShell.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// AFDOrigin group properties needed for origin group creation or update. + [System.ComponentModel.TypeConverter(typeof(AfdOriginGroupUpdateParametersTypeConverter))] + public partial class AfdOriginGroupUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdOriginGroupUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupUpdatePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("LoadBalancingSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).LoadBalancingSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters) content.GetValueForProperty("LoadBalancingSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).LoadBalancingSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SessionAffinityState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).SessionAffinityState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("SessionAffinityState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).SessionAffinityState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdOriginGroupUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupUpdatePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("LoadBalancingSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).LoadBalancingSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters) content.GetValueForProperty("LoadBalancingSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).LoadBalancingSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SessionAffinityState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).SessionAffinityState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("SessionAffinityState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal)this).SessionAffinityState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdOriginGroupUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdOriginGroupUpdateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// AFDOrigin group properties needed for origin group creation or update. + [System.ComponentModel.TypeConverter(typeof(AfdOriginGroupUpdateParametersTypeConverter))] + public partial interface IAfdOriginGroupUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdateParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdateParameters.TypeConverter.cs new file mode 100644 index 000000000000..404043aaf171 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdateParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdOriginGroupUpdateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdOriginGroupUpdateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdOriginGroupUpdateParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdOriginGroupUpdateParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdateParameters.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdateParameters.cs new file mode 100644 index 000000000000..1747286e0633 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdateParameters.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// AFDOrigin group properties needed for origin group creation or update. + public partial class AfdOriginGroupUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal + { + + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).HealthProbeSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).HealthProbeSetting = value ?? null /* model class */; } + + /// Load balancing settings for a backend pool + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters LoadBalancingSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).LoadBalancingSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).LoadBalancingSetting = value ?? null /* model class */; } + + /// Internal Acessors for ProfileName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal.ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).ProfileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).ProfileName = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupUpdatePropertiesParameters()); set { {_property = value;} } } + + /// The name of the profile which holds the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).ProfileName; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParameters _property; + + /// The JSON object that contains the properties of the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParameters Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupUpdatePropertiesParameters()); set => this._property = value; } + + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? SessionAffinityState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).SessionAffinityState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).SessionAffinityState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); } + + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).TrafficRestorationTimeToHealedOrNewEndpointsInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)Property).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = value ?? default(int); } + + /// Creates an new instance. + public AfdOriginGroupUpdateParameters() + { + + } + } + /// AFDOrigin group properties needed for origin group creation or update. + public partial interface IAfdOriginGroupUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health probe settings to the origin that is used to determine the health of the origin.", + SerializedName = @"healthProbeSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get; set; } + /// Load balancing settings for a backend pool + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Load balancing settings for a backend pool", + SerializedName = @"loadBalancingSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters LoadBalancingSetting { get; set; } + /// The name of the profile which holds the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the profile which holds the origin group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + string ProfileName { get; } + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'", + SerializedName = @"sessionAffinityState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? SessionAffinityState { get; set; } + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.", + SerializedName = @"trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + PossibleTypes = new [] { typeof(int) })] + int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get; set; } + + } + /// AFDOrigin group properties needed for origin group creation or update. + internal partial interface IAfdOriginGroupUpdateParametersInternal + + { + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get; set; } + /// Load balancing settings for a backend pool + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters LoadBalancingSetting { get; set; } + /// The name of the profile which holds the origin group. + string ProfileName { get; set; } + /// The JSON object that contains the properties of the origin group. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParameters Property { get; set; } + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? SessionAffinityState { get; set; } + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdateParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdateParameters.json.cs new file mode 100644 index 000000000000..90e379265eeb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdateParameters.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// AFDOrigin group properties needed for origin group creation or update. + public partial class AfdOriginGroupUpdateParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdOriginGroupUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupUpdatePropertiesParameters.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdOriginGroupUpdateParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdatePropertiesParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdatePropertiesParameters.PowerShell.cs new file mode 100644 index 000000000000..9036c2658d4c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdatePropertiesParameters.PowerShell.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties of the origin group. + [System.ComponentModel.TypeConverter(typeof(AfdOriginGroupUpdatePropertiesParametersTypeConverter))] + public partial class AfdOriginGroupUpdatePropertiesParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdOriginGroupUpdatePropertiesParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("LoadBalancingSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).LoadBalancingSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters) content.GetValueForProperty("LoadBalancingSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).LoadBalancingSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SessionAffinityState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).SessionAffinityState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("SessionAffinityState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).SessionAffinityState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdOriginGroupUpdatePropertiesParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("LoadBalancingSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).LoadBalancingSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters) content.GetValueForProperty("LoadBalancingSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).LoadBalancingSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SessionAffinityState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).SessionAffinityState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("SessionAffinityState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal)this).SessionAffinityState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdOriginGroupUpdatePropertiesParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdOriginGroupUpdatePropertiesParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties of the origin group. + [System.ComponentModel.TypeConverter(typeof(AfdOriginGroupUpdatePropertiesParametersTypeConverter))] + public partial interface IAfdOriginGroupUpdatePropertiesParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdatePropertiesParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdatePropertiesParameters.TypeConverter.cs new file mode 100644 index 000000000000..1787e3f4f772 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdatePropertiesParameters.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdOriginGroupUpdatePropertiesParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdOriginGroupUpdatePropertiesParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdOriginGroupUpdatePropertiesParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdOriginGroupUpdatePropertiesParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdatePropertiesParameters.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdatePropertiesParameters.cs new file mode 100644 index 000000000000..e58844ba7fe4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdatePropertiesParameters.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the origin group. + public partial class AfdOriginGroupUpdatePropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters _healthProbeSetting; + + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get => (this._healthProbeSetting = this._healthProbeSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters()); set => this._healthProbeSetting = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters _loadBalancingSetting; + + /// Load balancing settings for a backend pool + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters LoadBalancingSetting { get => (this._loadBalancingSetting = this._loadBalancingSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParameters()); set => this._loadBalancingSetting = value; } + + /// Internal Acessors for ProfileName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParametersInternal.ProfileName { get => this._profileName; set { {_profileName = value;} } } + + /// Backing field for property. + private string _profileName; + + /// The name of the profile which holds the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ProfileName { get => this._profileName; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? _sessionAffinityState; + + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? SessionAffinityState { get => this._sessionAffinityState; set => this._sessionAffinityState = value; } + + /// + /// Backing field for property. + /// + private int? _trafficRestorationTimeToHealedOrNewEndpointsInMinute; + + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get => this._trafficRestorationTimeToHealedOrNewEndpointsInMinute; set => this._trafficRestorationTimeToHealedOrNewEndpointsInMinute = value; } + + /// + /// Creates an new instance. + /// + public AfdOriginGroupUpdatePropertiesParameters() + { + + } + } + /// The JSON object that contains the properties of the origin group. + public partial interface IAfdOriginGroupUpdatePropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health probe settings to the origin that is used to determine the health of the origin.", + SerializedName = @"healthProbeSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get; set; } + /// Load balancing settings for a backend pool + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Load balancing settings for a backend pool", + SerializedName = @"loadBalancingSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters LoadBalancingSetting { get; set; } + /// The name of the profile which holds the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the profile which holds the origin group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + string ProfileName { get; } + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'", + SerializedName = @"sessionAffinityState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? SessionAffinityState { get; set; } + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.", + SerializedName = @"trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + PossibleTypes = new [] { typeof(int) })] + int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get; set; } + + } + /// The JSON object that contains the properties of the origin group. + internal partial interface IAfdOriginGroupUpdatePropertiesParametersInternal + + { + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get; set; } + /// Load balancing settings for a backend pool + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters LoadBalancingSetting { get; set; } + /// The name of the profile which holds the origin group. + string ProfileName { get; set; } + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? SessionAffinityState { get; set; } + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdatePropertiesParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdatePropertiesParameters.json.cs new file mode 100644 index 000000000000..f69a81942ddd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginGroupUpdatePropertiesParameters.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the origin group. + public partial class AfdOriginGroupUpdatePropertiesParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdOriginGroupUpdatePropertiesParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_profileName = If( json?.PropertyT("profileName"), out var __jsonProfileName) ? (string)__jsonProfileName : (string)ProfileName;} + {_loadBalancingSetting = If( json?.PropertyT("loadBalancingSettings"), out var __jsonLoadBalancingSettings) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadBalancingSettingsParameters.FromJson(__jsonLoadBalancingSettings) : LoadBalancingSetting;} + {_healthProbeSetting = If( json?.PropertyT("healthProbeSettings"), out var __jsonHealthProbeSettings) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters.FromJson(__jsonHealthProbeSettings) : HealthProbeSetting;} + {_trafficRestorationTimeToHealedOrNewEndpointsInMinute = If( json?.PropertyT("trafficRestorationTimeToHealedOrNewEndpointsInMinutes"), out var __jsonTrafficRestorationTimeToHealedOrNewEndpointsInMinutes) ? (int?)__jsonTrafficRestorationTimeToHealedOrNewEndpointsInMinutes : TrafficRestorationTimeToHealedOrNewEndpointsInMinute;} + {_sessionAffinityState = If( json?.PropertyT("sessionAffinityState"), out var __jsonSessionAffinityState) ? (string)__jsonSessionAffinityState : (string)SessionAffinityState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdatePropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdOriginGroupUpdatePropertiesParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._profileName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._profileName.ToString()) : null, "profileName" ,container.Add ); + } + AddIf( null != this._loadBalancingSetting ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._loadBalancingSetting.ToJson(null,serializationMode) : null, "loadBalancingSettings" ,container.Add ); + AddIf( null != this._healthProbeSetting ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._healthProbeSetting.ToJson(null,serializationMode) : null, "healthProbeSettings" ,container.Add ); + AddIf( null != this._trafficRestorationTimeToHealedOrNewEndpointsInMinute ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._trafficRestorationTimeToHealedOrNewEndpointsInMinute) : null, "trafficRestorationTimeToHealedOrNewEndpointsInMinutes" ,container.Add ); + AddIf( null != (((object)this._sessionAffinityState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._sessionAffinityState.ToString()) : null, "sessionAffinityState" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginListResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginListResult.PowerShell.cs new file mode 100644 index 000000000000..77f282ebcc2b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results. + /// + [System.ComponentModel.TypeConverter(typeof(AfdOriginListResultTypeConverter))] + public partial class AfdOriginListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdOriginListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdOriginListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdOriginListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdOriginListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results. + [System.ComponentModel.TypeConverter(typeof(AfdOriginListResultTypeConverter))] + public partial interface IAfdOriginListResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginListResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginListResult.TypeConverter.cs new file mode 100644 index 000000000000..eebae2a3382f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdOriginListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdOriginListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdOriginListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdOriginListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginListResult.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginListResult.cs new file mode 100644 index 000000000000..dd1ae22e3aed --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginListResult.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results. + /// + public partial class AfdOriginListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResultInternal + { + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of origin objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin[] _value; + + /// List of CDN origins within an endpoint + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin[] Value { get => this._value; } + + /// Creates an new instance. + public AfdOriginListResult() + { + + } + } + /// Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results. + public partial interface IAfdOriginListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// URL to get the next set of origin objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL to get the next set of origin objects if there are any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// List of CDN origins within an endpoint + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of CDN origins within an endpoint", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin[] Value { get; } + + } + /// Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results. + internal partial interface IAfdOriginListResultInternal + + { + /// URL to get the next set of origin objects if there are any. + string NextLink { get; set; } + /// List of CDN origins within an endpoint + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginListResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginListResult.json.cs new file mode 100644 index 000000000000..3b9658bab199 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginListResult.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results. + /// + public partial class AfdOriginListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdOriginListResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOrigin.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdOriginListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginProperties.PowerShell.cs new file mode 100644 index 000000000000..1a3963720395 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginProperties.PowerShell.cs @@ -0,0 +1,314 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties of the origin. + [System.ComponentModel.TypeConverter(typeof(AfdOriginPropertiesTypeConverter))] + public partial class AfdOriginProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdOriginProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SharedPrivateLinkResourceStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus?) content.GetValueForProperty("SharedPrivateLinkResourceStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus.CreateFrom); + } + if (content.Contains("AzureOriginId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).AzureOriginId = (string) content.GetValueForProperty("AzureOriginId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).AzureOriginId, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourcePrivateLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourcePrivateLink = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("SharedPrivateLinkResourcePrivateLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourcePrivateLink, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SharedPrivateLinkResourcePrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourcePrivateLinkLocation = (string) content.GetValueForProperty("SharedPrivateLinkResourcePrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourcePrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourceGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceGroupId = (string) content.GetValueForProperty("SharedPrivateLinkResourceGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceGroupId, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourceRequestMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceRequestMessage = (string) content.GetValueForProperty("SharedPrivateLinkResourceRequestMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceRequestMessage, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).PrivateLinkId = (string) content.GetValueForProperty("PrivateLinkId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).PrivateLinkId, global::System.Convert.ToString); + } + if (content.Contains("AzureOrigin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).AzureOrigin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AzureOrigin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).AzureOrigin, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SharedPrivateLinkResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties) content.GetValueForProperty("SharedPrivateLinkResource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SharedPrivateLinkResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("OriginGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).OriginGroupName = (string) content.GetValueForProperty("OriginGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).OriginGroupName, global::System.Convert.ToString); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("EnforceCertificateNameCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).EnforceCertificateNameCheck = (bool?) content.GetValueForProperty("EnforceCertificateNameCheck",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).EnforceCertificateNameCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdOriginProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SharedPrivateLinkResourceStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus?) content.GetValueForProperty("SharedPrivateLinkResourceStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus.CreateFrom); + } + if (content.Contains("AzureOriginId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).AzureOriginId = (string) content.GetValueForProperty("AzureOriginId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).AzureOriginId, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourcePrivateLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourcePrivateLink = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("SharedPrivateLinkResourcePrivateLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourcePrivateLink, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SharedPrivateLinkResourcePrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourcePrivateLinkLocation = (string) content.GetValueForProperty("SharedPrivateLinkResourcePrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourcePrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourceGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceGroupId = (string) content.GetValueForProperty("SharedPrivateLinkResourceGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceGroupId, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourceRequestMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceRequestMessage = (string) content.GetValueForProperty("SharedPrivateLinkResourceRequestMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceRequestMessage, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).PrivateLinkId = (string) content.GetValueForProperty("PrivateLinkId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).PrivateLinkId, global::System.Convert.ToString); + } + if (content.Contains("AzureOrigin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).AzureOrigin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AzureOrigin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).AzureOrigin, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SharedPrivateLinkResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties) content.GetValueForProperty("SharedPrivateLinkResource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SharedPrivateLinkResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("OriginGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).OriginGroupName = (string) content.GetValueForProperty("OriginGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).OriginGroupName, global::System.Convert.ToString); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("EnforceCertificateNameCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).EnforceCertificateNameCheck = (bool?) content.GetValueForProperty("EnforceCertificateNameCheck",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).EnforceCertificateNameCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdOriginProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdOriginProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties of the origin. + [System.ComponentModel.TypeConverter(typeof(AfdOriginPropertiesTypeConverter))] + public partial interface IAfdOriginProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginProperties.TypeConverter.cs new file mode 100644 index 000000000000..476370e2c770 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdOriginPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdOriginProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdOriginProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdOriginProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginProperties.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginProperties.cs new file mode 100644 index 000000000000..3d3179fcdb6b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginProperties.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the origin. + public partial class AfdOriginProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParameters __afdOriginUpdatePropertiesParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginUpdatePropertiesParameters(); + + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(); + + /// Resource reference to the Azure origin resource. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference AzureOrigin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).AzureOrigin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).AzureOrigin = value ?? null /* model class */; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string AzureOriginId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).AzureOriginId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).AzureOriginId = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus; } + + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled + /// if there is a single enabled backend in single enabled backend pool. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).EnabledState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).EnabledState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); } + + /// Whether to enable certificate name check at origin level + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public bool? EnforceCertificateNameCheck { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).EnforceCertificateNameCheck; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).EnforceCertificateNameCheck = value ?? default(bool); } + + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string HostName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).HostName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).HostName = value ?? null; } + + /// The value of the HTTP port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public int? HttpPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).HttpPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).HttpPort = value ?? default(int); } + + /// The value of the HTTPS port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public int? HttpsPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).HttpsPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).HttpsPort = value ?? default(int); } + + /// Internal Acessors for OriginGroupName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal.OriginGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).OriginGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).OriginGroupName = value; } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState = value; } + + /// The name of the origin group which contains this origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string OriginGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).OriginGroupName; } + + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string OriginHostHeader { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).OriginHostHeader; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).OriginHostHeader = value ?? null; } + + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public int? Priority { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).Priority; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).Priority = value ?? default(int); } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string PrivateLinkId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).PrivateLinkId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).PrivateLinkId = value ?? null; } + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState; } + + /// The properties of the private link resource for private origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties SharedPrivateLinkResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).SharedPrivateLinkResource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).SharedPrivateLinkResource = value ?? null /* model class */; } + + /// + /// The group id from the provider of resource the shared private link resource is for. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string SharedPrivateLinkResourceGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).SharedPrivateLinkResourceGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).SharedPrivateLinkResourceGroupId = value ?? null; } + + /// The resource id of the resource the shared private link resource is for. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference SharedPrivateLinkResourcePrivateLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).SharedPrivateLinkResourcePrivateLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).SharedPrivateLinkResourcePrivateLink = value ?? null /* model class */; } + + /// The location of the shared private link resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string SharedPrivateLinkResourcePrivateLinkLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).SharedPrivateLinkResourcePrivateLinkLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).SharedPrivateLinkResourcePrivateLinkLocation = value ?? null; } + + /// + /// The request message for requesting approval of the shared private link resource. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string SharedPrivateLinkResourceRequestMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).SharedPrivateLinkResourceRequestMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).SharedPrivateLinkResourceRequestMessage = value ?? null; } + + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus? SharedPrivateLinkResourceStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).SharedPrivateLinkResourceStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).SharedPrivateLinkResourceStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus)""); } + + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public int? Weight { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).Weight; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)__afdOriginUpdatePropertiesParameters).Weight = value ?? default(int); } + + /// Creates an new instance. + public AfdOriginProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__afdOriginUpdatePropertiesParameters), __afdOriginUpdatePropertiesParameters); + await eventListener.AssertObjectIsValid(nameof(__afdOriginUpdatePropertiesParameters), __afdOriginUpdatePropertiesParameters); + await eventListener.AssertNotNull(nameof(__afdStateProperties), __afdStateProperties); + await eventListener.AssertObjectIsValid(nameof(__afdStateProperties), __afdStateProperties); + } + } + /// The JSON object that contains the properties of the origin. + public partial interface IAfdOriginProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties + { + + } + /// The JSON object that contains the properties of the origin. + internal partial interface IAfdOriginPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginProperties.json.cs new file mode 100644 index 000000000000..84da4cf361cb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginProperties.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the origin. + public partial class AfdOriginProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdOriginProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __afdOriginUpdatePropertiesParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginUpdatePropertiesParameters(json); + __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdOriginProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __afdOriginUpdatePropertiesParameters?.ToJson(container, serializationMode); + __afdStateProperties?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdateParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..18c12b784c76 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdateParameters.PowerShell.cs @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// AFDOrigin properties needed for origin update. + [System.ComponentModel.TypeConverter(typeof(AfdOriginUpdateParametersTypeConverter))] + public partial class AfdOriginUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdOriginUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginUpdatePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("AzureOrigin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).AzureOrigin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AzureOrigin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).AzureOrigin, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SharedPrivateLinkResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties) content.GetValueForProperty("SharedPrivateLinkResource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SharedPrivateLinkResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("OriginGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).OriginGroupName = (string) content.GetValueForProperty("OriginGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).OriginGroupName, global::System.Convert.ToString); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EnforceCertificateNameCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).EnforceCertificateNameCheck = (bool?) content.GetValueForProperty("EnforceCertificateNameCheck",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).EnforceCertificateNameCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SharedPrivateLinkResourceStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourceStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus?) content.GetValueForProperty("SharedPrivateLinkResourceStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourceStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus.CreateFrom); + } + if (content.Contains("AzureOriginId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).AzureOriginId = (string) content.GetValueForProperty("AzureOriginId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).AzureOriginId, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourcePrivateLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourcePrivateLink = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("SharedPrivateLinkResourcePrivateLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourcePrivateLink, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SharedPrivateLinkResourcePrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourcePrivateLinkLocation = (string) content.GetValueForProperty("SharedPrivateLinkResourcePrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourcePrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourceGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourceGroupId = (string) content.GetValueForProperty("SharedPrivateLinkResourceGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourceGroupId, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourceRequestMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourceRequestMessage = (string) content.GetValueForProperty("SharedPrivateLinkResourceRequestMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourceRequestMessage, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).PrivateLinkId = (string) content.GetValueForProperty("PrivateLinkId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).PrivateLinkId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdOriginUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginUpdatePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("AzureOrigin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).AzureOrigin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AzureOrigin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).AzureOrigin, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SharedPrivateLinkResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties) content.GetValueForProperty("SharedPrivateLinkResource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SharedPrivateLinkResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("OriginGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).OriginGroupName = (string) content.GetValueForProperty("OriginGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).OriginGroupName, global::System.Convert.ToString); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EnforceCertificateNameCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).EnforceCertificateNameCheck = (bool?) content.GetValueForProperty("EnforceCertificateNameCheck",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).EnforceCertificateNameCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SharedPrivateLinkResourceStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourceStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus?) content.GetValueForProperty("SharedPrivateLinkResourceStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourceStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus.CreateFrom); + } + if (content.Contains("AzureOriginId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).AzureOriginId = (string) content.GetValueForProperty("AzureOriginId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).AzureOriginId, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourcePrivateLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourcePrivateLink = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("SharedPrivateLinkResourcePrivateLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourcePrivateLink, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SharedPrivateLinkResourcePrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourcePrivateLinkLocation = (string) content.GetValueForProperty("SharedPrivateLinkResourcePrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourcePrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourceGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourceGroupId = (string) content.GetValueForProperty("SharedPrivateLinkResourceGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourceGroupId, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourceRequestMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourceRequestMessage = (string) content.GetValueForProperty("SharedPrivateLinkResourceRequestMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).SharedPrivateLinkResourceRequestMessage, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).PrivateLinkId = (string) content.GetValueForProperty("PrivateLinkId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal)this).PrivateLinkId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdOriginUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdOriginUpdateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// AFDOrigin properties needed for origin update. + [System.ComponentModel.TypeConverter(typeof(AfdOriginUpdateParametersTypeConverter))] + public partial interface IAfdOriginUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdateParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdateParameters.TypeConverter.cs new file mode 100644 index 000000000000..03ad46edb96b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdateParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdOriginUpdateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdOriginUpdateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdOriginUpdateParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdOriginUpdateParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdateParameters.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdateParameters.cs new file mode 100644 index 000000000000..bae18b80cfad --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdateParameters.cs @@ -0,0 +1,337 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// AFDOrigin properties needed for origin update. + public partial class AfdOriginUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal + { + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string AzureOriginId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).AzureOriginId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).AzureOriginId = value ?? null; } + + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled + /// if there is a single enabled backend in single enabled backend pool. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).EnabledState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).EnabledState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); } + + /// Whether to enable certificate name check at origin level + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? EnforceCertificateNameCheck { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).EnforceCertificateNameCheck; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).EnforceCertificateNameCheck = value ?? default(bool); } + + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string HostName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).HostName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).HostName = value ?? null; } + + /// The value of the HTTP port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? HttpPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).HttpPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).HttpPort = value ?? default(int); } + + /// The value of the HTTPS port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? HttpsPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).HttpsPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).HttpsPort = value ?? default(int); } + + /// Internal Acessors for AzureOrigin + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal.AzureOrigin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).AzureOrigin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).AzureOrigin = value; } + + /// Internal Acessors for OriginGroupName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal.OriginGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).OriginGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).OriginGroupName = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginUpdatePropertiesParameters()); set { {_property = value;} } } + + /// Internal Acessors for SharedPrivateLinkResource + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal.SharedPrivateLinkResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResource = value; } + + /// Internal Acessors for SharedPrivateLinkResourcePrivateLink + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParametersInternal.SharedPrivateLinkResourcePrivateLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourcePrivateLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourcePrivateLink = value; } + + /// The name of the origin group which contains this origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).OriginGroupName; } + + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginHostHeader { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).OriginHostHeader; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).OriginHostHeader = value ?? null; } + + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? Priority { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).Priority; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).Priority = value ?? default(int); } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PrivateLinkId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).PrivateLinkId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).PrivateLinkId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParameters _property; + + /// The JSON object that contains the properties of the origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParameters Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginUpdatePropertiesParameters()); set => this._property = value; } + + /// + /// The group id from the provider of resource the shared private link resource is for. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string SharedPrivateLinkResourceGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourceGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourceGroupId = value ?? null; } + + /// The location of the shared private link resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string SharedPrivateLinkResourcePrivateLinkLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourcePrivateLinkLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourcePrivateLinkLocation = value ?? null; } + + /// + /// The request message for requesting approval of the shared private link resource. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string SharedPrivateLinkResourceRequestMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourceRequestMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourceRequestMessage = value ?? null; } + + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus? SharedPrivateLinkResourceStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourceStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).SharedPrivateLinkResourceStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus)""); } + + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? Weight { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).Weight; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)Property).Weight = value ?? default(int); } + + /// Creates an new instance. + public AfdOriginUpdateParameters() + { + + } + } + /// AFDOrigin properties needed for origin update. + public partial interface IAfdOriginUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string AzureOriginId { get; set; } + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled + /// if there is a single enabled backend in single enabled backend pool. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool.", + SerializedName = @"enabledState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get; set; } + /// Whether to enable certificate name check at origin level + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable certificate name check at origin level", + SerializedName = @"enforceCertificateNameCheck", + PossibleTypes = new [] { typeof(bool) })] + bool? EnforceCertificateNameCheck { get; set; } + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; set; } + /// The value of the HTTP port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTP port. Must be between 1 and 65535.", + SerializedName = @"httpPort", + PossibleTypes = new [] { typeof(int) })] + int? HttpPort { get; set; } + /// The value of the HTTPS port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTPS port. Must be between 1 and 65535.", + SerializedName = @"httpsPort", + PossibleTypes = new [] { typeof(int) })] + int? HttpsPort { get; set; } + /// The name of the origin group which contains this origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the origin group which contains this origin.", + SerializedName = @"originGroupName", + PossibleTypes = new [] { typeof(string) })] + string OriginGroupName { get; } + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + string OriginHostHeader { get; set; } + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5", + SerializedName = @"priority", + PossibleTypes = new [] { typeof(int) })] + int? Priority { get; set; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkId { get; set; } + /// + /// The group id from the provider of resource the shared private link resource is for. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The group id from the provider of resource the shared private link resource is for.", + SerializedName = @"groupId", + PossibleTypes = new [] { typeof(string) })] + string SharedPrivateLinkResourceGroupId { get; set; } + /// The location of the shared private link resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location of the shared private link resource", + SerializedName = @"privateLinkLocation", + PossibleTypes = new [] { typeof(string) })] + string SharedPrivateLinkResourcePrivateLinkLocation { get; set; } + /// + /// The request message for requesting approval of the shared private link resource. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The request message for requesting approval of the shared private link resource.", + SerializedName = @"requestMessage", + PossibleTypes = new [] { typeof(string) })] + string SharedPrivateLinkResourceRequestMessage { get; set; } + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus? SharedPrivateLinkResourceStatus { get; set; } + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Weight of the origin in given origin group for load balancing. Must be between 1 and 1000", + SerializedName = @"weight", + PossibleTypes = new [] { typeof(int) })] + int? Weight { get; set; } + + } + /// AFDOrigin properties needed for origin update. + internal partial interface IAfdOriginUpdateParametersInternal + + { + /// Resource reference to the Azure origin resource. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference AzureOrigin { get; set; } + /// Resource ID. + string AzureOriginId { get; set; } + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled + /// if there is a single enabled backend in single enabled backend pool. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get; set; } + /// Whether to enable certificate name check at origin level + bool? EnforceCertificateNameCheck { get; set; } + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + string HostName { get; set; } + /// The value of the HTTP port. Must be between 1 and 65535. + int? HttpPort { get; set; } + /// The value of the HTTPS port. Must be between 1 and 65535. + int? HttpsPort { get; set; } + /// The name of the origin group which contains this origin. + string OriginGroupName { get; set; } + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + string OriginHostHeader { get; set; } + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + int? Priority { get; set; } + /// Resource ID. + string PrivateLinkId { get; set; } + /// The JSON object that contains the properties of the origin. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParameters Property { get; set; } + /// The properties of the private link resource for private origin. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties SharedPrivateLinkResource { get; set; } + /// + /// The group id from the provider of resource the shared private link resource is for. + /// + string SharedPrivateLinkResourceGroupId { get; set; } + /// The resource id of the resource the shared private link resource is for. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference SharedPrivateLinkResourcePrivateLink { get; set; } + /// The location of the shared private link resource + string SharedPrivateLinkResourcePrivateLinkLocation { get; set; } + /// + /// The request message for requesting approval of the shared private link resource. + /// + string SharedPrivateLinkResourceRequestMessage { get; set; } + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus? SharedPrivateLinkResourceStatus { get; set; } + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + int? Weight { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdateParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdateParameters.json.cs new file mode 100644 index 000000000000..7f1b5eb74e73 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdateParameters.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// AFDOrigin properties needed for origin update. + public partial class AfdOriginUpdateParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdOriginUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginUpdatePropertiesParameters.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdOriginUpdateParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdatePropertiesParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdatePropertiesParameters.PowerShell.cs new file mode 100644 index 000000000000..ae5f1881772c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdatePropertiesParameters.PowerShell.cs @@ -0,0 +1,302 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties of the origin. + [System.ComponentModel.TypeConverter(typeof(AfdOriginUpdatePropertiesParametersTypeConverter))] + public partial class AfdOriginUpdatePropertiesParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdOriginUpdatePropertiesParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AzureOrigin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).AzureOrigin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AzureOrigin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).AzureOrigin, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SharedPrivateLinkResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties) content.GetValueForProperty("SharedPrivateLinkResource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SharedPrivateLinkResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("OriginGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).OriginGroupName = (string) content.GetValueForProperty("OriginGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).OriginGroupName, global::System.Convert.ToString); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("EnforceCertificateNameCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).EnforceCertificateNameCheck = (bool?) content.GetValueForProperty("EnforceCertificateNameCheck",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).EnforceCertificateNameCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SharedPrivateLinkResourceStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus?) content.GetValueForProperty("SharedPrivateLinkResourceStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus.CreateFrom); + } + if (content.Contains("AzureOriginId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).AzureOriginId = (string) content.GetValueForProperty("AzureOriginId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).AzureOriginId, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourcePrivateLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourcePrivateLink = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("SharedPrivateLinkResourcePrivateLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourcePrivateLink, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SharedPrivateLinkResourcePrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourcePrivateLinkLocation = (string) content.GetValueForProperty("SharedPrivateLinkResourcePrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourcePrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourceGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceGroupId = (string) content.GetValueForProperty("SharedPrivateLinkResourceGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceGroupId, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourceRequestMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceRequestMessage = (string) content.GetValueForProperty("SharedPrivateLinkResourceRequestMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceRequestMessage, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).PrivateLinkId = (string) content.GetValueForProperty("PrivateLinkId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).PrivateLinkId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdOriginUpdatePropertiesParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AzureOrigin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).AzureOrigin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("AzureOrigin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).AzureOrigin, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SharedPrivateLinkResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties) content.GetValueForProperty("SharedPrivateLinkResource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SharedPrivateLinkResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("OriginGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).OriginGroupName = (string) content.GetValueForProperty("OriginGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).OriginGroupName, global::System.Convert.ToString); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("EnforceCertificateNameCheck")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).EnforceCertificateNameCheck = (bool?) content.GetValueForProperty("EnforceCertificateNameCheck",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).EnforceCertificateNameCheck, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SharedPrivateLinkResourceStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus?) content.GetValueForProperty("SharedPrivateLinkResourceStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus.CreateFrom); + } + if (content.Contains("AzureOriginId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).AzureOriginId = (string) content.GetValueForProperty("AzureOriginId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).AzureOriginId, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourcePrivateLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourcePrivateLink = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("SharedPrivateLinkResourcePrivateLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourcePrivateLink, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SharedPrivateLinkResourcePrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourcePrivateLinkLocation = (string) content.GetValueForProperty("SharedPrivateLinkResourcePrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourcePrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourceGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceGroupId = (string) content.GetValueForProperty("SharedPrivateLinkResourceGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceGroupId, global::System.Convert.ToString); + } + if (content.Contains("SharedPrivateLinkResourceRequestMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceRequestMessage = (string) content.GetValueForProperty("SharedPrivateLinkResourceRequestMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).SharedPrivateLinkResourceRequestMessage, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).PrivateLinkId = (string) content.GetValueForProperty("PrivateLinkId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal)this).PrivateLinkId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdOriginUpdatePropertiesParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdOriginUpdatePropertiesParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties of the origin. + [System.ComponentModel.TypeConverter(typeof(AfdOriginUpdatePropertiesParametersTypeConverter))] + public partial interface IAfdOriginUpdatePropertiesParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdatePropertiesParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdatePropertiesParameters.TypeConverter.cs new file mode 100644 index 000000000000..c0315fbe5e67 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdatePropertiesParameters.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdOriginUpdatePropertiesParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdOriginUpdatePropertiesParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdOriginUpdatePropertiesParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdOriginUpdatePropertiesParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdatePropertiesParameters.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdatePropertiesParameters.cs new file mode 100644 index 000000000000..0bb9577dd2bb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdatePropertiesParameters.cs @@ -0,0 +1,366 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the origin. + public partial class AfdOriginUpdatePropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference _azureOrigin; + + /// Resource reference to the Azure origin resource. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference AzureOrigin { get => (this._azureOrigin = this._azureOrigin ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set => this._azureOrigin = value; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string AzureOriginId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)AzureOrigin).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)AzureOrigin).Id = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? _enabledState; + + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled + /// if there is a single enabled backend in single enabled backend pool. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get => this._enabledState; set => this._enabledState = value; } + + /// Backing field for property. + private bool? _enforceCertificateNameCheck; + + /// Whether to enable certificate name check at origin level + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? EnforceCertificateNameCheck { get => this._enforceCertificateNameCheck; set => this._enforceCertificateNameCheck = value; } + + /// Backing field for property. + private string _hostName; + + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string HostName { get => this._hostName; set => this._hostName = value; } + + /// Backing field for property. + private int? _httpPort; + + /// The value of the HTTP port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? HttpPort { get => this._httpPort; set => this._httpPort = value; } + + /// Backing field for property. + private int? _httpsPort; + + /// The value of the HTTPS port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? HttpsPort { get => this._httpsPort; set => this._httpsPort = value; } + + /// Internal Acessors for AzureOrigin + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal.AzureOrigin { get => (this._azureOrigin = this._azureOrigin ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set { {_azureOrigin = value;} } } + + /// Internal Acessors for OriginGroupName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal.OriginGroupName { get => this._originGroupName; set { {_originGroupName = value;} } } + + /// Internal Acessors for SharedPrivateLinkResource + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal.SharedPrivateLinkResource { get => (this._sharedPrivateLinkResource = this._sharedPrivateLinkResource ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SharedPrivateLinkResourceProperties()); set { {_sharedPrivateLinkResource = value;} } } + + /// Internal Acessors for SharedPrivateLinkResourcePrivateLink + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParametersInternal.SharedPrivateLinkResourcePrivateLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)SharedPrivateLinkResource).PrivateLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)SharedPrivateLinkResource).PrivateLink = value; } + + /// Backing field for property. + private string _originGroupName; + + /// The name of the origin group which contains this origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string OriginGroupName { get => this._originGroupName; } + + /// Backing field for property. + private string _originHostHeader; + + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string OriginHostHeader { get => this._originHostHeader; set => this._originHostHeader = value; } + + /// Backing field for property. + private int? _priority; + + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? Priority { get => this._priority; set => this._priority = value; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PrivateLinkId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)SharedPrivateLinkResource).PrivateLinkId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)SharedPrivateLinkResource).PrivateLinkId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties _sharedPrivateLinkResource; + + /// The properties of the private link resource for private origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties SharedPrivateLinkResource { get => (this._sharedPrivateLinkResource = this._sharedPrivateLinkResource ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SharedPrivateLinkResourceProperties()); set => this._sharedPrivateLinkResource = value; } + + /// + /// The group id from the provider of resource the shared private link resource is for. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string SharedPrivateLinkResourceGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)SharedPrivateLinkResource).GroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)SharedPrivateLinkResource).GroupId = value ?? null; } + + /// The location of the shared private link resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string SharedPrivateLinkResourcePrivateLinkLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)SharedPrivateLinkResource).PrivateLinkLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)SharedPrivateLinkResource).PrivateLinkLocation = value ?? null; } + + /// + /// The request message for requesting approval of the shared private link resource. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string SharedPrivateLinkResourceRequestMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)SharedPrivateLinkResource).RequestMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)SharedPrivateLinkResource).RequestMessage = value ?? null; } + + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus? SharedPrivateLinkResourceStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)SharedPrivateLinkResource).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)SharedPrivateLinkResource).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus)""); } + + /// Backing field for property. + private int? _weight; + + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? Weight { get => this._weight; set => this._weight = value; } + + /// Creates an new instance. + public AfdOriginUpdatePropertiesParameters() + { + + } + } + /// The JSON object that contains the properties of the origin. + public partial interface IAfdOriginUpdatePropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string AzureOriginId { get; set; } + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled + /// if there is a single enabled backend in single enabled backend pool. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool.", + SerializedName = @"enabledState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get; set; } + /// Whether to enable certificate name check at origin level + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable certificate name check at origin level", + SerializedName = @"enforceCertificateNameCheck", + PossibleTypes = new [] { typeof(bool) })] + bool? EnforceCertificateNameCheck { get; set; } + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; set; } + /// The value of the HTTP port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTP port. Must be between 1 and 65535.", + SerializedName = @"httpPort", + PossibleTypes = new [] { typeof(int) })] + int? HttpPort { get; set; } + /// The value of the HTTPS port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTPS port. Must be between 1 and 65535.", + SerializedName = @"httpsPort", + PossibleTypes = new [] { typeof(int) })] + int? HttpsPort { get; set; } + /// The name of the origin group which contains this origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the origin group which contains this origin.", + SerializedName = @"originGroupName", + PossibleTypes = new [] { typeof(string) })] + string OriginGroupName { get; } + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + string OriginHostHeader { get; set; } + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5", + SerializedName = @"priority", + PossibleTypes = new [] { typeof(int) })] + int? Priority { get; set; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkId { get; set; } + /// + /// The group id from the provider of resource the shared private link resource is for. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The group id from the provider of resource the shared private link resource is for.", + SerializedName = @"groupId", + PossibleTypes = new [] { typeof(string) })] + string SharedPrivateLinkResourceGroupId { get; set; } + /// The location of the shared private link resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location of the shared private link resource", + SerializedName = @"privateLinkLocation", + PossibleTypes = new [] { typeof(string) })] + string SharedPrivateLinkResourcePrivateLinkLocation { get; set; } + /// + /// The request message for requesting approval of the shared private link resource. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The request message for requesting approval of the shared private link resource.", + SerializedName = @"requestMessage", + PossibleTypes = new [] { typeof(string) })] + string SharedPrivateLinkResourceRequestMessage { get; set; } + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus? SharedPrivateLinkResourceStatus { get; set; } + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Weight of the origin in given origin group for load balancing. Must be between 1 and 1000", + SerializedName = @"weight", + PossibleTypes = new [] { typeof(int) })] + int? Weight { get; set; } + + } + /// The JSON object that contains the properties of the origin. + internal partial interface IAfdOriginUpdatePropertiesParametersInternal + + { + /// Resource reference to the Azure origin resource. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference AzureOrigin { get; set; } + /// Resource ID. + string AzureOriginId { get; set; } + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled + /// if there is a single enabled backend in single enabled backend pool. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get; set; } + /// Whether to enable certificate name check at origin level + bool? EnforceCertificateNameCheck { get; set; } + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + string HostName { get; set; } + /// The value of the HTTP port. Must be between 1 and 65535. + int? HttpPort { get; set; } + /// The value of the HTTPS port. Must be between 1 and 65535. + int? HttpsPort { get; set; } + /// The name of the origin group which contains this origin. + string OriginGroupName { get; set; } + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + string OriginHostHeader { get; set; } + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + int? Priority { get; set; } + /// Resource ID. + string PrivateLinkId { get; set; } + /// The properties of the private link resource for private origin. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties SharedPrivateLinkResource { get; set; } + /// + /// The group id from the provider of resource the shared private link resource is for. + /// + string SharedPrivateLinkResourceGroupId { get; set; } + /// The resource id of the resource the shared private link resource is for. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference SharedPrivateLinkResourcePrivateLink { get; set; } + /// The location of the shared private link resource + string SharedPrivateLinkResourcePrivateLinkLocation { get; set; } + /// + /// The request message for requesting approval of the shared private link resource. + /// + string SharedPrivateLinkResourceRequestMessage { get; set; } + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus? SharedPrivateLinkResourceStatus { get; set; } + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + int? Weight { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdatePropertiesParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdatePropertiesParameters.json.cs new file mode 100644 index 000000000000..c87efa3bba31 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdOriginUpdatePropertiesParameters.json.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the origin. + public partial class AfdOriginUpdatePropertiesParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdOriginUpdatePropertiesParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_azureOrigin = If( json?.PropertyT("azureOrigin"), out var __jsonAzureOrigin) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonAzureOrigin) : AzureOrigin;} + {_sharedPrivateLinkResource = If( json?.PropertyT("sharedPrivateLinkResource"), out var __jsonSharedPrivateLinkResource) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SharedPrivateLinkResourceProperties.FromJson(__jsonSharedPrivateLinkResource) : SharedPrivateLinkResource;} + {_originGroupName = If( json?.PropertyT("originGroupName"), out var __jsonOriginGroupName) ? (string)__jsonOriginGroupName : (string)OriginGroupName;} + {_hostName = If( json?.PropertyT("hostName"), out var __jsonHostName) ? (string)__jsonHostName : (string)HostName;} + {_httpPort = If( json?.PropertyT("httpPort"), out var __jsonHttpPort) ? (int?)__jsonHttpPort : HttpPort;} + {_httpsPort = If( json?.PropertyT("httpsPort"), out var __jsonHttpsPort) ? (int?)__jsonHttpsPort : HttpsPort;} + {_originHostHeader = If( json?.PropertyT("originHostHeader"), out var __jsonOriginHostHeader) ? (string)__jsonOriginHostHeader : (string)OriginHostHeader;} + {_priority = If( json?.PropertyT("priority"), out var __jsonPriority) ? (int?)__jsonPriority : Priority;} + {_weight = If( json?.PropertyT("weight"), out var __jsonWeight) ? (int?)__jsonWeight : Weight;} + {_enabledState = If( json?.PropertyT("enabledState"), out var __jsonEnabledState) ? (string)__jsonEnabledState : (string)EnabledState;} + {_enforceCertificateNameCheck = If( json?.PropertyT("enforceCertificateNameCheck"), out var __jsonEnforceCertificateNameCheck) ? (bool?)__jsonEnforceCertificateNameCheck : EnforceCertificateNameCheck;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdatePropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdOriginUpdatePropertiesParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._azureOrigin ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._azureOrigin.ToJson(null,serializationMode) : null, "azureOrigin" ,container.Add ); + AddIf( null != this._sharedPrivateLinkResource ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._sharedPrivateLinkResource.ToJson(null,serializationMode) : null, "sharedPrivateLinkResource" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._originGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._originGroupName.ToString()) : null, "originGroupName" ,container.Add ); + } + AddIf( null != (((object)this._hostName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._hostName.ToString()) : null, "hostName" ,container.Add ); + AddIf( null != this._httpPort ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._httpPort) : null, "httpPort" ,container.Add ); + AddIf( null != this._httpsPort ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._httpsPort) : null, "httpsPort" ,container.Add ); + AddIf( null != (((object)this._originHostHeader)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._originHostHeader.ToString()) : null, "originHostHeader" ,container.Add ); + AddIf( null != this._priority ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._priority) : null, "priority" ,container.Add ); + AddIf( null != this._weight ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._weight) : null, "weight" ,container.Add ); + AddIf( null != (((object)this._enabledState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._enabledState.ToString()) : null, "enabledState" ,container.Add ); + AddIf( null != this._enforceCertificateNameCheck ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._enforceCertificateNameCheck) : null, "enforceCertificateNameCheck" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdPurgeParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdPurgeParameters.PowerShell.cs new file mode 100644 index 000000000000..aee70de0b4a5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdPurgeParameters.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Parameters required for content purge. + [System.ComponentModel.TypeConverter(typeof(AfdPurgeParametersTypeConverter))] + public partial class AfdPurgeParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdPurgeParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ContentPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParametersInternal)this).ContentPath = (string[]) content.GetValueForProperty("ContentPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParametersInternal)this).ContentPath, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParametersInternal)this).Domain = (string[]) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParametersInternal)this).Domain, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdPurgeParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ContentPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParametersInternal)this).ContentPath = (string[]) content.GetValueForProperty("ContentPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParametersInternal)this).ContentPath, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParametersInternal)this).Domain = (string[]) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParametersInternal)this).Domain, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdPurgeParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdPurgeParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Parameters required for content purge. + [System.ComponentModel.TypeConverter(typeof(AfdPurgeParametersTypeConverter))] + public partial interface IAfdPurgeParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdPurgeParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdPurgeParameters.TypeConverter.cs new file mode 100644 index 000000000000..16efeb046e2a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdPurgeParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdPurgeParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdPurgeParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdPurgeParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdPurgeParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdPurgeParameters.cs b/src/Cdn/generated/api/Models/Api20210601/AfdPurgeParameters.cs new file mode 100644 index 000000000000..543dbf2bf126 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdPurgeParameters.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Parameters required for content purge. + public partial class AfdPurgeParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParametersInternal + { + + /// Backing field for property. + private string[] _contentPath; + + /// + /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] ContentPath { get => this._contentPath; set => this._contentPath = value; } + + /// Backing field for property. + private string[] _domain; + + /// List of domains. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] Domain { get => this._domain; set => this._domain = value; } + + /// Creates an new instance. + public AfdPurgeParameters() + { + + } + } + /// Parameters required for content purge. + public partial interface IAfdPurgeParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The path to the content to be purged. Can describe a file path or a wild card directory.", + SerializedName = @"contentPaths", + PossibleTypes = new [] { typeof(string) })] + string[] ContentPath { get; set; } + /// List of domains. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of domains.", + SerializedName = @"domains", + PossibleTypes = new [] { typeof(string) })] + string[] Domain { get; set; } + + } + /// Parameters required for content purge. + internal partial interface IAfdPurgeParametersInternal + + { + /// + /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// + string[] ContentPath { get; set; } + /// List of domains. + string[] Domain { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdPurgeParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdPurgeParameters.json.cs new file mode 100644 index 000000000000..f16e2fb454c0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdPurgeParameters.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Parameters required for content purge. + public partial class AfdPurgeParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdPurgeParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_contentPath = If( json?.PropertyT("contentPaths"), out var __jsonContentPaths) ? If( __jsonContentPaths as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : ContentPath;} + {_domain = If( json?.PropertyT("domains"), out var __jsonDomains) ? If( __jsonDomains as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : Domain;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdPurgeParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._contentPath) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._contentPath ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("contentPaths",__w); + } + if (null != this._domain) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._domain ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("domains",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdRouteCacheConfiguration.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdRouteCacheConfiguration.PowerShell.cs new file mode 100644 index 000000000000..56b3e8971efc --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdRouteCacheConfiguration.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. + /// + [System.ComponentModel.TypeConverter(typeof(AfdRouteCacheConfigurationTypeConverter))] + public partial class AfdRouteCacheConfiguration + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdRouteCacheConfiguration(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CompressionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).CompressionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings) content.GetValueForProperty("CompressionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).CompressionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CompressionSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("QueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).QueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior?) content.GetValueForProperty("QueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).QueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("QueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).QueryParameter = (string) content.GetValueForProperty("QueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).QueryParameter, global::System.Convert.ToString); + } + if (content.Contains("CompressionSettingContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).CompressionSettingContentTypesToCompress = (string[]) content.GetValueForProperty("CompressionSettingContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).CompressionSettingContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompressionSettingIsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).CompressionSettingIsCompressionEnabled = (bool?) content.GetValueForProperty("CompressionSettingIsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).CompressionSettingIsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdRouteCacheConfiguration(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CompressionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).CompressionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings) content.GetValueForProperty("CompressionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).CompressionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CompressionSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("QueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).QueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior?) content.GetValueForProperty("QueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).QueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("QueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).QueryParameter = (string) content.GetValueForProperty("QueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).QueryParameter, global::System.Convert.ToString); + } + if (content.Contains("CompressionSettingContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).CompressionSettingContentTypesToCompress = (string[]) content.GetValueForProperty("CompressionSettingContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).CompressionSettingContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompressionSettingIsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).CompressionSettingIsCompressionEnabled = (bool?) content.GetValueForProperty("CompressionSettingIsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)this).CompressionSettingIsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdRouteCacheConfiguration(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdRouteCacheConfiguration(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. + [System.ComponentModel.TypeConverter(typeof(AfdRouteCacheConfigurationTypeConverter))] + public partial interface IAfdRouteCacheConfiguration + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdRouteCacheConfiguration.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdRouteCacheConfiguration.TypeConverter.cs new file mode 100644 index 000000000000..60dd76c8b749 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdRouteCacheConfiguration.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdRouteCacheConfigurationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdRouteCacheConfiguration.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdRouteCacheConfiguration.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdRouteCacheConfiguration.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdRouteCacheConfiguration.cs b/src/Cdn/generated/api/Models/Api20210601/AfdRouteCacheConfiguration.cs new file mode 100644 index 000000000000..295ba4b5bb07 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdRouteCacheConfiguration.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. + /// + public partial class AfdRouteCacheConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings _compressionSetting; + + /// compression settings. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings CompressionSetting { get => (this._compressionSetting = this._compressionSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CompressionSettings()); set => this._compressionSetting = value; } + + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] CompressionSettingContentTypesToCompress { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettingsInternal)CompressionSetting).ContentTypesToCompress; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettingsInternal)CompressionSetting).ContentTypesToCompress = value ?? null /* arrayOf */; } + + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? CompressionSettingIsCompressionEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettingsInternal)CompressionSetting).IsCompressionEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettingsInternal)CompressionSetting).IsCompressionEnabled = value ?? default(bool); } + + /// Internal Acessors for CompressionSetting + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal.CompressionSetting { get => (this._compressionSetting = this._compressionSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CompressionSettings()); set { {_compressionSetting = value;} } } + + /// Backing field for property. + private string _queryParameter; + + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string QueryParameter { get => this._queryParameter; set => this._queryParameter = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior? _queryStringCachingBehavior; + + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior? QueryStringCachingBehavior { get => this._queryStringCachingBehavior; set => this._queryStringCachingBehavior = value; } + + /// Creates an new instance. + public AfdRouteCacheConfiguration() + { + + } + } + /// Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. + public partial interface IAfdRouteCacheConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of content types on which compression applies. The value should be a valid MIME type.", + SerializedName = @"contentTypesToCompress", + PossibleTypes = new [] { typeof(string) })] + string[] CompressionSettingContentTypesToCompress { get; set; } + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.", + SerializedName = @"isCompressionEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? CompressionSettingIsCompressionEnabled { get; set; } + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"query parameters to include or exclude (comma separated).", + SerializedName = @"queryParameters", + PossibleTypes = new [] { typeof(string) })] + string QueryParameter { get; set; } + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.", + SerializedName = @"queryStringCachingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior? QueryStringCachingBehavior { get; set; } + + } + /// Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. + internal partial interface IAfdRouteCacheConfigurationInternal + + { + /// compression settings. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings CompressionSetting { get; set; } + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + string[] CompressionSettingContentTypesToCompress { get; set; } + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + bool? CompressionSettingIsCompressionEnabled { get; set; } + /// query parameters to include or exclude (comma separated). + string QueryParameter { get; set; } + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior? QueryStringCachingBehavior { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdRouteCacheConfiguration.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdRouteCacheConfiguration.json.cs new file mode 100644 index 000000000000..583baedec8bc --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdRouteCacheConfiguration.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. + /// + public partial class AfdRouteCacheConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdRouteCacheConfiguration(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_compressionSetting = If( json?.PropertyT("compressionSettings"), out var __jsonCompressionSettings) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CompressionSettings.FromJson(__jsonCompressionSettings) : CompressionSetting;} + {_queryStringCachingBehavior = If( json?.PropertyT("queryStringCachingBehavior"), out var __jsonQueryStringCachingBehavior) ? (string)__jsonQueryStringCachingBehavior : (string)QueryStringCachingBehavior;} + {_queryParameter = If( json?.PropertyT("queryParameters"), out var __jsonQueryParameters) ? (string)__jsonQueryParameters : (string)QueryParameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdRouteCacheConfiguration(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._compressionSetting ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._compressionSetting.ToJson(null,serializationMode) : null, "compressionSettings" ,container.Add ); + AddIf( null != (((object)this._queryStringCachingBehavior)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._queryStringCachingBehavior.ToString()) : null, "queryStringCachingBehavior" ,container.Add ); + AddIf( null != (((object)this._queryParameter)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._queryParameter.ToString()) : null, "queryParameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdStateProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AfdStateProperties.PowerShell.cs new file mode 100644 index 000000000000..7cbcee5b9288 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdStateProperties.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The tracking states for afd resources. + [System.ComponentModel.TypeConverter(typeof(AfdStatePropertiesTypeConverter))] + public partial class AfdStateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AfdStateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AfdStateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AfdStateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AfdStateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The tracking states for afd resources. + [System.ComponentModel.TypeConverter(typeof(AfdStatePropertiesTypeConverter))] + public partial interface IAfdStateProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdStateProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AfdStateProperties.TypeConverter.cs new file mode 100644 index 000000000000..452ca531a13c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdStateProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AfdStatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AfdStateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AfdStateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AfdStateProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdStateProperties.cs b/src/Cdn/generated/api/Models/Api20210601/AfdStateProperties.cs new file mode 100644 index 000000000000..cd28649c518a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdStateProperties.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The tracking states for afd resources. + public partial class AfdStateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? _deploymentStatus; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => this._deploymentStatus; } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.DeploymentStatus { get => this._deploymentStatus; set { {_deploymentStatus = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? _provisioningState; + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Creates an new instance. + public AfdStateProperties() + { + + } + } + /// The tracking states for afd resources. + public partial interface IAfdStateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"", + SerializedName = @"deploymentStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; } + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; } + + } + /// The tracking states for afd resources. + internal partial interface IAfdStatePropertiesInternal + + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; set; } + /// Provisioning status + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AfdStateProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/AfdStateProperties.json.cs new file mode 100644 index 000000000000..56b9cbc1ad14 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AfdStateProperties.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The tracking states for afd resources. + public partial class AfdStateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AfdStateProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_deploymentStatus = If( json?.PropertyT("deploymentStatus"), out var __jsonDeploymentStatus) ? (string)__jsonDeploymentStatus : (string)DeploymentStatus;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AfdStateProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._deploymentStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._deploymentStatus.ToString()) : null, "deploymentStatus" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificate.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificate.PowerShell.cs new file mode 100644 index 000000000000..e0d10cd4dbc6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificate.PowerShell.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS. + /// + [System.ComponentModel.TypeConverter(typeof(AzureFirstPartyManagedCertificateTypeConverter))] + public partial class AzureFirstPartyManagedCertificate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AzureFirstPartyManagedCertificate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("ExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).ExpirationDate = (string) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).ExpirationDate, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureFirstPartyManagedCertificate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("ExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).ExpirationDate = (string) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).ExpirationDate, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureFirstPartyManagedCertificate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureFirstPartyManagedCertificate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS. + [System.ComponentModel.TypeConverter(typeof(AzureFirstPartyManagedCertificateTypeConverter))] + public partial interface IAzureFirstPartyManagedCertificate + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificate.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificate.TypeConverter.cs new file mode 100644 index 000000000000..f07403696b46 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AzureFirstPartyManagedCertificateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AzureFirstPartyManagedCertificate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AzureFirstPartyManagedCertificate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AzureFirstPartyManagedCertificate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificate.cs b/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificate.cs new file mode 100644 index 000000000000..ad403c19f2df --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificate.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS. + /// + public partial class AzureFirstPartyManagedCertificate : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificate, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificateInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificate __certificate = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Certificate(); + + /// Certificate expiration date. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string ExpirationDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).ExpirationDate; } + + /// Internal Acessors for ExpirationDate + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal.ExpirationDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).ExpirationDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).ExpirationDate = value; } + + /// Internal Acessors for Subject + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal.Subject { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).Subject; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).Subject = value; } + + /// Subject name in the certificate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Subject { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).Subject; } + + /// The type of the secret resource. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType? Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType)""); } + + /// Creates an new instance. + public AzureFirstPartyManagedCertificate() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__certificate), __certificate); + await eventListener.AssertObjectIsValid(nameof(__certificate), __certificate); + } + } + /// Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS. + public partial interface IAzureFirstPartyManagedCertificate : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificate + { + + } + /// Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS. + internal partial interface IAzureFirstPartyManagedCertificateInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificate.json.cs b/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificate.json.cs new file mode 100644 index 000000000000..239752758f7c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificate.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS. + /// + public partial class AzureFirstPartyManagedCertificate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AzureFirstPartyManagedCertificate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __certificate = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Certificate(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AzureFirstPartyManagedCertificate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __certificate?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificateParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificateParameters.PowerShell.cs new file mode 100644 index 000000000000..cd4a7a253d47 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificateParameters.PowerShell.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS. + /// + [System.ComponentModel.TypeConverter(typeof(AzureFirstPartyManagedCertificateParametersTypeConverter))] + public partial class AzureFirstPartyManagedCertificateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AzureFirstPartyManagedCertificateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureFirstPartyManagedCertificateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureFirstPartyManagedCertificateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureFirstPartyManagedCertificateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a + /// json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS. + [System.ComponentModel.TypeConverter(typeof(AzureFirstPartyManagedCertificateParametersTypeConverter))] + public partial interface IAzureFirstPartyManagedCertificateParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificateParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificateParameters.TypeConverter.cs new file mode 100644 index 000000000000..be327ef5b88b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificateParameters.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AzureFirstPartyManagedCertificateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificateParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificateParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AzureFirstPartyManagedCertificateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AzureFirstPartyManagedCertificateParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AzureFirstPartyManagedCertificateParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificateParameters.cs b/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificateParameters.cs new file mode 100644 index 000000000000..580a422e1d1c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificateParameters.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS. + /// + public partial class AzureFirstPartyManagedCertificateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificateParametersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters __secretParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretParameters(); + + /// The type of the secret resource. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)__secretParameters).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)__secretParameters).Type = value ; } + + /// + /// Creates an new instance. + /// + public AzureFirstPartyManagedCertificateParameters() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__secretParameters), __secretParameters); + await eventListener.AssertObjectIsValid(nameof(__secretParameters), __secretParameters); + } + } + /// Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS. + public partial interface IAzureFirstPartyManagedCertificateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters + { + + } + /// Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS. + internal partial interface IAzureFirstPartyManagedCertificateParametersInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificateParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificateParameters.json.cs new file mode 100644 index 000000000000..34bead11ea54 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/AzureFirstPartyManagedCertificateParameters.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS. + /// + public partial class AzureFirstPartyManagedCertificateParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal AzureFirstPartyManagedCertificateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __secretParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretParameters(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificateParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificateParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAzureFirstPartyManagedCertificateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AzureFirstPartyManagedCertificateParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __secretParameters?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CacheConfiguration.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CacheConfiguration.PowerShell.cs new file mode 100644 index 000000000000..447d77746ae3 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CacheConfiguration.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. + /// + [System.ComponentModel.TypeConverter(typeof(CacheConfigurationTypeConverter))] + public partial class CacheConfiguration + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CacheConfiguration(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("QueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).QueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior?) content.GetValueForProperty("QueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).QueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("QueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).QueryParameter = (string) content.GetValueForProperty("QueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).QueryParameter, global::System.Convert.ToString); + } + if (content.Contains("IsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).IsCompressionEnabled = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled?) content.GetValueForProperty("IsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).IsCompressionEnabled, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled.CreateFrom); + } + if (content.Contains("CacheBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).CacheBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior?) content.GetValueForProperty("CacheBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).CacheBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior.CreateFrom); + } + if (content.Contains("CacheDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).CacheDuration = (string) content.GetValueForProperty("CacheDuration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).CacheDuration, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CacheConfiguration(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("QueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).QueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior?) content.GetValueForProperty("QueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).QueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("QueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).QueryParameter = (string) content.GetValueForProperty("QueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).QueryParameter, global::System.Convert.ToString); + } + if (content.Contains("IsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).IsCompressionEnabled = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled?) content.GetValueForProperty("IsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).IsCompressionEnabled, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled.CreateFrom); + } + if (content.Contains("CacheBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).CacheBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior?) content.GetValueForProperty("CacheBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).CacheBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior.CreateFrom); + } + if (content.Contains("CacheDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).CacheDuration = (string) content.GetValueForProperty("CacheDuration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)this).CacheDuration, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CacheConfiguration(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CacheConfiguration(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. + [System.ComponentModel.TypeConverter(typeof(CacheConfigurationTypeConverter))] + public partial interface ICacheConfiguration + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CacheConfiguration.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CacheConfiguration.TypeConverter.cs new file mode 100644 index 000000000000..c925f0e44e81 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CacheConfiguration.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CacheConfigurationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CacheConfiguration.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CacheConfiguration.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CacheConfiguration.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CacheConfiguration.cs b/src/Cdn/generated/api/Models/Api20210601/CacheConfiguration.cs new file mode 100644 index 000000000000..f65de7daa5c8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CacheConfiguration.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. + /// + public partial class CacheConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior? _cacheBehavior; + + /// Caching behavior for the requests + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior? CacheBehavior { get => this._cacheBehavior; set => this._cacheBehavior = value; } + + /// Backing field for property. + private string _cacheDuration; + + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string CacheDuration { get => this._cacheDuration; set => this._cacheDuration = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled? _isCompressionEnabled; + + /// + /// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user + /// requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than + /// 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled? IsCompressionEnabled { get => this._isCompressionEnabled; set => this._isCompressionEnabled = value; } + + /// Backing field for property. + private string _queryParameter; + + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string QueryParameter { get => this._queryParameter; set => this._queryParameter = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior? _queryStringCachingBehavior; + + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior? QueryStringCachingBehavior { get => this._queryStringCachingBehavior; set => this._queryStringCachingBehavior = value; } + + /// Creates an new instance. + public CacheConfiguration() + { + + } + } + /// Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. + public partial interface ICacheConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Caching behavior for the requests + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Caching behavior for the requests", + SerializedName = @"cacheBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior? CacheBehavior { get; set; } + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss", + SerializedName = @"cacheDuration", + PossibleTypes = new [] { typeof(string) })] + string CacheDuration { get; set; } + /// + /// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user + /// requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than + /// 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.", + SerializedName = @"isCompressionEnabled", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled? IsCompressionEnabled { get; set; } + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"query parameters to include or exclude (comma separated).", + SerializedName = @"queryParameters", + PossibleTypes = new [] { typeof(string) })] + string QueryParameter { get; set; } + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.", + SerializedName = @"queryStringCachingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior? QueryStringCachingBehavior { get; set; } + + } + /// Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. + internal partial interface ICacheConfigurationInternal + + { + /// Caching behavior for the requests + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior? CacheBehavior { get; set; } + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// + string CacheDuration { get; set; } + /// + /// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user + /// requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than + /// 1 byte or larger than 1 MB. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled? IsCompressionEnabled { get; set; } + /// query parameters to include or exclude (comma separated). + string QueryParameter { get; set; } + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior? QueryStringCachingBehavior { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CacheConfiguration.json.cs b/src/Cdn/generated/api/Models/Api20210601/CacheConfiguration.json.cs new file mode 100644 index 000000000000..4528139214c5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CacheConfiguration.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. + /// + public partial class CacheConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CacheConfiguration(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_queryStringCachingBehavior = If( json?.PropertyT("queryStringCachingBehavior"), out var __jsonQueryStringCachingBehavior) ? (string)__jsonQueryStringCachingBehavior : (string)QueryStringCachingBehavior;} + {_queryParameter = If( json?.PropertyT("queryParameters"), out var __jsonQueryParameters) ? (string)__jsonQueryParameters : (string)QueryParameter;} + {_isCompressionEnabled = If( json?.PropertyT("isCompressionEnabled"), out var __jsonIsCompressionEnabled) ? (string)__jsonIsCompressionEnabled : (string)IsCompressionEnabled;} + {_cacheBehavior = If( json?.PropertyT("cacheBehavior"), out var __jsonCacheBehavior) ? (string)__jsonCacheBehavior : (string)CacheBehavior;} + {_cacheDuration = If( json?.PropertyT("cacheDuration"), out var __jsonCacheDuration) ? (string)__jsonCacheDuration : (string)CacheDuration;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CacheConfiguration(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._queryStringCachingBehavior)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._queryStringCachingBehavior.ToString()) : null, "queryStringCachingBehavior" ,container.Add ); + AddIf( null != (((object)this._queryParameter)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._queryParameter.ToString()) : null, "queryParameters" ,container.Add ); + AddIf( null != (((object)this._isCompressionEnabled)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._isCompressionEnabled.ToString()) : null, "isCompressionEnabled" ,container.Add ); + AddIf( null != (((object)this._cacheBehavior)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._cacheBehavior.ToString()) : null, "cacheBehavior" ,container.Add ); + AddIf( null != (((object)this._cacheDuration)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._cacheDuration.ToString()) : null, "cacheDuration" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CacheExpirationActionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CacheExpirationActionParameters.PowerShell.cs new file mode 100644 index 000000000000..139ff2f183ea --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CacheExpirationActionParameters.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for the cache expiration action. + [System.ComponentModel.TypeConverter(typeof(CacheExpirationActionParametersTypeConverter))] + public partial class CacheExpirationActionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CacheExpirationActionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("CacheBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)this).CacheBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior) content.GetValueForProperty("CacheBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)this).CacheBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior.CreateFrom); + } + if (content.Contains("CacheType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)this).CacheType = (string) content.GetValueForProperty("CacheType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)this).CacheType, global::System.Convert.ToString); + } + if (content.Contains("CacheDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)this).CacheDuration = (string) content.GetValueForProperty("CacheDuration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)this).CacheDuration, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CacheExpirationActionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("CacheBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)this).CacheBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior) content.GetValueForProperty("CacheBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)this).CacheBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior.CreateFrom); + } + if (content.Contains("CacheType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)this).CacheType = (string) content.GetValueForProperty("CacheType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)this).CacheType, global::System.Convert.ToString); + } + if (content.Contains("CacheDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)this).CacheDuration = (string) content.GetValueForProperty("CacheDuration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)this).CacheDuration, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CacheExpirationActionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CacheExpirationActionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for the cache expiration action. + [System.ComponentModel.TypeConverter(typeof(CacheExpirationActionParametersTypeConverter))] + public partial interface ICacheExpirationActionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CacheExpirationActionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CacheExpirationActionParameters.TypeConverter.cs new file mode 100644 index 000000000000..e59668771ff3 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CacheExpirationActionParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CacheExpirationActionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CacheExpirationActionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CacheExpirationActionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CacheExpirationActionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CacheExpirationActionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/CacheExpirationActionParameters.cs new file mode 100644 index 000000000000..5ba4d754c827 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CacheExpirationActionParameters.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for the cache expiration action. + public partial class CacheExpirationActionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior _cacheBehavior; + + /// Caching behavior for the requests + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior CacheBehavior { get => this._cacheBehavior; set => this._cacheBehavior = value; } + + /// Backing field for property. + private string _cacheDuration; + + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string CacheDuration { get => this._cacheDuration; set => this._cacheDuration = value; } + + /// Backing field for property. + private string _cacheType= @"All"; + + /// The level at which the content needs to be cached. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string CacheType { get => this._cacheType; } + + /// Internal Acessors for CacheType + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal.CacheType { get => this._cacheType; set { {_cacheType = value;} } } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleCacheExpirationActionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public CacheExpirationActionParameters() + { + + } + } + /// Defines the parameters for the cache expiration action. + public partial interface ICacheExpirationActionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Caching behavior for the requests + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Caching behavior for the requests", + SerializedName = @"cacheBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior CacheBehavior { get; set; } + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss", + SerializedName = @"cacheDuration", + PossibleTypes = new [] { typeof(string) })] + string CacheDuration { get; set; } + /// The level at which the content needs to be cached. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"The level at which the content needs to be cached.", + SerializedName = @"cacheType", + PossibleTypes = new [] { typeof(string) })] + string CacheType { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for the cache expiration action. + internal partial interface ICacheExpirationActionParametersInternal + + { + /// Caching behavior for the requests + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior CacheBehavior { get; set; } + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// + string CacheDuration { get; set; } + /// The level at which the content needs to be cached. + string CacheType { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CacheExpirationActionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/CacheExpirationActionParameters.json.cs new file mode 100644 index 000000000000..3f573976767c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CacheExpirationActionParameters.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for the cache expiration action. + public partial class CacheExpirationActionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CacheExpirationActionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_cacheBehavior = If( json?.PropertyT("cacheBehavior"), out var __jsonCacheBehavior) ? (string)__jsonCacheBehavior : (string)CacheBehavior;} + {_cacheType = If( json?.PropertyT("cacheType"), out var __jsonCacheType) ? (string)__jsonCacheType : (string)CacheType;} + {_cacheDuration = If( json?.PropertyT("cacheDuration"), out var __jsonCacheDuration) ? (string)__jsonCacheDuration : (string)CacheDuration;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CacheExpirationActionParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._cacheBehavior)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._cacheBehavior.ToString()) : null, "cacheBehavior" ,container.Add ); + AddIf( null != (((object)this._cacheType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._cacheType.ToString()) : null, "cacheType" ,container.Add ); + AddIf( null != (((object)this._cacheDuration)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._cacheDuration.ToString()) : null, "cacheDuration" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CacheKeyQueryStringActionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CacheKeyQueryStringActionParameters.PowerShell.cs new file mode 100644 index 000000000000..eb091892ccfa --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CacheKeyQueryStringActionParameters.PowerShell.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for the cache-key query string action. + [System.ComponentModel.TypeConverter(typeof(CacheKeyQueryStringActionParametersTypeConverter))] + public partial class CacheKeyQueryStringActionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CacheKeyQueryStringActionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("QueryStringBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)this).QueryStringBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior) content.GetValueForProperty("QueryStringBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)this).QueryStringBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior.CreateFrom); + } + if (content.Contains("QueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)this).QueryParameter = (string) content.GetValueForProperty("QueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)this).QueryParameter, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CacheKeyQueryStringActionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("QueryStringBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)this).QueryStringBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior) content.GetValueForProperty("QueryStringBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)this).QueryStringBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior.CreateFrom); + } + if (content.Contains("QueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)this).QueryParameter = (string) content.GetValueForProperty("QueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)this).QueryParameter, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CacheKeyQueryStringActionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CacheKeyQueryStringActionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for the cache-key query string action. + [System.ComponentModel.TypeConverter(typeof(CacheKeyQueryStringActionParametersTypeConverter))] + public partial interface ICacheKeyQueryStringActionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CacheKeyQueryStringActionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CacheKeyQueryStringActionParameters.TypeConverter.cs new file mode 100644 index 000000000000..8557615fe477 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CacheKeyQueryStringActionParameters.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CacheKeyQueryStringActionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CacheKeyQueryStringActionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CacheKeyQueryStringActionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CacheKeyQueryStringActionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CacheKeyQueryStringActionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/CacheKeyQueryStringActionParameters.cs new file mode 100644 index 000000000000..4c445dc9e71e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CacheKeyQueryStringActionParameters.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for the cache-key query string action. + public partial class CacheKeyQueryStringActionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal + { + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private string _queryParameter; + + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string QueryParameter { get => this._queryParameter; set => this._queryParameter = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior _queryStringBehavior; + + /// Caching behavior for the requests + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior QueryStringBehavior { get => this._queryStringBehavior; set => this._queryStringBehavior = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleCacheKeyQueryStringBehaviorActionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public CacheKeyQueryStringActionParameters() + { + + } + } + /// Defines the parameters for the cache-key query string action. + public partial interface ICacheKeyQueryStringActionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"query parameters to include or exclude (comma separated).", + SerializedName = @"queryParameters", + PossibleTypes = new [] { typeof(string) })] + string QueryParameter { get; set; } + /// Caching behavior for the requests + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Caching behavior for the requests", + SerializedName = @"queryStringBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior QueryStringBehavior { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for the cache-key query string action. + internal partial interface ICacheKeyQueryStringActionParametersInternal + + { + /// query parameters to include or exclude (comma separated). + string QueryParameter { get; set; } + /// Caching behavior for the requests + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior QueryStringBehavior { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CacheKeyQueryStringActionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/CacheKeyQueryStringActionParameters.json.cs new file mode 100644 index 000000000000..ab6c8f996f70 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CacheKeyQueryStringActionParameters.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for the cache-key query string action. + public partial class CacheKeyQueryStringActionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CacheKeyQueryStringActionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_queryStringBehavior = If( json?.PropertyT("queryStringBehavior"), out var __jsonQueryStringBehavior) ? (string)__jsonQueryStringBehavior : (string)QueryStringBehavior;} + {_queryParameter = If( json?.PropertyT("queryParameters"), out var __jsonQueryParameters) ? (string)__jsonQueryParameters : (string)QueryParameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CacheKeyQueryStringActionParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._queryStringBehavior)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._queryStringBehavior.ToString()) : null, "queryStringBehavior" ,container.Add ); + AddIf( null != (((object)this._queryParameter)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._queryParameter.ToString()) : null, "queryParameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CdnCertificateSourceParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CdnCertificateSourceParameters.PowerShell.cs new file mode 100644 index 000000000000..c58070a2e117 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CdnCertificateSourceParameters.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Defines the parameters for using CDN managed certificate for securing custom domain. + /// + [System.ComponentModel.TypeConverter(typeof(CdnCertificateSourceParametersTypeConverter))] + public partial class CdnCertificateSourceParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CdnCertificateSourceParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("CertificateType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParametersInternal)this).CertificateType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType) content.GetValueForProperty("CertificateType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParametersInternal)this).CertificateType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CdnCertificateSourceParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("CertificateType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParametersInternal)this).CertificateType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType) content.GetValueForProperty("CertificateType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParametersInternal)this).CertificateType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CdnCertificateSourceParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CdnCertificateSourceParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for using CDN managed certificate for securing custom domain. + [System.ComponentModel.TypeConverter(typeof(CdnCertificateSourceParametersTypeConverter))] + public partial interface ICdnCertificateSourceParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CdnCertificateSourceParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CdnCertificateSourceParameters.TypeConverter.cs new file mode 100644 index 000000000000..224af4226bdc --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CdnCertificateSourceParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CdnCertificateSourceParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CdnCertificateSourceParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CdnCertificateSourceParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CdnCertificateSourceParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CdnCertificateSourceParameters.cs b/src/Cdn/generated/api/Models/Api20210601/CdnCertificateSourceParameters.cs new file mode 100644 index 000000000000..6c7e4b41f411 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CdnCertificateSourceParameters.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Defines the parameters for using CDN managed certificate for securing custom domain. + /// + public partial class CdnCertificateSourceParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParametersInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType _certificateType; + + /// Type of certificate used + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType CertificateType { get => this._certificateType; set => this._certificateType = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private string _typeName= @"CdnCertificateSourceParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public CdnCertificateSourceParameters() + { + + } + } + /// Defines the parameters for using CDN managed certificate for securing custom domain. + public partial interface ICdnCertificateSourceParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Type of certificate used + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Type of certificate used", + SerializedName = @"certificateType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType CertificateType { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for using CDN managed certificate for securing custom domain. + internal partial interface ICdnCertificateSourceParametersInternal + + { + /// Type of certificate used + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType CertificateType { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CdnCertificateSourceParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/CdnCertificateSourceParameters.json.cs new file mode 100644 index 000000000000..a0137b850289 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CdnCertificateSourceParameters.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Defines the parameters for using CDN managed certificate for securing custom domain. + /// + public partial class CdnCertificateSourceParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CdnCertificateSourceParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_certificateType = If( json?.PropertyT("certificateType"), out var __jsonCertificateType) ? (string)__jsonCertificateType : (string)CertificateType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CdnCertificateSourceParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._certificateType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._certificateType.ToString()) : null, "certificateType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CdnManagedHttpsParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CdnManagedHttpsParameters.PowerShell.cs new file mode 100644 index 000000000000..3771098c0ce1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CdnManagedHttpsParameters.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Defines the certificate source parameters using CDN managed certificate for enabling SSL. + /// + [System.ComponentModel.TypeConverter(typeof(CdnManagedHttpsParametersTypeConverter))] + public partial class CdnManagedHttpsParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CdnManagedHttpsParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CertificateSourceParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParametersInternal)this).CertificateSourceParameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParameters) content.GetValueForProperty("CertificateSourceParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParametersInternal)this).CertificateSourceParameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CdnCertificateSourceParametersTypeConverter.ConvertFrom); + } + if (content.Contains("CertificateSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).CertificateSource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource) content.GetValueForProperty("CertificateSource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).CertificateSource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource.CreateFrom); + } + if (content.Contains("ProtocolType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).ProtocolType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType) content.GetValueForProperty("ProtocolType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).ProtocolType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType.CreateFrom); + } + if (content.Contains("MinimumTlsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).MinimumTlsVersion = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion?) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).MinimumTlsVersion, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion.CreateFrom); + } + if (content.Contains("CertificateSourceParameterCertificateType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParametersInternal)this).CertificateSourceParameterCertificateType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType) content.GetValueForProperty("CertificateSourceParameterCertificateType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParametersInternal)this).CertificateSourceParameterCertificateType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType.CreateFrom); + } + if (content.Contains("CertificateSourceParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParametersInternal)this).CertificateSourceParameterTypeName = (string) content.GetValueForProperty("CertificateSourceParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParametersInternal)this).CertificateSourceParameterTypeName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CdnManagedHttpsParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CertificateSourceParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParametersInternal)this).CertificateSourceParameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParameters) content.GetValueForProperty("CertificateSourceParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParametersInternal)this).CertificateSourceParameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CdnCertificateSourceParametersTypeConverter.ConvertFrom); + } + if (content.Contains("CertificateSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).CertificateSource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource) content.GetValueForProperty("CertificateSource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).CertificateSource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource.CreateFrom); + } + if (content.Contains("ProtocolType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).ProtocolType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType) content.GetValueForProperty("ProtocolType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).ProtocolType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType.CreateFrom); + } + if (content.Contains("MinimumTlsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).MinimumTlsVersion = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion?) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).MinimumTlsVersion, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion.CreateFrom); + } + if (content.Contains("CertificateSourceParameterCertificateType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParametersInternal)this).CertificateSourceParameterCertificateType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType) content.GetValueForProperty("CertificateSourceParameterCertificateType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParametersInternal)this).CertificateSourceParameterCertificateType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType.CreateFrom); + } + if (content.Contains("CertificateSourceParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParametersInternal)this).CertificateSourceParameterTypeName = (string) content.GetValueForProperty("CertificateSourceParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParametersInternal)this).CertificateSourceParameterTypeName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CdnManagedHttpsParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CdnManagedHttpsParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the certificate source parameters using CDN managed certificate for enabling SSL. + [System.ComponentModel.TypeConverter(typeof(CdnManagedHttpsParametersTypeConverter))] + public partial interface ICdnManagedHttpsParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CdnManagedHttpsParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CdnManagedHttpsParameters.TypeConverter.cs new file mode 100644 index 000000000000..e65872034042 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CdnManagedHttpsParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CdnManagedHttpsParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CdnManagedHttpsParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CdnManagedHttpsParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CdnManagedHttpsParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CdnManagedHttpsParameters.cs b/src/Cdn/generated/api/Models/Api20210601/CdnManagedHttpsParameters.cs new file mode 100644 index 000000000000..a8c005a2c303 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CdnManagedHttpsParameters.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Defines the certificate source parameters using CDN managed certificate for enabling SSL. + /// + public partial class CdnManagedHttpsParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParametersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters __customDomainHttpsParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainHttpsParameters(); + + /// Defines the source of the SSL certificate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource CertificateSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)__customDomainHttpsParameters).CertificateSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)__customDomainHttpsParameters).CertificateSource = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParameters _certificateSourceParameter; + + /// + /// Defines the certificate source parameters using CDN managed certificate for enabling SSL. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParameters CertificateSourceParameter { get => (this._certificateSourceParameter = this._certificateSourceParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CdnCertificateSourceParameters()); set => this._certificateSourceParameter = value; } + + /// Type of certificate used + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType CertificateSourceParameterCertificateType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParametersInternal)CertificateSourceParameter).CertificateType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParametersInternal)CertificateSourceParameter).CertificateType = value ; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string CertificateSourceParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParametersInternal)CertificateSourceParameter).TypeName; } + + /// Internal Acessors for CertificateSourceParameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParametersInternal.CertificateSourceParameter { get => (this._certificateSourceParameter = this._certificateSourceParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CdnCertificateSourceParameters()); set { {_certificateSourceParameter = value;} } } + + /// Internal Acessors for CertificateSourceParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParametersInternal.CertificateSourceParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParametersInternal)CertificateSourceParameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParametersInternal)CertificateSourceParameter).TypeName = value; } + + /// TLS protocol version that will be used for Https + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion? MinimumTlsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)__customDomainHttpsParameters).MinimumTlsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)__customDomainHttpsParameters).MinimumTlsVersion = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion)""); } + + /// Defines the TLS extension protocol that is used for secure delivery. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType ProtocolType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)__customDomainHttpsParameters).ProtocolType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)__customDomainHttpsParameters).ProtocolType = value ; } + + /// Creates an new instance. + public CdnManagedHttpsParameters() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__customDomainHttpsParameters), __customDomainHttpsParameters); + await eventListener.AssertObjectIsValid(nameof(__customDomainHttpsParameters), __customDomainHttpsParameters); + } + } + /// Defines the certificate source parameters using CDN managed certificate for enabling SSL. + public partial interface ICdnManagedHttpsParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters + { + /// Type of certificate used + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Type of certificate used", + SerializedName = @"certificateType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType CertificateSourceParameterCertificateType { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string CertificateSourceParameterTypeName { get; } + + } + /// Defines the certificate source parameters using CDN managed certificate for enabling SSL. + internal partial interface ICdnManagedHttpsParametersInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal + { + /// + /// Defines the certificate source parameters using CDN managed certificate for enabling SSL. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnCertificateSourceParameters CertificateSourceParameter { get; set; } + /// Type of certificate used + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType CertificateSourceParameterCertificateType { get; set; } + + string CertificateSourceParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CdnManagedHttpsParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/CdnManagedHttpsParameters.json.cs new file mode 100644 index 000000000000..f740473f736f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CdnManagedHttpsParameters.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Defines the certificate source parameters using CDN managed certificate for enabling SSL. + /// + public partial class CdnManagedHttpsParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CdnManagedHttpsParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __customDomainHttpsParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainHttpsParameters(json); + {_certificateSourceParameter = If( json?.PropertyT("certificateSourceParameters"), out var __jsonCertificateSourceParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CdnCertificateSourceParameters.FromJson(__jsonCertificateSourceParameters) : CertificateSourceParameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICdnManagedHttpsParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CdnManagedHttpsParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __customDomainHttpsParameters?.ToJson(container, serializationMode); + AddIf( null != this._certificateSourceParameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._certificateSourceParameter.ToJson(null,serializationMode) : null, "certificateSourceParameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Certificate.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/Certificate.PowerShell.cs new file mode 100644 index 000000000000..f6bdfda64c9e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Certificate.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Certificate used for https + [System.ComponentModel.TypeConverter(typeof(CertificateTypeConverter))] + public partial class Certificate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Certificate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("ExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).ExpirationDate = (string) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).ExpirationDate, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Certificate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("ExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).ExpirationDate = (string) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).ExpirationDate, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Certificate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Certificate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Certificate used for https + [System.ComponentModel.TypeConverter(typeof(CertificateTypeConverter))] + public partial interface ICertificate + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Certificate.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/Certificate.TypeConverter.cs new file mode 100644 index 000000000000..4b2bfb8f9198 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Certificate.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CertificateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Certificate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Certificate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Certificate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Certificate.cs b/src/Cdn/generated/api/Models/Api20210601/Certificate.cs new file mode 100644 index 000000000000..8eb2ab057f92 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Certificate.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Certificate used for https + public partial class Certificate : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificate, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal + { + + /// Backing field for property. + private string _expirationDate; + + /// Certificate expiration date. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ExpirationDate { get => this._expirationDate; } + + /// Internal Acessors for ExpirationDate + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal.ExpirationDate { get => this._expirationDate; set { {_expirationDate = value;} } } + + /// Internal Acessors for Subject + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal.Subject { get => this._subject; set { {_subject = value;} } } + + /// Backing field for property. + private string _subject; + + /// Subject name in the certificate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Subject { get => this._subject; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType? _type; + + /// The type of the secret resource. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType? Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public Certificate() + { + + } + } + /// Certificate used for https + public partial interface ICertificate : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Certificate expiration date. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Certificate expiration date.", + SerializedName = @"expirationDate", + PossibleTypes = new [] { typeof(string) })] + string ExpirationDate { get; } + /// Subject name in the certificate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Subject name in the certificate.", + SerializedName = @"subject", + PossibleTypes = new [] { typeof(string) })] + string Subject { get; } + /// The type of the secret resource. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of the secret resource.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType? Type { get; set; } + + } + /// Certificate used for https + internal partial interface ICertificateInternal + + { + /// Certificate expiration date. + string ExpirationDate { get; set; } + /// Subject name in the certificate. + string Subject { get; set; } + /// The type of the secret resource. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType? Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Certificate.json.cs b/src/Cdn/generated/api/Models/Api20210601/Certificate.json.cs new file mode 100644 index 000000000000..8395564a1746 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Certificate.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Certificate used for https + public partial class Certificate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal Certificate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_subject = If( json?.PropertyT("subject"), out var __jsonSubject) ? (string)__jsonSubject : (string)Subject;} + {_expirationDate = If( json?.PropertyT("expirationDate"), out var __jsonExpirationDate) ? (string)__jsonExpirationDate : (string)ExpirationDate;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new Certificate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._subject)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._subject.ToString()) : null, "subject" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._expirationDate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._expirationDate.ToString()) : null, "expirationDate" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityInput.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityInput.PowerShell.cs new file mode 100644 index 000000000000..7bc5c4ae2755 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityInput.PowerShell.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Input of CheckNameAvailability API. + [System.ComponentModel.TypeConverter(typeof(CheckEndpointNameAvailabilityInputTypeConverter))] + public partial class CheckEndpointNameAvailabilityInput + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CheckEndpointNameAvailabilityInput(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInputInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInputInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInputInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInputInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType.CreateFrom); + } + if (content.Contains("AutoGeneratedDomainNameLabelScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInputInternal)this).AutoGeneratedDomainNameLabelScope = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope?) content.GetValueForProperty("AutoGeneratedDomainNameLabelScope",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInputInternal)this).AutoGeneratedDomainNameLabelScope, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CheckEndpointNameAvailabilityInput(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInputInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInputInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInputInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInputInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType.CreateFrom); + } + if (content.Contains("AutoGeneratedDomainNameLabelScope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInputInternal)this).AutoGeneratedDomainNameLabelScope = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope?) content.GetValueForProperty("AutoGeneratedDomainNameLabelScope",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInputInternal)this).AutoGeneratedDomainNameLabelScope, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInput DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CheckEndpointNameAvailabilityInput(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CheckEndpointNameAvailabilityInput(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Input of CheckNameAvailability API. + [System.ComponentModel.TypeConverter(typeof(CheckEndpointNameAvailabilityInputTypeConverter))] + public partial interface ICheckEndpointNameAvailabilityInput + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityInput.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityInput.TypeConverter.cs new file mode 100644 index 000000000000..98ff62ef7f61 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityInput.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CheckEndpointNameAvailabilityInputTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInput ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInput).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CheckEndpointNameAvailabilityInput.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CheckEndpointNameAvailabilityInput.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CheckEndpointNameAvailabilityInput.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityInput.cs b/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityInput.cs new file mode 100644 index 000000000000..3c0dcc9f677b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityInput.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Input of CheckNameAvailability API. + public partial class CheckEndpointNameAvailabilityInput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInput, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInputInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope? _autoGeneratedDomainNameLabelScope; + + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get => this._autoGeneratedDomainNameLabelScope; set => this._autoGeneratedDomainNameLabelScope = value; } + + /// Backing field for property. + private string _name; + + /// The resource name to validate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType _type; + + /// The type of the resource whose name is to be validated. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public CheckEndpointNameAvailabilityInput() + { + + } + } + /// Input of CheckNameAvailability API. + public partial interface ICheckEndpointNameAvailabilityInput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the endpoint name reuse scope. The default value is TenantReuse.", + SerializedName = @"autoGeneratedDomainNameLabelScope", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } + /// The resource name to validate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The resource name to validate.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// The type of the resource whose name is to be validated. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The type of the resource whose name is to be validated.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType Type { get; set; } + + } + /// Input of CheckNameAvailability API. + internal partial interface ICheckEndpointNameAvailabilityInputInternal + + { + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } + /// The resource name to validate. + string Name { get; set; } + /// The type of the resource whose name is to be validated. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityInput.json.cs b/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityInput.json.cs new file mode 100644 index 000000000000..67ea3da778dc --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityInput.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Input of CheckNameAvailability API. + public partial class CheckEndpointNameAvailabilityInput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CheckEndpointNameAvailabilityInput(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_autoGeneratedDomainNameLabelScope = If( json?.PropertyT("autoGeneratedDomainNameLabelScope"), out var __jsonAutoGeneratedDomainNameLabelScope) ? (string)__jsonAutoGeneratedDomainNameLabelScope : (string)AutoGeneratedDomainNameLabelScope;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CheckEndpointNameAvailabilityInput(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + AddIf( null != (((object)this._autoGeneratedDomainNameLabelScope)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._autoGeneratedDomainNameLabelScope.ToString()) : null, "autoGeneratedDomainNameLabelScope" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityOutput.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityOutput.PowerShell.cs new file mode 100644 index 000000000000..c36fda8c1a50 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityOutput.PowerShell.cs @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Output of check name availability API. + [System.ComponentModel.TypeConverter(typeof(CheckEndpointNameAvailabilityOutputTypeConverter))] + public partial class CheckEndpointNameAvailabilityOutput + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CheckEndpointNameAvailabilityOutput(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("NameAvailable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AvailableHostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal)this).AvailableHostname = (string) content.GetValueForProperty("AvailableHostname",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal)this).AvailableHostname, global::System.Convert.ToString); + } + if (content.Contains("Reason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal)this).Reason, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CheckEndpointNameAvailabilityOutput(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("NameAvailable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AvailableHostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal)this).AvailableHostname = (string) content.GetValueForProperty("AvailableHostname",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal)this).AvailableHostname, global::System.Convert.ToString); + } + if (content.Contains("Reason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal)this).Reason, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutput DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CheckEndpointNameAvailabilityOutput(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CheckEndpointNameAvailabilityOutput(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Output of check name availability API. + [System.ComponentModel.TypeConverter(typeof(CheckEndpointNameAvailabilityOutputTypeConverter))] + public partial interface ICheckEndpointNameAvailabilityOutput + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityOutput.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityOutput.TypeConverter.cs new file mode 100644 index 000000000000..561f34a4e61d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityOutput.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CheckEndpointNameAvailabilityOutputTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutput ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutput).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CheckEndpointNameAvailabilityOutput.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CheckEndpointNameAvailabilityOutput.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CheckEndpointNameAvailabilityOutput.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityOutput.cs b/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityOutput.cs new file mode 100644 index 000000000000..d98b2e793ae1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityOutput.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Output of check name availability API. + public partial class CheckEndpointNameAvailabilityOutput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutput, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal + { + + /// Backing field for property. + private string _availableHostname; + + /// + /// Returns the available hostname generated based on the AutoGeneratedDomainNameLabelScope when the name is available, otherwise + /// it returns empty string + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string AvailableHostname { get => this._availableHostname; } + + /// Backing field for property. + private string _message; + + /// The detailed error message describing why the name is not available. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for AvailableHostname + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal.AvailableHostname { get => this._availableHostname; set { {_availableHostname = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for NameAvailable + bool? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal.NameAvailable { get => this._nameAvailable; set { {_nameAvailable = value;} } } + + /// Internal Acessors for Reason + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutputInternal.Reason { get => this._reason; set { {_reason = value;} } } + + /// Backing field for property. + private bool? _nameAvailable; + + /// Indicates whether the name is available. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NameAvailable { get => this._nameAvailable; } + + /// Backing field for property. + private string _reason; + + /// The reason why the name is not available. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Reason { get => this._reason; } + + /// Creates an new instance. + public CheckEndpointNameAvailabilityOutput() + { + + } + } + /// Output of check name availability API. + public partial interface ICheckEndpointNameAvailabilityOutput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// Returns the available hostname generated based on the AutoGeneratedDomainNameLabelScope when the name is available, otherwise + /// it returns empty string + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Returns the available hostname generated based on the AutoGeneratedDomainNameLabelScope when the name is available, otherwise it returns empty string", + SerializedName = @"availableHostname", + PossibleTypes = new [] { typeof(string) })] + string AvailableHostname { get; } + /// The detailed error message describing why the name is not available. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The detailed error message describing why the name is not available.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// Indicates whether the name is available. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates whether the name is available.", + SerializedName = @"nameAvailable", + PossibleTypes = new [] { typeof(bool) })] + bool? NameAvailable { get; } + /// The reason why the name is not available. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The reason why the name is not available.", + SerializedName = @"reason", + PossibleTypes = new [] { typeof(string) })] + string Reason { get; } + + } + /// Output of check name availability API. + internal partial interface ICheckEndpointNameAvailabilityOutputInternal + + { + /// + /// Returns the available hostname generated based on the AutoGeneratedDomainNameLabelScope when the name is available, otherwise + /// it returns empty string + /// + string AvailableHostname { get; set; } + /// The detailed error message describing why the name is not available. + string Message { get; set; } + /// Indicates whether the name is available. + bool? NameAvailable { get; set; } + /// The reason why the name is not available. + string Reason { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityOutput.json.cs b/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityOutput.json.cs new file mode 100644 index 000000000000..aaf6887a3d34 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckEndpointNameAvailabilityOutput.json.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Output of check name availability API. + public partial class CheckEndpointNameAvailabilityOutput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CheckEndpointNameAvailabilityOutput(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_nameAvailable = If( json?.PropertyT("nameAvailable"), out var __jsonNameAvailable) ? (bool?)__jsonNameAvailable : NameAvailable;} + {_availableHostname = If( json?.PropertyT("availableHostname"), out var __jsonAvailableHostname) ? (string)__jsonAvailableHostname : (string)AvailableHostname;} + {_reason = If( json?.PropertyT("reason"), out var __jsonReason) ? (string)__jsonReason : (string)Reason;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutput FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CheckEndpointNameAvailabilityOutput(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._nameAvailable ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._nameAvailable) : null, "nameAvailable" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._availableHostname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._availableHostname.ToString()) : null, "availableHostname" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._reason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._reason.ToString()) : null, "reason" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckHostNameAvailabilityInput.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CheckHostNameAvailabilityInput.PowerShell.cs new file mode 100644 index 000000000000..0733066f29f2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckHostNameAvailabilityInput.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Input of CheckHostNameAvailability API. + [System.ComponentModel.TypeConverter(typeof(CheckHostNameAvailabilityInputTypeConverter))] + public partial class CheckHostNameAvailabilityInput + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CheckHostNameAvailabilityInput(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInputInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInputInternal)this).HostName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CheckHostNameAvailabilityInput(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInputInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInputInternal)this).HostName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInput DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CheckHostNameAvailabilityInput(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CheckHostNameAvailabilityInput(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Input of CheckHostNameAvailability API. + [System.ComponentModel.TypeConverter(typeof(CheckHostNameAvailabilityInputTypeConverter))] + public partial interface ICheckHostNameAvailabilityInput + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckHostNameAvailabilityInput.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CheckHostNameAvailabilityInput.TypeConverter.cs new file mode 100644 index 000000000000..10bdb126a8b6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckHostNameAvailabilityInput.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CheckHostNameAvailabilityInputTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInput ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInput).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CheckHostNameAvailabilityInput.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CheckHostNameAvailabilityInput.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CheckHostNameAvailabilityInput.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckHostNameAvailabilityInput.cs b/src/Cdn/generated/api/Models/Api20210601/CheckHostNameAvailabilityInput.cs new file mode 100644 index 000000000000..a9c46c3ffe10 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckHostNameAvailabilityInput.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Input of CheckHostNameAvailability API. + public partial class CheckHostNameAvailabilityInput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInput, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInputInternal + { + + /// Backing field for property. + private string _hostName; + + /// The host name to validate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string HostName { get => this._hostName; set => this._hostName = value; } + + /// Creates an new instance. + public CheckHostNameAvailabilityInput() + { + + } + } + /// Input of CheckHostNameAvailability API. + public partial interface ICheckHostNameAvailabilityInput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The host name to validate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The host name to validate.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; set; } + + } + /// Input of CheckHostNameAvailability API. + internal partial interface ICheckHostNameAvailabilityInputInternal + + { + /// The host name to validate. + string HostName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckHostNameAvailabilityInput.json.cs b/src/Cdn/generated/api/Models/Api20210601/CheckHostNameAvailabilityInput.json.cs new file mode 100644 index 000000000000..6cd187761fb2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckHostNameAvailabilityInput.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Input of CheckHostNameAvailability API. + public partial class CheckHostNameAvailabilityInput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CheckHostNameAvailabilityInput(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_hostName = If( json?.PropertyT("hostName"), out var __jsonHostName) ? (string)__jsonHostName : (string)HostName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CheckHostNameAvailabilityInput(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._hostName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._hostName.ToString()) : null, "hostName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityInput.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityInput.PowerShell.cs new file mode 100644 index 000000000000..303df70527a8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityInput.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Input of CheckNameAvailability API. + [System.ComponentModel.TypeConverter(typeof(CheckNameAvailabilityInputTypeConverter))] + public partial class CheckNameAvailabilityInput + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CheckNameAvailabilityInput(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInputInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInputInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInputInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInputInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CheckNameAvailabilityInput(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInputInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInputInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInputInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInputInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInput DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CheckNameAvailabilityInput(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CheckNameAvailabilityInput(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Input of CheckNameAvailability API. + [System.ComponentModel.TypeConverter(typeof(CheckNameAvailabilityInputTypeConverter))] + public partial interface ICheckNameAvailabilityInput + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityInput.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityInput.TypeConverter.cs new file mode 100644 index 000000000000..ba0cb61f296a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityInput.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CheckNameAvailabilityInputTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInput ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInput).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CheckNameAvailabilityInput.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CheckNameAvailabilityInput.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CheckNameAvailabilityInput.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityInput.cs b/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityInput.cs new file mode 100644 index 000000000000..506fe619fd09 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityInput.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Input of CheckNameAvailability API. + public partial class CheckNameAvailabilityInput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInput, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInputInternal + { + + /// Backing field for property. + private string _name; + + /// The resource name to validate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType _type; + + /// The type of the resource whose name is to be validated. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public CheckNameAvailabilityInput() + { + + } + } + /// Input of CheckNameAvailability API. + public partial interface ICheckNameAvailabilityInput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The resource name to validate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The resource name to validate.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// The type of the resource whose name is to be validated. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The type of the resource whose name is to be validated.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType Type { get; set; } + + } + /// Input of CheckNameAvailability API. + internal partial interface ICheckNameAvailabilityInputInternal + + { + /// The resource name to validate. + string Name { get; set; } + /// The type of the resource whose name is to be validated. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityInput.json.cs b/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityInput.json.cs new file mode 100644 index 000000000000..e77ffd059d36 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityInput.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Input of CheckNameAvailability API. + public partial class CheckNameAvailabilityInput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CheckNameAvailabilityInput(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CheckNameAvailabilityInput(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityOutput.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityOutput.PowerShell.cs new file mode 100644 index 000000000000..89458dd112ba --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityOutput.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Output of check name availability API. + [System.ComponentModel.TypeConverter(typeof(CheckNameAvailabilityOutputTypeConverter))] + public partial class CheckNameAvailabilityOutput + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CheckNameAvailabilityOutput(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("NameAvailable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutputInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutputInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Reason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutputInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutputInternal)this).Reason, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutputInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutputInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CheckNameAvailabilityOutput(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("NameAvailable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutputInternal)this).NameAvailable = (bool?) content.GetValueForProperty("NameAvailable",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutputInternal)this).NameAvailable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Reason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutputInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutputInternal)this).Reason, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutputInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutputInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CheckNameAvailabilityOutput(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CheckNameAvailabilityOutput(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Output of check name availability API. + [System.ComponentModel.TypeConverter(typeof(CheckNameAvailabilityOutputTypeConverter))] + public partial interface ICheckNameAvailabilityOutput + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityOutput.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityOutput.TypeConverter.cs new file mode 100644 index 000000000000..76f8b21328c0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityOutput.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CheckNameAvailabilityOutputTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CheckNameAvailabilityOutput.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CheckNameAvailabilityOutput.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CheckNameAvailabilityOutput.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityOutput.cs b/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityOutput.cs new file mode 100644 index 000000000000..556d7d4df06c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityOutput.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Output of check name availability API. + public partial class CheckNameAvailabilityOutput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutputInternal + { + + /// Backing field for property. + private string _message; + + /// The detailed error message describing why the name is not available. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutputInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for NameAvailable + bool? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutputInternal.NameAvailable { get => this._nameAvailable; set { {_nameAvailable = value;} } } + + /// Internal Acessors for Reason + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutputInternal.Reason { get => this._reason; set { {_reason = value;} } } + + /// Backing field for property. + private bool? _nameAvailable; + + /// Indicates whether the name is available. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NameAvailable { get => this._nameAvailable; } + + /// Backing field for property. + private string _reason; + + /// The reason why the name is not available. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Reason { get => this._reason; } + + /// Creates an new instance. + public CheckNameAvailabilityOutput() + { + + } + } + /// Output of check name availability API. + public partial interface ICheckNameAvailabilityOutput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The detailed error message describing why the name is not available. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The detailed error message describing why the name is not available.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// Indicates whether the name is available. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates whether the name is available.", + SerializedName = @"nameAvailable", + PossibleTypes = new [] { typeof(bool) })] + bool? NameAvailable { get; } + /// The reason why the name is not available. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The reason why the name is not available.", + SerializedName = @"reason", + PossibleTypes = new [] { typeof(string) })] + string Reason { get; } + + } + /// Output of check name availability API. + internal partial interface ICheckNameAvailabilityOutputInternal + + { + /// The detailed error message describing why the name is not available. + string Message { get; set; } + /// Indicates whether the name is available. + bool? NameAvailable { get; set; } + /// The reason why the name is not available. + string Reason { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityOutput.json.cs b/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityOutput.json.cs new file mode 100644 index 000000000000..7b23eb21bf7e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CheckNameAvailabilityOutput.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Output of check name availability API. + public partial class CheckNameAvailabilityOutput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CheckNameAvailabilityOutput(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_nameAvailable = If( json?.PropertyT("nameAvailable"), out var __jsonNameAvailable) ? (bool?)__jsonNameAvailable : NameAvailable;} + {_reason = If( json?.PropertyT("reason"), out var __jsonReason) ? (string)__jsonReason : (string)Reason;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CheckNameAvailabilityOutput(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._nameAvailable ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._nameAvailable) : null, "nameAvailable" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._reason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._reason.ToString()) : null, "reason" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CidrIPAddress.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CidrIPAddress.PowerShell.cs new file mode 100644 index 000000000000..50b14c85392a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CidrIPAddress.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// CIDR Ip address + [System.ComponentModel.TypeConverter(typeof(CidrIPAddressTypeConverter))] + public partial class CidrIPAddress + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CidrIPAddress(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("BaseIPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddressInternal)this).BaseIPAddress = (string) content.GetValueForProperty("BaseIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddressInternal)this).BaseIPAddress, global::System.Convert.ToString); + } + if (content.Contains("PrefixLength")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddressInternal)this).PrefixLength = (int?) content.GetValueForProperty("PrefixLength",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddressInternal)this).PrefixLength, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CidrIPAddress(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("BaseIPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddressInternal)this).BaseIPAddress = (string) content.GetValueForProperty("BaseIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddressInternal)this).BaseIPAddress, global::System.Convert.ToString); + } + if (content.Contains("PrefixLength")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddressInternal)this).PrefixLength = (int?) content.GetValueForProperty("PrefixLength",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddressInternal)this).PrefixLength, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CidrIPAddress(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CidrIPAddress(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// CIDR Ip address + [System.ComponentModel.TypeConverter(typeof(CidrIPAddressTypeConverter))] + public partial interface ICidrIPAddress + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CidrIPAddress.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CidrIPAddress.TypeConverter.cs new file mode 100644 index 000000000000..5ad7cee3829e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CidrIPAddress.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CidrIPAddressTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CidrIPAddress.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CidrIPAddress.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CidrIPAddress.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CidrIPAddress.cs b/src/Cdn/generated/api/Models/Api20210601/CidrIPAddress.cs new file mode 100644 index 000000000000..da7fa834cbce --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CidrIPAddress.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// CIDR Ip address + public partial class CidrIPAddress : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddressInternal + { + + /// Backing field for property. + private string _baseIPAddress; + + /// Ip address itself. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string BaseIPAddress { get => this._baseIPAddress; set => this._baseIPAddress = value; } + + /// Backing field for property. + private int? _prefixLength; + + /// The length of the prefix of the ip address. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? PrefixLength { get => this._prefixLength; set => this._prefixLength = value; } + + /// Creates an new instance. + public CidrIPAddress() + { + + } + } + /// CIDR Ip address + public partial interface ICidrIPAddress : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Ip address itself. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Ip address itself.", + SerializedName = @"baseIpAddress", + PossibleTypes = new [] { typeof(string) })] + string BaseIPAddress { get; set; } + /// The length of the prefix of the ip address. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The length of the prefix of the ip address.", + SerializedName = @"prefixLength", + PossibleTypes = new [] { typeof(int) })] + int? PrefixLength { get; set; } + + } + /// CIDR Ip address + internal partial interface ICidrIPAddressInternal + + { + /// Ip address itself. + string BaseIPAddress { get; set; } + /// The length of the prefix of the ip address. + int? PrefixLength { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CidrIPAddress.json.cs b/src/Cdn/generated/api/Models/Api20210601/CidrIPAddress.json.cs new file mode 100644 index 000000000000..e65d20b3baca --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CidrIPAddress.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// CIDR Ip address + public partial class CidrIPAddress + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CidrIPAddress(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_baseIPAddress = If( json?.PropertyT("baseIpAddress"), out var __jsonBaseIPAddress) ? (string)__jsonBaseIPAddress : (string)BaseIPAddress;} + {_prefixLength = If( json?.PropertyT("prefixLength"), out var __jsonPrefixLength) ? (int?)__jsonPrefixLength : PrefixLength;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CidrIPAddress(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._baseIPAddress)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._baseIPAddress.ToString()) : null, "baseIpAddress" ,container.Add ); + AddIf( null != this._prefixLength ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._prefixLength) : null, "prefixLength" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ClientPortMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ClientPortMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..d24205558d08 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ClientPortMatchConditionParameters.PowerShell.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for ClientPort match conditions + [System.ComponentModel.TypeConverter(typeof(ClientPortMatchConditionParametersTypeConverter))] + public partial class ClientPortMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ClientPortMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ClientPortMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ClientPortMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ClientPortMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for ClientPort match conditions + [System.ComponentModel.TypeConverter(typeof(ClientPortMatchConditionParametersTypeConverter))] + public partial interface IClientPortMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ClientPortMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ClientPortMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..4bc3720cb29f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ClientPortMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ClientPortMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ClientPortMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ClientPortMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ClientPortMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ClientPortMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/ClientPortMatchConditionParameters.cs new file mode 100644 index 000000000000..a624274f8b1e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ClientPortMatchConditionParameters.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for ClientPort match conditions + public partial class ClientPortMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal + { + + /// Backing field for property. + private string[] _matchValue; + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator _operator; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator Operator { get => this._operator; set => this._operator = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleClientPortConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public ClientPortMatchConditionParameters() + { + + } + } + /// Defines the parameters for ClientPort match conditions + public partial interface IClientPortMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator Operator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for ClientPort match conditions + internal partial interface IClientPortMatchConditionParametersInternal + + { + /// The match value for the condition of the delivery rule + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator Operator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ClientPortMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/ClientPortMatchConditionParameters.json.cs new file mode 100644 index 000000000000..438f2a539449 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ClientPortMatchConditionParameters.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for ClientPort match conditions + public partial class ClientPortMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ClientPortMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MatchValue;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ClientPortMatchConditionParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._matchValue) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._matchValue ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("matchValues",__w); + } + if (null != this._transform) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._transform ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("transforms",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.PowerShell.cs new file mode 100644 index 000000000000..c7f5afce09f1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItemsTypeConverter))] + public partial class Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DateTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal)this).DateTime = (global::System.DateTime?) content.GetValueForProperty("DateTime",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal)this).DateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal)this).Value = (float?) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal)this).Value, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DateTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal)this).DateTime = (global::System.DateTime?) content.GetValueForProperty("DateTime",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal)this).DateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal)this).Value = (float?) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal)this).Value, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model + /// class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItemsTypeConverter))] + public partial interface IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.TypeConverter.cs new file mode 100644 index 000000000000..4bf20d9f962d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.TypeConverter.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItemsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null + /// if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null + /// if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.cs b/src/Cdn/generated/api/Models/Api20210601/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.cs new file mode 100644 index 000000000000..fb5571639a05 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal + { + + /// Backing field for property. + private global::System.DateTime? _dateTime; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public global::System.DateTime? DateTime { get => this._dateTime; set => this._dateTime = value; } + + /// Backing field for property. + private float? _value; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public float? Value { get => this._value; set => this._value = value; } + + /// + /// Creates an new instance. + /// + public Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems() + { + + } + } + public partial interface IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DateTime { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"value", + PossibleTypes = new [] { typeof(float) })] + float? Value { get; set; } + + } + internal partial interface IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal + + { + global::System.DateTime? DateTime { get; set; } + + float? Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.json.cs b/src/Cdn/generated/api/Models/Api20210601/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.json.cs new file mode 100644 index 000000000000..9e1ee9b02355 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dateTime = If( json?.PropertyT("dateTime"), out var __jsonDateTime) ? global::System.DateTime.TryParse((string)__jsonDateTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonDateTimeValue) ? __jsonDateTimeValue : DateTime : DateTime;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (float?)__jsonValue : Value;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._dateTime ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._dateTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "dateTime" ,container.Add ); + AddIf( null != this._value ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((float)this._value) : null, "value" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.PowerShell.cs new file mode 100644 index 000000000000..f8e92273f1eb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItemsTypeConverter))] + public partial class Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DateTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal)this).DateTime = (global::System.DateTime?) content.GetValueForProperty("DateTime",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal)this).DateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal)this).Value = (float?) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal)this).Value, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DateTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal)this).DateTime = (global::System.DateTime?) content.GetValueForProperty("DateTime",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal)this).DateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal)this).Value = (float?) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal)this).Value, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model + /// class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItemsTypeConverter))] + public partial interface IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.TypeConverter.cs new file mode 100644 index 000000000000..d007c847d42c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.TypeConverter.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItemsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null + /// if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null + /// if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.cs b/src/Cdn/generated/api/Models/Api20210601/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.cs new file mode 100644 index 000000000000..b66ee6745dce --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal + { + + /// Backing field for property. + private global::System.DateTime? _dateTime; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public global::System.DateTime? DateTime { get => this._dateTime; set => this._dateTime = value; } + + /// Backing field for property. + private float? _value; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public float? Value { get => this._value; set => this._value = value; } + + /// + /// Creates an new instance. + /// + public Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems() + { + + } + } + public partial interface IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DateTime { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"value", + PossibleTypes = new [] { typeof(float) })] + float? Value { get; set; } + + } + internal partial interface IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItemsInternal + + { + global::System.DateTime? DateTime { get; set; } + + float? Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.json.cs b/src/Cdn/generated/api/Models/Api20210601/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.json.cs new file mode 100644 index 000000000000..b632da4f7dc7 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dateTime = If( json?.PropertyT("dateTime"), out var __jsonDateTime) ? global::System.DateTime.TryParse((string)__jsonDateTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonDateTimeValue) ? __jsonDateTimeValue : DateTime : DateTime;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (float?)__jsonValue : Value;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of + /// as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._dateTime ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._dateTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "dateTime" ,container.Add ); + AddIf( null != this._value ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((float)this._value) : null, "value" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.PowerShell.cs new file mode 100644 index 000000000000..083c2f0b48a4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.PowerShell.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsTypeConverter))] + public partial class ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Metric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsInternal)this).Metric = (string) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsInternal)this).Metric, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsInternal)this).Value = (long?) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsInternal)this).Value, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("Percentage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsInternal)this).Percentage = (double?) content.GetValueForProperty("Percentage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsInternal)this).Percentage, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Metric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsInternal)this).Metric = (string) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsInternal)this).Metric, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsInternal)this).Value = (long?) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsInternal)this).Value, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("Percentage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsInternal)this).Percentage = (double?) content.GetValueForProperty("Percentage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsInternal)this).Percentage, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the + /// model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsTypeConverter))] + public partial interface IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.TypeConverter.cs new file mode 100644 index 000000000000..5ef911b63801 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.TypeConverter.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or + /// null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or + /// null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.cs b/src/Cdn/generated/api/Models/Api20210601/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.cs new file mode 100644 index 000000000000..0f412bf9b19d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsInternal + { + + /// Backing field for property. + private string _metric; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Metric { get => this._metric; set => this._metric = value; } + + /// Backing field for property. + private double? _percentage; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public double? Percentage { get => this._percentage; set => this._percentage = value; } + + /// Backing field for property. + private long? _value; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public long? Value { get => this._value; set => this._value = value; } + + /// + /// Creates an new instance. + /// + public ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems() + { + + } + } + public partial interface IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"metric", + PossibleTypes = new [] { typeof(string) })] + string Metric { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"percentage", + PossibleTypes = new [] { typeof(double) })] + double? Percentage { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"value", + PossibleTypes = new [] { typeof(long) })] + long? Value { get; set; } + + } + internal partial interface IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsInternal + + { + string Metric { get; set; } + + double? Percentage { get; set; } + + long? Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.json.cs b/src/Cdn/generated/api/Models/Api20210601/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.json.cs new file mode 100644 index 000000000000..5c9293fccd4f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_metric = If( json?.PropertyT("metric"), out var __jsonMetric) ? (string)__jsonMetric : (string)Metric;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (long?)__jsonValue : Value;} + {_percentage = If( json?.PropertyT("percentage"), out var __jsonPercentage) ? (double?)__jsonPercentage : Percentage;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._metric)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._metric.ToString()) : null, "metric" ,container.Add ); + AddIf( null != this._value ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((long)this._value) : null, "value" ,container.Add ); + AddIf( null != this._percentage ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((double)this._percentage) : null, "percentage" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CompressionSettings.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CompressionSettings.PowerShell.cs new file mode 100644 index 000000000000..377a8f4f2081 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CompressionSettings.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// settings for compression. + [System.ComponentModel.TypeConverter(typeof(CompressionSettingsTypeConverter))] + public partial class CompressionSettings + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CompressionSettings(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettingsInternal)this).ContentTypesToCompress = (string[]) content.GetValueForProperty("ContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettingsInternal)this).ContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("IsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettingsInternal)this).IsCompressionEnabled = (bool?) content.GetValueForProperty("IsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettingsInternal)this).IsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CompressionSettings(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettingsInternal)this).ContentTypesToCompress = (string[]) content.GetValueForProperty("ContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettingsInternal)this).ContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("IsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettingsInternal)this).IsCompressionEnabled = (bool?) content.GetValueForProperty("IsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettingsInternal)this).IsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CompressionSettings(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CompressionSettings(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// settings for compression. + [System.ComponentModel.TypeConverter(typeof(CompressionSettingsTypeConverter))] + public partial interface ICompressionSettings + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CompressionSettings.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CompressionSettings.TypeConverter.cs new file mode 100644 index 000000000000..bbbe2e530e18 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CompressionSettings.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CompressionSettingsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CompressionSettings.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CompressionSettings.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CompressionSettings.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CompressionSettings.cs b/src/Cdn/generated/api/Models/Api20210601/CompressionSettings.cs new file mode 100644 index 000000000000..a39fe226d2aa --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CompressionSettings.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// settings for compression. + public partial class CompressionSettings : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettingsInternal + { + + /// Backing field for property. + private string[] _contentTypesToCompress; + + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] ContentTypesToCompress { get => this._contentTypesToCompress; set => this._contentTypesToCompress = value; } + + /// Backing field for property. + private bool? _isCompressionEnabled; + + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? IsCompressionEnabled { get => this._isCompressionEnabled; set => this._isCompressionEnabled = value; } + + /// Creates an new instance. + public CompressionSettings() + { + + } + } + /// settings for compression. + public partial interface ICompressionSettings : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of content types on which compression applies. The value should be a valid MIME type.", + SerializedName = @"contentTypesToCompress", + PossibleTypes = new [] { typeof(string) })] + string[] ContentTypesToCompress { get; set; } + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.", + SerializedName = @"isCompressionEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsCompressionEnabled { get; set; } + + } + /// settings for compression. + internal partial interface ICompressionSettingsInternal + + { + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + string[] ContentTypesToCompress { get; set; } + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + bool? IsCompressionEnabled { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CompressionSettings.json.cs b/src/Cdn/generated/api/Models/Api20210601/CompressionSettings.json.cs new file mode 100644 index 000000000000..b41a533990b7 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CompressionSettings.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// settings for compression. + public partial class CompressionSettings + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CompressionSettings(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_contentTypesToCompress = If( json?.PropertyT("contentTypesToCompress"), out var __jsonContentTypesToCompress) ? If( __jsonContentTypesToCompress as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : ContentTypesToCompress;} + {_isCompressionEnabled = If( json?.PropertyT("isCompressionEnabled"), out var __jsonIsCompressionEnabled) ? (bool?)__jsonIsCompressionEnabled : IsCompressionEnabled;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CompressionSettings(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._contentTypesToCompress) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._contentTypesToCompress ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("contentTypesToCompress",__w); + } + AddIf( null != this._isCompressionEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._isCompressionEnabled) : null, "isCompressionEnabled" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ContinentsResponse.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponse.PowerShell.cs new file mode 100644 index 000000000000..02f457a3eec9 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponse.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Continents Response + [System.ComponentModel.TypeConverter(typeof(ContinentsResponseTypeConverter))] + public partial class ContinentsResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ContinentsResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Continent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseInternal)this).Continent = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItem[]) content.GetValueForProperty("Continent",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseInternal)this).Continent, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ContinentsResponseContinentsItemTypeConverter.ConvertFrom)); + } + if (content.Contains("CountryOrRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseInternal)this).CountryOrRegion = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItem[]) content.GetValueForProperty("CountryOrRegion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseInternal)this).CountryOrRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ContinentsResponseCountryOrRegionsItemTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ContinentsResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Continent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseInternal)this).Continent = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItem[]) content.GetValueForProperty("Continent",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseInternal)this).Continent, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ContinentsResponseContinentsItemTypeConverter.ConvertFrom)); + } + if (content.Contains("CountryOrRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseInternal)this).CountryOrRegion = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItem[]) content.GetValueForProperty("CountryOrRegion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseInternal)this).CountryOrRegion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ContinentsResponseCountryOrRegionsItemTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ContinentsResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ContinentsResponse(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Continents Response + [System.ComponentModel.TypeConverter(typeof(ContinentsResponseTypeConverter))] + public partial interface IContinentsResponse + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ContinentsResponse.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponse.TypeConverter.cs new file mode 100644 index 000000000000..8f28475af468 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponse.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ContinentsResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ContinentsResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ContinentsResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ContinentsResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ContinentsResponse.cs b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponse.cs new file mode 100644 index 000000000000..9360c229b0b5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponse.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Continents Response + public partial class ContinentsResponse : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponse, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItem[] _continent; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItem[] Continent { get => this._continent; set => this._continent = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItem[] _countryOrRegion; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItem[] CountryOrRegion { get => this._countryOrRegion; set => this._countryOrRegion = value; } + + /// Creates an new instance. + public ContinentsResponse() + { + + } + } + /// Continents Response + public partial interface IContinentsResponse : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"continents", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItem[] Continent { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"countryOrRegions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItem[] CountryOrRegion { get; set; } + + } + /// Continents Response + internal partial interface IContinentsResponseInternal + + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItem[] Continent { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItem[] CountryOrRegion { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ContinentsResponse.json.cs b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponse.json.cs new file mode 100644 index 000000000000..ced2cd16323f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponse.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Continents Response + public partial class ContinentsResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ContinentsResponse(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_continent = If( json?.PropertyT("continents"), out var __jsonContinents) ? If( __jsonContinents as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItem) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ContinentsResponseContinentsItem.FromJson(__u) )) ))() : null : Continent;} + {_countryOrRegion = If( json?.PropertyT("countryOrRegions"), out var __jsonCountryOrRegions) ? If( __jsonCountryOrRegions as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItem) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ContinentsResponseCountryOrRegionsItem.FromJson(__p) )) ))() : null : CountryOrRegion;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ContinentsResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._continent) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._continent ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("continents",__w); + } + if (null != this._countryOrRegion) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._countryOrRegion ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("countryOrRegions",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseContinentsItem.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseContinentsItem.PowerShell.cs new file mode 100644 index 000000000000..7e44155b8b67 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseContinentsItem.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ContinentsResponseContinentsItemTypeConverter))] + public partial class ContinentsResponseContinentsItem + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ContinentsResponseContinentsItem(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItemInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItemInternal)this).Id, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ContinentsResponseContinentsItem(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItemInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItemInternal)this).Id, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ContinentsResponseContinentsItem(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ContinentsResponseContinentsItem(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(ContinentsResponseContinentsItemTypeConverter))] + public partial interface IContinentsResponseContinentsItem + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseContinentsItem.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseContinentsItem.TypeConverter.cs new file mode 100644 index 000000000000..02964e2ad4f8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseContinentsItem.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ContinentsResponseContinentsItemTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItem ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItem).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ContinentsResponseContinentsItem.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ContinentsResponseContinentsItem.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ContinentsResponseContinentsItem.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseContinentsItem.cs b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseContinentsItem.cs new file mode 100644 index 000000000000..91099703f95b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseContinentsItem.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class ContinentsResponseContinentsItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItem, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItemInternal + { + + /// Backing field for property. + private string _id; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Creates an new instance. + public ContinentsResponseContinentsItem() + { + + } + } + public partial interface IContinentsResponseContinentsItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + + } + internal partial interface IContinentsResponseContinentsItemInternal + + { + string Id { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseContinentsItem.json.cs b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseContinentsItem.json.cs new file mode 100644 index 000000000000..0bd65effef01 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseContinentsItem.json.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class ContinentsResponseContinentsItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ContinentsResponseContinentsItem(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseContinentsItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ContinentsResponseContinentsItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseCountryOrRegionsItem.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseCountryOrRegionsItem.PowerShell.cs new file mode 100644 index 000000000000..19bf7490c5f2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseCountryOrRegionsItem.PowerShell.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ContinentsResponseCountryOrRegionsItemTypeConverter))] + public partial class ContinentsResponseCountryOrRegionsItem + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ContinentsResponseCountryOrRegionsItem(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItemInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItemInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("ContinentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItemInternal)this).ContinentId = (string) content.GetValueForProperty("ContinentId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItemInternal)this).ContinentId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ContinentsResponseCountryOrRegionsItem(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItemInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItemInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("ContinentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItemInternal)this).ContinentId = (string) content.GetValueForProperty("ContinentId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItemInternal)this).ContinentId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ContinentsResponseCountryOrRegionsItem(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ContinentsResponseCountryOrRegionsItem(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(ContinentsResponseCountryOrRegionsItemTypeConverter))] + public partial interface IContinentsResponseCountryOrRegionsItem + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseCountryOrRegionsItem.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseCountryOrRegionsItem.TypeConverter.cs new file mode 100644 index 000000000000..7fd9380d1100 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseCountryOrRegionsItem.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ContinentsResponseCountryOrRegionsItemTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItem ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItem).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ContinentsResponseCountryOrRegionsItem.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ContinentsResponseCountryOrRegionsItem.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ContinentsResponseCountryOrRegionsItem.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseCountryOrRegionsItem.cs b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseCountryOrRegionsItem.cs new file mode 100644 index 000000000000..c79d59a7a44f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseCountryOrRegionsItem.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class ContinentsResponseCountryOrRegionsItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItem, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItemInternal + { + + /// Backing field for property. + private string _continentId; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ContinentId { get => this._continentId; set => this._continentId = value; } + + /// Backing field for property. + private string _id; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Creates an new instance. + public ContinentsResponseCountryOrRegionsItem() + { + + } + } + public partial interface IContinentsResponseCountryOrRegionsItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"continentId", + PossibleTypes = new [] { typeof(string) })] + string ContinentId { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + + } + internal partial interface IContinentsResponseCountryOrRegionsItemInternal + + { + string ContinentId { get; set; } + + string Id { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseCountryOrRegionsItem.json.cs b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseCountryOrRegionsItem.json.cs new file mode 100644 index 000000000000..ba2cc8c3c5da --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ContinentsResponseCountryOrRegionsItem.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class ContinentsResponseCountryOrRegionsItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ContinentsResponseCountryOrRegionsItem(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_continentId = If( json?.PropertyT("continentId"), out var __jsonContinentId) ? (string)__jsonContinentId : (string)ContinentId;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponseCountryOrRegionsItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ContinentsResponseCountryOrRegionsItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AddIf( null != (((object)this._continentId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._continentId.ToString()) : null, "continentId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CookiesMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CookiesMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..55ec15c56a6f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CookiesMatchConditionParameters.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for Cookies match conditions + [System.ComponentModel.TypeConverter(typeof(CookiesMatchConditionParametersTypeConverter))] + public partial class CookiesMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CookiesMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Selector")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).Selector = (string) content.GetValueForProperty("Selector",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).Selector, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CookiesMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Selector")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).Selector = (string) content.GetValueForProperty("Selector",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).Selector, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CookiesMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CookiesMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for Cookies match conditions + [System.ComponentModel.TypeConverter(typeof(CookiesMatchConditionParametersTypeConverter))] + public partial interface ICookiesMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CookiesMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CookiesMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..fdd714dd681d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CookiesMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CookiesMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CookiesMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CookiesMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CookiesMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CookiesMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/CookiesMatchConditionParameters.cs new file mode 100644 index 000000000000..b0a28a10a6bb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CookiesMatchConditionParameters.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for Cookies match conditions + public partial class CookiesMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal + { + + /// Backing field for property. + private string[] _matchValue; + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator _operator; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator Operator { get => this._operator; set => this._operator = value; } + + /// Backing field for property. + private string _selector; + + /// Name of Cookies to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Selector { get => this._selector; set => this._selector = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleCookiesConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public CookiesMatchConditionParameters() + { + + } + } + /// Defines the parameters for Cookies match conditions + public partial interface ICookiesMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator Operator { get; set; } + /// Name of Cookies to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of Cookies to be matched", + SerializedName = @"selector", + PossibleTypes = new [] { typeof(string) })] + string Selector { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for Cookies match conditions + internal partial interface ICookiesMatchConditionParametersInternal + + { + /// The match value for the condition of the delivery rule + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator Operator { get; set; } + /// Name of Cookies to be matched + string Selector { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CookiesMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/CookiesMatchConditionParameters.json.cs new file mode 100644 index 000000000000..2bb07cf16db0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CookiesMatchConditionParameters.json.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for Cookies match conditions + public partial class CookiesMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CookiesMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_selector = If( json?.PropertyT("selector"), out var __jsonSelector) ? (string)__jsonSelector : (string)Selector;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MatchValue;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CookiesMatchConditionParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._selector)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._selector.ToString()) : null, "selector" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._matchValue) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._matchValue ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("matchValues",__w); + } + if (null != this._transform) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._transform ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("transforms",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomain.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomain.PowerShell.cs new file mode 100644 index 000000000000..ca925633a8a0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomain.PowerShell.cs @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + /// + [System.ComponentModel.TypeConverter(typeof(CustomDomainTypeConverter))] + public partial class CustomDomain + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CustomDomain(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState.CreateFrom); + } + if (content.Contains("CustomHttpsProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).CustomHttpsProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState?) content.GetValueForProperty("CustomHttpsProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).CustomHttpsProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState.CreateFrom); + } + if (content.Contains("CustomHttpsProvisioningSubstate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).CustomHttpsProvisioningSubstate = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate?) content.GetValueForProperty("CustomHttpsProvisioningSubstate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).CustomHttpsProvisioningSubstate, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate.CreateFrom); + } + if (content.Contains("CustomHttpsParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).CustomHttpsParameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters) content.GetValueForProperty("CustomHttpsParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).CustomHttpsParameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainHttpsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("ValidationData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).ValidationData = (string) content.GetValueForProperty("ValidationData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).ValidationData, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CustomDomain(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState.CreateFrom); + } + if (content.Contains("CustomHttpsProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).CustomHttpsProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState?) content.GetValueForProperty("CustomHttpsProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).CustomHttpsProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState.CreateFrom); + } + if (content.Contains("CustomHttpsProvisioningSubstate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).CustomHttpsProvisioningSubstate = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate?) content.GetValueForProperty("CustomHttpsProvisioningSubstate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).CustomHttpsProvisioningSubstate, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate.CreateFrom); + } + if (content.Contains("CustomHttpsParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).CustomHttpsParameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters) content.GetValueForProperty("CustomHttpsParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).CustomHttpsParameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainHttpsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("ValidationData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).ValidationData = (string) content.GetValueForProperty("ValidationData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).ValidationData, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CustomDomain(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CustomDomain(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + [System.ComponentModel.TypeConverter(typeof(CustomDomainTypeConverter))] + public partial interface ICustomDomain + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomain.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomain.TypeConverter.cs new file mode 100644 index 000000000000..3355e210a96a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomain.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CustomDomainTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CustomDomain.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CustomDomain.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CustomDomain.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomain.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomain.cs new file mode 100644 index 000000000000..d9db6850c7f8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomain.cs @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + /// + public partial class CustomDomain : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(); + + /// Certificate parameters for securing custom HTTPS + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters CustomHttpsParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)Property).CustomHttpsParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)Property).CustomHttpsParameter = value ?? null /* model class */; } + + /// Provisioning status of Custom Https of the custom domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState? CustomHttpsProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)Property).CustomHttpsProvisioningState; } + + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate? CustomHttpsProvisioningSubstate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)Property).CustomHttpsProvisioningSubstate; } + + /// The host name of the custom domain. Must be a domain name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string HostName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)Property).HostName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)Property).HostName = value ?? null; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; } + + /// Internal Acessors for CustomHttpsProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal.CustomHttpsProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)Property).CustomHttpsProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)Property).CustomHttpsProvisioningState = value; } + + /// Internal Acessors for CustomHttpsProvisioningSubstate + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal.CustomHttpsProvisioningSubstate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)Property).CustomHttpsProvisioningSubstate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)Property).CustomHttpsProvisioningSubstate = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for ResourceState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainInternal.ResourceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)Property).ResourceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)Property).ResourceState = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type = value; } + + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainProperties _property; + + /// The JSON object that contains the properties of the custom domain to create. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainProperties()); set => this._property = value; } + + /// Provisioning status of the custom domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.FormatTable] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// Resource status of the custom domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState? ResourceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)Property).ResourceState; } + + /// Read only system data + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; } + + /// + /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP + /// license number of a custom domain is required to deliver content in China. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ValidationData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)Property).ValidationData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)Property).ValidationData = value ?? null; } + + /// Creates an new instance. + public CustomDomain() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + public partial interface ICustomDomain : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource + { + /// Certificate parameters for securing custom HTTPS + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Certificate parameters for securing custom HTTPS", + SerializedName = @"customHttpsParameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters CustomHttpsParameter { get; set; } + /// Provisioning status of Custom Https of the custom domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status of Custom Https of the custom domain.", + SerializedName = @"customHttpsProvisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState? CustomHttpsProvisioningState { get; } + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step.", + SerializedName = @"customHttpsProvisioningSubstate", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate? CustomHttpsProvisioningSubstate { get; } + /// The host name of the custom domain. Must be a domain name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host name of the custom domain. Must be a domain name.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; set; } + /// Provisioning status of the custom domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status of the custom domain.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// Resource status of the custom domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource status of the custom domain.", + SerializedName = @"resourceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState? ResourceState { get; } + /// + /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP + /// license number of a custom domain is required to deliver content in China. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China.", + SerializedName = @"validationData", + PossibleTypes = new [] { typeof(string) })] + string ValidationData { get; set; } + + } + /// Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + internal partial interface ICustomDomainInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal + { + /// Certificate parameters for securing custom HTTPS + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters CustomHttpsParameter { get; set; } + /// Provisioning status of Custom Https of the custom domain. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState? CustomHttpsProvisioningState { get; set; } + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate? CustomHttpsProvisioningSubstate { get; set; } + /// The host name of the custom domain. Must be a domain name. + string HostName { get; set; } + /// The JSON object that contains the properties of the custom domain to create. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainProperties Property { get; set; } + /// Provisioning status of the custom domain. + string ProvisioningState { get; set; } + /// Resource status of the custom domain. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState? ResourceState { get; set; } + /// + /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP + /// license number of a custom domain is required to deliver content in China. + /// + string ValidationData { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomain.json.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomain.json.cs new file mode 100644 index 000000000000..d3c0f08d90cf --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomain.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + /// + public partial class CustomDomain + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CustomDomain(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CustomDomain(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainHttpsParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainHttpsParameters.PowerShell.cs new file mode 100644 index 000000000000..e7f80cb266d5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainHttpsParameters.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties to secure a custom domain. + [System.ComponentModel.TypeConverter(typeof(CustomDomainHttpsParametersTypeConverter))] + public partial class CustomDomainHttpsParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CustomDomainHttpsParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CertificateSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).CertificateSource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource) content.GetValueForProperty("CertificateSource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).CertificateSource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource.CreateFrom); + } + if (content.Contains("ProtocolType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).ProtocolType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType) content.GetValueForProperty("ProtocolType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).ProtocolType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType.CreateFrom); + } + if (content.Contains("MinimumTlsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).MinimumTlsVersion = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion?) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).MinimumTlsVersion, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CustomDomainHttpsParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CertificateSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).CertificateSource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource) content.GetValueForProperty("CertificateSource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).CertificateSource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource.CreateFrom); + } + if (content.Contains("ProtocolType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).ProtocolType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType) content.GetValueForProperty("ProtocolType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).ProtocolType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType.CreateFrom); + } + if (content.Contains("MinimumTlsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).MinimumTlsVersion = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion?) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).MinimumTlsVersion, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CustomDomainHttpsParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CustomDomainHttpsParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties to secure a custom domain. + [System.ComponentModel.TypeConverter(typeof(CustomDomainHttpsParametersTypeConverter))] + public partial interface ICustomDomainHttpsParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainHttpsParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainHttpsParameters.TypeConverter.cs new file mode 100644 index 000000000000..f036d5fd139c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainHttpsParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CustomDomainHttpsParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CustomDomainHttpsParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CustomDomainHttpsParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CustomDomainHttpsParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainHttpsParameters.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainHttpsParameters.cs new file mode 100644 index 000000000000..a0edbf0842fd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainHttpsParameters.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties to secure a custom domain. + public partial class CustomDomainHttpsParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource _certificateSource; + + /// Defines the source of the SSL certificate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource CertificateSource { get => this._certificateSource; set => this._certificateSource = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion? _minimumTlsVersion; + + /// TLS protocol version that will be used for Https + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion? MinimumTlsVersion { get => this._minimumTlsVersion; set => this._minimumTlsVersion = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType _protocolType; + + /// Defines the TLS extension protocol that is used for secure delivery. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType ProtocolType { get => this._protocolType; set => this._protocolType = value; } + + /// Creates an new instance. + public CustomDomainHttpsParameters() + { + + } + } + /// The JSON object that contains the properties to secure a custom domain. + public partial interface ICustomDomainHttpsParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Defines the source of the SSL certificate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Defines the source of the SSL certificate.", + SerializedName = @"certificateSource", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource CertificateSource { get; set; } + /// TLS protocol version that will be used for Https + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"TLS protocol version that will be used for Https", + SerializedName = @"minimumTlsVersion", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion? MinimumTlsVersion { get; set; } + /// Defines the TLS extension protocol that is used for secure delivery. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Defines the TLS extension protocol that is used for secure delivery.", + SerializedName = @"protocolType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType ProtocolType { get; set; } + + } + /// The JSON object that contains the properties to secure a custom domain. + internal partial interface ICustomDomainHttpsParametersInternal + + { + /// Defines the source of the SSL certificate. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource CertificateSource { get; set; } + /// TLS protocol version that will be used for Https + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion? MinimumTlsVersion { get; set; } + /// Defines the TLS extension protocol that is used for secure delivery. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType ProtocolType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainHttpsParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainHttpsParameters.json.cs new file mode 100644 index 000000000000..55c8fd25a709 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainHttpsParameters.json.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties to secure a custom domain. + public partial class CustomDomainHttpsParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CustomDomainHttpsParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_certificateSource = If( json?.PropertyT("certificateSource"), out var __jsonCertificateSource) ? (string)__jsonCertificateSource : (string)CertificateSource;} + {_protocolType = If( json?.PropertyT("protocolType"), out var __jsonProtocolType) ? (string)__jsonProtocolType : (string)ProtocolType;} + {_minimumTlsVersion = If( json?.PropertyT("minimumTlsVersion"), out var __jsonMinimumTlsVersion) ? (string)__jsonMinimumTlsVersion : (string)MinimumTlsVersion;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("certificateSource") ) + { + case "Cdn": + { + return new CdnManagedHttpsParameters(json); + } + case "AzureKeyVault": + { + return new UserManagedHttpsParameters(json); + } + } + return new CustomDomainHttpsParameters(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._certificateSource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._certificateSource.ToString()) : null, "certificateSource" ,container.Add ); + AddIf( null != (((object)this._protocolType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._protocolType.ToString()) : null, "protocolType" ,container.Add ); + AddIf( null != (((object)this._minimumTlsVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._minimumTlsVersion.ToString()) : null, "minimumTlsVersion" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainListResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainListResult.PowerShell.cs new file mode 100644 index 000000000000..5454e338b3ae --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainListResult.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Result of the request to list custom domains. It contains a list of custom domain objects and a URL link to get the next + /// set of results. + /// + [System.ComponentModel.TypeConverter(typeof(CustomDomainListResultTypeConverter))] + public partial class CustomDomainListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CustomDomainListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CustomDomainListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CustomDomainListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CustomDomainListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the request to list custom domains. It contains a list of custom domain objects and a URL link to get the next + /// set of results. + [System.ComponentModel.TypeConverter(typeof(CustomDomainListResultTypeConverter))] + public partial interface ICustomDomainListResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainListResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainListResult.TypeConverter.cs new file mode 100644 index 000000000000..e2ecbc4af7fa --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CustomDomainListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CustomDomainListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CustomDomainListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CustomDomainListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainListResult.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainListResult.cs new file mode 100644 index 000000000000..0f917a6c9de5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainListResult.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list custom domains. It contains a list of custom domain objects and a URL link to get the next + /// set of results. + /// + public partial class CustomDomainListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResultInternal + { + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of custom domain objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[] _value; + + /// List of CDN CustomDomains within an endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[] Value { get => this._value; } + + /// Creates an new instance. + public CustomDomainListResult() + { + + } + } + /// Result of the request to list custom domains. It contains a list of custom domain objects and a URL link to get the next + /// set of results. + public partial interface ICustomDomainListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// URL to get the next set of custom domain objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL to get the next set of custom domain objects if there are any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// List of CDN CustomDomains within an endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of CDN CustomDomains within an endpoint.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[] Value { get; } + + } + /// Result of the request to list custom domains. It contains a list of custom domain objects and a URL link to get the next + /// set of results. + internal partial interface ICustomDomainListResultInternal + + { + /// URL to get the next set of custom domain objects if there are any. + string NextLink { get; set; } + /// List of CDN CustomDomains within an endpoint. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainListResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainListResult.json.cs new file mode 100644 index 000000000000..6b65c9824951 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainListResult.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list custom domains. It contains a list of custom domain objects and a URL link to get the next + /// set of results. + /// + public partial class CustomDomainListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CustomDomainListResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomain.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CustomDomainListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainParameters.PowerShell.cs new file mode 100644 index 000000000000..7b34c330f3a5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainParameters.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The customDomain JSON object required for custom domain creation or update. + [System.ComponentModel.TypeConverter(typeof(CustomDomainParametersTypeConverter))] + public partial class CustomDomainParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CustomDomainParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainPropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParametersInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParametersInternal)this).HostName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CustomDomainParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainPropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParametersInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParametersInternal)this).HostName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CustomDomainParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CustomDomainParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The customDomain JSON object required for custom domain creation or update. + [System.ComponentModel.TypeConverter(typeof(CustomDomainParametersTypeConverter))] + public partial interface ICustomDomainParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainParameters.TypeConverter.cs new file mode 100644 index 000000000000..4d6c990ac75e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CustomDomainParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CustomDomainParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CustomDomainParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CustomDomainParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainParameters.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainParameters.cs new file mode 100644 index 000000000000..c5ab46d30dd9 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainParameters.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The customDomain JSON object required for custom domain creation or update. + public partial class CustomDomainParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParametersInternal + { + + /// The host name of the custom domain. Must be a domain name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string HostName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParametersInternal)Property).HostName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParametersInternal)Property).HostName = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainPropertiesParameters()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParameters _property; + + /// The JSON object that contains the properties of the custom domain to create. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParameters Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainPropertiesParameters()); set => this._property = value; } + + /// Creates an new instance. + public CustomDomainParameters() + { + + } + } + /// The customDomain JSON object required for custom domain creation or update. + public partial interface ICustomDomainParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The host name of the custom domain. Must be a domain name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host name of the custom domain. Must be a domain name.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; set; } + + } + /// The customDomain JSON object required for custom domain creation or update. + internal partial interface ICustomDomainParametersInternal + + { + /// The host name of the custom domain. Must be a domain name. + string HostName { get; set; } + /// The JSON object that contains the properties of the custom domain to create. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParameters Property { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainParameters.json.cs new file mode 100644 index 000000000000..190f82658776 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainParameters.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The customDomain JSON object required for custom domain creation or update. + public partial class CustomDomainParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CustomDomainParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainPropertiesParameters.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CustomDomainParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainProperties.PowerShell.cs new file mode 100644 index 000000000000..a484c5b8fe3c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainProperties.PowerShell.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties of the custom domain to create. + [System.ComponentModel.TypeConverter(typeof(CustomDomainPropertiesTypeConverter))] + public partial class CustomDomainProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CustomDomainProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState.CreateFrom); + } + if (content.Contains("CustomHttpsProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).CustomHttpsProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState?) content.GetValueForProperty("CustomHttpsProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).CustomHttpsProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState.CreateFrom); + } + if (content.Contains("CustomHttpsProvisioningSubstate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).CustomHttpsProvisioningSubstate = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate?) content.GetValueForProperty("CustomHttpsProvisioningSubstate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).CustomHttpsProvisioningSubstate, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate.CreateFrom); + } + if (content.Contains("CustomHttpsParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).CustomHttpsParameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters) content.GetValueForProperty("CustomHttpsParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).CustomHttpsParameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainHttpsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("ValidationData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).ValidationData = (string) content.GetValueForProperty("ValidationData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).ValidationData, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CustomDomainProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState.CreateFrom); + } + if (content.Contains("CustomHttpsProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).CustomHttpsProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState?) content.GetValueForProperty("CustomHttpsProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).CustomHttpsProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState.CreateFrom); + } + if (content.Contains("CustomHttpsProvisioningSubstate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).CustomHttpsProvisioningSubstate = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate?) content.GetValueForProperty("CustomHttpsProvisioningSubstate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).CustomHttpsProvisioningSubstate, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate.CreateFrom); + } + if (content.Contains("CustomHttpsParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).CustomHttpsParameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters) content.GetValueForProperty("CustomHttpsParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).CustomHttpsParameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainHttpsParametersTypeConverter.ConvertFrom); + } + if (content.Contains("ValidationData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).ValidationData = (string) content.GetValueForProperty("ValidationData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).ValidationData, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CustomDomainProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CustomDomainProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties of the custom domain to create. + [System.ComponentModel.TypeConverter(typeof(CustomDomainPropertiesTypeConverter))] + public partial interface ICustomDomainProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainProperties.TypeConverter.cs new file mode 100644 index 000000000000..88d5828fc201 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CustomDomainPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CustomDomainProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CustomDomainProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CustomDomainProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainProperties.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainProperties.cs new file mode 100644 index 000000000000..86389e3be558 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainProperties.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the custom domain to create. + public partial class CustomDomainProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters _customHttpsParameter; + + /// Certificate parameters for securing custom HTTPS + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters CustomHttpsParameter { get => (this._customHttpsParameter = this._customHttpsParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainHttpsParameters()); set => this._customHttpsParameter = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState? _customHttpsProvisioningState; + + /// Provisioning status of Custom Https of the custom domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState? CustomHttpsProvisioningState { get => this._customHttpsProvisioningState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate? _customHttpsProvisioningSubstate; + + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate? CustomHttpsProvisioningSubstate { get => this._customHttpsProvisioningSubstate; } + + /// Backing field for property. + private string _hostName; + + /// The host name of the custom domain. Must be a domain name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string HostName { get => this._hostName; set => this._hostName = value; } + + /// Internal Acessors for CustomHttpsProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal.CustomHttpsProvisioningState { get => this._customHttpsProvisioningState; set { {_customHttpsProvisioningState = value;} } } + + /// Internal Acessors for CustomHttpsProvisioningSubstate + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal.CustomHttpsProvisioningSubstate { get => this._customHttpsProvisioningSubstate; set { {_customHttpsProvisioningSubstate = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for ResourceState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesInternal.ResourceState { get => this._resourceState; set { {_resourceState = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// Provisioning status of the custom domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState? _resourceState; + + /// Resource status of the custom domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState? ResourceState { get => this._resourceState; } + + /// Backing field for property. + private string _validationData; + + /// + /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP + /// license number of a custom domain is required to deliver content in China. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ValidationData { get => this._validationData; set => this._validationData = value; } + + /// Creates an new instance. + public CustomDomainProperties() + { + + } + } + /// The JSON object that contains the properties of the custom domain to create. + public partial interface ICustomDomainProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Certificate parameters for securing custom HTTPS + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Certificate parameters for securing custom HTTPS", + SerializedName = @"customHttpsParameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters CustomHttpsParameter { get; set; } + /// Provisioning status of Custom Https of the custom domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status of Custom Https of the custom domain.", + SerializedName = @"customHttpsProvisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState? CustomHttpsProvisioningState { get; } + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step.", + SerializedName = @"customHttpsProvisioningSubstate", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate? CustomHttpsProvisioningSubstate { get; } + /// The host name of the custom domain. Must be a domain name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The host name of the custom domain. Must be a domain name.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; set; } + /// Provisioning status of the custom domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status of the custom domain.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// Resource status of the custom domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource status of the custom domain.", + SerializedName = @"resourceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState? ResourceState { get; } + /// + /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP + /// license number of a custom domain is required to deliver content in China. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China.", + SerializedName = @"validationData", + PossibleTypes = new [] { typeof(string) })] + string ValidationData { get; set; } + + } + /// The JSON object that contains the properties of the custom domain to create. + internal partial interface ICustomDomainPropertiesInternal + + { + /// Certificate parameters for securing custom HTTPS + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters CustomHttpsParameter { get; set; } + /// Provisioning status of Custom Https of the custom domain. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState? CustomHttpsProvisioningState { get; set; } + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate? CustomHttpsProvisioningSubstate { get; set; } + /// The host name of the custom domain. Must be a domain name. + string HostName { get; set; } + /// Provisioning status of the custom domain. + string ProvisioningState { get; set; } + /// Resource status of the custom domain. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState? ResourceState { get; set; } + /// + /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP + /// license number of a custom domain is required to deliver content in China. + /// + string ValidationData { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainProperties.json.cs new file mode 100644 index 000000000000..1d419ab11ebb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainProperties.json.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the custom domain to create. + public partial class CustomDomainProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CustomDomainProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_hostName = If( json?.PropertyT("hostName"), out var __jsonHostName) ? (string)__jsonHostName : (string)HostName;} + {_resourceState = If( json?.PropertyT("resourceState"), out var __jsonResourceState) ? (string)__jsonResourceState : (string)ResourceState;} + {_customHttpsProvisioningState = If( json?.PropertyT("customHttpsProvisioningState"), out var __jsonCustomHttpsProvisioningState) ? (string)__jsonCustomHttpsProvisioningState : (string)CustomHttpsProvisioningState;} + {_customHttpsProvisioningSubstate = If( json?.PropertyT("customHttpsProvisioningSubstate"), out var __jsonCustomHttpsProvisioningSubstate) ? (string)__jsonCustomHttpsProvisioningSubstate : (string)CustomHttpsProvisioningSubstate;} + {_customHttpsParameter = If( json?.PropertyT("customHttpsParameters"), out var __jsonCustomHttpsParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainHttpsParameters.FromJson(__jsonCustomHttpsParameters) : CustomHttpsParameter;} + {_validationData = If( json?.PropertyT("validationData"), out var __jsonValidationData) ? (string)__jsonValidationData : (string)ValidationData;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CustomDomainProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._hostName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._hostName.ToString()) : null, "hostName" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._resourceState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._resourceState.ToString()) : null, "resourceState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._customHttpsProvisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._customHttpsProvisioningState.ToString()) : null, "customHttpsProvisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._customHttpsProvisioningSubstate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._customHttpsProvisioningSubstate.ToString()) : null, "customHttpsProvisioningSubstate" ,container.Add ); + } + AddIf( null != this._customHttpsParameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._customHttpsParameter.ToJson(null,serializationMode) : null, "customHttpsParameters" ,container.Add ); + AddIf( null != (((object)this._validationData)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._validationData.ToString()) : null, "validationData" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainPropertiesParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainPropertiesParameters.PowerShell.cs new file mode 100644 index 000000000000..e9552eda3447 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainPropertiesParameters.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties of the custom domain to create. + [System.ComponentModel.TypeConverter(typeof(CustomDomainPropertiesParametersTypeConverter))] + public partial class CustomDomainPropertiesParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CustomDomainPropertiesParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParametersInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParametersInternal)this).HostName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CustomDomainPropertiesParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParametersInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParametersInternal)this).HostName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CustomDomainPropertiesParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CustomDomainPropertiesParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties of the custom domain to create. + [System.ComponentModel.TypeConverter(typeof(CustomDomainPropertiesParametersTypeConverter))] + public partial interface ICustomDomainPropertiesParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainPropertiesParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainPropertiesParameters.TypeConverter.cs new file mode 100644 index 000000000000..5a444c7abd3f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainPropertiesParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CustomDomainPropertiesParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CustomDomainPropertiesParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CustomDomainPropertiesParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CustomDomainPropertiesParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainPropertiesParameters.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainPropertiesParameters.cs new file mode 100644 index 000000000000..d73f25081c5e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainPropertiesParameters.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the custom domain to create. + public partial class CustomDomainPropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParametersInternal + { + + /// Backing field for property. + private string _hostName; + + /// The host name of the custom domain. Must be a domain name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string HostName { get => this._hostName; set => this._hostName = value; } + + /// Creates an new instance. + public CustomDomainPropertiesParameters() + { + + } + } + /// The JSON object that contains the properties of the custom domain to create. + public partial interface ICustomDomainPropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The host name of the custom domain. Must be a domain name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The host name of the custom domain. Must be a domain name.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; set; } + + } + /// The JSON object that contains the properties of the custom domain to create. + internal partial interface ICustomDomainPropertiesParametersInternal + + { + /// The host name of the custom domain. Must be a domain name. + string HostName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomDomainPropertiesParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/CustomDomainPropertiesParameters.json.cs new file mode 100644 index 000000000000..111ec60273a0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomDomainPropertiesParameters.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the custom domain to create. + public partial class CustomDomainPropertiesParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CustomDomainPropertiesParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_hostName = If( json?.PropertyT("hostName"), out var __jsonHostName) ? (string)__jsonHostName : (string)HostName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainPropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CustomDomainPropertiesParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._hostName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._hostName.ToString()) : null, "hostName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomerCertificate.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CustomerCertificate.PowerShell.cs new file mode 100644 index 000000000000..68caf995b243 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomerCertificate.PowerShell.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Customer Certificate used for https + [System.ComponentModel.TypeConverter(typeof(CustomerCertificateTypeConverter))] + public partial class CustomerCertificate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CustomerCertificate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SecretSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).SecretSource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("SecretSource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).SecretSource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SecretVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).SecretVersion = (string) content.GetValueForProperty("SecretVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).SecretVersion, global::System.Convert.ToString); + } + if (content.Contains("CertificateAuthority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).CertificateAuthority = (string) content.GetValueForProperty("CertificateAuthority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).CertificateAuthority, global::System.Convert.ToString); + } + if (content.Contains("UseLatestVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).UseLatestVersion = (bool?) content.GetValueForProperty("UseLatestVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).UseLatestVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SubjectAlternativeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).SubjectAlternativeName = (string[]) content.GetValueForProperty("SubjectAlternativeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).SubjectAlternativeName, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Thumbprint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).Thumbprint = (string) content.GetValueForProperty("Thumbprint",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).Thumbprint, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("ExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).ExpirationDate = (string) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).ExpirationDate, global::System.Convert.ToString); + } + if (content.Contains("SecretSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).SecretSourceId = (string) content.GetValueForProperty("SecretSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).SecretSourceId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CustomerCertificate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SecretSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).SecretSource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("SecretSource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).SecretSource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SecretVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).SecretVersion = (string) content.GetValueForProperty("SecretVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).SecretVersion, global::System.Convert.ToString); + } + if (content.Contains("CertificateAuthority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).CertificateAuthority = (string) content.GetValueForProperty("CertificateAuthority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).CertificateAuthority, global::System.Convert.ToString); + } + if (content.Contains("UseLatestVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).UseLatestVersion = (bool?) content.GetValueForProperty("UseLatestVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).UseLatestVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SubjectAlternativeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).SubjectAlternativeName = (string[]) content.GetValueForProperty("SubjectAlternativeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).SubjectAlternativeName, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Thumbprint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).Thumbprint = (string) content.GetValueForProperty("Thumbprint",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).Thumbprint, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("ExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).ExpirationDate = (string) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).ExpirationDate, global::System.Convert.ToString); + } + if (content.Contains("SecretSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).SecretSourceId = (string) content.GetValueForProperty("SecretSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal)this).SecretSourceId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CustomerCertificate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CustomerCertificate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Customer Certificate used for https + [System.ComponentModel.TypeConverter(typeof(CustomerCertificateTypeConverter))] + public partial interface ICustomerCertificate + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomerCertificate.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CustomerCertificate.TypeConverter.cs new file mode 100644 index 000000000000..5b304888ea54 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomerCertificate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CustomerCertificateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CustomerCertificate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CustomerCertificate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CustomerCertificate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomerCertificate.cs b/src/Cdn/generated/api/Models/Api20210601/CustomerCertificate.cs new file mode 100644 index 000000000000..ca13ec96a903 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomerCertificate.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Customer Certificate used for https + public partial class CustomerCertificate : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificate, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificate __certificate = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Certificate(); + + /// Backing field for property. + private string _certificateAuthority; + + /// Certificate issuing authority. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string CertificateAuthority { get => this._certificateAuthority; } + + /// Certificate expiration date. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string ExpirationDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).ExpirationDate; } + + /// Internal Acessors for ExpirationDate + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal.ExpirationDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).ExpirationDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).ExpirationDate = value; } + + /// Internal Acessors for Subject + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal.Subject { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).Subject; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).Subject = value; } + + /// Internal Acessors for CertificateAuthority + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal.CertificateAuthority { get => this._certificateAuthority; set { {_certificateAuthority = value;} } } + + /// Internal Acessors for SecretSource + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal.SecretSource { get => (this._secretSource = this._secretSource ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set { {_secretSource = value;} } } + + /// Internal Acessors for Thumbprint + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateInternal.Thumbprint { get => this._thumbprint; set { {_thumbprint = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference _secretSource; + + /// + /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference SecretSource { get => (this._secretSource = this._secretSource ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set => this._secretSource = value; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string SecretSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)SecretSource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)SecretSource).Id = value ?? null; } + + /// Backing field for property. + private string _secretVersion; + + /// Certificate version. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string SecretVersion { get => this._secretVersion; set => this._secretVersion = value; } + + /// Subject name in the certificate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Subject { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).Subject; } + + /// Backing field for property. + private string[] _subjectAlternativeName; + + /// The list of SANs. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] SubjectAlternativeName { get => this._subjectAlternativeName; set => this._subjectAlternativeName = value; } + + /// Backing field for property. + private string _thumbprint; + + /// Certificate thumbprint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Thumbprint { get => this._thumbprint; } + + /// The type of the secret resource. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType? Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType)""); } + + /// Backing field for property. + private bool? _useLatestVersion; + + /// Whether to use the latest version for the certificate + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? UseLatestVersion { get => this._useLatestVersion; set => this._useLatestVersion = value; } + + /// Creates an new instance. + public CustomerCertificate() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__certificate), __certificate); + await eventListener.AssertObjectIsValid(nameof(__certificate), __certificate); + } + } + /// Customer Certificate used for https + public partial interface ICustomerCertificate : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificate + { + /// Certificate issuing authority. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Certificate issuing authority.", + SerializedName = @"certificateAuthority", + PossibleTypes = new [] { typeof(string) })] + string CertificateAuthority { get; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string SecretSourceId { get; set; } + /// Certificate version. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Certificate version.", + SerializedName = @"secretVersion", + PossibleTypes = new [] { typeof(string) })] + string SecretVersion { get; set; } + /// The list of SANs. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of SANs.", + SerializedName = @"subjectAlternativeNames", + PossibleTypes = new [] { typeof(string) })] + string[] SubjectAlternativeName { get; set; } + /// Certificate thumbprint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Certificate thumbprint.", + SerializedName = @"thumbprint", + PossibleTypes = new [] { typeof(string) })] + string Thumbprint { get; } + /// Whether to use the latest version for the certificate + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to use the latest version for the certificate", + SerializedName = @"useLatestVersion", + PossibleTypes = new [] { typeof(bool) })] + bool? UseLatestVersion { get; set; } + + } + /// Customer Certificate used for https + internal partial interface ICustomerCertificateInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal + { + /// Certificate issuing authority. + string CertificateAuthority { get; set; } + /// + /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference SecretSource { get; set; } + /// Resource ID. + string SecretSourceId { get; set; } + /// Certificate version. + string SecretVersion { get; set; } + /// The list of SANs. + string[] SubjectAlternativeName { get; set; } + /// Certificate thumbprint. + string Thumbprint { get; set; } + /// Whether to use the latest version for the certificate + bool? UseLatestVersion { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomerCertificate.json.cs b/src/Cdn/generated/api/Models/Api20210601/CustomerCertificate.json.cs new file mode 100644 index 000000000000..3f2fc5bc41ce --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomerCertificate.json.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Customer Certificate used for https + public partial class CustomerCertificate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CustomerCertificate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __certificate = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Certificate(json); + {_secretSource = If( json?.PropertyT("secretSource"), out var __jsonSecretSource) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonSecretSource) : SecretSource;} + {_secretVersion = If( json?.PropertyT("secretVersion"), out var __jsonSecretVersion) ? (string)__jsonSecretVersion : (string)SecretVersion;} + {_certificateAuthority = If( json?.PropertyT("certificateAuthority"), out var __jsonCertificateAuthority) ? (string)__jsonCertificateAuthority : (string)CertificateAuthority;} + {_useLatestVersion = If( json?.PropertyT("useLatestVersion"), out var __jsonUseLatestVersion) ? (bool?)__jsonUseLatestVersion : UseLatestVersion;} + {_subjectAlternativeName = If( json?.PropertyT("subjectAlternativeNames"), out var __jsonSubjectAlternativeNames) ? If( __jsonSubjectAlternativeNames as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : SubjectAlternativeName;} + {_thumbprint = If( json?.PropertyT("thumbprint"), out var __jsonThumbprint) ? (string)__jsonThumbprint : (string)Thumbprint;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CustomerCertificate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __certificate?.ToJson(container, serializationMode); + AddIf( null != this._secretSource ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._secretSource.ToJson(null,serializationMode) : null, "secretSource" ,container.Add ); + AddIf( null != (((object)this._secretVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._secretVersion.ToString()) : null, "secretVersion" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._certificateAuthority)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._certificateAuthority.ToString()) : null, "certificateAuthority" ,container.Add ); + } + AddIf( null != this._useLatestVersion ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._useLatestVersion) : null, "useLatestVersion" ,container.Add ); + if (null != this._subjectAlternativeName) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._subjectAlternativeName ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("subjectAlternativeNames",__w); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._thumbprint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._thumbprint.ToString()) : null, "thumbprint" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomerCertificateParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/CustomerCertificateParameters.PowerShell.cs new file mode 100644 index 000000000000..673e03050966 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomerCertificateParameters.PowerShell.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Customer Certificate used for https + [System.ComponentModel.TypeConverter(typeof(CustomerCertificateParametersTypeConverter))] + public partial class CustomerCertificateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CustomerCertificateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SecretSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).SecretSource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("SecretSource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).SecretSource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SecretVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).SecretVersion = (string) content.GetValueForProperty("SecretVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).SecretVersion, global::System.Convert.ToString); + } + if (content.Contains("UseLatestVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).UseLatestVersion = (bool?) content.GetValueForProperty("UseLatestVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).UseLatestVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("ExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).ExpirationDate = (string) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).ExpirationDate, global::System.Convert.ToString); + } + if (content.Contains("CertificateAuthority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).CertificateAuthority = (string) content.GetValueForProperty("CertificateAuthority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).CertificateAuthority, global::System.Convert.ToString); + } + if (content.Contains("SubjectAlternativeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).SubjectAlternativeName = (string[]) content.GetValueForProperty("SubjectAlternativeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).SubjectAlternativeName, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Thumbprint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).Thumbprint = (string) content.GetValueForProperty("Thumbprint",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).Thumbprint, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + if (content.Contains("SecretSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).SecretSourceId = (string) content.GetValueForProperty("SecretSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).SecretSourceId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CustomerCertificateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SecretSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).SecretSource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("SecretSource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).SecretSource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SecretVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).SecretVersion = (string) content.GetValueForProperty("SecretVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).SecretVersion, global::System.Convert.ToString); + } + if (content.Contains("UseLatestVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).UseLatestVersion = (bool?) content.GetValueForProperty("UseLatestVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).UseLatestVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("ExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).ExpirationDate = (string) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).ExpirationDate, global::System.Convert.ToString); + } + if (content.Contains("CertificateAuthority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).CertificateAuthority = (string) content.GetValueForProperty("CertificateAuthority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).CertificateAuthority, global::System.Convert.ToString); + } + if (content.Contains("SubjectAlternativeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).SubjectAlternativeName = (string[]) content.GetValueForProperty("SubjectAlternativeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).SubjectAlternativeName, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Thumbprint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).Thumbprint = (string) content.GetValueForProperty("Thumbprint",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).Thumbprint, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + if (content.Contains("SecretSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).SecretSourceId = (string) content.GetValueForProperty("SecretSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal)this).SecretSourceId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CustomerCertificateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CustomerCertificateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Customer Certificate used for https + [System.ComponentModel.TypeConverter(typeof(CustomerCertificateParametersTypeConverter))] + public partial interface ICustomerCertificateParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomerCertificateParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/CustomerCertificateParameters.TypeConverter.cs new file mode 100644 index 000000000000..d1c99c3c1a8c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomerCertificateParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CustomerCertificateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CustomerCertificateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CustomerCertificateParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CustomerCertificateParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomerCertificateParameters.cs b/src/Cdn/generated/api/Models/Api20210601/CustomerCertificateParameters.cs new file mode 100644 index 000000000000..749e689270b1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomerCertificateParameters.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Customer Certificate used for https + public partial class CustomerCertificateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters __secretParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretParameters(); + + /// Backing field for property. + private string _certificateAuthority; + + /// Certificate issuing authority. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string CertificateAuthority { get => this._certificateAuthority; } + + /// Backing field for property. + private string _expirationDate; + + /// Certificate expiration date. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ExpirationDate { get => this._expirationDate; } + + /// Internal Acessors for CertificateAuthority + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal.CertificateAuthority { get => this._certificateAuthority; set { {_certificateAuthority = value;} } } + + /// Internal Acessors for ExpirationDate + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal.ExpirationDate { get => this._expirationDate; set { {_expirationDate = value;} } } + + /// Internal Acessors for SecretSource + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal.SecretSource { get => (this._secretSource = this._secretSource ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set { {_secretSource = value;} } } + + /// Internal Acessors for Subject + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal.Subject { get => this._subject; set { {_subject = value;} } } + + /// Internal Acessors for Thumbprint + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParametersInternal.Thumbprint { get => this._thumbprint; set { {_thumbprint = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference _secretSource; + + /// + /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference SecretSource { get => (this._secretSource = this._secretSource ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set => this._secretSource = value; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string SecretSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)SecretSource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)SecretSource).Id = value ?? null; } + + /// Backing field for property. + private string _secretVersion; + + /// Version of the secret to be used + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string SecretVersion { get => this._secretVersion; set => this._secretVersion = value; } + + /// Backing field for property. + private string _subject; + + /// Subject name in the certificate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Subject { get => this._subject; } + + /// Backing field for property. + private string[] _subjectAlternativeName; + + /// The list of SANs. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] SubjectAlternativeName { get => this._subjectAlternativeName; set => this._subjectAlternativeName = value; } + + /// Backing field for property. + private string _thumbprint; + + /// Certificate thumbprint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Thumbprint { get => this._thumbprint; } + + /// The type of the secret resource. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)__secretParameters).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)__secretParameters).Type = value ; } + + /// Backing field for property. + private bool? _useLatestVersion; + + /// Whether to use the latest version for the certificate + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? UseLatestVersion { get => this._useLatestVersion; set => this._useLatestVersion = value; } + + /// Creates an new instance. + public CustomerCertificateParameters() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__secretParameters), __secretParameters); + await eventListener.AssertObjectIsValid(nameof(__secretParameters), __secretParameters); + } + } + /// Customer Certificate used for https + public partial interface ICustomerCertificateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters + { + /// Certificate issuing authority. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Certificate issuing authority.", + SerializedName = @"certificateAuthority", + PossibleTypes = new [] { typeof(string) })] + string CertificateAuthority { get; } + /// Certificate expiration date. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Certificate expiration date.", + SerializedName = @"expirationDate", + PossibleTypes = new [] { typeof(string) })] + string ExpirationDate { get; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string SecretSourceId { get; set; } + /// Version of the secret to be used + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Version of the secret to be used", + SerializedName = @"secretVersion", + PossibleTypes = new [] { typeof(string) })] + string SecretVersion { get; set; } + /// Subject name in the certificate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Subject name in the certificate.", + SerializedName = @"subject", + PossibleTypes = new [] { typeof(string) })] + string Subject { get; } + /// The list of SANs. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of SANs.", + SerializedName = @"subjectAlternativeNames", + PossibleTypes = new [] { typeof(string) })] + string[] SubjectAlternativeName { get; set; } + /// Certificate thumbprint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Certificate thumbprint.", + SerializedName = @"thumbprint", + PossibleTypes = new [] { typeof(string) })] + string Thumbprint { get; } + /// Whether to use the latest version for the certificate + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to use the latest version for the certificate", + SerializedName = @"useLatestVersion", + PossibleTypes = new [] { typeof(bool) })] + bool? UseLatestVersion { get; set; } + + } + /// Customer Certificate used for https + internal partial interface ICustomerCertificateParametersInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal + { + /// Certificate issuing authority. + string CertificateAuthority { get; set; } + /// Certificate expiration date. + string ExpirationDate { get; set; } + /// + /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference SecretSource { get; set; } + /// Resource ID. + string SecretSourceId { get; set; } + /// Version of the secret to be used + string SecretVersion { get; set; } + /// Subject name in the certificate. + string Subject { get; set; } + /// The list of SANs. + string[] SubjectAlternativeName { get; set; } + /// Certificate thumbprint. + string Thumbprint { get; set; } + /// Whether to use the latest version for the certificate + bool? UseLatestVersion { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/CustomerCertificateParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/CustomerCertificateParameters.json.cs new file mode 100644 index 000000000000..47ca87a7bf08 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/CustomerCertificateParameters.json.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Customer Certificate used for https + public partial class CustomerCertificateParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CustomerCertificateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __secretParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretParameters(json); + {_secretSource = If( json?.PropertyT("secretSource"), out var __jsonSecretSource) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonSecretSource) : SecretSource;} + {_secretVersion = If( json?.PropertyT("secretVersion"), out var __jsonSecretVersion) ? (string)__jsonSecretVersion : (string)SecretVersion;} + {_useLatestVersion = If( json?.PropertyT("useLatestVersion"), out var __jsonUseLatestVersion) ? (bool?)__jsonUseLatestVersion : UseLatestVersion;} + {_subject = If( json?.PropertyT("subject"), out var __jsonSubject) ? (string)__jsonSubject : (string)Subject;} + {_expirationDate = If( json?.PropertyT("expirationDate"), out var __jsonExpirationDate) ? (string)__jsonExpirationDate : (string)ExpirationDate;} + {_certificateAuthority = If( json?.PropertyT("certificateAuthority"), out var __jsonCertificateAuthority) ? (string)__jsonCertificateAuthority : (string)CertificateAuthority;} + {_subjectAlternativeName = If( json?.PropertyT("subjectAlternativeNames"), out var __jsonSubjectAlternativeNames) ? If( __jsonSubjectAlternativeNames as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : SubjectAlternativeName;} + {_thumbprint = If( json?.PropertyT("thumbprint"), out var __jsonThumbprint) ? (string)__jsonThumbprint : (string)Thumbprint;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomerCertificateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CustomerCertificateParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __secretParameters?.ToJson(container, serializationMode); + AddIf( null != this._secretSource ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._secretSource.ToJson(null,serializationMode) : null, "secretSource" ,container.Add ); + AddIf( null != (((object)this._secretVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._secretVersion.ToString()) : null, "secretVersion" ,container.Add ); + AddIf( null != this._useLatestVersion ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._useLatestVersion) : null, "useLatestVersion" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._subject)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._subject.ToString()) : null, "subject" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._expirationDate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._expirationDate.ToString()) : null, "expirationDate" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._certificateAuthority)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._certificateAuthority.ToString()) : null, "certificateAuthority" ,container.Add ); + } + if (null != this._subjectAlternativeName) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._subjectAlternativeName ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("subjectAlternativeNames",__w); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._thumbprint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._thumbprint.ToString()) : null, "thumbprint" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOrigin.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOrigin.PowerShell.cs new file mode 100644 index 000000000000..5a308fc2a7dc --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOrigin.PowerShell.cs @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The main origin of CDN content which is added when creating a CDN endpoint. + [System.ComponentModel.TypeConverter(typeof(DeepCreatedOriginTypeConverter))] + public partial class DeepCreatedOrigin + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeepCreatedOrigin(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateLinkAlias")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateLinkAlias = (string) content.GetValueForProperty("PrivateLinkAlias",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateLinkAlias, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateLinkResourceId = (string) content.GetValueForProperty("PrivateLinkResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateLinkResourceId, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateLinkLocation = (string) content.GetValueForProperty("PrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkApprovalMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateLinkApprovalMessage = (string) content.GetValueForProperty("PrivateLinkApprovalMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateLinkApprovalMessage, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateEndpointStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus?) content.GetValueForProperty("PrivateEndpointStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateEndpointStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeepCreatedOrigin(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateLinkAlias")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateLinkAlias = (string) content.GetValueForProperty("PrivateLinkAlias",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateLinkAlias, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateLinkResourceId = (string) content.GetValueForProperty("PrivateLinkResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateLinkResourceId, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateLinkLocation = (string) content.GetValueForProperty("PrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkApprovalMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateLinkApprovalMessage = (string) content.GetValueForProperty("PrivateLinkApprovalMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateLinkApprovalMessage, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateEndpointStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus?) content.GetValueForProperty("PrivateEndpointStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal)this).PrivateEndpointStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeepCreatedOrigin(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeepCreatedOrigin(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The main origin of CDN content which is added when creating a CDN endpoint. + [System.ComponentModel.TypeConverter(typeof(DeepCreatedOriginTypeConverter))] + public partial interface IDeepCreatedOrigin + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOrigin.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOrigin.TypeConverter.cs new file mode 100644 index 000000000000..d849a8575fd1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOrigin.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeepCreatedOriginTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeepCreatedOrigin.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeepCreatedOrigin.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeepCreatedOrigin.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOrigin.cs b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOrigin.cs new file mode 100644 index 000000000000..3e3c683e6985 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOrigin.cs @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The main origin of CDN content which is added when creating a CDN endpoint. + public partial class DeepCreatedOrigin : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal + { + + /// + /// Origin is enabled for load balancing or not. By default, origin is always enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? Enabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).Enabled = value ?? default(bool); } + + /// + /// The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across all origins + /// in an endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string HostName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).HostName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).HostName = value ?? null; } + + /// The value of the HTTP port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? HttpPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).HttpPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).HttpPort = value ?? default(int); } + + /// The value of the HTTPS port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? HttpsPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).HttpsPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).HttpsPort = value ?? default(int); } + + /// Internal Acessors for PrivateEndpointStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal.PrivateEndpointStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).PrivateEndpointStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).PrivateEndpointStatus = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginProperties()); set { {_property = value;} } } + + /// Backing field for property. + private string _name; + + /// Origin name which must be unique within the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginHostHeader { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).OriginHostHeader; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).OriginHostHeader = value ?? null; } + + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? Priority { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).Priority; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).Priority = value ?? default(int); } + + /// The approval status for the connection to the Private Link + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus? PrivateEndpointStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).PrivateEndpointStatus; } + + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PrivateLinkAlias { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).PrivateLinkAlias; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).PrivateLinkAlias = value ?? null; } + + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PrivateLinkApprovalMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).PrivateLinkApprovalMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).PrivateLinkApprovalMessage = value ?? null; } + + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PrivateLinkLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).PrivateLinkLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).PrivateLinkLocation = value ?? null; } + + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PrivateLinkResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).PrivateLinkResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).PrivateLinkResourceId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginProperties _property; + + /// Properties of the origin created on the CDN endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginProperties()); set => this._property = value; } + + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? Weight { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).Weight; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)Property).Weight = value ?? default(int); } + + /// Creates an new instance. + public DeepCreatedOrigin() + { + + } + } + /// The main origin of CDN content which is added when creating a CDN endpoint. + public partial interface IDeepCreatedOrigin : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// Origin is enabled for load balancing or not. By default, origin is always enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Origin is enabled for load balancing or not. By default, origin is always enabled.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + /// + /// The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across all origins + /// in an endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across all origins in an endpoint.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; set; } + /// The value of the HTTP port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTP port. Must be between 1 and 65535.", + SerializedName = @"httpPort", + PossibleTypes = new [] { typeof(int) })] + int? HttpPort { get; set; } + /// The value of the HTTPS port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTPS port. Must be between 1 and 65535.", + SerializedName = @"httpsPort", + PossibleTypes = new [] { typeof(int) })] + int? HttpsPort { get; set; } + /// Origin name which must be unique within the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Origin name which must be unique within the endpoint. ", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default.", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + string OriginHostHeader { get; set; } + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5.", + SerializedName = @"priority", + PossibleTypes = new [] { typeof(int) })] + int? Priority { get; set; } + /// The approval status for the connection to the Private Link + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The approval status for the connection to the Private Link", + SerializedName = @"privateEndpointStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus? PrivateEndpointStatus { get; } + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'", + SerializedName = @"privateLinkAlias", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkAlias { get; set; } + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A custom message to be included in the approval request to connect to the Private Link.", + SerializedName = @"privateLinkApprovalMessage", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkApprovalMessage { get; set; } + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated", + SerializedName = @"privateLinkLocation", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkLocation { get; set; } + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'", + SerializedName = @"privateLinkResourceId", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkResourceId { get; set; } + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Weight of the origin in given origin group for load balancing. Must be between 1 and 1000", + SerializedName = @"weight", + PossibleTypes = new [] { typeof(int) })] + int? Weight { get; set; } + + } + /// The main origin of CDN content which is added when creating a CDN endpoint. + internal partial interface IDeepCreatedOriginInternal + + { + /// + /// Origin is enabled for load balancing or not. By default, origin is always enabled. + /// + bool? Enabled { get; set; } + /// + /// The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across all origins + /// in an endpoint. + /// + string HostName { get; set; } + /// The value of the HTTP port. Must be between 1 and 65535. + int? HttpPort { get; set; } + /// The value of the HTTPS port. Must be between 1 and 65535. + int? HttpsPort { get; set; } + /// Origin name which must be unique within the endpoint. + string Name { get; set; } + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. + /// + string OriginHostHeader { get; set; } + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5. + /// + int? Priority { get; set; } + /// The approval status for the connection to the Private Link + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus? PrivateEndpointStatus { get; set; } + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + string PrivateLinkAlias { get; set; } + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + string PrivateLinkApprovalMessage { get; set; } + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + string PrivateLinkLocation { get; set; } + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + string PrivateLinkResourceId { get; set; } + /// Properties of the origin created on the CDN endpoint. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginProperties Property { get; set; } + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + int? Weight { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOrigin.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOrigin.json.cs new file mode 100644 index 000000000000..b31d28a6ad82 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOrigin.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The main origin of CDN content which is added when creating a CDN endpoint. + public partial class DeepCreatedOrigin + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeepCreatedOrigin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginProperties.FromJson(__jsonProperties) : Property;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeepCreatedOrigin(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroup.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroup.PowerShell.cs new file mode 100644 index 000000000000..cbaf295d66bf --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroup.PowerShell.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// The origin group for CDN content which is added when creating a CDN endpoint. Traffic is sent to the origins within the + /// origin group based on origin health. + /// + [System.ComponentModel.TypeConverter(typeof(DeepCreatedOriginGroupTypeConverter))] + public partial class DeepCreatedOriginGroup + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeepCreatedOriginGroup(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginGroupPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).Origin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ResponseBasedOriginErrorDetectionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).ResponseBasedOriginErrorDetectionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) content.GetValueForProperty("ResponseBasedOriginErrorDetectionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).ResponseBasedOriginErrorDetectionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParametersTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeepCreatedOriginGroup(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginGroupPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).Origin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ResponseBasedOriginErrorDetectionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).ResponseBasedOriginErrorDetectionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) content.GetValueForProperty("ResponseBasedOriginErrorDetectionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal)this).ResponseBasedOriginErrorDetectionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParametersTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeepCreatedOriginGroup(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeepCreatedOriginGroup(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The origin group for CDN content which is added when creating a CDN endpoint. Traffic is sent to the origins within the + /// origin group based on origin health. + [System.ComponentModel.TypeConverter(typeof(DeepCreatedOriginGroupTypeConverter))] + public partial interface IDeepCreatedOriginGroup + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroup.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroup.TypeConverter.cs new file mode 100644 index 000000000000..e0bc9eeef362 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroup.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeepCreatedOriginGroupTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeepCreatedOriginGroup.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeepCreatedOriginGroup.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeepCreatedOriginGroup.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroup.cs b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroup.cs new file mode 100644 index 000000000000..3d5d5c36ffa4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroup.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// The origin group for CDN content which is added when creating a CDN endpoint. Traffic is sent to the origins within the + /// origin group based on origin health. + /// + public partial class DeepCreatedOriginGroup : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal + { + + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)Property).HealthProbeSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)Property).HealthProbeSetting = value ?? null /* model class */; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginGroupProperties()); set { {_property = value;} } } + + /// Backing field for property. + private string _name; + + /// Origin group name which must be unique within the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// The source of the content being delivered via CDN within given origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)Property).Origin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)Property).Origin = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupProperties _property; + + /// Properties of the origin group created on the CDN endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginGroupProperties()); set => this._property = value; } + + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses.This property is + /// currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)Property).ResponseBasedOriginErrorDetectionSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)Property).ResponseBasedOriginErrorDetectionSetting = value ?? null /* model class */; } + + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)Property).TrafficRestorationTimeToHealedOrNewEndpointsInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)Property).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = value ?? default(int); } + + /// Creates an new instance. + public DeepCreatedOriginGroup() + { + + } + } + /// The origin group for CDN content which is added when creating a CDN endpoint. Traffic is sent to the origins within the + /// origin group based on origin health. + public partial interface IDeepCreatedOriginGroup : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health probe settings to the origin that is used to determine the health of the origin.", + SerializedName = @"healthProbeSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get; set; } + /// Origin group name which must be unique within the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Origin group name which must be unique within the endpoint.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// The source of the content being delivered via CDN within given origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The source of the content being delivered via CDN within given origin group.", + SerializedName = @"origins", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get; set; } + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses.This property is + /// currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The JSON object that contains the properties to determine origin health using real requests/responses.This property is currently not supported.", + SerializedName = @"responseBasedOriginErrorDetectionSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get; set; } + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.", + SerializedName = @"trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + PossibleTypes = new [] { typeof(int) })] + int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get; set; } + + } + /// The origin group for CDN content which is added when creating a CDN endpoint. Traffic is sent to the origins within the + /// origin group based on origin health. + internal partial interface IDeepCreatedOriginGroupInternal + + { + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get; set; } + /// Origin group name which must be unique within the endpoint. + string Name { get; set; } + /// The source of the content being delivered via CDN within given origin group. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get; set; } + /// Properties of the origin group created on the CDN endpoint. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupProperties Property { get; set; } + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses.This property is + /// currently not supported. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get; set; } + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroup.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroup.json.cs new file mode 100644 index 000000000000..8aa534a79141 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroup.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// The origin group for CDN content which is added when creating a CDN endpoint. Traffic is sent to the origins within the + /// origin group based on origin health. + /// + public partial class DeepCreatedOriginGroup + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeepCreatedOriginGroup(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginGroupProperties.FromJson(__jsonProperties) : Property;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeepCreatedOriginGroup(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroupProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroupProperties.PowerShell.cs new file mode 100644 index 000000000000..98bbc39a1a3c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroupProperties.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Properties of the origin group created on the CDN endpoint. + [System.ComponentModel.TypeConverter(typeof(DeepCreatedOriginGroupPropertiesTypeConverter))] + public partial class DeepCreatedOriginGroupProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeepCreatedOriginGroupProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)this).Origin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ResponseBasedOriginErrorDetectionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)this).ResponseBasedOriginErrorDetectionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) content.GetValueForProperty("ResponseBasedOriginErrorDetectionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)this).ResponseBasedOriginErrorDetectionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParametersTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeepCreatedOriginGroupProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)this).Origin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ResponseBasedOriginErrorDetectionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)this).ResponseBasedOriginErrorDetectionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) content.GetValueForProperty("ResponseBasedOriginErrorDetectionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal)this).ResponseBasedOriginErrorDetectionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParametersTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeepCreatedOriginGroupProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeepCreatedOriginGroupProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties of the origin group created on the CDN endpoint. + [System.ComponentModel.TypeConverter(typeof(DeepCreatedOriginGroupPropertiesTypeConverter))] + public partial interface IDeepCreatedOriginGroupProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroupProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroupProperties.TypeConverter.cs new file mode 100644 index 000000000000..df60ceaef018 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroupProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeepCreatedOriginGroupPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeepCreatedOriginGroupProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeepCreatedOriginGroupProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeepCreatedOriginGroupProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroupProperties.cs b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroupProperties.cs new file mode 100644 index 000000000000..6c4ed1a1585f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroupProperties.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Properties of the origin group created on the CDN endpoint. + public partial class DeepCreatedOriginGroupProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupPropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters _healthProbeSetting; + + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get => (this._healthProbeSetting = this._healthProbeSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters()); set => this._healthProbeSetting = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] _origin; + + /// The source of the content being delivered via CDN within given origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get => this._origin; set => this._origin = value; } + + /// + /// Backing field for property. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters _responseBasedOriginErrorDetectionSetting; + + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses.This property is + /// currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get => (this._responseBasedOriginErrorDetectionSetting = this._responseBasedOriginErrorDetectionSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParameters()); set => this._responseBasedOriginErrorDetectionSetting = value; } + + /// + /// Backing field for property. + /// + private int? _trafficRestorationTimeToHealedOrNewEndpointsInMinute; + + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get => this._trafficRestorationTimeToHealedOrNewEndpointsInMinute; set => this._trafficRestorationTimeToHealedOrNewEndpointsInMinute = value; } + + /// Creates an new instance. + public DeepCreatedOriginGroupProperties() + { + + } + } + /// Properties of the origin group created on the CDN endpoint. + public partial interface IDeepCreatedOriginGroupProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health probe settings to the origin that is used to determine the health of the origin.", + SerializedName = @"healthProbeSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get; set; } + /// The source of the content being delivered via CDN within given origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The source of the content being delivered via CDN within given origin group.", + SerializedName = @"origins", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get; set; } + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses.This property is + /// currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The JSON object that contains the properties to determine origin health using real requests/responses.This property is currently not supported.", + SerializedName = @"responseBasedOriginErrorDetectionSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get; set; } + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.", + SerializedName = @"trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + PossibleTypes = new [] { typeof(int) })] + int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get; set; } + + } + /// Properties of the origin group created on the CDN endpoint. + internal partial interface IDeepCreatedOriginGroupPropertiesInternal + + { + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get; set; } + /// The source of the content being delivered via CDN within given origin group. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get; set; } + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses.This property is + /// currently not supported. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get; set; } + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroupProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroupProperties.json.cs new file mode 100644 index 000000000000..deda103ba049 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginGroupProperties.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Properties of the origin group created on the CDN endpoint. + public partial class DeepCreatedOriginGroupProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeepCreatedOriginGroupProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_healthProbeSetting = If( json?.PropertyT("healthProbeSettings"), out var __jsonHealthProbeSettings) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters.FromJson(__jsonHealthProbeSettings) : HealthProbeSetting;} + {_origin = If( json?.PropertyT("origins"), out var __jsonOrigins) ? If( __jsonOrigins as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__u) )) ))() : null : Origin;} + {_trafficRestorationTimeToHealedOrNewEndpointsInMinute = If( json?.PropertyT("trafficRestorationTimeToHealedOrNewEndpointsInMinutes"), out var __jsonTrafficRestorationTimeToHealedOrNewEndpointsInMinutes) ? (int?)__jsonTrafficRestorationTimeToHealedOrNewEndpointsInMinutes : TrafficRestorationTimeToHealedOrNewEndpointsInMinute;} + {_responseBasedOriginErrorDetectionSetting = If( json?.PropertyT("responseBasedOriginErrorDetectionSettings"), out var __jsonResponseBasedOriginErrorDetectionSettings) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParameters.FromJson(__jsonResponseBasedOriginErrorDetectionSettings) : ResponseBasedOriginErrorDetectionSetting;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroupProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeepCreatedOriginGroupProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._healthProbeSetting ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._healthProbeSetting.ToJson(null,serializationMode) : null, "healthProbeSettings" ,container.Add ); + if (null != this._origin) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._origin ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("origins",__w); + } + AddIf( null != this._trafficRestorationTimeToHealedOrNewEndpointsInMinute ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._trafficRestorationTimeToHealedOrNewEndpointsInMinute) : null, "trafficRestorationTimeToHealedOrNewEndpointsInMinutes" ,container.Add ); + AddIf( null != this._responseBasedOriginErrorDetectionSetting ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._responseBasedOriginErrorDetectionSetting.ToJson(null,serializationMode) : null, "responseBasedOriginErrorDetectionSettings" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginProperties.PowerShell.cs new file mode 100644 index 000000000000..e35fffd9e208 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginProperties.PowerShell.cs @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Properties of the origin created on the CDN endpoint. + [System.ComponentModel.TypeConverter(typeof(DeepCreatedOriginPropertiesTypeConverter))] + public partial class DeepCreatedOriginProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeepCreatedOriginProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateLinkAlias")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateLinkAlias = (string) content.GetValueForProperty("PrivateLinkAlias",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateLinkAlias, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateLinkResourceId = (string) content.GetValueForProperty("PrivateLinkResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateLinkResourceId, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateLinkLocation = (string) content.GetValueForProperty("PrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkApprovalMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateLinkApprovalMessage = (string) content.GetValueForProperty("PrivateLinkApprovalMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateLinkApprovalMessage, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateEndpointStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus?) content.GetValueForProperty("PrivateEndpointStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateEndpointStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeepCreatedOriginProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateLinkAlias")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateLinkAlias = (string) content.GetValueForProperty("PrivateLinkAlias",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateLinkAlias, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateLinkResourceId = (string) content.GetValueForProperty("PrivateLinkResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateLinkResourceId, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateLinkLocation = (string) content.GetValueForProperty("PrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkApprovalMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateLinkApprovalMessage = (string) content.GetValueForProperty("PrivateLinkApprovalMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateLinkApprovalMessage, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateEndpointStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus?) content.GetValueForProperty("PrivateEndpointStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal)this).PrivateEndpointStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeepCreatedOriginProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeepCreatedOriginProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties of the origin created on the CDN endpoint. + [System.ComponentModel.TypeConverter(typeof(DeepCreatedOriginPropertiesTypeConverter))] + public partial interface IDeepCreatedOriginProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginProperties.TypeConverter.cs new file mode 100644 index 000000000000..7aba73b873f8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeepCreatedOriginPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeepCreatedOriginProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeepCreatedOriginProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeepCreatedOriginProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginProperties.cs b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginProperties.cs new file mode 100644 index 000000000000..2291705404b3 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginProperties.cs @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Properties of the origin created on the CDN endpoint. + public partial class DeepCreatedOriginProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal + { + + /// Backing field for property. + private bool? _enabled; + + /// + /// Origin is enabled for load balancing or not. By default, origin is always enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? Enabled { get => this._enabled; set => this._enabled = value; } + + /// Backing field for property. + private string _hostName; + + /// + /// The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across all origins + /// in an endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string HostName { get => this._hostName; set => this._hostName = value; } + + /// Backing field for property. + private int? _httpPort; + + /// The value of the HTTP port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? HttpPort { get => this._httpPort; set => this._httpPort = value; } + + /// Backing field for property. + private int? _httpsPort; + + /// The value of the HTTPS port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? HttpsPort { get => this._httpsPort; set => this._httpsPort = value; } + + /// Internal Acessors for PrivateEndpointStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginPropertiesInternal.PrivateEndpointStatus { get => this._privateEndpointStatus; set { {_privateEndpointStatus = value;} } } + + /// Backing field for property. + private string _originHostHeader; + + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string OriginHostHeader { get => this._originHostHeader; set => this._originHostHeader = value; } + + /// Backing field for property. + private int? _priority; + + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? Priority { get => this._priority; set => this._priority = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus? _privateEndpointStatus; + + /// The approval status for the connection to the Private Link + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus? PrivateEndpointStatus { get => this._privateEndpointStatus; } + + /// Backing field for property. + private string _privateLinkAlias; + + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string PrivateLinkAlias { get => this._privateLinkAlias; set => this._privateLinkAlias = value; } + + /// Backing field for property. + private string _privateLinkApprovalMessage; + + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string PrivateLinkApprovalMessage { get => this._privateLinkApprovalMessage; set => this._privateLinkApprovalMessage = value; } + + /// Backing field for property. + private string _privateLinkLocation; + + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string PrivateLinkLocation { get => this._privateLinkLocation; set => this._privateLinkLocation = value; } + + /// Backing field for property. + private string _privateLinkResourceId; + + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string PrivateLinkResourceId { get => this._privateLinkResourceId; set => this._privateLinkResourceId = value; } + + /// Backing field for property. + private int? _weight; + + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? Weight { get => this._weight; set => this._weight = value; } + + /// Creates an new instance. + public DeepCreatedOriginProperties() + { + + } + } + /// Properties of the origin created on the CDN endpoint. + public partial interface IDeepCreatedOriginProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// Origin is enabled for load balancing or not. By default, origin is always enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Origin is enabled for load balancing or not. By default, origin is always enabled.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + /// + /// The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across all origins + /// in an endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across all origins in an endpoint.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; set; } + /// The value of the HTTP port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTP port. Must be between 1 and 65535.", + SerializedName = @"httpPort", + PossibleTypes = new [] { typeof(int) })] + int? HttpPort { get; set; } + /// The value of the HTTPS port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTPS port. Must be between 1 and 65535.", + SerializedName = @"httpsPort", + PossibleTypes = new [] { typeof(int) })] + int? HttpsPort { get; set; } + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default.", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + string OriginHostHeader { get; set; } + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5.", + SerializedName = @"priority", + PossibleTypes = new [] { typeof(int) })] + int? Priority { get; set; } + /// The approval status for the connection to the Private Link + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The approval status for the connection to the Private Link", + SerializedName = @"privateEndpointStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus? PrivateEndpointStatus { get; } + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'", + SerializedName = @"privateLinkAlias", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkAlias { get; set; } + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A custom message to be included in the approval request to connect to the Private Link.", + SerializedName = @"privateLinkApprovalMessage", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkApprovalMessage { get; set; } + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated", + SerializedName = @"privateLinkLocation", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkLocation { get; set; } + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'", + SerializedName = @"privateLinkResourceId", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkResourceId { get; set; } + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Weight of the origin in given origin group for load balancing. Must be between 1 and 1000", + SerializedName = @"weight", + PossibleTypes = new [] { typeof(int) })] + int? Weight { get; set; } + + } + /// Properties of the origin created on the CDN endpoint. + internal partial interface IDeepCreatedOriginPropertiesInternal + + { + /// + /// Origin is enabled for load balancing or not. By default, origin is always enabled. + /// + bool? Enabled { get; set; } + /// + /// The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across all origins + /// in an endpoint. + /// + string HostName { get; set; } + /// The value of the HTTP port. Must be between 1 and 65535. + int? HttpPort { get; set; } + /// The value of the HTTPS port. Must be between 1 and 65535. + int? HttpsPort { get; set; } + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. + /// + string OriginHostHeader { get; set; } + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5. + /// + int? Priority { get; set; } + /// The approval status for the connection to the Private Link + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus? PrivateEndpointStatus { get; set; } + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + string PrivateLinkAlias { get; set; } + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + string PrivateLinkApprovalMessage { get; set; } + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + string PrivateLinkLocation { get; set; } + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + string PrivateLinkResourceId { get; set; } + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + int? Weight { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginProperties.json.cs new file mode 100644 index 000000000000..f329eb6d77b7 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeepCreatedOriginProperties.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Properties of the origin created on the CDN endpoint. + public partial class DeepCreatedOriginProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeepCreatedOriginProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_hostName = If( json?.PropertyT("hostName"), out var __jsonHostName) ? (string)__jsonHostName : (string)HostName;} + {_httpPort = If( json?.PropertyT("httpPort"), out var __jsonHttpPort) ? (int?)__jsonHttpPort : HttpPort;} + {_httpsPort = If( json?.PropertyT("httpsPort"), out var __jsonHttpsPort) ? (int?)__jsonHttpsPort : HttpsPort;} + {_originHostHeader = If( json?.PropertyT("originHostHeader"), out var __jsonOriginHostHeader) ? (string)__jsonOriginHostHeader : (string)OriginHostHeader;} + {_priority = If( json?.PropertyT("priority"), out var __jsonPriority) ? (int?)__jsonPriority : Priority;} + {_weight = If( json?.PropertyT("weight"), out var __jsonWeight) ? (int?)__jsonWeight : Weight;} + {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : Enabled;} + {_privateLinkAlias = If( json?.PropertyT("privateLinkAlias"), out var __jsonPrivateLinkAlias) ? (string)__jsonPrivateLinkAlias : (string)PrivateLinkAlias;} + {_privateLinkResourceId = If( json?.PropertyT("privateLinkResourceId"), out var __jsonPrivateLinkResourceId) ? (string)__jsonPrivateLinkResourceId : (string)PrivateLinkResourceId;} + {_privateLinkLocation = If( json?.PropertyT("privateLinkLocation"), out var __jsonPrivateLinkLocation) ? (string)__jsonPrivateLinkLocation : (string)PrivateLinkLocation;} + {_privateLinkApprovalMessage = If( json?.PropertyT("privateLinkApprovalMessage"), out var __jsonPrivateLinkApprovalMessage) ? (string)__jsonPrivateLinkApprovalMessage : (string)PrivateLinkApprovalMessage;} + {_privateEndpointStatus = If( json?.PropertyT("privateEndpointStatus"), out var __jsonPrivateEndpointStatus) ? (string)__jsonPrivateEndpointStatus : (string)PrivateEndpointStatus;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeepCreatedOriginProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._hostName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._hostName.ToString()) : null, "hostName" ,container.Add ); + AddIf( null != this._httpPort ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._httpPort) : null, "httpPort" ,container.Add ); + AddIf( null != this._httpsPort ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._httpsPort) : null, "httpsPort" ,container.Add ); + AddIf( null != (((object)this._originHostHeader)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._originHostHeader.ToString()) : null, "originHostHeader" ,container.Add ); + AddIf( null != this._priority ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._priority) : null, "priority" ,container.Add ); + AddIf( null != this._weight ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._weight) : null, "weight" ,container.Add ); + AddIf( null != this._enabled ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._enabled) : null, "enabled" ,container.Add ); + AddIf( null != (((object)this._privateLinkAlias)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._privateLinkAlias.ToString()) : null, "privateLinkAlias" ,container.Add ); + AddIf( null != (((object)this._privateLinkResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._privateLinkResourceId.ToString()) : null, "privateLinkResourceId" ,container.Add ); + AddIf( null != (((object)this._privateLinkLocation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._privateLinkLocation.ToString()) : null, "privateLinkLocation" ,container.Add ); + AddIf( null != (((object)this._privateLinkApprovalMessage)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._privateLinkApprovalMessage.ToString()) : null, "privateLinkApprovalMessage" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._privateEndpointStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._privateEndpointStatus.ToString()) : null, "privateEndpointStatus" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRule.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRule.PowerShell.cs new file mode 100644 index 000000000000..0a7fbf6fafa9 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRule.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// A rule that specifies a set of actions and conditions + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleTypeConverter))] + public partial class DeliveryRule + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRule(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Order")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleInternal)this).Order = (int) content.GetValueForProperty("Order",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleInternal)this).Order, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Condition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleInternal)this).Condition = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[]) content.GetValueForProperty("Condition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleInternal)this).Condition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleConditionTypeConverter.ConvertFrom)); + } + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[]) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleInternal)this).Action, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1TypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRule(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Order")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleInternal)this).Order = (int) content.GetValueForProperty("Order",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleInternal)this).Order, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Condition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleInternal)this).Condition = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[]) content.GetValueForProperty("Condition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleInternal)this).Condition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleConditionTypeConverter.ConvertFrom)); + } + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[]) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleInternal)this).Action, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1TypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRule(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRule(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// A rule that specifies a set of actions and conditions + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleTypeConverter))] + public partial interface IDeliveryRule + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRule.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRule.TypeConverter.cs new file mode 100644 index 000000000000..a1f82d4e87dd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRule.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRule.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRule.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRule.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRule.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRule.cs new file mode 100644 index 000000000000..998e16e2ad5f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRule.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// A rule that specifies a set of actions and conditions + public partial class DeliveryRule : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] _action; + + /// + /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] Action { get => this._action; set => this._action = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] _condition; + + /// A list of conditions that must be matched for the actions to be executed + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] Condition { get => this._condition; set => this._condition = value; } + + /// Backing field for property. + private string _name; + + /// Name of the rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private int _order; + + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + /// be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition + /// and actions listed in it will always be applied. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int Order { get => this._order; set => this._order = value; } + + /// Creates an new instance. + public DeliveryRule() + { + + } + } + /// A rule that specifies a set of actions and conditions + public partial interface IDeliveryRule : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"A list of actions that are executed when all the conditions of a rule are satisfied.", + SerializedName = @"actions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] Action { get; set; } + /// A list of conditions that must be matched for the actions to be executed + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of conditions that must be matched for the actions to be executed", + SerializedName = @"conditions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] Condition { get; set; } + /// Name of the rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the rule", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + /// be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition + /// and actions listed in it will always be applied. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.", + SerializedName = @"order", + PossibleTypes = new [] { typeof(int) })] + int Order { get; set; } + + } + /// A rule that specifies a set of actions and conditions + internal partial interface IDeliveryRuleInternal + + { + /// + /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] Action { get; set; } + /// A list of conditions that must be matched for the actions to be executed + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] Condition { get; set; } + /// Name of the rule + string Name { get; set; } + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + /// be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition + /// and actions listed in it will always be applied. + /// + int Order { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRule.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRule.json.cs new file mode 100644 index 000000000000..2756af9b07fd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRule.json.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// A rule that specifies a set of actions and conditions + public partial class DeliveryRule + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRule(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_order = If( json?.PropertyT("order"), out var __jsonOrder) ? (int)__jsonOrder : Order;} + {_condition = If( json?.PropertyT("conditions"), out var __jsonConditions) ? If( __jsonConditions as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition.FromJson(__u) )) ))() : null : Condition;} + {_action = If( json?.PropertyT("actions"), out var __jsonActions) ? If( __jsonActions as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1.FromJson(__p) )) ))() : null : Action;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRule(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber(this._order), "order" ,container.Add ); + if (null != this._condition) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._condition ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("conditions",__w); + } + if (null != this._action) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._action ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("actions",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleAction1.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleAction1.PowerShell.cs new file mode 100644 index 000000000000..ae4ecb455f1b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleAction1.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// An action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleAction1TypeConverter))] + public partial class DeliveryRuleAction1 + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleAction1(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleAction1(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleAction1(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleAction1(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// An action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleAction1TypeConverter))] + public partial interface IDeliveryRuleAction1 + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleAction1.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleAction1.TypeConverter.cs new file mode 100644 index 000000000000..cf5f6ef57c19 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleAction1.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleAction1TypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleAction1.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleAction1.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleAction1.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleAction1.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleAction1.cs new file mode 100644 index 000000000000..94d8a7d91ce3 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleAction1.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// An action for the delivery rule. + public partial class DeliveryRuleAction1 : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction _name; + + /// The name of the action for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction Name { get => this._name; set => this._name = value; } + + /// Creates an new instance. + public DeliveryRuleAction1() + { + + } + } + /// An action for the delivery rule. + public partial interface IDeliveryRuleAction1 : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The name of the action for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the action for the delivery rule.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction Name { get; set; } + + } + /// An action for the delivery rule. + internal partial interface IDeliveryRuleAction1Internal + + { + /// The name of the action for the delivery rule. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction Name { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleAction1.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleAction1.json.cs new file mode 100644 index 000000000000..bb474a2cef74 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleAction1.json.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// An action for the delivery rule. + public partial class DeliveryRuleAction1 + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleAction1(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 interface is polymorphic, and + /// the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("name") ) + { + case "UrlRedirect": + { + return new UrlRedirectAction(json); + } + case "UrlSigning": + { + return new UrlSigningAction(json); + } + case "OriginGroupOverride": + { + return new OriginGroupOverrideAction(json); + } + case "UrlRewrite": + { + return new UrlRewriteAction(json); + } + case "ModifyRequestHeader": + { + return new DeliveryRuleRequestHeaderAction(json); + } + case "ModifyResponseHeader": + { + return new DeliveryRuleResponseHeaderAction(json); + } + case "CacheExpiration": + { + return new DeliveryRuleCacheExpirationAction(json); + } + case "CacheKeyQueryString": + { + return new DeliveryRuleCacheKeyQueryStringAction(json); + } + case "RouteConfigurationOverride": + { + return new DeliveryRuleRouteConfigurationOverrideAction(json); + } + } + return new DeliveryRuleAction1(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheExpirationAction.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheExpirationAction.PowerShell.cs new file mode 100644 index 000000000000..ba27582c47a4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheExpirationAction.PowerShell.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the cache expiration action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleCacheExpirationActionTypeConverter))] + public partial class DeliveryRuleCacheExpirationAction + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleCacheExpirationAction(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheExpirationActionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + if (content.Contains("ParameterCacheBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).ParameterCacheBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior) content.GetValueForProperty("ParameterCacheBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).ParameterCacheBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior.CreateFrom); + } + if (content.Contains("ParameterCacheType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).ParameterCacheType = (string) content.GetValueForProperty("ParameterCacheType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).ParameterCacheType, global::System.Convert.ToString); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterCacheDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).ParameterCacheDuration = (string) content.GetValueForProperty("ParameterCacheDuration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).ParameterCacheDuration, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleCacheExpirationAction(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheExpirationActionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + if (content.Contains("ParameterCacheBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).ParameterCacheBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior) content.GetValueForProperty("ParameterCacheBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).ParameterCacheBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior.CreateFrom); + } + if (content.Contains("ParameterCacheType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).ParameterCacheType = (string) content.GetValueForProperty("ParameterCacheType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).ParameterCacheType, global::System.Convert.ToString); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterCacheDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).ParameterCacheDuration = (string) content.GetValueForProperty("ParameterCacheDuration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal)this).ParameterCacheDuration, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleCacheExpirationAction(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleCacheExpirationAction(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the cache expiration action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleCacheExpirationActionTypeConverter))] + public partial interface IDeliveryRuleCacheExpirationAction + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheExpirationAction.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheExpirationAction.TypeConverter.cs new file mode 100644 index 000000000000..91c3940368e2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheExpirationAction.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleCacheExpirationActionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationAction ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationAction).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleCacheExpirationAction.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleCacheExpirationAction.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleCacheExpirationAction.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheExpirationAction.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheExpirationAction.cs new file mode 100644 index 000000000000..265fe888facf --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheExpirationAction.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the cache expiration action for the delivery rule. + public partial class DeliveryRuleCacheExpirationAction : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationAction, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheExpirationActionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterCacheType + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal.ParameterCacheType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)Parameter).CacheType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)Parameter).CacheType = value; } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationActionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)Parameter).TypeName = value; } + + /// The name of the action for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)__deliveryRuleAction1).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)__deliveryRuleAction1).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParameters _parameter; + + /// Defines the parameters for the action. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheExpirationActionParameters()); set => this._parameter = value; } + + /// Caching behavior for the requests + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior ParameterCacheBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)Parameter).CacheBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)Parameter).CacheBehavior = value ; } + + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterCacheDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)Parameter).CacheDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)Parameter).CacheDuration = value ?? null; } + + /// The level at which the content needs to be cached. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterCacheType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)Parameter).CacheType; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleCacheExpirationAction() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleAction1), __deliveryRuleAction1); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleAction1), __deliveryRuleAction1); + } + } + /// Defines the cache expiration action for the delivery rule. + public partial interface IDeliveryRuleCacheExpirationAction : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 + { + /// Caching behavior for the requests + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Caching behavior for the requests", + SerializedName = @"cacheBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior ParameterCacheBehavior { get; set; } + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss", + SerializedName = @"cacheDuration", + PossibleTypes = new [] { typeof(string) })] + string ParameterCacheDuration { get; set; } + /// The level at which the content needs to be cached. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"The level at which the content needs to be cached.", + SerializedName = @"cacheType", + PossibleTypes = new [] { typeof(string) })] + string ParameterCacheType { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the cache expiration action for the delivery rule. + internal partial interface IDeliveryRuleCacheExpirationActionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal + { + /// Defines the parameters for the action. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheExpirationActionParameters Parameter { get; set; } + /// Caching behavior for the requests + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior ParameterCacheBehavior { get; set; } + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// + string ParameterCacheDuration { get; set; } + /// The level at which the content needs to be cached. + string ParameterCacheType { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheExpirationAction.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheExpirationAction.json.cs new file mode 100644 index 000000000000..58c5493e2a03 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheExpirationAction.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the cache expiration action for the delivery rule. + public partial class DeliveryRuleCacheExpirationAction + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleCacheExpirationAction(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheExpirationActionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationAction. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationAction. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheExpirationAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleCacheExpirationAction(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleAction1?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheKeyQueryStringAction.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheKeyQueryStringAction.PowerShell.cs new file mode 100644 index 000000000000..fc04e0439894 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheKeyQueryStringAction.PowerShell.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the cache-key query string action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleCacheKeyQueryStringActionTypeConverter))] + public partial class DeliveryRuleCacheKeyQueryStringAction + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleCacheKeyQueryStringAction(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheKeyQueryStringActionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterQueryStringBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal)this).ParameterQueryStringBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior) content.GetValueForProperty("ParameterQueryStringBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal)this).ParameterQueryStringBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior.CreateFrom); + } + if (content.Contains("ParameterQueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal)this).ParameterQueryParameter = (string) content.GetValueForProperty("ParameterQueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal)this).ParameterQueryParameter, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleCacheKeyQueryStringAction(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheKeyQueryStringActionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterQueryStringBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal)this).ParameterQueryStringBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior) content.GetValueForProperty("ParameterQueryStringBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal)this).ParameterQueryStringBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior.CreateFrom); + } + if (content.Contains("ParameterQueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal)this).ParameterQueryParameter = (string) content.GetValueForProperty("ParameterQueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal)this).ParameterQueryParameter, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleCacheKeyQueryStringAction(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleCacheKeyQueryStringAction(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the cache-key query string action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleCacheKeyQueryStringActionTypeConverter))] + public partial interface IDeliveryRuleCacheKeyQueryStringAction + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheKeyQueryStringAction.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheKeyQueryStringAction.TypeConverter.cs new file mode 100644 index 000000000000..e12c5f050aeb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheKeyQueryStringAction.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleCacheKeyQueryStringActionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringAction ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringAction).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleCacheKeyQueryStringAction.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleCacheKeyQueryStringAction.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleCacheKeyQueryStringAction.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheKeyQueryStringAction.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheKeyQueryStringAction.cs new file mode 100644 index 000000000000..dea132aea17f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheKeyQueryStringAction.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the cache-key query string action for the delivery rule. + public partial class DeliveryRuleCacheKeyQueryStringAction : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringAction, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheKeyQueryStringActionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringActionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)Parameter).TypeName = value; } + + /// The name of the action for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)__deliveryRuleAction1).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)__deliveryRuleAction1).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParameters _parameter; + + /// Defines the parameters for the action. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheKeyQueryStringActionParameters()); set => this._parameter = value; } + + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterQueryParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)Parameter).QueryParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)Parameter).QueryParameter = value ?? null; } + + /// Caching behavior for the requests + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior ParameterQueryStringBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)Parameter).QueryStringBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)Parameter).QueryStringBehavior = value ; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleCacheKeyQueryStringAction() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleAction1), __deliveryRuleAction1); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleAction1), __deliveryRuleAction1); + } + } + /// Defines the cache-key query string action for the delivery rule. + public partial interface IDeliveryRuleCacheKeyQueryStringAction : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 + { + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"query parameters to include or exclude (comma separated).", + SerializedName = @"queryParameters", + PossibleTypes = new [] { typeof(string) })] + string ParameterQueryParameter { get; set; } + /// Caching behavior for the requests + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Caching behavior for the requests", + SerializedName = @"queryStringBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior ParameterQueryStringBehavior { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the cache-key query string action for the delivery rule. + internal partial interface IDeliveryRuleCacheKeyQueryStringActionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal + { + /// Defines the parameters for the action. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheKeyQueryStringActionParameters Parameter { get; set; } + /// query parameters to include or exclude (comma separated). + string ParameterQueryParameter { get; set; } + /// Caching behavior for the requests + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior ParameterQueryStringBehavior { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheKeyQueryStringAction.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheKeyQueryStringAction.json.cs new file mode 100644 index 000000000000..3d0241ec0a4b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCacheKeyQueryStringAction.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the cache-key query string action for the delivery rule. + public partial class DeliveryRuleCacheKeyQueryStringAction + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleCacheKeyQueryStringAction(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheKeyQueryStringActionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringAction. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringAction. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCacheKeyQueryStringAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleCacheKeyQueryStringAction(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleAction1?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleClientPortCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleClientPortCondition.PowerShell.cs new file mode 100644 index 000000000000..06349006be29 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleClientPortCondition.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the ClientPort condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleClientPortConditionTypeConverter))] + public partial class DeliveryRuleClientPortCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleClientPortCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ClientPortMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleClientPortCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ClientPortMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleClientPortCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleClientPortCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the ClientPort condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleClientPortConditionTypeConverter))] + public partial interface IDeliveryRuleClientPortCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleClientPortCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleClientPortCondition.TypeConverter.cs new file mode 100644 index 000000000000..1e014e222ef0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleClientPortCondition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleClientPortConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleClientPortCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleClientPortCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleClientPortCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleClientPortCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleClientPortCondition.cs new file mode 100644 index 000000000000..b34b64fb38bb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleClientPortCondition.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the ClientPort condition for the delivery rule. + public partial class DeliveryRuleClientPortCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ClientPortMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ClientPortMatchConditionParameters()); set => this._parameter = value; } + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)Parameter).Operator = value ; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleClientPortCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the ClientPort condition for the delivery rule. + public partial interface IDeliveryRuleClientPortCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator ParameterOperator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the ClientPort condition for the delivery rule. + internal partial interface IDeliveryRuleClientPortConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IClientPortMatchConditionParameters Parameter { get; set; } + /// The match value for the condition of the delivery rule + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator ParameterOperator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleClientPortCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleClientPortCondition.json.cs new file mode 100644 index 000000000000..891dd1b63061 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleClientPortCondition.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the ClientPort condition for the delivery rule. + public partial class DeliveryRuleClientPortCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleClientPortCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ClientPortMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleClientPortCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleClientPortCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCondition.PowerShell.cs new file mode 100644 index 000000000000..3968b4eb8119 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCondition.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// A condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleConditionTypeConverter))] + public partial class DeliveryRuleCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// A condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleConditionTypeConverter))] + public partial interface IDeliveryRuleCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCondition.TypeConverter.cs new file mode 100644 index 000000000000..daabe12a14c7 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCondition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCondition.cs new file mode 100644 index 000000000000..2d1cb98537ea --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCondition.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// A condition for the delivery rule. + public partial class DeliveryRuleCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable _name; + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => this._name; set => this._name = value; } + + /// Creates an new instance. + public DeliveryRuleCondition() + { + + } + } + /// A condition for the delivery rule. + public partial interface IDeliveryRuleCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the condition for the delivery rule.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get; set; } + + } + /// A condition for the delivery rule. + internal partial interface IDeliveryRuleConditionInternal + + { + /// The name of the condition for the delivery rule. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCondition.json.cs new file mode 100644 index 000000000000..3765788b6b50 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCondition.json.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// A condition for the delivery rule. + public partial class DeliveryRuleCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition interface is polymorphic, and + /// the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("name") ) + { + case "RemoteAddress": + { + return new DeliveryRuleRemoteAddressCondition(json); + } + case "RequestMethod": + { + return new DeliveryRuleRequestMethodCondition(json); + } + case "QueryString": + { + return new DeliveryRuleQueryStringCondition(json); + } + case "PostArgs": + { + return new DeliveryRulePostArgsCondition(json); + } + case "RequestUri": + { + return new DeliveryRuleRequestUriCondition(json); + } + case "RequestHeader": + { + return new DeliveryRuleRequestHeaderCondition(json); + } + case "RequestBody": + { + return new DeliveryRuleRequestBodyCondition(json); + } + case "RequestScheme": + { + return new DeliveryRuleRequestSchemeCondition(json); + } + case "UrlPath": + { + return new DeliveryRuleUrlPathCondition(json); + } + case "UrlFileExtension": + { + return new DeliveryRuleUrlFileExtensionCondition(json); + } + case "UrlFileName": + { + return new DeliveryRuleUrlFileNameCondition(json); + } + case "HttpVersion": + { + return new DeliveryRuleHttpVersionCondition(json); + } + case "Cookies": + { + return new DeliveryRuleCookiesCondition(json); + } + case "IsDevice": + { + return new DeliveryRuleIsDeviceCondition(json); + } + case "SocketAddr": + { + return new DeliveryRuleSocketAddrCondition(json); + } + case "ClientPort": + { + return new DeliveryRuleClientPortCondition(json); + } + case "ServerPort": + { + return new DeliveryRuleServerPortCondition(json); + } + case "HostName": + { + return new DeliveryRuleHostNameCondition(json); + } + case "SslProtocol": + { + return new DeliveryRuleSslProtocolCondition(json); + } + } + return new DeliveryRuleCondition(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCookiesCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCookiesCondition.PowerShell.cs new file mode 100644 index 000000000000..0e1be99634d4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCookiesCondition.PowerShell.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the Cookies condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleCookiesConditionTypeConverter))] + public partial class DeliveryRuleCookiesCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleCookiesCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CookiesMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterSelector")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterSelector = (string) content.GetValueForProperty("ParameterSelector",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterSelector, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleCookiesCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CookiesMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterSelector")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterSelector = (string) content.GetValueForProperty("ParameterSelector",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterSelector, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleCookiesCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleCookiesCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the Cookies condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleCookiesConditionTypeConverter))] + public partial interface IDeliveryRuleCookiesCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCookiesCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCookiesCondition.TypeConverter.cs new file mode 100644 index 000000000000..8b46319d876e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCookiesCondition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleCookiesConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleCookiesCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleCookiesCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleCookiesCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCookiesCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCookiesCondition.cs new file mode 100644 index 000000000000..27b7dbb504df --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCookiesCondition.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the Cookies condition for the delivery rule. + public partial class DeliveryRuleCookiesCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CookiesMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CookiesMatchConditionParameters()); set => this._parameter = value; } + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)Parameter).Operator = value ; } + + /// Name of Cookies to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterSelector { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)Parameter).Selector; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)Parameter).Selector = value ?? null; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleCookiesCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the Cookies condition for the delivery rule. + public partial interface IDeliveryRuleCookiesCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator ParameterOperator { get; set; } + /// Name of Cookies to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of Cookies to be matched", + SerializedName = @"selector", + PossibleTypes = new [] { typeof(string) })] + string ParameterSelector { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the Cookies condition for the delivery rule. + internal partial interface IDeliveryRuleCookiesConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICookiesMatchConditionParameters Parameter { get; set; } + /// The match value for the condition of the delivery rule + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator ParameterOperator { get; set; } + /// Name of Cookies to be matched + string ParameterSelector { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCookiesCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCookiesCondition.json.cs new file mode 100644 index 000000000000..dde6a4ba0c3a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleCookiesCondition.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the Cookies condition for the delivery rule. + public partial class DeliveryRuleCookiesCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleCookiesCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CookiesMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCookiesCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleCookiesCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHostNameCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHostNameCondition.PowerShell.cs new file mode 100644 index 000000000000..035141c29b9f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHostNameCondition.PowerShell.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the HostName condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleHostNameConditionTypeConverter))] + public partial class DeliveryRuleHostNameCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleHostNameCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HostNameMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleHostNameCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HostNameMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleHostNameCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleHostNameCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the HostName condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleHostNameConditionTypeConverter))] + public partial interface IDeliveryRuleHostNameCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHostNameCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHostNameCondition.TypeConverter.cs new file mode 100644 index 000000000000..17ab4220236f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHostNameCondition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleHostNameConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleHostNameCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleHostNameCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleHostNameCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHostNameCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHostNameCondition.cs new file mode 100644 index 000000000000..90bf4bdb4305 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHostNameCondition.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the HostName condition for the delivery rule. + public partial class DeliveryRuleHostNameCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HostNameMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HostNameMatchConditionParameters()); set => this._parameter = value; } + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)Parameter).Operator = value ; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleHostNameCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the HostName condition for the delivery rule. + public partial interface IDeliveryRuleHostNameCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator ParameterOperator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the HostName condition for the delivery rule. + internal partial interface IDeliveryRuleHostNameConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParameters Parameter { get; set; } + /// The match value for the condition of the delivery rule + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator ParameterOperator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHostNameCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHostNameCondition.json.cs new file mode 100644 index 000000000000..a845bcb7f630 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHostNameCondition.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the HostName condition for the delivery rule. + public partial class DeliveryRuleHostNameCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleHostNameCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HostNameMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHostNameCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleHostNameCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHttpVersionCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHttpVersionCondition.PowerShell.cs new file mode 100644 index 000000000000..d408299e5fd8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHttpVersionCondition.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the HttpVersion condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleHttpVersionConditionTypeConverter))] + public partial class DeliveryRuleHttpVersionCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleHttpVersionCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HttpVersionMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterOperator = (string) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterOperator, global::System.Convert.ToString); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleHttpVersionCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HttpVersionMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterOperator = (string) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterOperator, global::System.Convert.ToString); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleHttpVersionCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleHttpVersionCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the HttpVersion condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleHttpVersionConditionTypeConverter))] + public partial interface IDeliveryRuleHttpVersionCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHttpVersionCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHttpVersionCondition.TypeConverter.cs new file mode 100644 index 000000000000..9a2fdcba4230 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHttpVersionCondition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleHttpVersionConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleHttpVersionCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleHttpVersionCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleHttpVersionCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHttpVersionCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHttpVersionCondition.cs new file mode 100644 index 000000000000..9d9a6d1f7952 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHttpVersionCondition.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the HttpVersion condition for the delivery rule. + public partial class DeliveryRuleHttpVersionCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HttpVersionMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterOperator + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal.ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)Parameter).Operator = value; } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HttpVersionMatchConditionParameters()); set => this._parameter = value; } + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)Parameter).Operator; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleHttpVersionCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the HttpVersion condition for the delivery rule. + public partial interface IDeliveryRuleHttpVersionCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(string) })] + string ParameterOperator { get; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the HttpVersion condition for the delivery rule. + internal partial interface IDeliveryRuleHttpVersionConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParameters Parameter { get; set; } + /// The match value for the condition of the delivery rule + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + string ParameterOperator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHttpVersionCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHttpVersionCondition.json.cs new file mode 100644 index 000000000000..5483aeb49e27 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleHttpVersionCondition.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the HttpVersion condition for the delivery rule. + public partial class DeliveryRuleHttpVersionCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleHttpVersionCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HttpVersionMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleHttpVersionCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleHttpVersionCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleIsDeviceCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleIsDeviceCondition.PowerShell.cs new file mode 100644 index 000000000000..b8b99652c397 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleIsDeviceCondition.PowerShell.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the IsDevice condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleIsDeviceConditionTypeConverter))] + public partial class DeliveryRuleIsDeviceCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleIsDeviceCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IsDeviceMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterOperator = (string) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterOperator, global::System.Convert.ToString); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleIsDeviceCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IsDeviceMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterOperator = (string) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterOperator, global::System.Convert.ToString); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleIsDeviceCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleIsDeviceCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the IsDevice condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleIsDeviceConditionTypeConverter))] + public partial interface IDeliveryRuleIsDeviceCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleIsDeviceCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleIsDeviceCondition.TypeConverter.cs new file mode 100644 index 000000000000..bc7bc4add494 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleIsDeviceCondition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleIsDeviceConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleIsDeviceCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleIsDeviceCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleIsDeviceCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleIsDeviceCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleIsDeviceCondition.cs new file mode 100644 index 000000000000..0068fc5fc626 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleIsDeviceCondition.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the IsDevice condition for the delivery rule. + public partial class DeliveryRuleIsDeviceCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IsDeviceMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterOperator + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal.ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)Parameter).Operator = value; } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IsDeviceMatchConditionParameters()); set => this._parameter = value; } + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)Parameter).Operator; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleIsDeviceCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the IsDevice condition for the delivery rule. + public partial interface IDeliveryRuleIsDeviceCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(string) })] + string ParameterOperator { get; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the IsDevice condition for the delivery rule. + internal partial interface IDeliveryRuleIsDeviceConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParameters Parameter { get; set; } + /// The match value for the condition of the delivery rule + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + string ParameterOperator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleIsDeviceCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleIsDeviceCondition.json.cs new file mode 100644 index 000000000000..77a87d4a44b5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleIsDeviceCondition.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the IsDevice condition for the delivery rule. + public partial class DeliveryRuleIsDeviceCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleIsDeviceCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IsDeviceMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleIsDeviceCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleIsDeviceCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRulePostArgsCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRulePostArgsCondition.PowerShell.cs new file mode 100644 index 000000000000..be2e54849970 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRulePostArgsCondition.PowerShell.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the PostArgs condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRulePostArgsConditionTypeConverter))] + public partial class DeliveryRulePostArgsCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRulePostArgsCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.PostArgsMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterSelector")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterSelector = (string) content.GetValueForProperty("ParameterSelector",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterSelector, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRulePostArgsCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.PostArgsMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterSelector")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterSelector = (string) content.GetValueForProperty("ParameterSelector",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterSelector, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRulePostArgsCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRulePostArgsCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the PostArgs condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRulePostArgsConditionTypeConverter))] + public partial interface IDeliveryRulePostArgsCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRulePostArgsCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRulePostArgsCondition.TypeConverter.cs new file mode 100644 index 000000000000..2aaf5fffbc42 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRulePostArgsCondition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRulePostArgsConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRulePostArgsCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRulePostArgsCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRulePostArgsCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRulePostArgsCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRulePostArgsCondition.cs new file mode 100644 index 000000000000..69f36efb7b46 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRulePostArgsCondition.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the PostArgs condition for the delivery rule. + public partial class DeliveryRulePostArgsCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.PostArgsMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.PostArgsMatchConditionParameters()); set => this._parameter = value; } + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)Parameter).Operator = value ; } + + /// Name of PostArg to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterSelector { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)Parameter).Selector; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)Parameter).Selector = value ?? null; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRulePostArgsCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the PostArgs condition for the delivery rule. + public partial interface IDeliveryRulePostArgsCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator ParameterOperator { get; set; } + /// Name of PostArg to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of PostArg to be matched", + SerializedName = @"selector", + PossibleTypes = new [] { typeof(string) })] + string ParameterSelector { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the PostArgs condition for the delivery rule. + internal partial interface IDeliveryRulePostArgsConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParameters Parameter { get; set; } + /// The match value for the condition of the delivery rule + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator ParameterOperator { get; set; } + /// Name of PostArg to be matched + string ParameterSelector { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRulePostArgsCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRulePostArgsCondition.json.cs new file mode 100644 index 000000000000..73fe2c8642e6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRulePostArgsCondition.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the PostArgs condition for the delivery rule. + public partial class DeliveryRulePostArgsCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRulePostArgsCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.PostArgsMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRulePostArgsCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRulePostArgsCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleQueryStringCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleQueryStringCondition.PowerShell.cs new file mode 100644 index 000000000000..9e3d09937b64 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleQueryStringCondition.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the QueryString condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleQueryStringConditionTypeConverter))] + public partial class DeliveryRuleQueryStringCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleQueryStringCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.QueryStringMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleQueryStringCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.QueryStringMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleQueryStringCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleQueryStringCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the QueryString condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleQueryStringConditionTypeConverter))] + public partial interface IDeliveryRuleQueryStringCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleQueryStringCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleQueryStringCondition.TypeConverter.cs new file mode 100644 index 000000000000..93a18aecee25 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleQueryStringCondition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleQueryStringConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleQueryStringCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleQueryStringCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleQueryStringCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleQueryStringCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleQueryStringCondition.cs new file mode 100644 index 000000000000..c3612ec5e3d1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleQueryStringCondition.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the QueryString condition for the delivery rule. + public partial class DeliveryRuleQueryStringCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.QueryStringMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.QueryStringMatchConditionParameters()); set => this._parameter = value; } + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)Parameter).Operator = value ; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleQueryStringCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the QueryString condition for the delivery rule. + public partial interface IDeliveryRuleQueryStringCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator ParameterOperator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the QueryString condition for the delivery rule. + internal partial interface IDeliveryRuleQueryStringConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParameters Parameter { get; set; } + /// The match value for the condition of the delivery rule + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator ParameterOperator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleQueryStringCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleQueryStringCondition.json.cs new file mode 100644 index 000000000000..e2b555895252 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleQueryStringCondition.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the QueryString condition for the delivery rule. + public partial class DeliveryRuleQueryStringCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleQueryStringCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.QueryStringMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleQueryStringCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleQueryStringCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRemoteAddressCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRemoteAddressCondition.PowerShell.cs new file mode 100644 index 000000000000..a3333a812ba0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRemoteAddressCondition.PowerShell.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the RemoteAddress condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleRemoteAddressConditionTypeConverter))] + public partial class DeliveryRuleRemoteAddressCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleRemoteAddressCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RemoteAddressMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleRemoteAddressCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RemoteAddressMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleRemoteAddressCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleRemoteAddressCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the RemoteAddress condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleRemoteAddressConditionTypeConverter))] + public partial interface IDeliveryRuleRemoteAddressCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRemoteAddressCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRemoteAddressCondition.TypeConverter.cs new file mode 100644 index 000000000000..21901fc64480 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRemoteAddressCondition.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleRemoteAddressConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleRemoteAddressCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleRemoteAddressCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleRemoteAddressCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRemoteAddressCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRemoteAddressCondition.cs new file mode 100644 index 000000000000..0f91eaf6bd80 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRemoteAddressCondition.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the RemoteAddress condition for the delivery rule. + public partial class DeliveryRuleRemoteAddressCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RemoteAddressMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RemoteAddressMatchConditionParameters()); set => this._parameter = value; } + + /// + /// Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the + /// variable with the given operator this match condition is considered a match. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)Parameter).Operator = value ; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleRemoteAddressCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the RemoteAddress condition for the delivery rule. + public partial interface IDeliveryRuleRemoteAddressCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// + /// Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the + /// variable with the given operator this match condition is considered a match. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the variable with the given operator this match condition is considered a match.", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator ParameterOperator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the RemoteAddress condition for the delivery rule. + internal partial interface IDeliveryRuleRemoteAddressConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParameters Parameter { get; set; } + /// + /// Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the + /// variable with the given operator this match condition is considered a match. + /// + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator ParameterOperator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRemoteAddressCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRemoteAddressCondition.json.cs new file mode 100644 index 000000000000..8195276b4163 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRemoteAddressCondition.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the RemoteAddress condition for the delivery rule. + public partial class DeliveryRuleRemoteAddressCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleRemoteAddressCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RemoteAddressMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRemoteAddressCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleRemoteAddressCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestBodyCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestBodyCondition.PowerShell.cs new file mode 100644 index 000000000000..fb8417b3da43 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestBodyCondition.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the RequestBody condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleRequestBodyConditionTypeConverter))] + public partial class DeliveryRuleRequestBodyCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleRequestBodyCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestBodyMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleRequestBodyCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestBodyMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleRequestBodyCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleRequestBodyCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the RequestBody condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleRequestBodyConditionTypeConverter))] + public partial interface IDeliveryRuleRequestBodyCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestBodyCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestBodyCondition.TypeConverter.cs new file mode 100644 index 000000000000..3548eec56bf3 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestBodyCondition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleRequestBodyConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleRequestBodyCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleRequestBodyCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleRequestBodyCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestBodyCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestBodyCondition.cs new file mode 100644 index 000000000000..73bc8eb8bdfd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestBodyCondition.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the RequestBody condition for the delivery rule. + public partial class DeliveryRuleRequestBodyCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestBodyMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestBodyMatchConditionParameters()); set => this._parameter = value; } + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)Parameter).Operator = value ; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleRequestBodyCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the RequestBody condition for the delivery rule. + public partial interface IDeliveryRuleRequestBodyCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator ParameterOperator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the RequestBody condition for the delivery rule. + internal partial interface IDeliveryRuleRequestBodyConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParameters Parameter { get; set; } + /// The match value for the condition of the delivery rule + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator ParameterOperator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestBodyCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestBodyCondition.json.cs new file mode 100644 index 000000000000..5962d7e77985 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestBodyCondition.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the RequestBody condition for the delivery rule. + public partial class DeliveryRuleRequestBodyCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleRequestBodyCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestBodyMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestBodyCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleRequestBodyCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderAction.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderAction.PowerShell.cs new file mode 100644 index 000000000000..c13ab41499ae --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderAction.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the request header action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleRequestHeaderActionTypeConverter))] + public partial class DeliveryRuleRequestHeaderAction + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleRequestHeaderAction(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HeaderActionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + if (content.Contains("ParameterHeaderAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).ParameterHeaderAction = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction) content.GetValueForProperty("ParameterHeaderAction",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).ParameterHeaderAction, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterHeaderName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).ParameterHeaderName = (string) content.GetValueForProperty("ParameterHeaderName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).ParameterHeaderName, global::System.Convert.ToString); + } + if (content.Contains("ParameterValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).ParameterValue = (string) content.GetValueForProperty("ParameterValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).ParameterValue, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleRequestHeaderAction(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HeaderActionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + if (content.Contains("ParameterHeaderAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).ParameterHeaderAction = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction) content.GetValueForProperty("ParameterHeaderAction",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).ParameterHeaderAction, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterHeaderName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).ParameterHeaderName = (string) content.GetValueForProperty("ParameterHeaderName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).ParameterHeaderName, global::System.Convert.ToString); + } + if (content.Contains("ParameterValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).ParameterValue = (string) content.GetValueForProperty("ParameterValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal)this).ParameterValue, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleRequestHeaderAction(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleRequestHeaderAction(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the request header action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleRequestHeaderActionTypeConverter))] + public partial interface IDeliveryRuleRequestHeaderAction + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderAction.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderAction.TypeConverter.cs new file mode 100644 index 000000000000..6fa30e9d096f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderAction.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleRequestHeaderActionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderAction ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderAction).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleRequestHeaderAction.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleRequestHeaderAction.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleRequestHeaderAction.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderAction.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderAction.cs new file mode 100644 index 000000000000..c8808394155d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderAction.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the request header action for the delivery rule. + public partial class DeliveryRuleRequestHeaderAction : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderAction, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HeaderActionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderActionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)Parameter).TypeName = value; } + + /// The name of the action for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)__deliveryRuleAction1).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)__deliveryRuleAction1).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters _parameter; + + /// Defines the parameters for the action. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HeaderActionParameters()); set => this._parameter = value; } + + /// Action to perform + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction ParameterHeaderAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)Parameter).HeaderAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)Parameter).HeaderAction = value ; } + + /// Name of the header to modify + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterHeaderName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)Parameter).HeaderName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)Parameter).HeaderName = value ; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)Parameter).TypeName; } + + /// Value for the specified action + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)Parameter).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)Parameter).Value = value ?? null; } + + /// Creates an new instance. + public DeliveryRuleRequestHeaderAction() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleAction1), __deliveryRuleAction1); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleAction1), __deliveryRuleAction1); + } + } + /// Defines the request header action for the delivery rule. + public partial interface IDeliveryRuleRequestHeaderAction : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 + { + /// Action to perform + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Action to perform", + SerializedName = @"headerAction", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction ParameterHeaderAction { get; set; } + /// Name of the header to modify + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the header to modify", + SerializedName = @"headerName", + PossibleTypes = new [] { typeof(string) })] + string ParameterHeaderName { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + /// Value for the specified action + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value for the specified action", + SerializedName = @"value", + PossibleTypes = new [] { typeof(string) })] + string ParameterValue { get; set; } + + } + /// Defines the request header action for the delivery rule. + internal partial interface IDeliveryRuleRequestHeaderActionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal + { + /// Defines the parameters for the action. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters Parameter { get; set; } + /// Action to perform + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction ParameterHeaderAction { get; set; } + /// Name of the header to modify + string ParameterHeaderName { get; set; } + + string ParameterTypeName { get; set; } + /// Value for the specified action + string ParameterValue { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderAction.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderAction.json.cs new file mode 100644 index 000000000000..8f3654807b3d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderAction.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the request header action for the delivery rule. + public partial class DeliveryRuleRequestHeaderAction + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleRequestHeaderAction(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HeaderActionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderAction. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderAction. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleRequestHeaderAction(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleAction1?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderCondition.PowerShell.cs new file mode 100644 index 000000000000..ac72cdbc7a66 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderCondition.PowerShell.cs @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the RequestHeader condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleRequestHeaderConditionTypeConverter))] + public partial class DeliveryRuleRequestHeaderCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleRequestHeaderCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestHeaderMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterSelector")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterSelector = (string) content.GetValueForProperty("ParameterSelector",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterSelector, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleRequestHeaderCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestHeaderMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterSelector")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterSelector = (string) content.GetValueForProperty("ParameterSelector",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterSelector, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleRequestHeaderCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleRequestHeaderCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the RequestHeader condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleRequestHeaderConditionTypeConverter))] + public partial interface IDeliveryRuleRequestHeaderCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderCondition.TypeConverter.cs new file mode 100644 index 000000000000..98da31e767fb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderCondition.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleRequestHeaderConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleRequestHeaderCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleRequestHeaderCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleRequestHeaderCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderCondition.cs new file mode 100644 index 000000000000..334c155fb047 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderCondition.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the RequestHeader condition for the delivery rule. + public partial class DeliveryRuleRequestHeaderCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestHeaderMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestHeaderMatchConditionParameters()); set => this._parameter = value; } + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)Parameter).Operator = value ; } + + /// Name of Header to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterSelector { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)Parameter).Selector; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)Parameter).Selector = value ?? null; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleRequestHeaderCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the RequestHeader condition for the delivery rule. + public partial interface IDeliveryRuleRequestHeaderCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator ParameterOperator { get; set; } + /// Name of Header to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of Header to be matched", + SerializedName = @"selector", + PossibleTypes = new [] { typeof(string) })] + string ParameterSelector { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the RequestHeader condition for the delivery rule. + internal partial interface IDeliveryRuleRequestHeaderConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParameters Parameter { get; set; } + /// The match value for the condition of the delivery rule + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator ParameterOperator { get; set; } + /// Name of Header to be matched + string ParameterSelector { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderCondition.json.cs new file mode 100644 index 000000000000..cef874afac8b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestHeaderCondition.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the RequestHeader condition for the delivery rule. + public partial class DeliveryRuleRequestHeaderCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleRequestHeaderCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestHeaderMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestHeaderCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleRequestHeaderCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestMethodCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestMethodCondition.PowerShell.cs new file mode 100644 index 000000000000..010b7a3392e0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestMethodCondition.PowerShell.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the RequestMethod condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleRequestMethodConditionTypeConverter))] + public partial class DeliveryRuleRequestMethodCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleRequestMethodCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestMethodMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterOperator = (string) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterOperator, global::System.Convert.ToString); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleRequestMethodCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestMethodMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterOperator = (string) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterOperator, global::System.Convert.ToString); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleRequestMethodCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleRequestMethodCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the RequestMethod condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleRequestMethodConditionTypeConverter))] + public partial interface IDeliveryRuleRequestMethodCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestMethodCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestMethodCondition.TypeConverter.cs new file mode 100644 index 000000000000..f2583fa72980 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestMethodCondition.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleRequestMethodConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleRequestMethodCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleRequestMethodCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleRequestMethodCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestMethodCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestMethodCondition.cs new file mode 100644 index 000000000000..5ae7eb3a887c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestMethodCondition.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the RequestMethod condition for the delivery rule. + public partial class DeliveryRuleRequestMethodCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestMethodMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterOperator + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal.ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)Parameter).Operator = value; } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestMethodMatchConditionParameters()); set => this._parameter = value; } + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)Parameter).Operator; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleRequestMethodCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the RequestMethod condition for the delivery rule. + public partial interface IDeliveryRuleRequestMethodCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(string) })] + string ParameterOperator { get; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the RequestMethod condition for the delivery rule. + internal partial interface IDeliveryRuleRequestMethodConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParameters Parameter { get; set; } + /// The match value for the condition of the delivery rule + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + string ParameterOperator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestMethodCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestMethodCondition.json.cs new file mode 100644 index 000000000000..85f78dd39ebd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestMethodCondition.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the RequestMethod condition for the delivery rule. + public partial class DeliveryRuleRequestMethodCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleRequestMethodCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestMethodMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestMethodCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleRequestMethodCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestSchemeCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestSchemeCondition.PowerShell.cs new file mode 100644 index 000000000000..184936f91b78 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestSchemeCondition.PowerShell.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the RequestScheme condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleRequestSchemeConditionTypeConverter))] + public partial class DeliveryRuleRequestSchemeCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleRequestSchemeCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestSchemeMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterOperator = (string) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterOperator, global::System.Convert.ToString); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleRequestSchemeCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestSchemeMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterOperator = (string) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterOperator, global::System.Convert.ToString); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleRequestSchemeCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleRequestSchemeCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the RequestScheme condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleRequestSchemeConditionTypeConverter))] + public partial interface IDeliveryRuleRequestSchemeCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestSchemeCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestSchemeCondition.TypeConverter.cs new file mode 100644 index 000000000000..5b785509cce1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestSchemeCondition.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleRequestSchemeConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleRequestSchemeCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleRequestSchemeCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleRequestSchemeCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestSchemeCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestSchemeCondition.cs new file mode 100644 index 000000000000..c52dc90122ac --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestSchemeCondition.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the RequestScheme condition for the delivery rule. + public partial class DeliveryRuleRequestSchemeCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestSchemeMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterOperator + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal.ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)Parameter).Operator = value; } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestSchemeMatchConditionParameters()); set => this._parameter = value; } + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)Parameter).Operator; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleRequestSchemeCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the RequestScheme condition for the delivery rule. + public partial interface IDeliveryRuleRequestSchemeCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(string) })] + string ParameterOperator { get; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the RequestScheme condition for the delivery rule. + internal partial interface IDeliveryRuleRequestSchemeConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParameters Parameter { get; set; } + /// The match value for the condition of the delivery rule + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + string ParameterOperator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestSchemeCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestSchemeCondition.json.cs new file mode 100644 index 000000000000..d4fca540a9aa --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestSchemeCondition.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the RequestScheme condition for the delivery rule. + public partial class DeliveryRuleRequestSchemeCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleRequestSchemeCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestSchemeMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestSchemeCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleRequestSchemeCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestUriCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestUriCondition.PowerShell.cs new file mode 100644 index 000000000000..cd0df2a1c3bf --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestUriCondition.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the RequestUri condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleRequestUriConditionTypeConverter))] + public partial class DeliveryRuleRequestUriCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleRequestUriCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestUriMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleRequestUriCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestUriMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleRequestUriCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleRequestUriCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the RequestUri condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleRequestUriConditionTypeConverter))] + public partial interface IDeliveryRuleRequestUriCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestUriCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestUriCondition.TypeConverter.cs new file mode 100644 index 000000000000..ceeea2723dc1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestUriCondition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleRequestUriConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleRequestUriCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleRequestUriCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleRequestUriCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestUriCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestUriCondition.cs new file mode 100644 index 000000000000..e4da808e913b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestUriCondition.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the RequestUri condition for the delivery rule. + public partial class DeliveryRuleRequestUriCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestUriMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestUriMatchConditionParameters()); set => this._parameter = value; } + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)Parameter).Operator = value ; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleRequestUriCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the RequestUri condition for the delivery rule. + public partial interface IDeliveryRuleRequestUriCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator ParameterOperator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the RequestUri condition for the delivery rule. + internal partial interface IDeliveryRuleRequestUriConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParameters Parameter { get; set; } + /// The match value for the condition of the delivery rule + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator ParameterOperator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestUriCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestUriCondition.json.cs new file mode 100644 index 000000000000..429dc3b663aa --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRequestUriCondition.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the RequestUri condition for the delivery rule. + public partial class DeliveryRuleRequestUriCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleRequestUriCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RequestUriMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRequestUriCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleRequestUriCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleResponseHeaderAction.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleResponseHeaderAction.PowerShell.cs new file mode 100644 index 000000000000..71e78f6d0165 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleResponseHeaderAction.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the response header action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleResponseHeaderActionTypeConverter))] + public partial class DeliveryRuleResponseHeaderAction + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleResponseHeaderAction(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HeaderActionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + if (content.Contains("ParameterHeaderAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).ParameterHeaderAction = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction) content.GetValueForProperty("ParameterHeaderAction",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).ParameterHeaderAction, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterHeaderName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).ParameterHeaderName = (string) content.GetValueForProperty("ParameterHeaderName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).ParameterHeaderName, global::System.Convert.ToString); + } + if (content.Contains("ParameterValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).ParameterValue = (string) content.GetValueForProperty("ParameterValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).ParameterValue, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleResponseHeaderAction(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HeaderActionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + if (content.Contains("ParameterHeaderAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).ParameterHeaderAction = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction) content.GetValueForProperty("ParameterHeaderAction",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).ParameterHeaderAction, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterHeaderName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).ParameterHeaderName = (string) content.GetValueForProperty("ParameterHeaderName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).ParameterHeaderName, global::System.Convert.ToString); + } + if (content.Contains("ParameterValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).ParameterValue = (string) content.GetValueForProperty("ParameterValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal)this).ParameterValue, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleResponseHeaderAction(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleResponseHeaderAction(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the response header action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleResponseHeaderActionTypeConverter))] + public partial interface IDeliveryRuleResponseHeaderAction + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleResponseHeaderAction.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleResponseHeaderAction.TypeConverter.cs new file mode 100644 index 000000000000..0c725fa1d39c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleResponseHeaderAction.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleResponseHeaderActionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderAction ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderAction).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleResponseHeaderAction.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleResponseHeaderAction.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleResponseHeaderAction.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleResponseHeaderAction.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleResponseHeaderAction.cs new file mode 100644 index 000000000000..11a7c5ff0ba6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleResponseHeaderAction.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the response header action for the delivery rule. + public partial class DeliveryRuleResponseHeaderAction : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderAction, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HeaderActionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderActionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)Parameter).TypeName = value; } + + /// The name of the action for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)__deliveryRuleAction1).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)__deliveryRuleAction1).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters _parameter; + + /// Defines the parameters for the action. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HeaderActionParameters()); set => this._parameter = value; } + + /// Action to perform + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction ParameterHeaderAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)Parameter).HeaderAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)Parameter).HeaderAction = value ; } + + /// Name of the header to modify + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterHeaderName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)Parameter).HeaderName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)Parameter).HeaderName = value ; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)Parameter).TypeName; } + + /// Value for the specified action + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)Parameter).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)Parameter).Value = value ?? null; } + + /// Creates an new instance. + public DeliveryRuleResponseHeaderAction() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleAction1), __deliveryRuleAction1); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleAction1), __deliveryRuleAction1); + } + } + /// Defines the response header action for the delivery rule. + public partial interface IDeliveryRuleResponseHeaderAction : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 + { + /// Action to perform + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Action to perform", + SerializedName = @"headerAction", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction ParameterHeaderAction { get; set; } + /// Name of the header to modify + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the header to modify", + SerializedName = @"headerName", + PossibleTypes = new [] { typeof(string) })] + string ParameterHeaderName { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + /// Value for the specified action + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value for the specified action", + SerializedName = @"value", + PossibleTypes = new [] { typeof(string) })] + string ParameterValue { get; set; } + + } + /// Defines the response header action for the delivery rule. + internal partial interface IDeliveryRuleResponseHeaderActionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal + { + /// Defines the parameters for the action. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters Parameter { get; set; } + /// Action to perform + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction ParameterHeaderAction { get; set; } + /// Name of the header to modify + string ParameterHeaderName { get; set; } + + string ParameterTypeName { get; set; } + /// Value for the specified action + string ParameterValue { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleResponseHeaderAction.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleResponseHeaderAction.json.cs new file mode 100644 index 000000000000..7438af71176d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleResponseHeaderAction.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the response header action for the delivery rule. + public partial class DeliveryRuleResponseHeaderAction + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleResponseHeaderAction(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HeaderActionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderAction. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderAction. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleResponseHeaderAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleResponseHeaderAction(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleAction1?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRouteConfigurationOverrideAction.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRouteConfigurationOverrideAction.PowerShell.cs new file mode 100644 index 000000000000..6007f05974b4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRouteConfigurationOverrideAction.PowerShell.cs @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Defines the route configuration override action for the delivery rule. Only applicable to Frontdoor Standard/Premium Profiles. + /// + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleRouteConfigurationOverrideActionTypeConverter))] + public partial class DeliveryRuleRouteConfigurationOverrideAction + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleRouteConfigurationOverrideAction(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteConfigurationOverrideActionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + if (content.Contains("ParameterCacheConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).ParameterCacheConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration) content.GetValueForProperty("ParameterCacheConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).ParameterCacheConfiguration, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("ParameterOriginGroupOverride")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).ParameterOriginGroupOverride = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride) content.GetValueForProperty("ParameterOriginGroupOverride",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).ParameterOriginGroupOverride, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverrideTypeConverter.ConvertFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("OriginGroupOverrideForwardingProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).OriginGroupOverrideForwardingProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol?) content.GetValueForProperty("OriginGroupOverrideForwardingProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).OriginGroupOverrideForwardingProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol.CreateFrom); + } + if (content.Contains("CacheConfigurationQueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationQueryParameter = (string) content.GetValueForProperty("CacheConfigurationQueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationQueryParameter, global::System.Convert.ToString); + } + if (content.Contains("CacheConfigurationCacheDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationCacheDuration = (string) content.GetValueForProperty("CacheConfigurationCacheDuration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationCacheDuration, global::System.Convert.ToString); + } + if (content.Contains("OriginGroupOverrideOriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).OriginGroupOverrideOriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("OriginGroupOverrideOriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).OriginGroupOverrideOriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("CacheConfigurationQueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationQueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior?) content.GetValueForProperty("CacheConfigurationQueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationQueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("CacheConfigurationIsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationIsCompressionEnabled = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled?) content.GetValueForProperty("CacheConfigurationIsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationIsCompressionEnabled, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled.CreateFrom); + } + if (content.Contains("CacheConfigurationCacheBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationCacheBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior?) content.GetValueForProperty("CacheConfigurationCacheBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationCacheBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior.CreateFrom); + } + if (content.Contains("OriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).OriginGroupId = (string) content.GetValueForProperty("OriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).OriginGroupId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleRouteConfigurationOverrideAction(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteConfigurationOverrideActionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + if (content.Contains("ParameterCacheConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).ParameterCacheConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration) content.GetValueForProperty("ParameterCacheConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).ParameterCacheConfiguration, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("ParameterOriginGroupOverride")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).ParameterOriginGroupOverride = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride) content.GetValueForProperty("ParameterOriginGroupOverride",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).ParameterOriginGroupOverride, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverrideTypeConverter.ConvertFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("OriginGroupOverrideForwardingProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).OriginGroupOverrideForwardingProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol?) content.GetValueForProperty("OriginGroupOverrideForwardingProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).OriginGroupOverrideForwardingProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol.CreateFrom); + } + if (content.Contains("CacheConfigurationQueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationQueryParameter = (string) content.GetValueForProperty("CacheConfigurationQueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationQueryParameter, global::System.Convert.ToString); + } + if (content.Contains("CacheConfigurationCacheDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationCacheDuration = (string) content.GetValueForProperty("CacheConfigurationCacheDuration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationCacheDuration, global::System.Convert.ToString); + } + if (content.Contains("OriginGroupOverrideOriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).OriginGroupOverrideOriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("OriginGroupOverrideOriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).OriginGroupOverrideOriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("CacheConfigurationQueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationQueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior?) content.GetValueForProperty("CacheConfigurationQueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationQueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("CacheConfigurationIsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationIsCompressionEnabled = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled?) content.GetValueForProperty("CacheConfigurationIsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationIsCompressionEnabled, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled.CreateFrom); + } + if (content.Contains("CacheConfigurationCacheBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationCacheBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior?) content.GetValueForProperty("CacheConfigurationCacheBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).CacheConfigurationCacheBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior.CreateFrom); + } + if (content.Contains("OriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).OriginGroupId = (string) content.GetValueForProperty("OriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal)this).OriginGroupId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleRouteConfigurationOverrideAction(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleRouteConfigurationOverrideAction(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the route configuration override action for the delivery rule. Only applicable to Frontdoor Standard/Premium Profiles. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleRouteConfigurationOverrideActionTypeConverter))] + public partial interface IDeliveryRuleRouteConfigurationOverrideAction + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRouteConfigurationOverrideAction.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRouteConfigurationOverrideAction.TypeConverter.cs new file mode 100644 index 000000000000..a1af11c28f00 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRouteConfigurationOverrideAction.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleRouteConfigurationOverrideActionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideAction ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideAction).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleRouteConfigurationOverrideAction.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleRouteConfigurationOverrideAction.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleRouteConfigurationOverrideAction.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRouteConfigurationOverrideAction.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRouteConfigurationOverrideAction.cs new file mode 100644 index 000000000000..cbccb88db6a6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRouteConfigurationOverrideAction.cs @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Defines the route configuration override action for the delivery rule. Only applicable to Frontdoor Standard/Premium Profiles. + /// + public partial class DeliveryRuleRouteConfigurationOverrideAction : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideAction, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(); + + /// Caching behavior for the requests + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior? CacheConfigurationCacheBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).CacheConfigurationCacheBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).CacheConfigurationCacheBehavior = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior)""); } + + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string CacheConfigurationCacheDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).CacheConfigurationCacheDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).CacheConfigurationCacheDuration = value ?? null; } + + /// + /// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user + /// requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than + /// 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled? CacheConfigurationIsCompressionEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).CacheConfigurationIsCompressionEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).CacheConfigurationIsCompressionEnabled = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled)""); } + + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string CacheConfigurationQueryParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).CacheConfigurationQueryParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).CacheConfigurationQueryParameter = value ?? null; } + + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior? CacheConfigurationQueryStringCachingBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).CacheConfigurationQueryStringCachingBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).CacheConfigurationQueryStringCachingBehavior = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior)""); } + + /// Internal Acessors for OriginGroupOverrideOriginGroup + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal.OriginGroupOverrideOriginGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).OriginGroupOverrideOriginGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).OriginGroupOverrideOriginGroup = value; } + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteConfigurationOverrideActionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterCacheConfiguration + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal.ParameterCacheConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).CacheConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).CacheConfiguration = value; } + + /// Internal Acessors for ParameterOriginGroupOverride + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal.ParameterOriginGroupOverride { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).OriginGroupOverride; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).OriginGroupOverride = value; } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideActionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).TypeName = value; } + + /// The name of the action for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)__deliveryRuleAction1).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)__deliveryRuleAction1).Name = value ; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).OriginGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).OriginGroupId = value ?? null; } + + /// Protocol this rule will use when forwarding traffic to backends. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? OriginGroupOverrideForwardingProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).OriginGroupOverrideForwardingProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).OriginGroupOverrideForwardingProtocol = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParameters _parameter; + + /// Defines the parameters for the action. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteConfigurationOverrideActionParameters()); set => this._parameter = value; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)Parameter).TypeName; } + + /// + /// Creates an new instance. + /// + public DeliveryRuleRouteConfigurationOverrideAction() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleAction1), __deliveryRuleAction1); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleAction1), __deliveryRuleAction1); + } + } + /// Defines the route configuration override action for the delivery rule. Only applicable to Frontdoor Standard/Premium Profiles. + public partial interface IDeliveryRuleRouteConfigurationOverrideAction : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 + { + /// Caching behavior for the requests + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Caching behavior for the requests", + SerializedName = @"cacheBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior? CacheConfigurationCacheBehavior { get; set; } + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss", + SerializedName = @"cacheDuration", + PossibleTypes = new [] { typeof(string) })] + string CacheConfigurationCacheDuration { get; set; } + /// + /// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user + /// requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than + /// 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.", + SerializedName = @"isCompressionEnabled", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled? CacheConfigurationIsCompressionEnabled { get; set; } + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"query parameters to include or exclude (comma separated).", + SerializedName = @"queryParameters", + PossibleTypes = new [] { typeof(string) })] + string CacheConfigurationQueryParameter { get; set; } + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.", + SerializedName = @"queryStringCachingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior? CacheConfigurationQueryStringCachingBehavior { get; set; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string OriginGroupId { get; set; } + /// Protocol this rule will use when forwarding traffic to backends. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protocol this rule will use when forwarding traffic to backends.", + SerializedName = @"forwardingProtocol", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? OriginGroupOverrideForwardingProtocol { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the route configuration override action for the delivery rule. Only applicable to Frontdoor Standard/Premium Profiles. + internal partial interface IDeliveryRuleRouteConfigurationOverrideActionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal + { + /// Caching behavior for the requests + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior? CacheConfigurationCacheBehavior { get; set; } + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// + string CacheConfigurationCacheDuration { get; set; } + /// + /// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user + /// requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than + /// 1 byte or larger than 1 MB. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled? CacheConfigurationIsCompressionEnabled { get; set; } + /// query parameters to include or exclude (comma separated). + string CacheConfigurationQueryParameter { get; set; } + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior? CacheConfigurationQueryStringCachingBehavior { get; set; } + /// Resource ID. + string OriginGroupId { get; set; } + /// Protocol this rule will use when forwarding traffic to backends. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? OriginGroupOverrideForwardingProtocol { get; set; } + /// defines the OriginGroup that would override the DefaultOriginGroup on route. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference OriginGroupOverrideOriginGroup { get; set; } + /// Defines the parameters for the action. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParameters Parameter { get; set; } + /// + /// The caching configuration associated with this rule. To disable caching, do not provide a cacheConfiguration object. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration ParameterCacheConfiguration { get; set; } + /// + /// A reference to the origin group override configuration. Leave empty to use the default origin group on route. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride ParameterOriginGroupOverride { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRouteConfigurationOverrideAction.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRouteConfigurationOverrideAction.json.cs new file mode 100644 index 000000000000..2ce4b4dd3f21 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleRouteConfigurationOverrideAction.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Defines the route configuration override action for the delivery rule. Only applicable to Frontdoor Standard/Premium Profiles. + /// + public partial class DeliveryRuleRouteConfigurationOverrideAction + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleRouteConfigurationOverrideAction(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteConfigurationOverrideActionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideAction. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideAction. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleRouteConfigurationOverrideAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleRouteConfigurationOverrideAction(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleAction1?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleServerPortCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleServerPortCondition.PowerShell.cs new file mode 100644 index 000000000000..b256e69a65f1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleServerPortCondition.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the ServerPort condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleServerPortConditionTypeConverter))] + public partial class DeliveryRuleServerPortCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleServerPortCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ServerPortMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleServerPortCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ServerPortMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleServerPortCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleServerPortCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the ServerPort condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleServerPortConditionTypeConverter))] + public partial interface IDeliveryRuleServerPortCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleServerPortCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleServerPortCondition.TypeConverter.cs new file mode 100644 index 000000000000..3fe192564d2a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleServerPortCondition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleServerPortConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleServerPortCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleServerPortCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleServerPortCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleServerPortCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleServerPortCondition.cs new file mode 100644 index 000000000000..b49ee62942aa --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleServerPortCondition.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the ServerPort condition for the delivery rule. + public partial class DeliveryRuleServerPortCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ServerPortMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ServerPortMatchConditionParameters()); set => this._parameter = value; } + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)Parameter).Operator = value ; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleServerPortCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the ServerPort condition for the delivery rule. + public partial interface IDeliveryRuleServerPortCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator ParameterOperator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the ServerPort condition for the delivery rule. + internal partial interface IDeliveryRuleServerPortConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParameters Parameter { get; set; } + /// The match value for the condition of the delivery rule + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator ParameterOperator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleServerPortCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleServerPortCondition.json.cs new file mode 100644 index 000000000000..5b6631e5d418 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleServerPortCondition.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the ServerPort condition for the delivery rule. + public partial class DeliveryRuleServerPortCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleServerPortCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ServerPortMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleServerPortCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleServerPortCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSocketAddrCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSocketAddrCondition.PowerShell.cs new file mode 100644 index 000000000000..661b4884ad07 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSocketAddrCondition.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the SocketAddress condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleSocketAddrConditionTypeConverter))] + public partial class DeliveryRuleSocketAddrCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleSocketAddrCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SocketAddrMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleSocketAddrCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SocketAddrMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleSocketAddrCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleSocketAddrCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the SocketAddress condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleSocketAddrConditionTypeConverter))] + public partial interface IDeliveryRuleSocketAddrCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSocketAddrCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSocketAddrCondition.TypeConverter.cs new file mode 100644 index 000000000000..02346b296681 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSocketAddrCondition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleSocketAddrConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleSocketAddrCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleSocketAddrCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleSocketAddrCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSocketAddrCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSocketAddrCondition.cs new file mode 100644 index 000000000000..327ddb2b7266 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSocketAddrCondition.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the SocketAddress condition for the delivery rule. + public partial class DeliveryRuleSocketAddrCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SocketAddrMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SocketAddrMatchConditionParameters()); set => this._parameter = value; } + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)Parameter).Operator = value ; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleSocketAddrCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the SocketAddress condition for the delivery rule. + public partial interface IDeliveryRuleSocketAddrCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator ParameterOperator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the SocketAddress condition for the delivery rule. + internal partial interface IDeliveryRuleSocketAddrConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParameters Parameter { get; set; } + /// The match value for the condition of the delivery rule + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator ParameterOperator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSocketAddrCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSocketAddrCondition.json.cs new file mode 100644 index 000000000000..c958492c3ad8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSocketAddrCondition.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the SocketAddress condition for the delivery rule. + public partial class DeliveryRuleSocketAddrCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleSocketAddrCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SocketAddrMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSocketAddrCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleSocketAddrCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSslProtocolCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSslProtocolCondition.PowerShell.cs new file mode 100644 index 000000000000..45de5bc43af9 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSslProtocolCondition.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the SslProtocol condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleSslProtocolConditionTypeConverter))] + public partial class DeliveryRuleSslProtocolCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleSslProtocolCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SslProtocolMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterOperator = (string) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterOperator, global::System.Convert.ToString); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterMatchValue = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol.CreateFrom)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleSslProtocolCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SslProtocolMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterOperator = (string) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterOperator, global::System.Convert.ToString); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterMatchValue = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol.CreateFrom)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleSslProtocolCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleSslProtocolCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the SslProtocol condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleSslProtocolConditionTypeConverter))] + public partial interface IDeliveryRuleSslProtocolCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSslProtocolCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSslProtocolCondition.TypeConverter.cs new file mode 100644 index 000000000000..5d68921e6c76 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSslProtocolCondition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleSslProtocolConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleSslProtocolCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleSslProtocolCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleSslProtocolCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSslProtocolCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSslProtocolCondition.cs new file mode 100644 index 000000000000..2bf73612a645 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSslProtocolCondition.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the SslProtocol condition for the delivery rule. + public partial class DeliveryRuleSslProtocolCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SslProtocolMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterOperator + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal.ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)Parameter).Operator = value; } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SslProtocolMatchConditionParameters()); set => this._parameter = value; } + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)Parameter).Operator; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleSslProtocolCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the SslProtocol condition for the delivery rule. + public partial interface IDeliveryRuleSslProtocolCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(string) })] + string ParameterOperator { get; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the SslProtocol condition for the delivery rule. + internal partial interface IDeliveryRuleSslProtocolConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParameters Parameter { get; set; } + /// The match value for the condition of the delivery rule + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + string ParameterOperator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSslProtocolCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSslProtocolCondition.json.cs new file mode 100644 index 000000000000..41192dab918d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleSslProtocolCondition.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the SslProtocol condition for the delivery rule. + public partial class DeliveryRuleSslProtocolCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleSslProtocolCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SslProtocolMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleSslProtocolCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleSslProtocolCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileExtensionCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileExtensionCondition.PowerShell.cs new file mode 100644 index 000000000000..8054953d1e3f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileExtensionCondition.PowerShell.cs @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the UrlFileExtension condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleUrlFileExtensionConditionTypeConverter))] + public partial class DeliveryRuleUrlFileExtensionCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleUrlFileExtensionCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlFileExtensionMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleUrlFileExtensionCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlFileExtensionMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleUrlFileExtensionCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleUrlFileExtensionCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the UrlFileExtension condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleUrlFileExtensionConditionTypeConverter))] + public partial interface IDeliveryRuleUrlFileExtensionCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileExtensionCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileExtensionCondition.TypeConverter.cs new file mode 100644 index 000000000000..7d178615bd7a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileExtensionCondition.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleUrlFileExtensionConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleUrlFileExtensionCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleUrlFileExtensionCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleUrlFileExtensionCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileExtensionCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileExtensionCondition.cs new file mode 100644 index 000000000000..2eaa742eb324 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileExtensionCondition.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the UrlFileExtension condition for the delivery rule. + public partial class DeliveryRuleUrlFileExtensionCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlFileExtensionMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlFileExtensionMatchConditionParameters()); set => this._parameter = value; } + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)Parameter).Operator = value ; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleUrlFileExtensionCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the UrlFileExtension condition for the delivery rule. + public partial interface IDeliveryRuleUrlFileExtensionCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator ParameterOperator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the UrlFileExtension condition for the delivery rule. + internal partial interface IDeliveryRuleUrlFileExtensionConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParameters Parameter { get; set; } + /// The match value for the condition of the delivery rule + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator ParameterOperator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileExtensionCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileExtensionCondition.json.cs new file mode 100644 index 000000000000..c0055de9c784 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileExtensionCondition.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the UrlFileExtension condition for the delivery rule. + public partial class DeliveryRuleUrlFileExtensionCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleUrlFileExtensionCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlFileExtensionMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileExtensionCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleUrlFileExtensionCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileNameCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileNameCondition.PowerShell.cs new file mode 100644 index 000000000000..6567c0feb9cf --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileNameCondition.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the UrlFileName condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleUrlFileNameConditionTypeConverter))] + public partial class DeliveryRuleUrlFileNameCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleUrlFileNameCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlFileNameMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleUrlFileNameCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlFileNameMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleUrlFileNameCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleUrlFileNameCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the UrlFileName condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleUrlFileNameConditionTypeConverter))] + public partial interface IDeliveryRuleUrlFileNameCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileNameCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileNameCondition.TypeConverter.cs new file mode 100644 index 000000000000..b3b9ceef3186 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileNameCondition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleUrlFileNameConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleUrlFileNameCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleUrlFileNameCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleUrlFileNameCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileNameCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileNameCondition.cs new file mode 100644 index 000000000000..e39e611a54b4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileNameCondition.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the UrlFileName condition for the delivery rule. + public partial class DeliveryRuleUrlFileNameCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlFileNameMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlFileNameMatchConditionParameters()); set => this._parameter = value; } + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)Parameter).Operator = value ; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleUrlFileNameCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the UrlFileName condition for the delivery rule. + public partial interface IDeliveryRuleUrlFileNameCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator ParameterOperator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the UrlFileName condition for the delivery rule. + internal partial interface IDeliveryRuleUrlFileNameConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParameters Parameter { get; set; } + /// The match value for the condition of the delivery rule + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator ParameterOperator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileNameCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileNameCondition.json.cs new file mode 100644 index 000000000000..a12cf1e1930b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlFileNameCondition.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the UrlFileName condition for the delivery rule. + public partial class DeliveryRuleUrlFileNameCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleUrlFileNameCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlFileNameMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlFileNameCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleUrlFileNameCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlPathCondition.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlPathCondition.PowerShell.cs new file mode 100644 index 000000000000..c533e4622c11 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlPathCondition.PowerShell.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the UrlPath condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleUrlPathConditionTypeConverter))] + public partial class DeliveryRuleUrlPathCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DeliveryRuleUrlPathCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlPathMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DeliveryRuleUrlPathCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlPathMatchConditionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterOperator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterOperator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator) content.GetValueForProperty("ParameterOperator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterOperator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator.CreateFrom); + } + if (content.Contains("ParameterNegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterNegateCondition = (bool?) content.GetValueForProperty("ParameterNegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterNegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ParameterMatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterMatchValue = (string[]) content.GetValueForProperty("ParameterMatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterMatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ParameterTransform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterTransform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("ParameterTransform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal)this).ParameterTransform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DeliveryRuleUrlPathCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DeliveryRuleUrlPathCondition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the UrlPath condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(DeliveryRuleUrlPathConditionTypeConverter))] + public partial interface IDeliveryRuleUrlPathCondition + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlPathCondition.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlPathCondition.TypeConverter.cs new file mode 100644 index 000000000000..e25301bc572b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlPathCondition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DeliveryRuleUrlPathConditionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathCondition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathCondition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DeliveryRuleUrlPathCondition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DeliveryRuleUrlPathCondition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DeliveryRuleUrlPathCondition.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlPathCondition.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlPathCondition.cs new file mode 100644 index 000000000000..b3897591749e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlPathCondition.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the UrlPath condition for the delivery rule. + public partial class DeliveryRuleUrlPathCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathCondition, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlPathMatchConditionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathConditionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)Parameter).TypeName = value; } + + /// The name of the condition for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal)__deliveryRuleCondition).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParameters _parameter; + + /// Defines the parameters for the condition. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlPathMatchConditionParameters()); set => this._parameter = value; } + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ParameterMatchValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)Parameter).MatchValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)Parameter).MatchValue = value ?? null /* arrayOf */; } + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterNegateCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)Parameter).NegateCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)Parameter).NegateCondition = value ?? default(bool); } + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator ParameterOperator { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)Parameter).Operator; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)Parameter).Operator = value ; } + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)Parameter).Transform; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)Parameter).Transform = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public DeliveryRuleUrlPathCondition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleCondition), __deliveryRuleCondition); + } + } + /// Defines the UrlPath condition for the delivery rule. + public partial interface IDeliveryRuleUrlPathCondition : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator ParameterOperator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the UrlPath condition for the delivery rule. + internal partial interface IDeliveryRuleUrlPathConditionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleConditionInternal + { + /// Defines the parameters for the condition. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParameters Parameter { get; set; } + /// The match value for the condition of the delivery rule + string[] ParameterMatchValue { get; set; } + /// Describes if this is negate condition or not + bool? ParameterNegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator ParameterOperator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] ParameterTransform { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlPathCondition.json.cs b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlPathCondition.json.cs new file mode 100644 index 000000000000..216454c131a0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DeliveryRuleUrlPathCondition.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the UrlPath condition for the delivery rule. + public partial class DeliveryRuleUrlPathCondition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DeliveryRuleUrlPathCondition(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleCondition = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlPathMatchConditionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathCondition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathCondition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleUrlPathCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DeliveryRuleUrlPathCondition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleCondition?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DimensionProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DimensionProperties.PowerShell.cs new file mode 100644 index 000000000000..0d10da0ec68e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DimensionProperties.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Type of operation: get, read, delete, etc. + [System.ComponentModel.TypeConverter(typeof(DimensionPropertiesTypeConverter))] + public partial class DimensionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DimensionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DimensionProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DimensionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionPropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionPropertiesInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("InternalName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionPropertiesInternal)this).InternalName = (string) content.GetValueForProperty("InternalName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionPropertiesInternal)this).InternalName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DimensionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionPropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionPropertiesInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("InternalName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionPropertiesInternal)this).InternalName = (string) content.GetValueForProperty("InternalName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionPropertiesInternal)this).InternalName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Type of operation: get, read, delete, etc. + [System.ComponentModel.TypeConverter(typeof(DimensionPropertiesTypeConverter))] + public partial interface IDimensionProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DimensionProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DimensionProperties.TypeConverter.cs new file mode 100644 index 000000000000..7eb031662d30 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DimensionProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DimensionPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DimensionProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DimensionProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DimensionProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DimensionProperties.cs b/src/Cdn/generated/api/Models/Api20210601/DimensionProperties.cs new file mode 100644 index 000000000000..6016b699b6d8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DimensionProperties.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Type of operation: get, read, delete, etc. + public partial class DimensionProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionPropertiesInternal + { + + /// Backing field for property. + private string _displayName; + + /// Display name of dimension. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private string _internalName; + + /// Internal name of dimension. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string InternalName { get => this._internalName; set => this._internalName = value; } + + /// Backing field for property. + private string _name; + + /// Name of dimension. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Creates an new instance. + public DimensionProperties() + { + + } + } + /// Type of operation: get, read, delete, etc. + public partial interface IDimensionProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Display name of dimension. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display name of dimension.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Internal name of dimension. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Internal name of dimension.", + SerializedName = @"internalName", + PossibleTypes = new [] { typeof(string) })] + string InternalName { get; set; } + /// Name of dimension. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of dimension.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + + } + /// Type of operation: get, read, delete, etc. + internal partial interface IDimensionPropertiesInternal + + { + /// Display name of dimension. + string DisplayName { get; set; } + /// Internal name of dimension. + string InternalName { get; set; } + /// Name of dimension. + string Name { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DimensionProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/DimensionProperties.json.cs new file mode 100644 index 000000000000..129482b4c534 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DimensionProperties.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Type of operation: get, read, delete, etc. + public partial class DimensionProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DimensionProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_internalName = If( json?.PropertyT("internalName"), out var __jsonInternalName) ? (string)__jsonInternalName : (string)InternalName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DimensionProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AddIf( null != (((object)this._internalName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._internalName.ToString()) : null, "internalName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DomainValidationProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/DomainValidationProperties.PowerShell.cs new file mode 100644 index 000000000000..396df50b0815 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DomainValidationProperties.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties to validate a domain. + [System.ComponentModel.TypeConverter(typeof(DomainValidationPropertiesTypeConverter))] + public partial class DomainValidationProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DomainValidationProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DomainValidationProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DomainValidationProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ValidationToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationPropertiesInternal)this).ValidationToken = (string) content.GetValueForProperty("ValidationToken",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationPropertiesInternal)this).ValidationToken, global::System.Convert.ToString); + } + if (content.Contains("ExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationPropertiesInternal)this).ExpirationDate = (string) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationPropertiesInternal)this).ExpirationDate, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DomainValidationProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ValidationToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationPropertiesInternal)this).ValidationToken = (string) content.GetValueForProperty("ValidationToken",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationPropertiesInternal)this).ValidationToken, global::System.Convert.ToString); + } + if (content.Contains("ExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationPropertiesInternal)this).ExpirationDate = (string) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationPropertiesInternal)this).ExpirationDate, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties to validate a domain. + [System.ComponentModel.TypeConverter(typeof(DomainValidationPropertiesTypeConverter))] + public partial interface IDomainValidationProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DomainValidationProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/DomainValidationProperties.TypeConverter.cs new file mode 100644 index 000000000000..10dc92a84707 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DomainValidationProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DomainValidationPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DomainValidationProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DomainValidationProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DomainValidationProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DomainValidationProperties.cs b/src/Cdn/generated/api/Models/Api20210601/DomainValidationProperties.cs new file mode 100644 index 000000000000..d5a5fe89e785 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DomainValidationProperties.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties to validate a domain. + public partial class DomainValidationProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationPropertiesInternal + { + + /// Backing field for property. + private string _expirationDate; + + /// The date time that the token expires + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ExpirationDate { get => this._expirationDate; } + + /// Internal Acessors for ExpirationDate + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationPropertiesInternal.ExpirationDate { get => this._expirationDate; set { {_expirationDate = value;} } } + + /// Internal Acessors for ValidationToken + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationPropertiesInternal.ValidationToken { get => this._validationToken; set { {_validationToken = value;} } } + + /// Backing field for property. + private string _validationToken; + + /// Challenge used for DNS TXT record or file based validation + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ValidationToken { get => this._validationToken; } + + /// Creates an new instance. + public DomainValidationProperties() + { + + } + } + /// The JSON object that contains the properties to validate a domain. + public partial interface IDomainValidationProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The date time that the token expires + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date time that the token expires", + SerializedName = @"expirationDate", + PossibleTypes = new [] { typeof(string) })] + string ExpirationDate { get; } + /// Challenge used for DNS TXT record or file based validation + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Challenge used for DNS TXT record or file based validation", + SerializedName = @"validationToken", + PossibleTypes = new [] { typeof(string) })] + string ValidationToken { get; } + + } + /// The JSON object that contains the properties to validate a domain. + internal partial interface IDomainValidationPropertiesInternal + + { + /// The date time that the token expires + string ExpirationDate { get; set; } + /// Challenge used for DNS TXT record or file based validation + string ValidationToken { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/DomainValidationProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/DomainValidationProperties.json.cs new file mode 100644 index 000000000000..437adf9d75c8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/DomainValidationProperties.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties to validate a domain. + public partial class DomainValidationProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal DomainValidationProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_validationToken = If( json?.PropertyT("validationToken"), out var __jsonValidationToken) ? (string)__jsonValidationToken : (string)ValidationToken;} + {_expirationDate = If( json?.PropertyT("expirationDate"), out var __jsonExpirationDate) ? (string)__jsonExpirationDate : (string)ExpirationDate;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDomainValidationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new DomainValidationProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._validationToken)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._validationToken.ToString()) : null, "validationToken" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._expirationDate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._expirationDate.ToString()) : null, "expirationDate" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EdgeNode.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/EdgeNode.PowerShell.cs new file mode 100644 index 000000000000..cad8f39c52d2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EdgeNode.PowerShell.cs @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users. + /// + [System.ComponentModel.TypeConverter(typeof(EdgeNodeTypeConverter))] + public partial class EdgeNode + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EdgeNode(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EdgeNode(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EdgeNode(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EdgeNodePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("IPAddressGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeInternal)this).IPAddressGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup[]) content.GetValueForProperty("IPAddressGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeInternal)this).IPAddressGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPAddressGroupTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EdgeNode(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EdgeNodePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("IPAddressGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeInternal)this).IPAddressGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup[]) content.GetValueForProperty("IPAddressGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeInternal)this).IPAddressGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPAddressGroupTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users. + [System.ComponentModel.TypeConverter(typeof(EdgeNodeTypeConverter))] + public partial interface IEdgeNode + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EdgeNode.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/EdgeNode.TypeConverter.cs new file mode 100644 index 000000000000..1fda1690f11b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EdgeNode.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EdgeNodeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EdgeNode.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EdgeNode.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EdgeNode.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EdgeNode.cs b/src/Cdn/generated/api/Models/Api20210601/EdgeNode.cs new file mode 100644 index 000000000000..9cfe2253f99c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EdgeNode.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users. + /// + public partial class EdgeNode : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(); + + /// List of ip address groups. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup[] IPAddressGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodePropertiesInternal)Property).IPAddressGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodePropertiesInternal)Property).IPAddressGroup = value ?? null /* arrayOf */; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EdgeNodeProperties()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type = value; } + + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeProperties _property; + + /// The JSON object that contains the properties required to create an edgenode. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EdgeNodeProperties()); set => this._property = value; } + + /// Read only system data + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public EdgeNode() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users. + public partial interface IEdgeNode : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource + { + /// List of ip address groups. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of ip address groups.", + SerializedName = @"ipAddressGroups", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup[] IPAddressGroup { get; set; } + + } + /// Edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users. + internal partial interface IEdgeNodeInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal + { + /// List of ip address groups. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup[] IPAddressGroup { get; set; } + /// The JSON object that contains the properties required to create an edgenode. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EdgeNode.json.cs b/src/Cdn/generated/api/Models/Api20210601/EdgeNode.json.cs new file mode 100644 index 000000000000..ce54256c7da8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EdgeNode.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users. + /// + public partial class EdgeNode + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal EdgeNode(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EdgeNodeProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new EdgeNode(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EdgeNodeProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/EdgeNodeProperties.PowerShell.cs new file mode 100644 index 000000000000..2b8fbcf813f3 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EdgeNodeProperties.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties required to create an edgenode. + [System.ComponentModel.TypeConverter(typeof(EdgeNodePropertiesTypeConverter))] + public partial class EdgeNodeProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EdgeNodeProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EdgeNodeProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EdgeNodeProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IPAddressGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodePropertiesInternal)this).IPAddressGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup[]) content.GetValueForProperty("IPAddressGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodePropertiesInternal)this).IPAddressGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPAddressGroupTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EdgeNodeProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IPAddressGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodePropertiesInternal)this).IPAddressGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup[]) content.GetValueForProperty("IPAddressGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodePropertiesInternal)this).IPAddressGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPAddressGroupTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties required to create an edgenode. + [System.ComponentModel.TypeConverter(typeof(EdgeNodePropertiesTypeConverter))] + public partial interface IEdgeNodeProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EdgeNodeProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/EdgeNodeProperties.TypeConverter.cs new file mode 100644 index 000000000000..14642eec45fd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EdgeNodeProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EdgeNodePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EdgeNodeProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EdgeNodeProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EdgeNodeProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EdgeNodeProperties.cs b/src/Cdn/generated/api/Models/Api20210601/EdgeNodeProperties.cs new file mode 100644 index 000000000000..1f0ef34065e9 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EdgeNodeProperties.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties required to create an edgenode. + public partial class EdgeNodeProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodePropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup[] _iPAddressGroup; + + /// List of ip address groups. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup[] IPAddressGroup { get => this._iPAddressGroup; set => this._iPAddressGroup = value; } + + /// Creates an new instance. + public EdgeNodeProperties() + { + + } + } + /// The JSON object that contains the properties required to create an edgenode. + public partial interface IEdgeNodeProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// List of ip address groups. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"List of ip address groups.", + SerializedName = @"ipAddressGroups", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup[] IPAddressGroup { get; set; } + + } + /// The JSON object that contains the properties required to create an edgenode. + internal partial interface IEdgeNodePropertiesInternal + + { + /// List of ip address groups. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup[] IPAddressGroup { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EdgeNodeProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/EdgeNodeProperties.json.cs new file mode 100644 index 000000000000..53ae31a90c18 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EdgeNodeProperties.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties required to create an edgenode. + public partial class EdgeNodeProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal EdgeNodeProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_iPAddressGroup = If( json?.PropertyT("ipAddressGroups"), out var __jsonIPAddressGroups) ? If( __jsonIPAddressGroups as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPAddressGroup.FromJson(__u) )) ))() : null : IPAddressGroup;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNodeProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new EdgeNodeProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._iPAddressGroup) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._iPAddressGroup ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("ipAddressGroups",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EdgenodeResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/EdgenodeResult.PowerShell.cs new file mode 100644 index 000000000000..6441133c3d97 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EdgenodeResult.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Result of the request to list CDN edgenodes. It contains a list of ip address group and a URL link to get the next set + /// of results. + /// + [System.ComponentModel.TypeConverter(typeof(EdgenodeResultTypeConverter))] + public partial class EdgenodeResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EdgenodeResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EdgenodeResult(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EdgenodeResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EdgeNodeTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EdgenodeResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EdgeNodeTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the request to list CDN edgenodes. It contains a list of ip address group and a URL link to get the next set + /// of results. + [System.ComponentModel.TypeConverter(typeof(EdgenodeResultTypeConverter))] + public partial interface IEdgenodeResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EdgenodeResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/EdgenodeResult.TypeConverter.cs new file mode 100644 index 000000000000..9f2698443c44 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EdgenodeResult.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EdgenodeResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EdgenodeResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EdgenodeResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EdgenodeResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EdgenodeResult.cs b/src/Cdn/generated/api/Models/Api20210601/EdgenodeResult.cs new file mode 100644 index 000000000000..3a07827c85fb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EdgenodeResult.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list CDN edgenodes. It contains a list of ip address group and a URL link to get the next set + /// of results. + /// + public partial class EdgenodeResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResultInternal + { + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of edgenode list results if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode[] _value; + + /// Edge node of CDN service. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode[] Value { get => this._value; } + + /// Creates an new instance. + public EdgenodeResult() + { + + } + } + /// Result of the request to list CDN edgenodes. It contains a list of ip address group and a URL link to get the next set + /// of results. + public partial interface IEdgenodeResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// URL to get the next set of edgenode list results if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL to get the next set of edgenode list results if there are any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// Edge node of CDN service. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Edge node of CDN service.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode[] Value { get; } + + } + /// Result of the request to list CDN edgenodes. It contains a list of ip address group and a URL link to get the next set + /// of results. + internal partial interface IEdgenodeResultInternal + + { + /// URL to get the next set of edgenode list results if there are any. + string NextLink { get; set; } + /// Edge node of CDN service. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EdgenodeResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/EdgenodeResult.json.cs new file mode 100644 index 000000000000..c51e772a1534 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EdgenodeResult.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list CDN edgenodes. It contains a list of ip address group and a URL link to get the next set + /// of results. + /// + public partial class EdgenodeResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal EdgenodeResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EdgeNode.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgenodeResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new EdgenodeResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Endpoint.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/Endpoint.PowerShell.cs new file mode 100644 index 000000000000..254dac2cd684 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Endpoint.PowerShell.cs @@ -0,0 +1,454 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + /// caching and delivery behavior. The CDN endpoint uses the URL format .azureedge.net. + /// + [System.ComponentModel.TypeConverter(typeof(EndpointTypeConverter))] + public partial class Endpoint + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Endpoint(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Endpoint(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Endpoint(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("OptimizationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).OptimizationType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType?) content.GetValueForProperty("OptimizationType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).OptimizationType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType.CreateFrom); + } + if (content.Contains("DefaultOriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DefaultOriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("DefaultOriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DefaultOriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("DeliveryPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DeliveryPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy) content.GetValueForProperty("DeliveryPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DeliveryPolicy, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersDeliveryPolicyTypeConverter.ConvertFrom); + } + if (content.Contains("WebApplicationFirewallPolicyLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).WebApplicationFirewallPolicyLink = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink) content.GetValueForProperty("WebApplicationFirewallPolicyLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).WebApplicationFirewallPolicyLink, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkTypeConverter.ConvertFrom); + } + if (content.Contains("OriginPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).OriginPath = (string) content.GetValueForProperty("OriginPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).OriginPath, global::System.Convert.ToString); + } + if (content.Contains("ContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).ContentTypesToCompress = (string[]) content.GetValueForProperty("ContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).ContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("IsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).IsCompressionEnabled = (bool?) content.GetValueForProperty("IsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).IsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHttpAllowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).IsHttpAllowed = (bool?) content.GetValueForProperty("IsHttpAllowed",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).IsHttpAllowed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHttpsAllowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).IsHttpsAllowed = (bool?) content.GetValueForProperty("IsHttpsAllowed",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).IsHttpsAllowed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("QueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).QueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior?) content.GetValueForProperty("QueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).QueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("ProbePath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).ProbePath = (string) content.GetValueForProperty("ProbePath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).ProbePath, global::System.Convert.ToString); + } + if (content.Contains("GeoFilter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).GeoFilter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[]) content.GetValueForProperty("GeoFilter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).GeoFilter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.GeoFilterTypeConverter.ConvertFrom)); + } + if (content.Contains("UrlSigningKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).UrlSigningKey = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[]) content.GetValueForProperty("UrlSigningKey",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).UrlSigningKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKeyTypeConverter.ConvertFrom)); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin[]) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).Origin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginTypeConverter.ConvertFrom)); + } + if (content.Contains("OriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).OriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup[]) content.GetValueForProperty("OriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).OriginGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).CustomDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[]) content.GetValueForProperty("CustomDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).CustomDomain, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainTypeConverter.ConvertFrom)); + } + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("DefaultOriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DefaultOriginGroupId = (string) content.GetValueForProperty("DefaultOriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DefaultOriginGroupId, global::System.Convert.ToString); + } + if (content.Contains("DeliveryPolicyDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DeliveryPolicyDescription = (string) content.GetValueForProperty("DeliveryPolicyDescription",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DeliveryPolicyDescription, global::System.Convert.ToString); + } + if (content.Contains("DeliveryPolicyRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DeliveryPolicyRule = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[]) content.GetValueForProperty("DeliveryPolicyRule",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DeliveryPolicyRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleTypeConverter.ConvertFrom)); + } + if (content.Contains("WebApplicationFirewallPolicyLinkId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).WebApplicationFirewallPolicyLinkId = (string) content.GetValueForProperty("WebApplicationFirewallPolicyLinkId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).WebApplicationFirewallPolicyLinkId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Endpoint(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("OptimizationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).OptimizationType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType?) content.GetValueForProperty("OptimizationType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).OptimizationType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType.CreateFrom); + } + if (content.Contains("DefaultOriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DefaultOriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("DefaultOriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DefaultOriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("DeliveryPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DeliveryPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy) content.GetValueForProperty("DeliveryPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DeliveryPolicy, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersDeliveryPolicyTypeConverter.ConvertFrom); + } + if (content.Contains("WebApplicationFirewallPolicyLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).WebApplicationFirewallPolicyLink = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink) content.GetValueForProperty("WebApplicationFirewallPolicyLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).WebApplicationFirewallPolicyLink, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkTypeConverter.ConvertFrom); + } + if (content.Contains("OriginPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).OriginPath = (string) content.GetValueForProperty("OriginPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).OriginPath, global::System.Convert.ToString); + } + if (content.Contains("ContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).ContentTypesToCompress = (string[]) content.GetValueForProperty("ContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).ContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("IsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).IsCompressionEnabled = (bool?) content.GetValueForProperty("IsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).IsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHttpAllowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).IsHttpAllowed = (bool?) content.GetValueForProperty("IsHttpAllowed",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).IsHttpAllowed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHttpsAllowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).IsHttpsAllowed = (bool?) content.GetValueForProperty("IsHttpsAllowed",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).IsHttpsAllowed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("QueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).QueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior?) content.GetValueForProperty("QueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).QueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("ProbePath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).ProbePath = (string) content.GetValueForProperty("ProbePath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).ProbePath, global::System.Convert.ToString); + } + if (content.Contains("GeoFilter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).GeoFilter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[]) content.GetValueForProperty("GeoFilter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).GeoFilter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.GeoFilterTypeConverter.ConvertFrom)); + } + if (content.Contains("UrlSigningKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).UrlSigningKey = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[]) content.GetValueForProperty("UrlSigningKey",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).UrlSigningKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKeyTypeConverter.ConvertFrom)); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin[]) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).Origin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginTypeConverter.ConvertFrom)); + } + if (content.Contains("OriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).OriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup[]) content.GetValueForProperty("OriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).OriginGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).CustomDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[]) content.GetValueForProperty("CustomDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).CustomDomain, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainTypeConverter.ConvertFrom)); + } + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("DefaultOriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DefaultOriginGroupId = (string) content.GetValueForProperty("DefaultOriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DefaultOriginGroupId, global::System.Convert.ToString); + } + if (content.Contains("DeliveryPolicyDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DeliveryPolicyDescription = (string) content.GetValueForProperty("DeliveryPolicyDescription",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DeliveryPolicyDescription, global::System.Convert.ToString); + } + if (content.Contains("DeliveryPolicyRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DeliveryPolicyRule = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[]) content.GetValueForProperty("DeliveryPolicyRule",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).DeliveryPolicyRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleTypeConverter.ConvertFrom)); + } + if (content.Contains("WebApplicationFirewallPolicyLinkId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).WebApplicationFirewallPolicyLinkId = (string) content.GetValueForProperty("WebApplicationFirewallPolicyLinkId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal)this).WebApplicationFirewallPolicyLinkId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + /// caching and delivery behavior. The CDN endpoint uses the URL format .azureedge.net. + [System.ComponentModel.TypeConverter(typeof(EndpointTypeConverter))] + public partial interface IEndpoint + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Endpoint.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/Endpoint.TypeConverter.cs new file mode 100644 index 000000000000..e674e90be607 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Endpoint.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EndpointTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Endpoint.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Endpoint.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Endpoint.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Endpoint.cs b/src/Cdn/generated/api/Models/Api20210601/Endpoint.cs new file mode 100644 index 000000000000..d8594b0a3e88 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Endpoint.cs @@ -0,0 +1,568 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + /// caching and delivery behavior. The CDN endpoint uses the URL format .azureedge.net. + /// + public partial class Endpoint : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResource(); + + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ContentTypesToCompress { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).ContentTypesToCompress; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).ContentTypesToCompress = value ?? null /* arrayOf */; } + + /// The custom domains under the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[] CustomDomain { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)Property).CustomDomain; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string DefaultOriginGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DefaultOriginGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DefaultOriginGroupId = value ?? null; } + + /// User-friendly description of the policy. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string DeliveryPolicyDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DeliveryPolicyDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DeliveryPolicyDescription = value ?? null; } + + /// A list of the delivery rules. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] DeliveryPolicyRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DeliveryPolicyRule; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DeliveryPolicyRule = value ?? null /* arrayOf */; } + + /// + /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified + /// path or content, e.g. block APAC for path /pictures/ + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[] GeoFilter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).GeoFilter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).GeoFilter = value ?? null /* arrayOf */; } + + /// + /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string HostName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)Property).HostName; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Id; } + + /// + /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will + /// be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content + /// is smaller than 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? IsCompressionEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).IsCompressionEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).IsCompressionEnabled = value ?? default(bool); } + + /// + /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? IsHttpAllowed { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).IsHttpAllowed; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).IsHttpAllowed = value ?? default(bool); } + + /// + /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? IsHttpsAllowed { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).IsHttpsAllowed; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).IsHttpsAllowed = value ?? default(bool); } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// Internal Acessors for CustomDomain + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal.CustomDomain { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)Property).CustomDomain; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)Property).CustomDomain = value; } + + /// Internal Acessors for DefaultOriginGroup + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal.DefaultOriginGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DefaultOriginGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DefaultOriginGroup = value; } + + /// Internal Acessors for DeliveryPolicy + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal.DeliveryPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DeliveryPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DeliveryPolicy = value; } + + /// Internal Acessors for HostName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal.HostName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)Property).HostName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)Property).HostName = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for ResourceState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal.ResourceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)Property).ResourceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)Property).ResourceState = value; } + + /// Internal Acessors for WebApplicationFirewallPolicyLink + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointInternal.WebApplicationFirewallPolicyLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).WebApplicationFirewallPolicyLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).WebApplicationFirewallPolicyLink = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Type = value; } + + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Name; } + + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this + /// information, CDN can apply scenario driven optimization. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType? OptimizationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).OptimizationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).OptimizationType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType)""); } + + /// The source of the content being delivered via CDN. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin[] Origin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)Property).Origin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)Property).Origin = value ?? null /* arrayOf */; } + + /// + /// The origin groups comprising of origins that are used for load balancing the traffic based on availability. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup[] OriginGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)Property).OriginGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)Property).OriginGroup = value ?? null /* arrayOf */; } + + /// + /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses + /// single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname + /// determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header + /// value to match the origin hostname by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginHostHeader { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).OriginHostHeader; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).OriginHostHeader = value ?? null; } + + /// + /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).OriginPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).OriginPath = value ?? null; } + + /// + /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal + /// routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ProbePath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).ProbePath; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).ProbePath = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointProperties _property; + + /// The JSON object that contains the properties required to create an endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointProperties()); set => this._property = value; } + + /// Provisioning status of the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)Property).ProvisioningState; } + + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching + /// to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior? QueryStringCachingBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).QueryStringCachingBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).QueryStringCachingBehavior = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior)""); } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.FormatTable] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// Resource status of the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState? ResourceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)Property).ResourceState; } + + /// Read only system data + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemData; } + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Type; } + + /// List of keys used to validate the signed URL hashes. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[] UrlSigningKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).UrlSigningKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).UrlSigningKey = value ?? null /* arrayOf */; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string WebApplicationFirewallPolicyLinkId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).WebApplicationFirewallPolicyLinkId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).WebApplicationFirewallPolicyLinkId = value ?? null; } + + /// Creates an new instance. + public Endpoint() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + /// caching and delivery behavior. The CDN endpoint uses the URL format .azureedge.net. + public partial interface IEndpoint : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResource + { + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of content types on which compression applies. The value should be a valid MIME type.", + SerializedName = @"contentTypesToCompress", + PossibleTypes = new [] { typeof(string) })] + string[] ContentTypesToCompress { get; set; } + /// The custom domains under the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The custom domains under the endpoint.", + SerializedName = @"customDomains", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[] CustomDomain { get; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string DefaultOriginGroupId { get; set; } + /// User-friendly description of the policy. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"User-friendly description of the policy.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string DeliveryPolicyDescription { get; set; } + /// A list of the delivery rules. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of the delivery rules.", + SerializedName = @"rules", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] DeliveryPolicyRule { get; set; } + /// + /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified + /// path or content, e.g. block APAC for path /pictures/ + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/", + SerializedName = @"geoFilters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[] GeoFilter { get; set; } + /// + /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; } + /// + /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will + /// be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content + /// is smaller than 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB.", + SerializedName = @"isCompressionEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsCompressionEnabled { get; set; } + /// + /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.", + SerializedName = @"isHttpAllowed", + PossibleTypes = new [] { typeof(bool) })] + bool? IsHttpAllowed { get; set; } + /// + /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.", + SerializedName = @"isHttpsAllowed", + PossibleTypes = new [] { typeof(bool) })] + bool? IsHttpsAllowed { get; set; } + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this + /// information, CDN can apply scenario driven optimization. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization.", + SerializedName = @"optimizationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType? OptimizationType { get; set; } + /// The source of the content being delivered via CDN. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The source of the content being delivered via CDN.", + SerializedName = @"origins", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin[] Origin { get; set; } + /// + /// The origin groups comprising of origins that are used for load balancing the traffic based on availability. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The origin groups comprising of origins that are used for load balancing the traffic based on availability.", + SerializedName = @"originGroups", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup[] OriginGroup { get; set; } + /// + /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses + /// single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname + /// determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header + /// value to match the origin hostname by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default.", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + string OriginHostHeader { get; set; } + /// + /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.", + SerializedName = @"originPath", + PossibleTypes = new [] { typeof(string) })] + string OriginPath { get; set; } + /// + /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal + /// routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin.", + SerializedName = @"probePath", + PossibleTypes = new [] { typeof(string) })] + string ProbePath { get; set; } + /// Provisioning status of the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status of the endpoint.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching + /// to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL.", + SerializedName = @"queryStringCachingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior? QueryStringCachingBehavior { get; set; } + /// Resource status of the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource status of the endpoint.", + SerializedName = @"resourceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState? ResourceState { get; } + /// List of keys used to validate the signed URL hashes. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of keys used to validate the signed URL hashes.", + SerializedName = @"urlSigningKeys", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[] UrlSigningKey { get; set; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string WebApplicationFirewallPolicyLinkId { get; set; } + + } + /// CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + /// caching and delivery behavior. The CDN endpoint uses the URL format .azureedge.net. + internal partial interface IEndpointInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal + { + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + string[] ContentTypesToCompress { get; set; } + /// The custom domains under the endpoint. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[] CustomDomain { get; set; } + /// A reference to the origin group. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference DefaultOriginGroup { get; set; } + /// Resource ID. + string DefaultOriginGroupId { get; set; } + /// A policy that specifies the delivery rules to be used for an endpoint. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy DeliveryPolicy { get; set; } + /// User-friendly description of the policy. + string DeliveryPolicyDescription { get; set; } + /// A list of the delivery rules. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] DeliveryPolicyRule { get; set; } + /// + /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified + /// path or content, e.g. block APAC for path /pictures/ + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[] GeoFilter { get; set; } + /// + /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + /// + string HostName { get; set; } + /// + /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will + /// be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content + /// is smaller than 1 byte or larger than 1 MB. + /// + bool? IsCompressionEnabled { get; set; } + /// + /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + bool? IsHttpAllowed { get; set; } + /// + /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + bool? IsHttpsAllowed { get; set; } + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this + /// information, CDN can apply scenario driven optimization. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType? OptimizationType { get; set; } + /// The source of the content being delivered via CDN. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin[] Origin { get; set; } + /// + /// The origin groups comprising of origins that are used for load balancing the traffic based on availability. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup[] OriginGroup { get; set; } + /// + /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses + /// single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname + /// determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header + /// value to match the origin hostname by default. + /// + string OriginHostHeader { get; set; } + /// + /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + string OriginPath { get; set; } + /// + /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal + /// routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// + string ProbePath { get; set; } + /// The JSON object that contains the properties required to create an endpoint. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointProperties Property { get; set; } + /// Provisioning status of the endpoint. + string ProvisioningState { get; set; } + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching + /// to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior? QueryStringCachingBehavior { get; set; } + /// Resource status of the endpoint. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState? ResourceState { get; set; } + /// List of keys used to validate the signed URL hashes. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[] UrlSigningKey { get; set; } + /// Defines the Web Application Firewall policy for the endpoint (if applicable) + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink WebApplicationFirewallPolicyLink { get; set; } + /// Resource ID. + string WebApplicationFirewallPolicyLinkId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Endpoint.json.cs b/src/Cdn/generated/api/Models/Api20210601/Endpoint.json.cs new file mode 100644 index 000000000000..d0a47314a064 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Endpoint.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + /// caching and delivery behavior. The CDN endpoint uses the URL format .azureedge.net. + /// + public partial class Endpoint + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal Endpoint(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new Endpoint(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointListResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointListResult.PowerShell.cs new file mode 100644 index 000000000000..a8138628b82e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointListResult.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of + /// results. + /// + [System.ComponentModel.TypeConverter(typeof(EndpointListResultTypeConverter))] + public partial class EndpointListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EndpointListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EndpointListResult(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EndpointListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EndpointListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of + /// results. + [System.ComponentModel.TypeConverter(typeof(EndpointListResultTypeConverter))] + public partial interface IEndpointListResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointListResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointListResult.TypeConverter.cs new file mode 100644 index 000000000000..a54544031601 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EndpointListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EndpointListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EndpointListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EndpointListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointListResult.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointListResult.cs new file mode 100644 index 000000000000..6d9f48324c86 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointListResult.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of + /// results. + /// + public partial class EndpointListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResultInternal + { + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of endpoint objects if there is any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint[] _value; + + /// List of CDN endpoints within a profile + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint[] Value { get => this._value; } + + /// Creates an new instance. + public EndpointListResult() + { + + } + } + /// Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of + /// results. + public partial interface IEndpointListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// URL to get the next set of endpoint objects if there is any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL to get the next set of endpoint objects if there is any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// List of CDN endpoints within a profile + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of CDN endpoints within a profile", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint[] Value { get; } + + } + /// Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of + /// results. + internal partial interface IEndpointListResultInternal + + { + /// URL to get the next set of endpoint objects if there is any. + string NextLink { get; set; } + /// List of CDN endpoints within a profile + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointListResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointListResult.json.cs new file mode 100644 index 000000000000..d63f73e14570 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointListResult.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of + /// results. + /// + public partial class EndpointListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal EndpointListResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Endpoint.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new EndpointListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointProperties.PowerShell.cs new file mode 100644 index 000000000000..4731e4701519 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointProperties.PowerShell.cs @@ -0,0 +1,346 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties required to create an endpoint. + [System.ComponentModel.TypeConverter(typeof(EndpointPropertiesTypeConverter))] + public partial class EndpointProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EndpointProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EndpointProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EndpointProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin[]) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).Origin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginTypeConverter.ConvertFrom)); + } + if (content.Contains("OriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).OriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup[]) content.GetValueForProperty("OriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).OriginGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).CustomDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[]) content.GetValueForProperty("CustomDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).CustomDomain, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainTypeConverter.ConvertFrom)); + } + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("DefaultOriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DefaultOriginGroupId = (string) content.GetValueForProperty("DefaultOriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DefaultOriginGroupId, global::System.Convert.ToString); + } + if (content.Contains("DeliveryPolicyDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicyDescription = (string) content.GetValueForProperty("DeliveryPolicyDescription",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicyDescription, global::System.Convert.ToString); + } + if (content.Contains("DeliveryPolicyRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicyRule = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[]) content.GetValueForProperty("DeliveryPolicyRule",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicyRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleTypeConverter.ConvertFrom)); + } + if (content.Contains("WebApplicationFirewallPolicyLinkId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).WebApplicationFirewallPolicyLinkId = (string) content.GetValueForProperty("WebApplicationFirewallPolicyLinkId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).WebApplicationFirewallPolicyLinkId, global::System.Convert.ToString); + } + if (content.Contains("DefaultOriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DefaultOriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("DefaultOriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DefaultOriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("DeliveryPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy) content.GetValueForProperty("DeliveryPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicy, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersDeliveryPolicyTypeConverter.ConvertFrom); + } + if (content.Contains("WebApplicationFirewallPolicyLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).WebApplicationFirewallPolicyLink = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink) content.GetValueForProperty("WebApplicationFirewallPolicyLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).WebApplicationFirewallPolicyLink, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkTypeConverter.ConvertFrom); + } + if (content.Contains("OriginPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OriginPath = (string) content.GetValueForProperty("OriginPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OriginPath, global::System.Convert.ToString); + } + if (content.Contains("ContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).ContentTypesToCompress = (string[]) content.GetValueForProperty("ContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).ContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("IsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsCompressionEnabled = (bool?) content.GetValueForProperty("IsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHttpAllowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsHttpAllowed = (bool?) content.GetValueForProperty("IsHttpAllowed",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsHttpAllowed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHttpsAllowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsHttpsAllowed = (bool?) content.GetValueForProperty("IsHttpsAllowed",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsHttpsAllowed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("QueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).QueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior?) content.GetValueForProperty("QueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).QueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("OptimizationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OptimizationType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType?) content.GetValueForProperty("OptimizationType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OptimizationType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType.CreateFrom); + } + if (content.Contains("ProbePath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).ProbePath = (string) content.GetValueForProperty("ProbePath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).ProbePath, global::System.Convert.ToString); + } + if (content.Contains("GeoFilter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).GeoFilter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[]) content.GetValueForProperty("GeoFilter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).GeoFilter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.GeoFilterTypeConverter.ConvertFrom)); + } + if (content.Contains("UrlSigningKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).UrlSigningKey = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[]) content.GetValueForProperty("UrlSigningKey",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).UrlSigningKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKeyTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EndpointProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin[]) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).Origin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginTypeConverter.ConvertFrom)); + } + if (content.Contains("OriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).OriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup[]) content.GetValueForProperty("OriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).OriginGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).CustomDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[]) content.GetValueForProperty("CustomDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).CustomDomain, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainTypeConverter.ConvertFrom)); + } + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("DefaultOriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DefaultOriginGroupId = (string) content.GetValueForProperty("DefaultOriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DefaultOriginGroupId, global::System.Convert.ToString); + } + if (content.Contains("DeliveryPolicyDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicyDescription = (string) content.GetValueForProperty("DeliveryPolicyDescription",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicyDescription, global::System.Convert.ToString); + } + if (content.Contains("DeliveryPolicyRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicyRule = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[]) content.GetValueForProperty("DeliveryPolicyRule",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicyRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleTypeConverter.ConvertFrom)); + } + if (content.Contains("WebApplicationFirewallPolicyLinkId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).WebApplicationFirewallPolicyLinkId = (string) content.GetValueForProperty("WebApplicationFirewallPolicyLinkId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).WebApplicationFirewallPolicyLinkId, global::System.Convert.ToString); + } + if (content.Contains("DefaultOriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DefaultOriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("DefaultOriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DefaultOriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("DeliveryPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy) content.GetValueForProperty("DeliveryPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicy, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersDeliveryPolicyTypeConverter.ConvertFrom); + } + if (content.Contains("WebApplicationFirewallPolicyLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).WebApplicationFirewallPolicyLink = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink) content.GetValueForProperty("WebApplicationFirewallPolicyLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).WebApplicationFirewallPolicyLink, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkTypeConverter.ConvertFrom); + } + if (content.Contains("OriginPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OriginPath = (string) content.GetValueForProperty("OriginPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OriginPath, global::System.Convert.ToString); + } + if (content.Contains("ContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).ContentTypesToCompress = (string[]) content.GetValueForProperty("ContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).ContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("IsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsCompressionEnabled = (bool?) content.GetValueForProperty("IsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHttpAllowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsHttpAllowed = (bool?) content.GetValueForProperty("IsHttpAllowed",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsHttpAllowed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHttpsAllowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsHttpsAllowed = (bool?) content.GetValueForProperty("IsHttpsAllowed",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsHttpsAllowed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("QueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).QueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior?) content.GetValueForProperty("QueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).QueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("OptimizationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OptimizationType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType?) content.GetValueForProperty("OptimizationType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OptimizationType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType.CreateFrom); + } + if (content.Contains("ProbePath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).ProbePath = (string) content.GetValueForProperty("ProbePath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).ProbePath, global::System.Convert.ToString); + } + if (content.Contains("GeoFilter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).GeoFilter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[]) content.GetValueForProperty("GeoFilter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).GeoFilter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.GeoFilterTypeConverter.ConvertFrom)); + } + if (content.Contains("UrlSigningKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).UrlSigningKey = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[]) content.GetValueForProperty("UrlSigningKey",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).UrlSigningKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKeyTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties required to create an endpoint. + [System.ComponentModel.TypeConverter(typeof(EndpointPropertiesTypeConverter))] + public partial interface IEndpointProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointProperties.TypeConverter.cs new file mode 100644 index 000000000000..985987ecc6e6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EndpointPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EndpointProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EndpointProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EndpointProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointProperties.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointProperties.cs new file mode 100644 index 000000000000..f2f7bb938810 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointProperties.cs @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties required to create an endpoint. + public partial class EndpointProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParameters __endpointPropertiesUpdateParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParameters(); + + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string[] ContentTypesToCompress { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).ContentTypesToCompress; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).ContentTypesToCompress = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[] _customDomain; + + /// The custom domains under the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[] CustomDomain { get => this._customDomain; } + + /// A reference to the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference DefaultOriginGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).DefaultOriginGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).DefaultOriginGroup = value ?? null /* model class */; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string DefaultOriginGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).DefaultOriginGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).DefaultOriginGroupId = value ?? null; } + + /// A policy that specifies the delivery rules to be used for an endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy DeliveryPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).DeliveryPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).DeliveryPolicy = value ?? null /* model class */; } + + /// User-friendly description of the policy. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string DeliveryPolicyDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).DeliveryPolicyDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).DeliveryPolicyDescription = value ?? null; } + + /// A list of the delivery rules. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] DeliveryPolicyRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).DeliveryPolicyRule; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).DeliveryPolicyRule = value ?? null /* arrayOf */; } + + /// + /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified + /// path or content, e.g. block APAC for path /pictures/ + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[] GeoFilter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).GeoFilter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).GeoFilter = value ?? null /* arrayOf */; } + + /// Backing field for property. + private string _hostName; + + /// + /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string HostName { get => this._hostName; } + + /// + /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will + /// be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content + /// is smaller than 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public bool? IsCompressionEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).IsCompressionEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).IsCompressionEnabled = value ?? default(bool); } + + /// + /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public bool? IsHttpAllowed { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).IsHttpAllowed; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).IsHttpAllowed = value ?? default(bool); } + + /// + /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public bool? IsHttpsAllowed { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).IsHttpsAllowed; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).IsHttpsAllowed = value ?? default(bool); } + + /// Internal Acessors for CustomDomain + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal.CustomDomain { get => this._customDomain; set { {_customDomain = value;} } } + + /// Internal Acessors for HostName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal.HostName { get => this._hostName; set { {_hostName = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for ResourceState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesInternal.ResourceState { get => this._resourceState; set { {_resourceState = value;} } } + + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this + /// information, CDN can apply scenario driven optimization. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType? OptimizationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).OptimizationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).OptimizationType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin[] _origin; + + /// The source of the content being delivered via CDN. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin[] Origin { get => this._origin; set => this._origin = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup[] _originGroup; + + /// + /// The origin groups comprising of origins that are used for load balancing the traffic based on availability. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup[] OriginGroup { get => this._originGroup; set => this._originGroup = value; } + + /// + /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses + /// single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname + /// determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header + /// value to match the origin hostname by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string OriginHostHeader { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).OriginHostHeader; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).OriginHostHeader = value ?? null; } + + /// + /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string OriginPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).OriginPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).OriginPath = value ?? null; } + + /// + /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal + /// routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string ProbePath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).ProbePath; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).ProbePath = value ?? null; } + + /// Backing field for property. + private string _provisioningState; + + /// Provisioning status of the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching + /// to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior? QueryStringCachingBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).QueryStringCachingBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).QueryStringCachingBehavior = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState? _resourceState; + + /// Resource status of the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState? ResourceState { get => this._resourceState; } + + /// List of keys used to validate the signed URL hashes. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[] UrlSigningKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).UrlSigningKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).UrlSigningKey = value ?? null /* arrayOf */; } + + /// Defines the Web Application Firewall policy for the endpoint (if applicable) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink WebApplicationFirewallPolicyLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).WebApplicationFirewallPolicyLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).WebApplicationFirewallPolicyLink = value ?? null /* model class */; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string WebApplicationFirewallPolicyLinkId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).WebApplicationFirewallPolicyLinkId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)__endpointPropertiesUpdateParameters).WebApplicationFirewallPolicyLinkId = value ?? null; } + + /// Creates an new instance. + public EndpointProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__endpointPropertiesUpdateParameters), __endpointPropertiesUpdateParameters); + await eventListener.AssertObjectIsValid(nameof(__endpointPropertiesUpdateParameters), __endpointPropertiesUpdateParameters); + } + } + /// The JSON object that contains the properties required to create an endpoint. + public partial interface IEndpointProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParameters + { + /// The custom domains under the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The custom domains under the endpoint.", + SerializedName = @"customDomains", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[] CustomDomain { get; } + /// + /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; } + /// The source of the content being delivered via CDN. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The source of the content being delivered via CDN.", + SerializedName = @"origins", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin[] Origin { get; set; } + /// + /// The origin groups comprising of origins that are used for load balancing the traffic based on availability. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The origin groups comprising of origins that are used for load balancing the traffic based on availability.", + SerializedName = @"originGroups", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup[] OriginGroup { get; set; } + /// Provisioning status of the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status of the endpoint.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// Resource status of the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource status of the endpoint.", + SerializedName = @"resourceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState? ResourceState { get; } + + } + /// The JSON object that contains the properties required to create an endpoint. + internal partial interface IEndpointPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal + { + /// The custom domains under the endpoint. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain[] CustomDomain { get; set; } + /// + /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + /// + string HostName { get; set; } + /// The source of the content being delivered via CDN. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin[] Origin { get; set; } + /// + /// The origin groups comprising of origins that are used for load balancing the traffic based on availability. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup[] OriginGroup { get; set; } + /// Provisioning status of the endpoint. + string ProvisioningState { get; set; } + /// Resource status of the endpoint. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState? ResourceState { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointProperties.json.cs new file mode 100644 index 000000000000..58e51929f1bf --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointProperties.json.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties required to create an endpoint. + public partial class EndpointProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal EndpointProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __endpointPropertiesUpdateParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParameters(json); + {_hostName = If( json?.PropertyT("hostName"), out var __jsonHostName) ? (string)__jsonHostName : (string)HostName;} + {_origin = If( json?.PropertyT("origins"), out var __jsonOrigins) ? If( __jsonOrigins as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOrigin.FromJson(__u) )) ))() : null : Origin;} + {_originGroup = If( json?.PropertyT("originGroups"), out var __jsonOriginGroups) ? If( __jsonOriginGroups as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeepCreatedOriginGroup.FromJson(__p) )) ))() : null : OriginGroup;} + {_customDomain = If( json?.PropertyT("customDomains"), out var __jsonCustomDomains) ? If( __jsonCustomDomains as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomain.FromJson(__k) )) ))() : null : CustomDomain;} + {_resourceState = If( json?.PropertyT("resourceState"), out var __jsonResourceState) ? (string)__jsonResourceState : (string)ResourceState;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new EndpointProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __endpointPropertiesUpdateParameters?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._hostName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._hostName.ToString()) : null, "hostName" ,container.Add ); + } + if (null != this._origin) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._origin ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("origins",__w); + } + if (null != this._originGroup) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._originGroup ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("originGroups",__r); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._customDomain) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __n in this._customDomain ) + { + AddIf(__n?.ToJson(null, serializationMode) ,__m.Add); + } + container.Add("customDomains",__m); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._resourceState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._resourceState.ToString()) : null, "resourceState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..4624b29190c4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParameters.PowerShell.cs @@ -0,0 +1,302 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object containing endpoint update parameters. + [System.ComponentModel.TypeConverter(typeof(EndpointPropertiesUpdateParametersTypeConverter))] + public partial class EndpointPropertiesUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EndpointPropertiesUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EndpointPropertiesUpdateParameters(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EndpointPropertiesUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DefaultOriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DefaultOriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("DefaultOriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DefaultOriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("DeliveryPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy) content.GetValueForProperty("DeliveryPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicy, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersDeliveryPolicyTypeConverter.ConvertFrom); + } + if (content.Contains("WebApplicationFirewallPolicyLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).WebApplicationFirewallPolicyLink = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink) content.GetValueForProperty("WebApplicationFirewallPolicyLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).WebApplicationFirewallPolicyLink, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkTypeConverter.ConvertFrom); + } + if (content.Contains("OriginPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OriginPath = (string) content.GetValueForProperty("OriginPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OriginPath, global::System.Convert.ToString); + } + if (content.Contains("ContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).ContentTypesToCompress = (string[]) content.GetValueForProperty("ContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).ContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("IsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsCompressionEnabled = (bool?) content.GetValueForProperty("IsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHttpAllowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsHttpAllowed = (bool?) content.GetValueForProperty("IsHttpAllowed",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsHttpAllowed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHttpsAllowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsHttpsAllowed = (bool?) content.GetValueForProperty("IsHttpsAllowed",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsHttpsAllowed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("QueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).QueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior?) content.GetValueForProperty("QueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).QueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("OptimizationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OptimizationType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType?) content.GetValueForProperty("OptimizationType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OptimizationType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType.CreateFrom); + } + if (content.Contains("ProbePath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).ProbePath = (string) content.GetValueForProperty("ProbePath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).ProbePath, global::System.Convert.ToString); + } + if (content.Contains("GeoFilter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).GeoFilter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[]) content.GetValueForProperty("GeoFilter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).GeoFilter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.GeoFilterTypeConverter.ConvertFrom)); + } + if (content.Contains("UrlSigningKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).UrlSigningKey = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[]) content.GetValueForProperty("UrlSigningKey",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).UrlSigningKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKeyTypeConverter.ConvertFrom)); + } + if (content.Contains("DefaultOriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DefaultOriginGroupId = (string) content.GetValueForProperty("DefaultOriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DefaultOriginGroupId, global::System.Convert.ToString); + } + if (content.Contains("DeliveryPolicyDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicyDescription = (string) content.GetValueForProperty("DeliveryPolicyDescription",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicyDescription, global::System.Convert.ToString); + } + if (content.Contains("DeliveryPolicyRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicyRule = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[]) content.GetValueForProperty("DeliveryPolicyRule",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicyRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleTypeConverter.ConvertFrom)); + } + if (content.Contains("WebApplicationFirewallPolicyLinkId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).WebApplicationFirewallPolicyLinkId = (string) content.GetValueForProperty("WebApplicationFirewallPolicyLinkId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).WebApplicationFirewallPolicyLinkId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EndpointPropertiesUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DefaultOriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DefaultOriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("DefaultOriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DefaultOriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("DeliveryPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy) content.GetValueForProperty("DeliveryPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicy, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersDeliveryPolicyTypeConverter.ConvertFrom); + } + if (content.Contains("WebApplicationFirewallPolicyLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).WebApplicationFirewallPolicyLink = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink) content.GetValueForProperty("WebApplicationFirewallPolicyLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).WebApplicationFirewallPolicyLink, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkTypeConverter.ConvertFrom); + } + if (content.Contains("OriginPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OriginPath = (string) content.GetValueForProperty("OriginPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OriginPath, global::System.Convert.ToString); + } + if (content.Contains("ContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).ContentTypesToCompress = (string[]) content.GetValueForProperty("ContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).ContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("IsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsCompressionEnabled = (bool?) content.GetValueForProperty("IsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHttpAllowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsHttpAllowed = (bool?) content.GetValueForProperty("IsHttpAllowed",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsHttpAllowed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHttpsAllowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsHttpsAllowed = (bool?) content.GetValueForProperty("IsHttpsAllowed",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).IsHttpsAllowed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("QueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).QueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior?) content.GetValueForProperty("QueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).QueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("OptimizationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OptimizationType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType?) content.GetValueForProperty("OptimizationType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).OptimizationType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType.CreateFrom); + } + if (content.Contains("ProbePath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).ProbePath = (string) content.GetValueForProperty("ProbePath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).ProbePath, global::System.Convert.ToString); + } + if (content.Contains("GeoFilter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).GeoFilter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[]) content.GetValueForProperty("GeoFilter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).GeoFilter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.GeoFilterTypeConverter.ConvertFrom)); + } + if (content.Contains("UrlSigningKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).UrlSigningKey = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[]) content.GetValueForProperty("UrlSigningKey",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).UrlSigningKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKeyTypeConverter.ConvertFrom)); + } + if (content.Contains("DefaultOriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DefaultOriginGroupId = (string) content.GetValueForProperty("DefaultOriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DefaultOriginGroupId, global::System.Convert.ToString); + } + if (content.Contains("DeliveryPolicyDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicyDescription = (string) content.GetValueForProperty("DeliveryPolicyDescription",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicyDescription, global::System.Convert.ToString); + } + if (content.Contains("DeliveryPolicyRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicyRule = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[]) content.GetValueForProperty("DeliveryPolicyRule",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).DeliveryPolicyRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleTypeConverter.ConvertFrom)); + } + if (content.Contains("WebApplicationFirewallPolicyLinkId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).WebApplicationFirewallPolicyLinkId = (string) content.GetValueForProperty("WebApplicationFirewallPolicyLinkId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)this).WebApplicationFirewallPolicyLinkId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object containing endpoint update parameters. + [System.ComponentModel.TypeConverter(typeof(EndpointPropertiesUpdateParametersTypeConverter))] + public partial interface IEndpointPropertiesUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParameters.TypeConverter.cs new file mode 100644 index 000000000000..250a5fa819a9 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParameters.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EndpointPropertiesUpdateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EndpointPropertiesUpdateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EndpointPropertiesUpdateParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EndpointPropertiesUpdateParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParameters.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParameters.cs new file mode 100644 index 000000000000..3be80a328a5b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParameters.cs @@ -0,0 +1,406 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object containing endpoint update parameters. + public partial class EndpointPropertiesUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal + { + + /// Backing field for property. + private string[] _contentTypesToCompress; + + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] ContentTypesToCompress { get => this._contentTypesToCompress; set => this._contentTypesToCompress = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference _defaultOriginGroup; + + /// A reference to the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference DefaultOriginGroup { get => (this._defaultOriginGroup = this._defaultOriginGroup ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set => this._defaultOriginGroup = value; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string DefaultOriginGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)DefaultOriginGroup).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)DefaultOriginGroup).Id = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy _deliveryPolicy; + + /// A policy that specifies the delivery rules to be used for an endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy DeliveryPolicy { get => (this._deliveryPolicy = this._deliveryPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersDeliveryPolicy()); set => this._deliveryPolicy = value; } + + /// User-friendly description of the policy. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string DeliveryPolicyDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicyInternal)DeliveryPolicy).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicyInternal)DeliveryPolicy).Description = value ?? null; } + + /// A list of the delivery rules. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] DeliveryPolicyRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicyInternal)DeliveryPolicy).Rule; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicyInternal)DeliveryPolicy).Rule = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[] _geoFilter; + + /// + /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified + /// path or content, e.g. block APAC for path /pictures/ + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[] GeoFilter { get => this._geoFilter; set => this._geoFilter = value; } + + /// Backing field for property. + private bool? _isCompressionEnabled; + + /// + /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will + /// be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content + /// is smaller than 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? IsCompressionEnabled { get => this._isCompressionEnabled; set => this._isCompressionEnabled = value; } + + /// Backing field for property. + private bool? _isHttpAllowed; + + /// + /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? IsHttpAllowed { get => this._isHttpAllowed; set => this._isHttpAllowed = value; } + + /// Backing field for property. + private bool? _isHttpsAllowed; + + /// + /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? IsHttpsAllowed { get => this._isHttpsAllowed; set => this._isHttpsAllowed = value; } + + /// Internal Acessors for DefaultOriginGroup + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal.DefaultOriginGroup { get => (this._defaultOriginGroup = this._defaultOriginGroup ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set { {_defaultOriginGroup = value;} } } + + /// Internal Acessors for DeliveryPolicy + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal.DeliveryPolicy { get => (this._deliveryPolicy = this._deliveryPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersDeliveryPolicy()); set { {_deliveryPolicy = value;} } } + + /// Internal Acessors for WebApplicationFirewallPolicyLink + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal.WebApplicationFirewallPolicyLink { get => (this._webApplicationFirewallPolicyLink = this._webApplicationFirewallPolicyLink ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink()); set { {_webApplicationFirewallPolicyLink = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType? _optimizationType; + + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this + /// information, CDN can apply scenario driven optimization. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType? OptimizationType { get => this._optimizationType; set => this._optimizationType = value; } + + /// Backing field for property. + private string _originHostHeader; + + /// + /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses + /// single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname + /// determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header + /// value to match the origin hostname by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string OriginHostHeader { get => this._originHostHeader; set => this._originHostHeader = value; } + + /// Backing field for property. + private string _originPath; + + /// + /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string OriginPath { get => this._originPath; set => this._originPath = value; } + + /// Backing field for property. + private string _probePath; + + /// + /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal + /// routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ProbePath { get => this._probePath; set => this._probePath = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior? _queryStringCachingBehavior; + + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching + /// to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior? QueryStringCachingBehavior { get => this._queryStringCachingBehavior; set => this._queryStringCachingBehavior = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[] _urlSigningKey; + + /// List of keys used to validate the signed URL hashes. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[] UrlSigningKey { get => this._urlSigningKey; set => this._urlSigningKey = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink _webApplicationFirewallPolicyLink; + + /// Defines the Web Application Firewall policy for the endpoint (if applicable) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink WebApplicationFirewallPolicyLink { get => (this._webApplicationFirewallPolicyLink = this._webApplicationFirewallPolicyLink ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink()); set => this._webApplicationFirewallPolicyLink = value; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string WebApplicationFirewallPolicyLinkId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkInternal)WebApplicationFirewallPolicyLink).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkInternal)WebApplicationFirewallPolicyLink).Id = value ?? null; } + + /// Creates an new instance. + public EndpointPropertiesUpdateParameters() + { + + } + } + /// The JSON object containing endpoint update parameters. + public partial interface IEndpointPropertiesUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of content types on which compression applies. The value should be a valid MIME type.", + SerializedName = @"contentTypesToCompress", + PossibleTypes = new [] { typeof(string) })] + string[] ContentTypesToCompress { get; set; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string DefaultOriginGroupId { get; set; } + /// User-friendly description of the policy. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"User-friendly description of the policy.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string DeliveryPolicyDescription { get; set; } + /// A list of the delivery rules. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of the delivery rules.", + SerializedName = @"rules", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] DeliveryPolicyRule { get; set; } + /// + /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified + /// path or content, e.g. block APAC for path /pictures/ + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/", + SerializedName = @"geoFilters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[] GeoFilter { get; set; } + /// + /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will + /// be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content + /// is smaller than 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB.", + SerializedName = @"isCompressionEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsCompressionEnabled { get; set; } + /// + /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.", + SerializedName = @"isHttpAllowed", + PossibleTypes = new [] { typeof(bool) })] + bool? IsHttpAllowed { get; set; } + /// + /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.", + SerializedName = @"isHttpsAllowed", + PossibleTypes = new [] { typeof(bool) })] + bool? IsHttpsAllowed { get; set; } + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this + /// information, CDN can apply scenario driven optimization. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization.", + SerializedName = @"optimizationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType? OptimizationType { get; set; } + /// + /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses + /// single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname + /// determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header + /// value to match the origin hostname by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default.", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + string OriginHostHeader { get; set; } + /// + /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.", + SerializedName = @"originPath", + PossibleTypes = new [] { typeof(string) })] + string OriginPath { get; set; } + /// + /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal + /// routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin.", + SerializedName = @"probePath", + PossibleTypes = new [] { typeof(string) })] + string ProbePath { get; set; } + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching + /// to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL.", + SerializedName = @"queryStringCachingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior? QueryStringCachingBehavior { get; set; } + /// List of keys used to validate the signed URL hashes. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of keys used to validate the signed URL hashes.", + SerializedName = @"urlSigningKeys", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[] UrlSigningKey { get; set; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string WebApplicationFirewallPolicyLinkId { get; set; } + + } + /// The JSON object containing endpoint update parameters. + internal partial interface IEndpointPropertiesUpdateParametersInternal + + { + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + string[] ContentTypesToCompress { get; set; } + /// A reference to the origin group. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference DefaultOriginGroup { get; set; } + /// Resource ID. + string DefaultOriginGroupId { get; set; } + /// A policy that specifies the delivery rules to be used for an endpoint. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy DeliveryPolicy { get; set; } + /// User-friendly description of the policy. + string DeliveryPolicyDescription { get; set; } + /// A list of the delivery rules. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] DeliveryPolicyRule { get; set; } + /// + /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified + /// path or content, e.g. block APAC for path /pictures/ + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[] GeoFilter { get; set; } + /// + /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will + /// be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content + /// is smaller than 1 byte or larger than 1 MB. + /// + bool? IsCompressionEnabled { get; set; } + /// + /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + bool? IsHttpAllowed { get; set; } + /// + /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + bool? IsHttpsAllowed { get; set; } + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this + /// information, CDN can apply scenario driven optimization. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType? OptimizationType { get; set; } + /// + /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses + /// single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname + /// determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header + /// value to match the origin hostname by default. + /// + string OriginHostHeader { get; set; } + /// + /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + string OriginPath { get; set; } + /// + /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal + /// routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// + string ProbePath { get; set; } + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching + /// to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior? QueryStringCachingBehavior { get; set; } + /// List of keys used to validate the signed URL hashes. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[] UrlSigningKey { get; set; } + /// Defines the Web Application Firewall policy for the endpoint (if applicable) + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink WebApplicationFirewallPolicyLink { get; set; } + /// Resource ID. + string WebApplicationFirewallPolicyLinkId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParameters.json.cs new file mode 100644 index 000000000000..ac7c9e6baa48 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParameters.json.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object containing endpoint update parameters. + public partial class EndpointPropertiesUpdateParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal EndpointPropertiesUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_defaultOriginGroup = If( json?.PropertyT("defaultOriginGroup"), out var __jsonDefaultOriginGroup) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonDefaultOriginGroup) : DefaultOriginGroup;} + {_deliveryPolicy = If( json?.PropertyT("deliveryPolicy"), out var __jsonDeliveryPolicy) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersDeliveryPolicy.FromJson(__jsonDeliveryPolicy) : DeliveryPolicy;} + {_webApplicationFirewallPolicyLink = If( json?.PropertyT("webApplicationFirewallPolicyLink"), out var __jsonWebApplicationFirewallPolicyLink) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.FromJson(__jsonWebApplicationFirewallPolicyLink) : WebApplicationFirewallPolicyLink;} + {_originPath = If( json?.PropertyT("originPath"), out var __jsonOriginPath) ? (string)__jsonOriginPath : (string)OriginPath;} + {_contentTypesToCompress = If( json?.PropertyT("contentTypesToCompress"), out var __jsonContentTypesToCompress) ? If( __jsonContentTypesToCompress as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : ContentTypesToCompress;} + {_originHostHeader = If( json?.PropertyT("originHostHeader"), out var __jsonOriginHostHeader) ? (string)__jsonOriginHostHeader : (string)OriginHostHeader;} + {_isCompressionEnabled = If( json?.PropertyT("isCompressionEnabled"), out var __jsonIsCompressionEnabled) ? (bool?)__jsonIsCompressionEnabled : IsCompressionEnabled;} + {_isHttpAllowed = If( json?.PropertyT("isHttpAllowed"), out var __jsonIsHttpAllowed) ? (bool?)__jsonIsHttpAllowed : IsHttpAllowed;} + {_isHttpsAllowed = If( json?.PropertyT("isHttpsAllowed"), out var __jsonIsHttpsAllowed) ? (bool?)__jsonIsHttpsAllowed : IsHttpsAllowed;} + {_queryStringCachingBehavior = If( json?.PropertyT("queryStringCachingBehavior"), out var __jsonQueryStringCachingBehavior) ? (string)__jsonQueryStringCachingBehavior : (string)QueryStringCachingBehavior;} + {_optimizationType = If( json?.PropertyT("optimizationType"), out var __jsonOptimizationType) ? (string)__jsonOptimizationType : (string)OptimizationType;} + {_probePath = If( json?.PropertyT("probePath"), out var __jsonProbePath) ? (string)__jsonProbePath : (string)ProbePath;} + {_geoFilter = If( json?.PropertyT("geoFilters"), out var __jsonGeoFilters) ? If( __jsonGeoFilters as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.GeoFilter.FromJson(__p) )) ))() : null : GeoFilter;} + {_urlSigningKey = If( json?.PropertyT("urlSigningKeys"), out var __jsonUrlSigningKeys) ? If( __jsonUrlSigningKeys as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKey.FromJson(__k) )) ))() : null : UrlSigningKey;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new EndpointPropertiesUpdateParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._defaultOriginGroup ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._defaultOriginGroup.ToJson(null,serializationMode) : null, "defaultOriginGroup" ,container.Add ); + AddIf( null != this._deliveryPolicy ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._deliveryPolicy.ToJson(null,serializationMode) : null, "deliveryPolicy" ,container.Add ); + AddIf( null != this._webApplicationFirewallPolicyLink ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._webApplicationFirewallPolicyLink.ToJson(null,serializationMode) : null, "webApplicationFirewallPolicyLink" ,container.Add ); + AddIf( null != (((object)this._originPath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._originPath.ToString()) : null, "originPath" ,container.Add ); + if (null != this._contentTypesToCompress) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._contentTypesToCompress ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("contentTypesToCompress",__w); + } + AddIf( null != (((object)this._originHostHeader)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._originHostHeader.ToString()) : null, "originHostHeader" ,container.Add ); + AddIf( null != this._isCompressionEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._isCompressionEnabled) : null, "isCompressionEnabled" ,container.Add ); + AddIf( null != this._isHttpAllowed ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._isHttpAllowed) : null, "isHttpAllowed" ,container.Add ); + AddIf( null != this._isHttpsAllowed ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._isHttpsAllowed) : null, "isHttpsAllowed" ,container.Add ); + AddIf( null != (((object)this._queryStringCachingBehavior)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._queryStringCachingBehavior.ToString()) : null, "queryStringCachingBehavior" ,container.Add ); + AddIf( null != (((object)this._optimizationType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._optimizationType.ToString()) : null, "optimizationType" ,container.Add ); + AddIf( null != (((object)this._probePath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._probePath.ToString()) : null, "probePath" ,container.Add ); + if (null != this._geoFilter) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._geoFilter ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("geoFilters",__r); + } + if (null != this._urlSigningKey) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __n in this._urlSigningKey ) + { + AddIf(__n?.ToJson(null, serializationMode) ,__m.Add); + } + container.Add("urlSigningKeys",__m); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersDeliveryPolicy.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersDeliveryPolicy.PowerShell.cs new file mode 100644 index 000000000000..e09beaeb65e4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersDeliveryPolicy.PowerShell.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// A policy that specifies the delivery rules to be used for an endpoint. + [System.ComponentModel.TypeConverter(typeof(EndpointPropertiesUpdateParametersDeliveryPolicyTypeConverter))] + public partial class EndpointPropertiesUpdateParametersDeliveryPolicy + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EndpointPropertiesUpdateParametersDeliveryPolicy(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EndpointPropertiesUpdateParametersDeliveryPolicy(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EndpointPropertiesUpdateParametersDeliveryPolicy(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicyInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicyInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Rule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicyInternal)this).Rule = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[]) content.GetValueForProperty("Rule",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicyInternal)this).Rule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EndpointPropertiesUpdateParametersDeliveryPolicy(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicyInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicyInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Rule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicyInternal)this).Rule = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[]) content.GetValueForProperty("Rule",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicyInternal)this).Rule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// A policy that specifies the delivery rules to be used for an endpoint. + [System.ComponentModel.TypeConverter(typeof(EndpointPropertiesUpdateParametersDeliveryPolicyTypeConverter))] + public partial interface IEndpointPropertiesUpdateParametersDeliveryPolicy + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersDeliveryPolicy.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersDeliveryPolicy.TypeConverter.cs new file mode 100644 index 000000000000..a6e1e013f469 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersDeliveryPolicy.TypeConverter.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EndpointPropertiesUpdateParametersDeliveryPolicyTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EndpointPropertiesUpdateParametersDeliveryPolicy.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EndpointPropertiesUpdateParametersDeliveryPolicy.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EndpointPropertiesUpdateParametersDeliveryPolicy.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersDeliveryPolicy.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersDeliveryPolicy.cs new file mode 100644 index 000000000000..37501ace7664 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersDeliveryPolicy.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// A policy that specifies the delivery rules to be used for an endpoint. + public partial class EndpointPropertiesUpdateParametersDeliveryPolicy : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicyInternal + { + + /// Backing field for property. + private string _description; + + /// User-friendly description of the policy. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] _rule; + + /// A list of the delivery rules. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] Rule { get => this._rule; set => this._rule = value; } + + /// + /// Creates an new instance. + /// + public EndpointPropertiesUpdateParametersDeliveryPolicy() + { + + } + } + /// A policy that specifies the delivery rules to be used for an endpoint. + public partial interface IEndpointPropertiesUpdateParametersDeliveryPolicy : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// User-friendly description of the policy. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"User-friendly description of the policy.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// A list of the delivery rules. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"A list of the delivery rules.", + SerializedName = @"rules", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] Rule { get; set; } + + } + /// A policy that specifies the delivery rules to be used for an endpoint. + internal partial interface IEndpointPropertiesUpdateParametersDeliveryPolicyInternal + + { + /// User-friendly description of the policy. + string Description { get; set; } + /// A list of the delivery rules. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] Rule { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersDeliveryPolicy.json.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersDeliveryPolicy.json.cs new file mode 100644 index 000000000000..4abfeb2197d8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersDeliveryPolicy.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// A policy that specifies the delivery rules to be used for an endpoint. + public partial class EndpointPropertiesUpdateParametersDeliveryPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal EndpointPropertiesUpdateParametersDeliveryPolicy(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_rule = If( json?.PropertyT("rules"), out var __jsonRules) ? If( __jsonRules as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRule.FromJson(__u) )) ))() : null : Rule;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new EndpointPropertiesUpdateParametersDeliveryPolicy(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + if (null != this._rule) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._rule ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("rules",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.PowerShell.cs new file mode 100644 index 000000000000..a7e8178090c8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.PowerShell.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the Web Application Firewall policy for the endpoint (if applicable) + [System.ComponentModel.TypeConverter(typeof(EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkTypeConverter))] + public partial class EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkInternal)this).Id, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkInternal)this).Id, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing + /// the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the Web Application Firewall policy for the endpoint (if applicable) + [System.ComponentModel.TypeConverter(typeof(EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkTypeConverter))] + public partial interface IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.TypeConverter.cs new file mode 100644 index 000000000000..4b4b3c7f5d2a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.TypeConverter.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there + /// is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there + /// is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.cs new file mode 100644 index 000000000000..3cc8077223f5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the Web Application Firewall policy for the endpoint (if applicable) + public partial class EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkInternal + { + + /// Backing field for property. + private string _id; + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// + /// Creates an new instance. + /// + public EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink() + { + + } + } + /// Defines the Web Application Firewall policy for the endpoint (if applicable) + public partial interface IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + + } + /// Defines the Web Application Firewall policy for the endpoint (if applicable) + internal partial interface IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkInternal + + { + /// Resource ID. + string Id { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.json.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.json.cs new file mode 100644 index 000000000000..47e460fb5182 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the Web Application Firewall policy for the endpoint (if applicable) + public partial class EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..77cb8d1fd0ac --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParameters.PowerShell.cs @@ -0,0 +1,314 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Properties required to create or update an endpoint. + [System.ComponentModel.TypeConverter(typeof(EndpointUpdateParametersTypeConverter))] + public partial class EndpointUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EndpointUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EndpointUpdateParameters(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EndpointUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointUpdateParametersTagsTypeConverter.ConvertFrom); + } + if (content.Contains("OptimizationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).OptimizationType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType?) content.GetValueForProperty("OptimizationType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).OptimizationType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType.CreateFrom); + } + if (content.Contains("DefaultOriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DefaultOriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("DefaultOriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DefaultOriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("DeliveryPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DeliveryPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy) content.GetValueForProperty("DeliveryPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DeliveryPolicy, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersDeliveryPolicyTypeConverter.ConvertFrom); + } + if (content.Contains("WebApplicationFirewallPolicyLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).WebApplicationFirewallPolicyLink = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink) content.GetValueForProperty("WebApplicationFirewallPolicyLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).WebApplicationFirewallPolicyLink, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkTypeConverter.ConvertFrom); + } + if (content.Contains("OriginPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).OriginPath = (string) content.GetValueForProperty("OriginPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).OriginPath, global::System.Convert.ToString); + } + if (content.Contains("ContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).ContentTypesToCompress = (string[]) content.GetValueForProperty("ContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).ContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("IsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).IsCompressionEnabled = (bool?) content.GetValueForProperty("IsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).IsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHttpAllowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).IsHttpAllowed = (bool?) content.GetValueForProperty("IsHttpAllowed",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).IsHttpAllowed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHttpsAllowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).IsHttpsAllowed = (bool?) content.GetValueForProperty("IsHttpsAllowed",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).IsHttpsAllowed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("QueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).QueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior?) content.GetValueForProperty("QueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).QueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("ProbePath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).ProbePath = (string) content.GetValueForProperty("ProbePath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).ProbePath, global::System.Convert.ToString); + } + if (content.Contains("GeoFilter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).GeoFilter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[]) content.GetValueForProperty("GeoFilter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).GeoFilter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.GeoFilterTypeConverter.ConvertFrom)); + } + if (content.Contains("UrlSigningKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).UrlSigningKey = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[]) content.GetValueForProperty("UrlSigningKey",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).UrlSigningKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKeyTypeConverter.ConvertFrom)); + } + if (content.Contains("DefaultOriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DefaultOriginGroupId = (string) content.GetValueForProperty("DefaultOriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DefaultOriginGroupId, global::System.Convert.ToString); + } + if (content.Contains("DeliveryPolicyDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DeliveryPolicyDescription = (string) content.GetValueForProperty("DeliveryPolicyDescription",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DeliveryPolicyDescription, global::System.Convert.ToString); + } + if (content.Contains("DeliveryPolicyRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DeliveryPolicyRule = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[]) content.GetValueForProperty("DeliveryPolicyRule",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DeliveryPolicyRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleTypeConverter.ConvertFrom)); + } + if (content.Contains("WebApplicationFirewallPolicyLinkId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).WebApplicationFirewallPolicyLinkId = (string) content.GetValueForProperty("WebApplicationFirewallPolicyLinkId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).WebApplicationFirewallPolicyLinkId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EndpointUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointUpdateParametersTagsTypeConverter.ConvertFrom); + } + if (content.Contains("OptimizationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).OptimizationType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType?) content.GetValueForProperty("OptimizationType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).OptimizationType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType.CreateFrom); + } + if (content.Contains("DefaultOriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DefaultOriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("DefaultOriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DefaultOriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("DeliveryPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DeliveryPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy) content.GetValueForProperty("DeliveryPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DeliveryPolicy, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersDeliveryPolicyTypeConverter.ConvertFrom); + } + if (content.Contains("WebApplicationFirewallPolicyLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).WebApplicationFirewallPolicyLink = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink) content.GetValueForProperty("WebApplicationFirewallPolicyLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).WebApplicationFirewallPolicyLink, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLinkTypeConverter.ConvertFrom); + } + if (content.Contains("OriginPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).OriginPath = (string) content.GetValueForProperty("OriginPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).OriginPath, global::System.Convert.ToString); + } + if (content.Contains("ContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).ContentTypesToCompress = (string[]) content.GetValueForProperty("ContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).ContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("IsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).IsCompressionEnabled = (bool?) content.GetValueForProperty("IsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).IsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHttpAllowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).IsHttpAllowed = (bool?) content.GetValueForProperty("IsHttpAllowed",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).IsHttpAllowed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHttpsAllowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).IsHttpsAllowed = (bool?) content.GetValueForProperty("IsHttpsAllowed",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).IsHttpsAllowed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("QueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).QueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior?) content.GetValueForProperty("QueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).QueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("ProbePath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).ProbePath = (string) content.GetValueForProperty("ProbePath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).ProbePath, global::System.Convert.ToString); + } + if (content.Contains("GeoFilter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).GeoFilter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[]) content.GetValueForProperty("GeoFilter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).GeoFilter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.GeoFilterTypeConverter.ConvertFrom)); + } + if (content.Contains("UrlSigningKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).UrlSigningKey = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[]) content.GetValueForProperty("UrlSigningKey",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).UrlSigningKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningKeyTypeConverter.ConvertFrom)); + } + if (content.Contains("DefaultOriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DefaultOriginGroupId = (string) content.GetValueForProperty("DefaultOriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DefaultOriginGroupId, global::System.Convert.ToString); + } + if (content.Contains("DeliveryPolicyDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DeliveryPolicyDescription = (string) content.GetValueForProperty("DeliveryPolicyDescription",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DeliveryPolicyDescription, global::System.Convert.ToString); + } + if (content.Contains("DeliveryPolicyRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DeliveryPolicyRule = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[]) content.GetValueForProperty("DeliveryPolicyRule",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).DeliveryPolicyRule, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleTypeConverter.ConvertFrom)); + } + if (content.Contains("WebApplicationFirewallPolicyLinkId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).WebApplicationFirewallPolicyLinkId = (string) content.GetValueForProperty("WebApplicationFirewallPolicyLinkId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal)this).WebApplicationFirewallPolicyLinkId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties required to create or update an endpoint. + [System.ComponentModel.TypeConverter(typeof(EndpointUpdateParametersTypeConverter))] + public partial interface IEndpointUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParameters.TypeConverter.cs new file mode 100644 index 000000000000..ec2f2920cd66 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EndpointUpdateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EndpointUpdateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EndpointUpdateParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EndpointUpdateParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParameters.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParameters.cs new file mode 100644 index 000000000000..1e8059fe0648 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParameters.cs @@ -0,0 +1,381 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Properties required to create or update an endpoint. + public partial class EndpointUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal + { + + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] ContentTypesToCompress { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).ContentTypesToCompress; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).ContentTypesToCompress = value ?? null /* arrayOf */; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string DefaultOriginGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DefaultOriginGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DefaultOriginGroupId = value ?? null; } + + /// User-friendly description of the policy. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string DeliveryPolicyDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DeliveryPolicyDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DeliveryPolicyDescription = value ?? null; } + + /// A list of the delivery rules. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] DeliveryPolicyRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DeliveryPolicyRule; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DeliveryPolicyRule = value ?? null /* arrayOf */; } + + /// + /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified + /// path or content, e.g. block APAC for path /pictures/ + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[] GeoFilter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).GeoFilter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).GeoFilter = value ?? null /* arrayOf */; } + + /// + /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will + /// be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content + /// is smaller than 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? IsCompressionEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).IsCompressionEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).IsCompressionEnabled = value ?? default(bool); } + + /// + /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? IsHttpAllowed { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).IsHttpAllowed; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).IsHttpAllowed = value ?? default(bool); } + + /// + /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? IsHttpsAllowed { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).IsHttpsAllowed; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).IsHttpsAllowed = value ?? default(bool); } + + /// Internal Acessors for DefaultOriginGroup + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal.DefaultOriginGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DefaultOriginGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DefaultOriginGroup = value; } + + /// Internal Acessors for DeliveryPolicy + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal.DeliveryPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DeliveryPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).DeliveryPolicy = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParameters()); set { {_property = value;} } } + + /// Internal Acessors for WebApplicationFirewallPolicyLink + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersInternal.WebApplicationFirewallPolicyLink { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).WebApplicationFirewallPolicyLink; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).WebApplicationFirewallPolicyLink = value; } + + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this + /// information, CDN can apply scenario driven optimization. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType? OptimizationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).OptimizationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).OptimizationType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType)""); } + + /// + /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses + /// single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname + /// determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header + /// value to match the origin hostname by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginHostHeader { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).OriginHostHeader; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).OriginHostHeader = value ?? null; } + + /// + /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).OriginPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).OriginPath = value ?? null; } + + /// + /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal + /// routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ProbePath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).ProbePath; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).ProbePath = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParameters _property; + + /// The JSON object containing endpoint update parameters. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParameters Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParameters()); set => this._property = value; } + + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching + /// to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior? QueryStringCachingBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).QueryStringCachingBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).QueryStringCachingBehavior = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags _tag; + + /// Endpoint tags. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointUpdateParametersTags()); set => this._tag = value; } + + /// List of keys used to validate the signed URL hashes. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[] UrlSigningKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).UrlSigningKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).UrlSigningKey = value ?? null /* arrayOf */; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string WebApplicationFirewallPolicyLinkId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).WebApplicationFirewallPolicyLinkId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersInternal)Property).WebApplicationFirewallPolicyLinkId = value ?? null; } + + /// Creates an new instance. + public EndpointUpdateParameters() + { + + } + } + /// Properties required to create or update an endpoint. + public partial interface IEndpointUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of content types on which compression applies. The value should be a valid MIME type.", + SerializedName = @"contentTypesToCompress", + PossibleTypes = new [] { typeof(string) })] + string[] ContentTypesToCompress { get; set; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string DefaultOriginGroupId { get; set; } + /// User-friendly description of the policy. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"User-friendly description of the policy.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string DeliveryPolicyDescription { get; set; } + /// A list of the delivery rules. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of the delivery rules.", + SerializedName = @"rules", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] DeliveryPolicyRule { get; set; } + /// + /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified + /// path or content, e.g. block APAC for path /pictures/ + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/", + SerializedName = @"geoFilters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[] GeoFilter { get; set; } + /// + /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will + /// be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content + /// is smaller than 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB.", + SerializedName = @"isCompressionEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsCompressionEnabled { get; set; } + /// + /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.", + SerializedName = @"isHttpAllowed", + PossibleTypes = new [] { typeof(bool) })] + bool? IsHttpAllowed { get; set; } + /// + /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.", + SerializedName = @"isHttpsAllowed", + PossibleTypes = new [] { typeof(bool) })] + bool? IsHttpsAllowed { get; set; } + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this + /// information, CDN can apply scenario driven optimization. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization.", + SerializedName = @"optimizationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType? OptimizationType { get; set; } + /// + /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses + /// single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname + /// determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header + /// value to match the origin hostname by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default.", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + string OriginHostHeader { get; set; } + /// + /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.", + SerializedName = @"originPath", + PossibleTypes = new [] { typeof(string) })] + string OriginPath { get; set; } + /// + /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal + /// routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin.", + SerializedName = @"probePath", + PossibleTypes = new [] { typeof(string) })] + string ProbePath { get; set; } + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching + /// to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL.", + SerializedName = @"queryStringCachingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior? QueryStringCachingBehavior { get; set; } + /// Endpoint tags. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Endpoint tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags Tag { get; set; } + /// List of keys used to validate the signed URL hashes. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of keys used to validate the signed URL hashes.", + SerializedName = @"urlSigningKeys", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[] UrlSigningKey { get; set; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string WebApplicationFirewallPolicyLinkId { get; set; } + + } + /// Properties required to create or update an endpoint. + internal partial interface IEndpointUpdateParametersInternal + + { + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + string[] ContentTypesToCompress { get; set; } + /// A reference to the origin group. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference DefaultOriginGroup { get; set; } + /// Resource ID. + string DefaultOriginGroupId { get; set; } + /// A policy that specifies the delivery rules to be used for an endpoint. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersDeliveryPolicy DeliveryPolicy { get; set; } + /// User-friendly description of the policy. + string DeliveryPolicyDescription { get; set; } + /// A list of the delivery rules. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] DeliveryPolicyRule { get; set; } + /// + /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified + /// path or content, e.g. block APAC for path /pictures/ + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[] GeoFilter { get; set; } + /// + /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will + /// be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content + /// is smaller than 1 byte or larger than 1 MB. + /// + bool? IsCompressionEnabled { get; set; } + /// + /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + bool? IsHttpAllowed { get; set; } + /// + /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + bool? IsHttpsAllowed { get; set; } + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this + /// information, CDN can apply scenario driven optimization. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType? OptimizationType { get; set; } + /// + /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses + /// single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname + /// determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header + /// value to match the origin hostname by default. + /// + string OriginHostHeader { get; set; } + /// + /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + string OriginPath { get; set; } + /// + /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal + /// routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// + string ProbePath { get; set; } + /// The JSON object containing endpoint update parameters. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParameters Property { get; set; } + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching + /// to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior? QueryStringCachingBehavior { get; set; } + /// Endpoint tags. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags Tag { get; set; } + /// List of keys used to validate the signed URL hashes. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[] UrlSigningKey { get; set; } + /// Defines the Web Application Firewall policy for the endpoint (if applicable) + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink WebApplicationFirewallPolicyLink { get; set; } + /// Resource ID. + string WebApplicationFirewallPolicyLinkId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParameters.json.cs new file mode 100644 index 000000000000..fed04f57782a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParameters.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Properties required to create or update an endpoint. + public partial class EndpointUpdateParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal EndpointUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointPropertiesUpdateParameters.FromJson(__jsonProperties) : Property;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointUpdateParametersTags.FromJson(__jsonTags) : Tag;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new EndpointUpdateParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.PowerShell.cs new file mode 100644 index 000000000000..d0e268ee9868 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.PowerShell.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Endpoint tags. + [System.ComponentModel.TypeConverter(typeof(EndpointUpdateParametersTagsTypeConverter))] + public partial class EndpointUpdateParametersTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EndpointUpdateParametersTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EndpointUpdateParametersTags(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EndpointUpdateParametersTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EndpointUpdateParametersTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Endpoint tags. + [System.ComponentModel.TypeConverter(typeof(EndpointUpdateParametersTagsTypeConverter))] + public partial interface IEndpointUpdateParametersTags + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.TypeConverter.cs new file mode 100644 index 000000000000..094e3e87bddf --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EndpointUpdateParametersTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EndpointUpdateParametersTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EndpointUpdateParametersTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EndpointUpdateParametersTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.cs new file mode 100644 index 000000000000..9955f73fda29 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Endpoint tags. + public partial class EndpointUpdateParametersTags : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTagsInternal + { + + /// Creates an new instance. + public EndpointUpdateParametersTags() + { + + } + } + /// Endpoint tags. + public partial interface IEndpointUpdateParametersTags : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray + { + + } + /// Endpoint tags. + internal partial interface IEndpointUpdateParametersTagsInternal + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.dictionary.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.dictionary.cs new file mode 100644 index 000000000000..0b6f0446085a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class EndpointUpdateParametersTags : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointUpdateParametersTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.json.cs b/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.json.cs new file mode 100644 index 000000000000..37605e470fbf --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/EndpointUpdateParametersTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Endpoint tags. + public partial class EndpointUpdateParametersTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + /// + internal EndpointUpdateParametersTags(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new EndpointUpdateParametersTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ErrorAdditionalInfo.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ErrorAdditionalInfo.PowerShell.cs new file mode 100644 index 000000000000..e75440039004 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ErrorAdditionalInfo.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The resource management error additional info. + [System.ComponentModel.TypeConverter(typeof(ErrorAdditionalInfoTypeConverter))] + public partial class ErrorAdditionalInfo + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorAdditionalInfo(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorAdditionalInfo(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorAdditionalInfo(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Info")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.AnyTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Info")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.AnyTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The resource management error additional info. + [System.ComponentModel.TypeConverter(typeof(ErrorAdditionalInfoTypeConverter))] + public partial interface IErrorAdditionalInfo + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ErrorAdditionalInfo.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ErrorAdditionalInfo.TypeConverter.cs new file mode 100644 index 000000000000..e49e41324247 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ErrorAdditionalInfo.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorAdditionalInfoTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorAdditionalInfo.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorAdditionalInfo.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorAdditionalInfo.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ErrorAdditionalInfo.cs b/src/Cdn/generated/api/Models/Api20210601/ErrorAdditionalInfo.cs new file mode 100644 index 000000000000..dac55e469ea0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ErrorAdditionalInfo.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The resource management error additional info. + public partial class ErrorAdditionalInfo : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfoInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IAny _info; + + /// The additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Any()); } + + /// Internal Acessors for Info + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Any()); set { {_info = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _type; + + /// The additional info type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public ErrorAdditionalInfo() + { + + } + } + /// The resource management error additional info. + public partial interface IErrorAdditionalInfo : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The additional info.", + SerializedName = @"info", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IAny Info { get; } + /// The additional info type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The additional info type.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// The resource management error additional info. + internal partial interface IErrorAdditionalInfoInternal + + { + /// The additional info. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.IAny Info { get; set; } + /// The additional info type. + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ErrorAdditionalInfo.json.cs b/src/Cdn/generated/api/Models/Api20210601/ErrorAdditionalInfo.json.cs new file mode 100644 index 000000000000..6ba102012f8b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ErrorAdditionalInfo.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The resource management error additional info. + public partial class ErrorAdditionalInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Any.FromJson(__jsonInfo) : Info;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ErrorAdditionalInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._info.ToJson(null,serializationMode) : null, "info" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ErrorDetail.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ErrorDetail.PowerShell.cs new file mode 100644 index 000000000000..d48107e24958 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ErrorDetail.PowerShell.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The error detail. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] + public partial class ErrorDetail + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorDetail(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorDetail(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorDetail(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorDetail(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The error detail. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] + public partial interface IErrorDetail + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ErrorDetail.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ErrorDetail.TypeConverter.cs new file mode 100644 index 000000000000..a22576a8cb41 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ErrorDetail.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorDetailTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorDetail.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorDetail.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorDetail.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ErrorDetail.cs b/src/Cdn/generated/api/Models/Api20210601/ErrorDetail.cs new file mode 100644 index 000000000000..da1afeecf95f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ErrorDetail.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[] _additionalInfo; + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; } + + /// Backing field for property. + private string _code; + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Code { get => this._code; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[] _detail; + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[] Detail { get => this._detail; } + + /// Backing field for property. + private string _message; + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } + + /// Backing field for property. + private string _target; + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Target { get => this._target; } + + /// Creates an new instance. + public ErrorDetail() + { + + } + } + /// The error detail. + public partial interface IErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[] Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// The error detail. + internal partial interface IErrorDetailInternal + + { + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[] Detail { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ErrorDetail.json.cs b/src/Cdn/generated/api/Models/Api20210601/ErrorDetail.json.cs new file mode 100644 index 000000000000..fd175670331e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ErrorDetail.json.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetail.FromJson(__u) )) ))() : null : Detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : AdditionalInfo;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._detail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._detail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("details",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._additionalInfo) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._additionalInfo ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("additionalInfo",__r); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ErrorResponse.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ErrorResponse.PowerShell.cs new file mode 100644 index 000000000000..f244acc30f00 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ErrorResponse.PowerShell.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Error response indicates Azure Front Door Standard or Azure Front Door Premium or CDN service is not able to process the + /// incoming request. The reason is provided in the error message. + /// + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial class ErrorResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorResponse(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Error response indicates Azure Front Door Standard or Azure Front Door Premium or CDN service is not able to process the + /// incoming request. The reason is provided in the error message. + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial interface IErrorResponse + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ErrorResponse.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ErrorResponse.TypeConverter.cs new file mode 100644 index 000000000000..88a4710839ac --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ErrorResponse.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ErrorResponse.cs b/src/Cdn/generated/api/Models/Api20210601/ErrorResponse.cs new file mode 100644 index 000000000000..2e2b3895398b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ErrorResponse.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Error response indicates Azure Front Door Standard or Azure Front Door Premium or CDN service is not able to process the + /// incoming request. The reason is provided in the error message. + /// + public partial class ErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal + { + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Detail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail _error; + + /// The error object. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetail()); set => this._error = value; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).AdditionalInfo = value; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Code = value; } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Detail = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetail()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Message = value; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Target = value; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetailInternal)Error).Target; } + + /// Creates an new instance. + public ErrorResponse() + { + + } + } + /// Error response indicates Azure Front Door Standard or Azure Front Door Premium or CDN service is not able to process the + /// incoming request. The reason is provided in the error message. + public partial interface IErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[] Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// Error response indicates Azure Front Door Standard or Azure Front Door Premium or CDN service is not able to process the + /// incoming request. The reason is provided in the error message. + internal partial interface IErrorResponseInternal + + { + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail[] Detail { get; set; } + /// The error object. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorDetail Error { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ErrorResponse.json.cs b/src/Cdn/generated/api/Models/Api20210601/ErrorResponse.json.cs new file mode 100644 index 000000000000..5505aca7fa0d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ErrorResponse.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Error response indicates Azure Front Door Standard or Azure Front Door Premium or CDN service is not able to process the + /// incoming request. The reason is provided in the error message. + /// + public partial class ErrorResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ErrorDetail.FromJson(__jsonError) : Error;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/GeoFilter.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/GeoFilter.PowerShell.cs new file mode 100644 index 000000000000..f2bce4086eaa --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/GeoFilter.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Rules defining user's geo access within a CDN endpoint. + [System.ComponentModel.TypeConverter(typeof(GeoFilterTypeConverter))] + public partial class GeoFilter + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GeoFilter(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GeoFilter(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GeoFilter(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RelativePath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilterInternal)this).RelativePath = (string) content.GetValueForProperty("RelativePath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilterInternal)this).RelativePath, global::System.Convert.ToString); + } + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilterInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilterInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions.CreateFrom); + } + if (content.Contains("CountryCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilterInternal)this).CountryCode = (string[]) content.GetValueForProperty("CountryCode",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilterInternal)this).CountryCode, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GeoFilter(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RelativePath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilterInternal)this).RelativePath = (string) content.GetValueForProperty("RelativePath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilterInternal)this).RelativePath, global::System.Convert.ToString); + } + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilterInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilterInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions.CreateFrom); + } + if (content.Contains("CountryCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilterInternal)this).CountryCode = (string[]) content.GetValueForProperty("CountryCode",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilterInternal)this).CountryCode, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Rules defining user's geo access within a CDN endpoint. + [System.ComponentModel.TypeConverter(typeof(GeoFilterTypeConverter))] + public partial interface IGeoFilter + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/GeoFilter.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/GeoFilter.TypeConverter.cs new file mode 100644 index 000000000000..bd321dee905c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/GeoFilter.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class GeoFilterTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return GeoFilter.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return GeoFilter.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return GeoFilter.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/GeoFilter.cs b/src/Cdn/generated/api/Models/Api20210601/GeoFilter.cs new file mode 100644 index 000000000000..0afe147c67b3 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/GeoFilter.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Rules defining user's geo access within a CDN endpoint. + public partial class GeoFilter : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilterInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions _action; + + /// Action of the geo filter, i.e. allow or block access. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions Action { get => this._action; set => this._action = value; } + + /// Backing field for property. + private string[] _countryCode; + + /// + /// Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] CountryCode { get => this._countryCode; set => this._countryCode = value; } + + /// Backing field for property. + private string _relativePath; + + /// + /// Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string RelativePath { get => this._relativePath; set => this._relativePath = value; } + + /// Creates an new instance. + public GeoFilter() + { + + } + } + /// Rules defining user's geo access within a CDN endpoint. + public partial interface IGeoFilter : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Action of the geo filter, i.e. allow or block access. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Action of the geo filter, i.e. allow or block access.", + SerializedName = @"action", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions Action { get; set; } + /// + /// Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US.", + SerializedName = @"countryCodes", + PossibleTypes = new [] { typeof(string) })] + string[] CountryCode { get; set; } + /// + /// Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.)", + SerializedName = @"relativePath", + PossibleTypes = new [] { typeof(string) })] + string RelativePath { get; set; } + + } + /// Rules defining user's geo access within a CDN endpoint. + internal partial interface IGeoFilterInternal + + { + /// Action of the geo filter, i.e. allow or block access. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions Action { get; set; } + /// + /// Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US. + /// + string[] CountryCode { get; set; } + /// + /// Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) + /// + string RelativePath { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/GeoFilter.json.cs b/src/Cdn/generated/api/Models/Api20210601/GeoFilter.json.cs new file mode 100644 index 000000000000..bd971c2d88df --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/GeoFilter.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Rules defining user's geo access within a CDN endpoint. + public partial class GeoFilter + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new GeoFilter(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal GeoFilter(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_relativePath = If( json?.PropertyT("relativePath"), out var __jsonRelativePath) ? (string)__jsonRelativePath : (string)RelativePath;} + {_action = If( json?.PropertyT("action"), out var __jsonAction) ? (string)__jsonAction : (string)Action;} + {_countryCode = If( json?.PropertyT("countryCodes"), out var __jsonCountryCodes) ? If( __jsonCountryCodes as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : CountryCode;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._relativePath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._relativePath.ToString()) : null, "relativePath" ,container.Add ); + AddIf( null != (((object)this._action)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._action.ToString()) : null, "action" ,container.Add ); + if (null != this._countryCode) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._countryCode ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("countryCodes",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HeaderActionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/HeaderActionParameters.PowerShell.cs new file mode 100644 index 000000000000..f0d90dc46fd4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HeaderActionParameters.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for the request header action. + [System.ComponentModel.TypeConverter(typeof(HeaderActionParametersTypeConverter))] + public partial class HeaderActionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new HeaderActionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new HeaderActionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal HeaderActionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("HeaderAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)this).HeaderAction = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction) content.GetValueForProperty("HeaderAction",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)this).HeaderAction, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction.CreateFrom); + } + if (content.Contains("HeaderName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)this).HeaderName = (string) content.GetValueForProperty("HeaderName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)this).HeaderName, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)this).Value, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal HeaderActionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("HeaderAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)this).HeaderAction = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction) content.GetValueForProperty("HeaderAction",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)this).HeaderAction, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction.CreateFrom); + } + if (content.Contains("HeaderName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)this).HeaderName = (string) content.GetValueForProperty("HeaderName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)this).HeaderName, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal)this).Value, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for the request header action. + [System.ComponentModel.TypeConverter(typeof(HeaderActionParametersTypeConverter))] + public partial interface IHeaderActionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HeaderActionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/HeaderActionParameters.TypeConverter.cs new file mode 100644 index 000000000000..9c1e9afa3852 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HeaderActionParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class HeaderActionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return HeaderActionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return HeaderActionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return HeaderActionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HeaderActionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/HeaderActionParameters.cs new file mode 100644 index 000000000000..6e065f4bad9a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HeaderActionParameters.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for the request header action. + public partial class HeaderActionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction _headerAction; + + /// Action to perform + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction HeaderAction { get => this._headerAction; set => this._headerAction = value; } + + /// Backing field for property. + private string _headerName; + + /// Name of the header to modify + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string HeaderName { get => this._headerName; set => this._headerName = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleHeaderActionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Backing field for property. + private string _value; + + /// Value for the specified action + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public HeaderActionParameters() + { + + } + } + /// Defines the parameters for the request header action. + public partial interface IHeaderActionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Action to perform + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Action to perform", + SerializedName = @"headerAction", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction HeaderAction { get; set; } + /// Name of the header to modify + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the header to modify", + SerializedName = @"headerName", + PossibleTypes = new [] { typeof(string) })] + string HeaderName { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + /// Value for the specified action + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Value for the specified action", + SerializedName = @"value", + PossibleTypes = new [] { typeof(string) })] + string Value { get; set; } + + } + /// Defines the parameters for the request header action. + internal partial interface IHeaderActionParametersInternal + + { + /// Action to perform + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction HeaderAction { get; set; } + /// Name of the header to modify + string HeaderName { get; set; } + + string TypeName { get; set; } + /// Value for the specified action + string Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HeaderActionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/HeaderActionParameters.json.cs new file mode 100644 index 000000000000..dc724ff5272b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HeaderActionParameters.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for the request header action. + public partial class HeaderActionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHeaderActionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new HeaderActionParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal HeaderActionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_headerAction = If( json?.PropertyT("headerAction"), out var __jsonHeaderAction) ? (string)__jsonHeaderAction : (string)HeaderAction;} + {_headerName = If( json?.PropertyT("headerName"), out var __jsonHeaderName) ? (string)__jsonHeaderName : (string)HeaderName;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)Value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._headerAction)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._headerAction.ToString()) : null, "headerAction" ,container.Add ); + AddIf( null != (((object)this._headerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._headerName.ToString()) : null, "headerName" ,container.Add ); + AddIf( null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._value.ToString()) : null, "value" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HealthProbeParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/HealthProbeParameters.PowerShell.cs new file mode 100644 index 000000000000..ae8024d2ec11 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HealthProbeParameters.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties to send health probes to origin. + [System.ComponentModel.TypeConverter(typeof(HealthProbeParametersTypeConverter))] + public partial class HealthProbeParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new HealthProbeParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new HealthProbeParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal HealthProbeParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProbePath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParametersInternal)this).ProbePath = (string) content.GetValueForProperty("ProbePath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParametersInternal)this).ProbePath, global::System.Convert.ToString); + } + if (content.Contains("ProbeRequestType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParametersInternal)this).ProbeRequestType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType?) content.GetValueForProperty("ProbeRequestType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParametersInternal)this).ProbeRequestType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType.CreateFrom); + } + if (content.Contains("ProbeProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParametersInternal)this).ProbeProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol?) content.GetValueForProperty("ProbeProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParametersInternal)this).ProbeProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol.CreateFrom); + } + if (content.Contains("ProbeIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParametersInternal)this).ProbeIntervalInSecond = (int?) content.GetValueForProperty("ProbeIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParametersInternal)this).ProbeIntervalInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal HealthProbeParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProbePath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParametersInternal)this).ProbePath = (string) content.GetValueForProperty("ProbePath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParametersInternal)this).ProbePath, global::System.Convert.ToString); + } + if (content.Contains("ProbeRequestType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParametersInternal)this).ProbeRequestType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType?) content.GetValueForProperty("ProbeRequestType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParametersInternal)this).ProbeRequestType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType.CreateFrom); + } + if (content.Contains("ProbeProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParametersInternal)this).ProbeProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol?) content.GetValueForProperty("ProbeProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParametersInternal)this).ProbeProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol.CreateFrom); + } + if (content.Contains("ProbeIntervalInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParametersInternal)this).ProbeIntervalInSecond = (int?) content.GetValueForProperty("ProbeIntervalInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParametersInternal)this).ProbeIntervalInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties to send health probes to origin. + [System.ComponentModel.TypeConverter(typeof(HealthProbeParametersTypeConverter))] + public partial interface IHealthProbeParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HealthProbeParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/HealthProbeParameters.TypeConverter.cs new file mode 100644 index 000000000000..b5b14ca37646 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HealthProbeParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class HealthProbeParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return HealthProbeParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return HealthProbeParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return HealthProbeParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HealthProbeParameters.cs b/src/Cdn/generated/api/Models/Api20210601/HealthProbeParameters.cs new file mode 100644 index 000000000000..5c0b9894fe00 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HealthProbeParameters.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties to send health probes to origin. + public partial class HealthProbeParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParametersInternal + { + + /// Backing field for property. + private int? _probeIntervalInSecond; + + /// The number of seconds between health probes.Default is 240sec. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? ProbeIntervalInSecond { get => this._probeIntervalInSecond; set => this._probeIntervalInSecond = value; } + + /// Backing field for property. + private string _probePath; + + /// + /// The path relative to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ProbePath { get => this._probePath; set => this._probePath = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol? _probeProtocol; + + /// Protocol to use for health probe. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol? ProbeProtocol { get => this._probeProtocol; set => this._probeProtocol = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType? _probeRequestType; + + /// The type of health probe request that is made. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType? ProbeRequestType { get => this._probeRequestType; set => this._probeRequestType = value; } + + /// Creates an new instance. + public HealthProbeParameters() + { + + } + } + /// The JSON object that contains the properties to send health probes to origin. + public partial interface IHealthProbeParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The number of seconds between health probes.Default is 240sec. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of seconds between health probes.Default is 240sec.", + SerializedName = @"probeIntervalInSeconds", + PossibleTypes = new [] { typeof(int) })] + int? ProbeIntervalInSecond { get; set; } + /// + /// The path relative to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The path relative to the origin that is used to determine the health of the origin.", + SerializedName = @"probePath", + PossibleTypes = new [] { typeof(string) })] + string ProbePath { get; set; } + /// Protocol to use for health probe. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protocol to use for health probe.", + SerializedName = @"probeProtocol", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol? ProbeProtocol { get; set; } + /// The type of health probe request that is made. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of health probe request that is made.", + SerializedName = @"probeRequestType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType? ProbeRequestType { get; set; } + + } + /// The JSON object that contains the properties to send health probes to origin. + internal partial interface IHealthProbeParametersInternal + + { + /// The number of seconds between health probes.Default is 240sec. + int? ProbeIntervalInSecond { get; set; } + /// + /// The path relative to the origin that is used to determine the health of the origin. + /// + string ProbePath { get; set; } + /// Protocol to use for health probe. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol? ProbeProtocol { get; set; } + /// The type of health probe request that is made. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType? ProbeRequestType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HealthProbeParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/HealthProbeParameters.json.cs new file mode 100644 index 000000000000..62ae419c1058 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HealthProbeParameters.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties to send health probes to origin. + public partial class HealthProbeParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new HealthProbeParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal HealthProbeParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_probePath = If( json?.PropertyT("probePath"), out var __jsonProbePath) ? (string)__jsonProbePath : (string)ProbePath;} + {_probeRequestType = If( json?.PropertyT("probeRequestType"), out var __jsonProbeRequestType) ? (string)__jsonProbeRequestType : (string)ProbeRequestType;} + {_probeProtocol = If( json?.PropertyT("probeProtocol"), out var __jsonProbeProtocol) ? (string)__jsonProbeProtocol : (string)ProbeProtocol;} + {_probeIntervalInSecond = If( json?.PropertyT("probeIntervalInSeconds"), out var __jsonProbeIntervalInSeconds) ? (int?)__jsonProbeIntervalInSeconds : ProbeIntervalInSecond;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._probePath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._probePath.ToString()) : null, "probePath" ,container.Add ); + AddIf( null != (((object)this._probeRequestType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._probeRequestType.ToString()) : null, "probeRequestType" ,container.Add ); + AddIf( null != (((object)this._probeProtocol)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._probeProtocol.ToString()) : null, "probeProtocol" ,container.Add ); + AddIf( null != this._probeIntervalInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._probeIntervalInSecond) : null, "probeIntervalInSeconds" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HostNameMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/HostNameMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..1b86e922baf1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HostNameMatchConditionParameters.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for HostName match conditions + [System.ComponentModel.TypeConverter(typeof(HostNameMatchConditionParametersTypeConverter))] + public partial class HostNameMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new HostNameMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new HostNameMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal HostNameMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal HostNameMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for HostName match conditions + [System.ComponentModel.TypeConverter(typeof(HostNameMatchConditionParametersTypeConverter))] + public partial interface IHostNameMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HostNameMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/HostNameMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..a6f7f347f422 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HostNameMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class HostNameMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return HostNameMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return HostNameMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return HostNameMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HostNameMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/HostNameMatchConditionParameters.cs new file mode 100644 index 000000000000..bdc97174c872 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HostNameMatchConditionParameters.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for HostName match conditions + public partial class HostNameMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal + { + + /// Backing field for property. + private string[] _matchValue; + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator _operator; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator Operator { get => this._operator; set => this._operator = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleHostNameConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public HostNameMatchConditionParameters() + { + + } + } + /// Defines the parameters for HostName match conditions + public partial interface IHostNameMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator Operator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for HostName match conditions + internal partial interface IHostNameMatchConditionParametersInternal + + { + /// The match value for the condition of the delivery rule + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator Operator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HostNameMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/HostNameMatchConditionParameters.json.cs new file mode 100644 index 000000000000..2e202fc204a4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HostNameMatchConditionParameters.json.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for HostName match conditions + public partial class HostNameMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHostNameMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new HostNameMatchConditionParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal HostNameMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MatchValue;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._matchValue) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._matchValue ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("matchValues",__w); + } + if (null != this._transform) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._transform ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("transforms",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HttpErrorRangeParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/HttpErrorRangeParameters.PowerShell.cs new file mode 100644 index 000000000000..8904d1e2fc7f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HttpErrorRangeParameters.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that represents the range for http status codes + [System.ComponentModel.TypeConverter(typeof(HttpErrorRangeParametersTypeConverter))] + public partial class HttpErrorRangeParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new HttpErrorRangeParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new HttpErrorRangeParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal HttpErrorRangeParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Begin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParametersInternal)this).Begin = (int?) content.GetValueForProperty("Begin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParametersInternal)this).Begin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("End")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParametersInternal)this).End = (int?) content.GetValueForProperty("End",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParametersInternal)this).End, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal HttpErrorRangeParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Begin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParametersInternal)this).Begin = (int?) content.GetValueForProperty("Begin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParametersInternal)this).Begin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("End")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParametersInternal)this).End = (int?) content.GetValueForProperty("End",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParametersInternal)this).End, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that represents the range for http status codes + [System.ComponentModel.TypeConverter(typeof(HttpErrorRangeParametersTypeConverter))] + public partial interface IHttpErrorRangeParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HttpErrorRangeParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/HttpErrorRangeParameters.TypeConverter.cs new file mode 100644 index 000000000000..6a42ccb5dbf4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HttpErrorRangeParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class HttpErrorRangeParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return HttpErrorRangeParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return HttpErrorRangeParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return HttpErrorRangeParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HttpErrorRangeParameters.cs b/src/Cdn/generated/api/Models/Api20210601/HttpErrorRangeParameters.cs new file mode 100644 index 000000000000..6199da61bc48 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HttpErrorRangeParameters.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that represents the range for http status codes + public partial class HttpErrorRangeParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParametersInternal + { + + /// Backing field for property. + private int? _begin; + + /// The inclusive start of the http status code range. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? Begin { get => this._begin; set => this._begin = value; } + + /// Backing field for property. + private int? _end; + + /// The inclusive end of the http status code range. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? End { get => this._end; set => this._end = value; } + + /// Creates an new instance. + public HttpErrorRangeParameters() + { + + } + } + /// The JSON object that represents the range for http status codes + public partial interface IHttpErrorRangeParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The inclusive start of the http status code range. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The inclusive start of the http status code range.", + SerializedName = @"begin", + PossibleTypes = new [] { typeof(int) })] + int? Begin { get; set; } + /// The inclusive end of the http status code range. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The inclusive end of the http status code range.", + SerializedName = @"end", + PossibleTypes = new [] { typeof(int) })] + int? End { get; set; } + + } + /// The JSON object that represents the range for http status codes + internal partial interface IHttpErrorRangeParametersInternal + + { + /// The inclusive start of the http status code range. + int? Begin { get; set; } + /// The inclusive end of the http status code range. + int? End { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HttpErrorRangeParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/HttpErrorRangeParameters.json.cs new file mode 100644 index 000000000000..cd153d220ba0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HttpErrorRangeParameters.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that represents the range for http status codes + public partial class HttpErrorRangeParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new HttpErrorRangeParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal HttpErrorRangeParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_begin = If( json?.PropertyT("begin"), out var __jsonBegin) ? (int?)__jsonBegin : Begin;} + {_end = If( json?.PropertyT("end"), out var __jsonEnd) ? (int?)__jsonEnd : End;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._begin ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._begin) : null, "begin" ,container.Add ); + AddIf( null != this._end ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._end) : null, "end" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HttpVersionMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/HttpVersionMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..5c597577ee36 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HttpVersionMatchConditionParameters.PowerShell.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for HttpVersion match conditions + [System.ComponentModel.TypeConverter(typeof(HttpVersionMatchConditionParametersTypeConverter))] + public partial class HttpVersionMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new HttpVersionMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new HttpVersionMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal HttpVersionMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).Operator = (string) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).Operator, global::System.Convert.ToString); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal HttpVersionMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).Operator = (string) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).Operator, global::System.Convert.ToString); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for HttpVersion match conditions + [System.ComponentModel.TypeConverter(typeof(HttpVersionMatchConditionParametersTypeConverter))] + public partial interface IHttpVersionMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HttpVersionMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/HttpVersionMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..7ace81d1c300 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HttpVersionMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class HttpVersionMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return HttpVersionMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return HttpVersionMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return HttpVersionMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HttpVersionMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/HttpVersionMatchConditionParameters.cs new file mode 100644 index 000000000000..c5aae547ada5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HttpVersionMatchConditionParameters.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for HttpVersion match conditions + public partial class HttpVersionMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal + { + + /// Backing field for property. + private string[] _matchValue; + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for Operator + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal.Operator { get => this._operator; set { {_operator = value;} } } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private string _operator= @"Equal"; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Operator { get => this._operator; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleHttpVersionConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public HttpVersionMatchConditionParameters() + { + + } + } + /// Defines the parameters for HttpVersion match conditions + public partial interface IHttpVersionMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(string) })] + string Operator { get; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for HttpVersion match conditions + internal partial interface IHttpVersionMatchConditionParametersInternal + + { + /// The match value for the condition of the delivery rule + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + string Operator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/HttpVersionMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/HttpVersionMatchConditionParameters.json.cs new file mode 100644 index 000000000000..35b53036fd56 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/HttpVersionMatchConditionParameters.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for HttpVersion match conditions + public partial class HttpVersionMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpVersionMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new HttpVersionMatchConditionParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal HttpVersionMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MatchValue;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._matchValue) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._matchValue ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("matchValues",__w); + } + if (null != this._transform) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._transform ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("transforms",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/IPAddressGroup.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/IPAddressGroup.PowerShell.cs new file mode 100644 index 000000000000..9d6fbcee2f43 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/IPAddressGroup.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// CDN Ip address group + [System.ComponentModel.TypeConverter(typeof(IPAddressGroupTypeConverter))] + public partial class IPAddressGroup + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new IPAddressGroup(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new IPAddressGroup(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal IPAddressGroup(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DeliveryRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroupInternal)this).DeliveryRegion = (string) content.GetValueForProperty("DeliveryRegion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroupInternal)this).DeliveryRegion, global::System.Convert.ToString); + } + if (content.Contains("Ipv4Address")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroupInternal)this).Ipv4Address = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress[]) content.GetValueForProperty("Ipv4Address",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroupInternal)this).Ipv4Address, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CidrIPAddressTypeConverter.ConvertFrom)); + } + if (content.Contains("Ipv6Address")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroupInternal)this).Ipv6Address = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress[]) content.GetValueForProperty("Ipv6Address",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroupInternal)this).Ipv6Address, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CidrIPAddressTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal IPAddressGroup(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DeliveryRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroupInternal)this).DeliveryRegion = (string) content.GetValueForProperty("DeliveryRegion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroupInternal)this).DeliveryRegion, global::System.Convert.ToString); + } + if (content.Contains("Ipv4Address")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroupInternal)this).Ipv4Address = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress[]) content.GetValueForProperty("Ipv4Address",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroupInternal)this).Ipv4Address, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CidrIPAddressTypeConverter.ConvertFrom)); + } + if (content.Contains("Ipv6Address")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroupInternal)this).Ipv6Address = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress[]) content.GetValueForProperty("Ipv6Address",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroupInternal)this).Ipv6Address, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CidrIPAddressTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// CDN Ip address group + [System.ComponentModel.TypeConverter(typeof(IPAddressGroupTypeConverter))] + public partial interface IIPAddressGroup + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/IPAddressGroup.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/IPAddressGroup.TypeConverter.cs new file mode 100644 index 000000000000..68326a08d4a9 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/IPAddressGroup.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class IPAddressGroupTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return IPAddressGroup.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return IPAddressGroup.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return IPAddressGroup.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/IPAddressGroup.cs b/src/Cdn/generated/api/Models/Api20210601/IPAddressGroup.cs new file mode 100644 index 000000000000..a9b9e7b56d71 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/IPAddressGroup.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// CDN Ip address group + public partial class IPAddressGroup : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroupInternal + { + + /// Backing field for property. + private string _deliveryRegion; + + /// The delivery region of the ip address group + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string DeliveryRegion { get => this._deliveryRegion; set => this._deliveryRegion = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress[] _ipv4Address; + + /// The list of ip v4 addresses. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress[] Ipv4Address { get => this._ipv4Address; set => this._ipv4Address = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress[] _ipv6Address; + + /// The list of ip v6 addresses. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress[] Ipv6Address { get => this._ipv6Address; set => this._ipv6Address = value; } + + /// Creates an new instance. + public IPAddressGroup() + { + + } + } + /// CDN Ip address group + public partial interface IIPAddressGroup : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The delivery region of the ip address group + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The delivery region of the ip address group", + SerializedName = @"deliveryRegion", + PossibleTypes = new [] { typeof(string) })] + string DeliveryRegion { get; set; } + /// The list of ip v4 addresses. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of ip v4 addresses.", + SerializedName = @"ipv4Addresses", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress[] Ipv4Address { get; set; } + /// The list of ip v6 addresses. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of ip v6 addresses.", + SerializedName = @"ipv6Addresses", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress[] Ipv6Address { get; set; } + + } + /// CDN Ip address group + internal partial interface IIPAddressGroupInternal + + { + /// The delivery region of the ip address group + string DeliveryRegion { get; set; } + /// The list of ip v4 addresses. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress[] Ipv4Address { get; set; } + /// The list of ip v6 addresses. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress[] Ipv6Address { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/IPAddressGroup.json.cs b/src/Cdn/generated/api/Models/Api20210601/IPAddressGroup.json.cs new file mode 100644 index 000000000000..d048d148fedf --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/IPAddressGroup.json.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// CDN Ip address group + public partial class IPAddressGroup + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIPAddressGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new IPAddressGroup(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal IPAddressGroup(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_deliveryRegion = If( json?.PropertyT("deliveryRegion"), out var __jsonDeliveryRegion) ? (string)__jsonDeliveryRegion : (string)DeliveryRegion;} + {_ipv4Address = If( json?.PropertyT("ipv4Addresses"), out var __jsonIpv4Addresses) ? If( __jsonIpv4Addresses as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CidrIPAddress.FromJson(__u) )) ))() : null : Ipv4Address;} + {_ipv6Address = If( json?.PropertyT("ipv6Addresses"), out var __jsonIpv6Addresses) ? If( __jsonIpv6Addresses as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICidrIPAddress) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CidrIPAddress.FromJson(__p) )) ))() : null : Ipv6Address;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._deliveryRegion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._deliveryRegion.ToString()) : null, "deliveryRegion" ,container.Add ); + if (null != this._ipv4Address) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._ipv4Address ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("ipv4Addresses",__w); + } + if (null != this._ipv6Address) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._ipv6Address ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("ipv6Addresses",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/IsDeviceMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/IsDeviceMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..99f24aae22e6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/IsDeviceMatchConditionParameters.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for IsDevice match conditions + [System.ComponentModel.TypeConverter(typeof(IsDeviceMatchConditionParametersTypeConverter))] + public partial class IsDeviceMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new IsDeviceMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new IsDeviceMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal IsDeviceMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).Operator = (string) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).Operator, global::System.Convert.ToString); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal IsDeviceMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).Operator = (string) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).Operator, global::System.Convert.ToString); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for IsDevice match conditions + [System.ComponentModel.TypeConverter(typeof(IsDeviceMatchConditionParametersTypeConverter))] + public partial interface IIsDeviceMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/IsDeviceMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/IsDeviceMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..459e4afd73e0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/IsDeviceMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class IsDeviceMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return IsDeviceMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return IsDeviceMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return IsDeviceMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/IsDeviceMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/IsDeviceMatchConditionParameters.cs new file mode 100644 index 000000000000..293caf9cc0cd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/IsDeviceMatchConditionParameters.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for IsDevice match conditions + public partial class IsDeviceMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal + { + + /// Backing field for property. + private string[] _matchValue; + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for Operator + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal.Operator { get => this._operator; set { {_operator = value;} } } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private string _operator= @"Equal"; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Operator { get => this._operator; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleIsDeviceConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public IsDeviceMatchConditionParameters() + { + + } + } + /// Defines the parameters for IsDevice match conditions + public partial interface IIsDeviceMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(string) })] + string Operator { get; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for IsDevice match conditions + internal partial interface IIsDeviceMatchConditionParametersInternal + + { + /// The match value for the condition of the delivery rule + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + string Operator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/IsDeviceMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/IsDeviceMatchConditionParameters.json.cs new file mode 100644 index 000000000000..03dc7de46e5e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/IsDeviceMatchConditionParameters.json.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for IsDevice match conditions + public partial class IsDeviceMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IIsDeviceMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new IsDeviceMatchConditionParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal IsDeviceMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MatchValue;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._matchValue) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._matchValue ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("matchValues",__w); + } + if (null != this._transform) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._transform ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("transforms",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/KeyVaultCertificateSourceParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/KeyVaultCertificateSourceParameters.PowerShell.cs new file mode 100644 index 000000000000..8bb6329aae1a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/KeyVaultCertificateSourceParameters.PowerShell.cs @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Describes the parameters for using a user's KeyVault certificate for securing custom domain. + /// + [System.ComponentModel.TypeConverter(typeof(KeyVaultCertificateSourceParametersTypeConverter))] + public partial class KeyVaultCertificateSourceParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new KeyVaultCertificateSourceParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new KeyVaultCertificateSourceParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal KeyVaultCertificateSourceParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).SubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("ResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).ResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("VaultName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).VaultName = (string) content.GetValueForProperty("VaultName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).VaultName, global::System.Convert.ToString); + } + if (content.Contains("SecretName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).SecretName = (string) content.GetValueForProperty("SecretName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).SecretName, global::System.Convert.ToString); + } + if (content.Contains("SecretVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).SecretVersion = (string) content.GetValueForProperty("SecretVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).SecretVersion, global::System.Convert.ToString); + } + if (content.Contains("UpdateRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).UpdateRule = (string) content.GetValueForProperty("UpdateRule",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).UpdateRule, global::System.Convert.ToString); + } + if (content.Contains("DeleteRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).DeleteRule = (string) content.GetValueForProperty("DeleteRule",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).DeleteRule, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal KeyVaultCertificateSourceParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).SubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("ResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).ResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("VaultName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).VaultName = (string) content.GetValueForProperty("VaultName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).VaultName, global::System.Convert.ToString); + } + if (content.Contains("SecretName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).SecretName = (string) content.GetValueForProperty("SecretName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).SecretName, global::System.Convert.ToString); + } + if (content.Contains("SecretVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).SecretVersion = (string) content.GetValueForProperty("SecretVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).SecretVersion, global::System.Convert.ToString); + } + if (content.Contains("UpdateRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).UpdateRule = (string) content.GetValueForProperty("UpdateRule",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).UpdateRule, global::System.Convert.ToString); + } + if (content.Contains("DeleteRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).DeleteRule = (string) content.GetValueForProperty("DeleteRule",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)this).DeleteRule, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Describes the parameters for using a user's KeyVault certificate for securing custom domain. + [System.ComponentModel.TypeConverter(typeof(KeyVaultCertificateSourceParametersTypeConverter))] + public partial interface IKeyVaultCertificateSourceParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/KeyVaultCertificateSourceParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/KeyVaultCertificateSourceParameters.TypeConverter.cs new file mode 100644 index 000000000000..a3e4887e5b17 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/KeyVaultCertificateSourceParameters.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class KeyVaultCertificateSourceParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return KeyVaultCertificateSourceParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return KeyVaultCertificateSourceParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return KeyVaultCertificateSourceParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/KeyVaultCertificateSourceParameters.cs b/src/Cdn/generated/api/Models/Api20210601/KeyVaultCertificateSourceParameters.cs new file mode 100644 index 000000000000..4d0e69feb132 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/KeyVaultCertificateSourceParameters.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Describes the parameters for using a user's KeyVault certificate for securing custom domain. + /// + public partial class KeyVaultCertificateSourceParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal + { + + /// Backing field for property. + private string _deleteRule= @"NoAction"; + + /// + /// Describes the action that shall be taken when the certificate is removed from Key Vault. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string DeleteRule { get => this._deleteRule; } + + /// Internal Acessors for DeleteRule + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal.DeleteRule { get => this._deleteRule; set { {_deleteRule = value;} } } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Internal Acessors for UpdateRule + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal.UpdateRule { get => this._updateRule; set { {_updateRule = value;} } } + + /// Backing field for property. + private string _resourceGroupName; + + /// Resource group of the user's Key Vault containing the SSL certificate + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _secretName; + + /// + /// The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string SecretName { get => this._secretName; set => this._secretName = value; } + + /// Backing field for property. + private string _secretVersion; + + /// The version(GUID) of Key Vault Secret in Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string SecretVersion { get => this._secretVersion; set => this._secretVersion = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Subscription Id of the user's Key Vault containing the SSL certificate + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private string _typeName= @"KeyVaultCertificateSourceParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Backing field for property. + private string _updateRule= @"NoAction"; + + /// + /// Describes the action that shall be taken when the certificate is updated in Key Vault. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string UpdateRule { get => this._updateRule; } + + /// Backing field for property. + private string _vaultName; + + /// The name of the user's Key Vault containing the SSL certificate + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string VaultName { get => this._vaultName; set => this._vaultName = value; } + + /// Creates an new instance. + public KeyVaultCertificateSourceParameters() + { + + } + } + /// Describes the parameters for using a user's KeyVault certificate for securing custom domain. + public partial interface IKeyVaultCertificateSourceParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// Describes the action that shall be taken when the certificate is removed from Key Vault. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Describes the action that shall be taken when the certificate is removed from Key Vault.", + SerializedName = @"deleteRule", + PossibleTypes = new [] { typeof(string) })] + string DeleteRule { get; } + /// Resource group of the user's Key Vault containing the SSL certificate + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Resource group of the user's Key Vault containing the SSL certificate", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + string ResourceGroupName { get; set; } + /// + /// The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of Key Vault Secret (representing the full certificate PFX) in Key Vault.", + SerializedName = @"secretName", + PossibleTypes = new [] { typeof(string) })] + string SecretName { get; set; } + /// The version(GUID) of Key Vault Secret in Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The version(GUID) of Key Vault Secret in Key Vault.", + SerializedName = @"secretVersion", + PossibleTypes = new [] { typeof(string) })] + string SecretVersion { get; set; } + /// Subscription Id of the user's Key Vault containing the SSL certificate + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription Id of the user's Key Vault containing the SSL certificate", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + string SubscriptionId { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + /// + /// Describes the action that shall be taken when the certificate is updated in Key Vault. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Describes the action that shall be taken when the certificate is updated in Key Vault.", + SerializedName = @"updateRule", + PossibleTypes = new [] { typeof(string) })] + string UpdateRule { get; } + /// The name of the user's Key Vault containing the SSL certificate + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the user's Key Vault containing the SSL certificate", + SerializedName = @"vaultName", + PossibleTypes = new [] { typeof(string) })] + string VaultName { get; set; } + + } + /// Describes the parameters for using a user's KeyVault certificate for securing custom domain. + internal partial interface IKeyVaultCertificateSourceParametersInternal + + { + /// + /// Describes the action that shall be taken when the certificate is removed from Key Vault. + /// + string DeleteRule { get; set; } + /// Resource group of the user's Key Vault containing the SSL certificate + string ResourceGroupName { get; set; } + /// + /// The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. + /// + string SecretName { get; set; } + /// The version(GUID) of Key Vault Secret in Key Vault. + string SecretVersion { get; set; } + /// Subscription Id of the user's Key Vault containing the SSL certificate + string SubscriptionId { get; set; } + + string TypeName { get; set; } + /// + /// Describes the action that shall be taken when the certificate is updated in Key Vault. + /// + string UpdateRule { get; set; } + /// The name of the user's Key Vault containing the SSL certificate + string VaultName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/KeyVaultCertificateSourceParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/KeyVaultCertificateSourceParameters.json.cs new file mode 100644 index 000000000000..d4dc34fece76 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/KeyVaultCertificateSourceParameters.json.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Describes the parameters for using a user's KeyVault certificate for securing custom domain. + /// + public partial class KeyVaultCertificateSourceParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new KeyVaultCertificateSourceParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal KeyVaultCertificateSourceParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} + {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;} + {_vaultName = If( json?.PropertyT("vaultName"), out var __jsonVaultName) ? (string)__jsonVaultName : (string)VaultName;} + {_secretName = If( json?.PropertyT("secretName"), out var __jsonSecretName) ? (string)__jsonSecretName : (string)SecretName;} + {_secretVersion = If( json?.PropertyT("secretVersion"), out var __jsonSecretVersion) ? (string)__jsonSecretVersion : (string)SecretVersion;} + {_updateRule = If( json?.PropertyT("updateRule"), out var __jsonUpdateRule) ? (string)__jsonUpdateRule : (string)UpdateRule;} + {_deleteRule = If( json?.PropertyT("deleteRule"), out var __jsonDeleteRule) ? (string)__jsonDeleteRule : (string)DeleteRule;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add ); + AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add ); + AddIf( null != (((object)this._vaultName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._vaultName.ToString()) : null, "vaultName" ,container.Add ); + AddIf( null != (((object)this._secretName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._secretName.ToString()) : null, "secretName" ,container.Add ); + AddIf( null != (((object)this._secretVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._secretVersion.ToString()) : null, "secretVersion" ,container.Add ); + AddIf( null != (((object)this._updateRule)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._updateRule.ToString()) : null, "updateRule" ,container.Add ); + AddIf( null != (((object)this._deleteRule)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._deleteRule.ToString()) : null, "deleteRule" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/KeyVaultSigningKeyParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/KeyVaultSigningKeyParameters.PowerShell.cs new file mode 100644 index 000000000000..275202e2f7ed --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/KeyVaultSigningKeyParameters.PowerShell.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Describes the parameters for using a user's KeyVault for URL Signing Key. + [System.ComponentModel.TypeConverter(typeof(KeyVaultSigningKeyParametersTypeConverter))] + public partial class KeyVaultSigningKeyParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new KeyVaultSigningKeyParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new KeyVaultSigningKeyParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal KeyVaultSigningKeyParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).SubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("ResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).ResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("VaultName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).VaultName = (string) content.GetValueForProperty("VaultName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).VaultName, global::System.Convert.ToString); + } + if (content.Contains("SecretName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).SecretName = (string) content.GetValueForProperty("SecretName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).SecretName, global::System.Convert.ToString); + } + if (content.Contains("SecretVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).SecretVersion = (string) content.GetValueForProperty("SecretVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).SecretVersion, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal KeyVaultSigningKeyParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).SubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("ResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).ResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("VaultName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).VaultName = (string) content.GetValueForProperty("VaultName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).VaultName, global::System.Convert.ToString); + } + if (content.Contains("SecretName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).SecretName = (string) content.GetValueForProperty("SecretName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).SecretName, global::System.Convert.ToString); + } + if (content.Contains("SecretVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).SecretVersion = (string) content.GetValueForProperty("SecretVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)this).SecretVersion, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Describes the parameters for using a user's KeyVault for URL Signing Key. + [System.ComponentModel.TypeConverter(typeof(KeyVaultSigningKeyParametersTypeConverter))] + public partial interface IKeyVaultSigningKeyParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/KeyVaultSigningKeyParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/KeyVaultSigningKeyParameters.TypeConverter.cs new file mode 100644 index 000000000000..4dda3a74ccb4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/KeyVaultSigningKeyParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class KeyVaultSigningKeyParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return KeyVaultSigningKeyParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return KeyVaultSigningKeyParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return KeyVaultSigningKeyParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/KeyVaultSigningKeyParameters.cs b/src/Cdn/generated/api/Models/Api20210601/KeyVaultSigningKeyParameters.cs new file mode 100644 index 000000000000..9a8a3e3c9847 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/KeyVaultSigningKeyParameters.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Describes the parameters for using a user's KeyVault for URL Signing Key. + public partial class KeyVaultSigningKeyParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal + { + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private string _resourceGroupName; + + /// Resource group of the user's Key Vault containing the secret + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _secretName; + + /// The name of secret in Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string SecretName { get => this._secretName; set => this._secretName = value; } + + /// Backing field for property. + private string _secretVersion; + + /// The version(GUID) of secret in Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string SecretVersion { get => this._secretVersion; set => this._secretVersion = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Subscription Id of the user's Key Vault containing the secret + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private string _typeName= @"KeyVaultSigningKeyParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Backing field for property. + private string _vaultName; + + /// The name of the user's Key Vault containing the secret + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string VaultName { get => this._vaultName; set => this._vaultName = value; } + + /// Creates an new instance. + public KeyVaultSigningKeyParameters() + { + + } + } + /// Describes the parameters for using a user's KeyVault for URL Signing Key. + public partial interface IKeyVaultSigningKeyParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Resource group of the user's Key Vault containing the secret + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Resource group of the user's Key Vault containing the secret", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + string ResourceGroupName { get; set; } + /// The name of secret in Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of secret in Key Vault.", + SerializedName = @"secretName", + PossibleTypes = new [] { typeof(string) })] + string SecretName { get; set; } + /// The version(GUID) of secret in Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The version(GUID) of secret in Key Vault.", + SerializedName = @"secretVersion", + PossibleTypes = new [] { typeof(string) })] + string SecretVersion { get; set; } + /// Subscription Id of the user's Key Vault containing the secret + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription Id of the user's Key Vault containing the secret", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + string SubscriptionId { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + /// The name of the user's Key Vault containing the secret + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the user's Key Vault containing the secret", + SerializedName = @"vaultName", + PossibleTypes = new [] { typeof(string) })] + string VaultName { get; set; } + + } + /// Describes the parameters for using a user's KeyVault for URL Signing Key. + internal partial interface IKeyVaultSigningKeyParametersInternal + + { + /// Resource group of the user's Key Vault containing the secret + string ResourceGroupName { get; set; } + /// The name of secret in Key Vault. + string SecretName { get; set; } + /// The version(GUID) of secret in Key Vault. + string SecretVersion { get; set; } + /// Subscription Id of the user's Key Vault containing the secret + string SubscriptionId { get; set; } + + string TypeName { get; set; } + /// The name of the user's Key Vault containing the secret + string VaultName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/KeyVaultSigningKeyParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/KeyVaultSigningKeyParameters.json.cs new file mode 100644 index 000000000000..04ab017263b4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/KeyVaultSigningKeyParameters.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Describes the parameters for using a user's KeyVault for URL Signing Key. + public partial class KeyVaultSigningKeyParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new KeyVaultSigningKeyParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal KeyVaultSigningKeyParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} + {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;} + {_vaultName = If( json?.PropertyT("vaultName"), out var __jsonVaultName) ? (string)__jsonVaultName : (string)VaultName;} + {_secretName = If( json?.PropertyT("secretName"), out var __jsonSecretName) ? (string)__jsonSecretName : (string)SecretName;} + {_secretVersion = If( json?.PropertyT("secretVersion"), out var __jsonSecretVersion) ? (string)__jsonSecretVersion : (string)SecretVersion;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add ); + AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add ); + AddIf( null != (((object)this._vaultName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._vaultName.ToString()) : null, "vaultName" ,container.Add ); + AddIf( null != (((object)this._secretName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._secretName.ToString()) : null, "secretName" ,container.Add ); + AddIf( null != (((object)this._secretVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._secretVersion.ToString()) : null, "secretVersion" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/LoadBalancingSettingsParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/LoadBalancingSettingsParameters.PowerShell.cs new file mode 100644 index 000000000000..7e2dfaf8a743 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/LoadBalancingSettingsParameters.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Round-Robin load balancing settings for a backend pool + [System.ComponentModel.TypeConverter(typeof(LoadBalancingSettingsParametersTypeConverter))] + public partial class LoadBalancingSettingsParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new LoadBalancingSettingsParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new LoadBalancingSettingsParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal LoadBalancingSettingsParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SampleSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParametersInternal)this).SampleSize = (int?) content.GetValueForProperty("SampleSize",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParametersInternal)this).SampleSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SuccessfulSamplesRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParametersInternal)this).SuccessfulSamplesRequired = (int?) content.GetValueForProperty("SuccessfulSamplesRequired",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParametersInternal)this).SuccessfulSamplesRequired, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AdditionalLatencyInMillisecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParametersInternal)this).AdditionalLatencyInMillisecond = (int?) content.GetValueForProperty("AdditionalLatencyInMillisecond",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParametersInternal)this).AdditionalLatencyInMillisecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal LoadBalancingSettingsParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SampleSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParametersInternal)this).SampleSize = (int?) content.GetValueForProperty("SampleSize",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParametersInternal)this).SampleSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SuccessfulSamplesRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParametersInternal)this).SuccessfulSamplesRequired = (int?) content.GetValueForProperty("SuccessfulSamplesRequired",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParametersInternal)this).SuccessfulSamplesRequired, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AdditionalLatencyInMillisecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParametersInternal)this).AdditionalLatencyInMillisecond = (int?) content.GetValueForProperty("AdditionalLatencyInMillisecond",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParametersInternal)this).AdditionalLatencyInMillisecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Round-Robin load balancing settings for a backend pool + [System.ComponentModel.TypeConverter(typeof(LoadBalancingSettingsParametersTypeConverter))] + public partial interface ILoadBalancingSettingsParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/LoadBalancingSettingsParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/LoadBalancingSettingsParameters.TypeConverter.cs new file mode 100644 index 000000000000..16e6ed60d6ae --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/LoadBalancingSettingsParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class LoadBalancingSettingsParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return LoadBalancingSettingsParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return LoadBalancingSettingsParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return LoadBalancingSettingsParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/LoadBalancingSettingsParameters.cs b/src/Cdn/generated/api/Models/Api20210601/LoadBalancingSettingsParameters.cs new file mode 100644 index 000000000000..148a3b04f99d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/LoadBalancingSettingsParameters.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Round-Robin load balancing settings for a backend pool + public partial class LoadBalancingSettingsParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParametersInternal + { + + /// Backing field for property. + private int? _additionalLatencyInMillisecond; + + /// + /// The additional latency in milliseconds for probes to fall into the lowest latency bucket + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? AdditionalLatencyInMillisecond { get => this._additionalLatencyInMillisecond; set => this._additionalLatencyInMillisecond = value; } + + /// Backing field for property. + private int? _sampleSize; + + /// The number of samples to consider for load balancing decisions + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? SampleSize { get => this._sampleSize; set => this._sampleSize = value; } + + /// Backing field for property. + private int? _successfulSamplesRequired; + + /// The number of samples within the sample period that must succeed + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? SuccessfulSamplesRequired { get => this._successfulSamplesRequired; set => this._successfulSamplesRequired = value; } + + /// Creates an new instance. + public LoadBalancingSettingsParameters() + { + + } + } + /// Round-Robin load balancing settings for a backend pool + public partial interface ILoadBalancingSettingsParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// The additional latency in milliseconds for probes to fall into the lowest latency bucket + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The additional latency in milliseconds for probes to fall into the lowest latency bucket", + SerializedName = @"additionalLatencyInMilliseconds", + PossibleTypes = new [] { typeof(int) })] + int? AdditionalLatencyInMillisecond { get; set; } + /// The number of samples to consider for load balancing decisions + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of samples to consider for load balancing decisions", + SerializedName = @"sampleSize", + PossibleTypes = new [] { typeof(int) })] + int? SampleSize { get; set; } + /// The number of samples within the sample period that must succeed + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of samples within the sample period that must succeed", + SerializedName = @"successfulSamplesRequired", + PossibleTypes = new [] { typeof(int) })] + int? SuccessfulSamplesRequired { get; set; } + + } + /// Round-Robin load balancing settings for a backend pool + internal partial interface ILoadBalancingSettingsParametersInternal + + { + /// + /// The additional latency in milliseconds for probes to fall into the lowest latency bucket + /// + int? AdditionalLatencyInMillisecond { get; set; } + /// The number of samples to consider for load balancing decisions + int? SampleSize { get; set; } + /// The number of samples within the sample period that must succeed + int? SuccessfulSamplesRequired { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/LoadBalancingSettingsParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/LoadBalancingSettingsParameters.json.cs new file mode 100644 index 000000000000..917d9e336c07 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/LoadBalancingSettingsParameters.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Round-Robin load balancing settings for a backend pool + public partial class LoadBalancingSettingsParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new LoadBalancingSettingsParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal LoadBalancingSettingsParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_sampleSize = If( json?.PropertyT("sampleSize"), out var __jsonSampleSize) ? (int?)__jsonSampleSize : SampleSize;} + {_successfulSamplesRequired = If( json?.PropertyT("successfulSamplesRequired"), out var __jsonSuccessfulSamplesRequired) ? (int?)__jsonSuccessfulSamplesRequired : SuccessfulSamplesRequired;} + {_additionalLatencyInMillisecond = If( json?.PropertyT("additionalLatencyInMilliseconds"), out var __jsonAdditionalLatencyInMilliseconds) ? (int?)__jsonAdditionalLatencyInMilliseconds : AdditionalLatencyInMillisecond;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._sampleSize ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._sampleSize) : null, "sampleSize" ,container.Add ); + AddIf( null != this._successfulSamplesRequired ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._successfulSamplesRequired) : null, "successfulSamplesRequired" ,container.Add ); + AddIf( null != this._additionalLatencyInMillisecond ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._additionalLatencyInMillisecond) : null, "additionalLatencyInMilliseconds" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/LoadParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/LoadParameters.PowerShell.cs new file mode 100644 index 000000000000..e4e6b5e68c76 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/LoadParameters.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Parameters required for content load. + [System.ComponentModel.TypeConverter(typeof(LoadParametersTypeConverter))] + public partial class LoadParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new LoadParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new LoadParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal LoadParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ContentPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParametersInternal)this).ContentPath = (string[]) content.GetValueForProperty("ContentPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParametersInternal)this).ContentPath, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal LoadParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ContentPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParametersInternal)this).ContentPath = (string[]) content.GetValueForProperty("ContentPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParametersInternal)this).ContentPath, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Parameters required for content load. + [System.ComponentModel.TypeConverter(typeof(LoadParametersTypeConverter))] + public partial interface ILoadParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/LoadParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/LoadParameters.TypeConverter.cs new file mode 100644 index 000000000000..c0a7f285f1bc --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/LoadParameters.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class LoadParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return LoadParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return LoadParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return LoadParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/LoadParameters.cs b/src/Cdn/generated/api/Models/Api20210601/LoadParameters.cs new file mode 100644 index 000000000000..f36ffa971ad3 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/LoadParameters.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Parameters required for content load. + public partial class LoadParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParametersInternal + { + + /// Backing field for property. + private string[] _contentPath; + + /// + /// The path to the content to be loaded. Path should be a relative file URL of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] ContentPath { get => this._contentPath; set => this._contentPath = value; } + + /// Creates an new instance. + public LoadParameters() + { + + } + } + /// Parameters required for content load. + public partial interface ILoadParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// The path to the content to be loaded. Path should be a relative file URL of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The path to the content to be loaded. Path should be a relative file URL of the origin.", + SerializedName = @"contentPaths", + PossibleTypes = new [] { typeof(string) })] + string[] ContentPath { get; set; } + + } + /// Parameters required for content load. + internal partial interface ILoadParametersInternal + + { + /// + /// The path to the content to be loaded. Path should be a relative file URL of the origin. + /// + string[] ContentPath { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/LoadParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/LoadParameters.json.cs new file mode 100644 index 000000000000..3bd55dbc03c0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/LoadParameters.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Parameters required for content load. + public partial class LoadParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new LoadParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal LoadParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_contentPath = If( json?.PropertyT("contentPaths"), out var __jsonContentPaths) ? If( __jsonContentPaths as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : ContentPath;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._contentPath) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._contentPath ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("contentPaths",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/LogSpecification.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/LogSpecification.PowerShell.cs new file mode 100644 index 000000000000..8c9d156c100d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/LogSpecification.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Log specification of operation. + [System.ComponentModel.TypeConverter(typeof(LogSpecificationTypeConverter))] + public partial class LogSpecification + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new LogSpecification(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new LogSpecification(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal LogSpecification(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecificationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecificationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecificationInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecificationInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("BlobDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecificationInternal)this).BlobDuration = (string) content.GetValueForProperty("BlobDuration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecificationInternal)this).BlobDuration, global::System.Convert.ToString); + } + if (content.Contains("LogFilterPattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecificationInternal)this).LogFilterPattern = (string) content.GetValueForProperty("LogFilterPattern",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecificationInternal)this).LogFilterPattern, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal LogSpecification(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecificationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecificationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecificationInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecificationInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("BlobDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecificationInternal)this).BlobDuration = (string) content.GetValueForProperty("BlobDuration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecificationInternal)this).BlobDuration, global::System.Convert.ToString); + } + if (content.Contains("LogFilterPattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecificationInternal)this).LogFilterPattern = (string) content.GetValueForProperty("LogFilterPattern",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecificationInternal)this).LogFilterPattern, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Log specification of operation. + [System.ComponentModel.TypeConverter(typeof(LogSpecificationTypeConverter))] + public partial interface ILogSpecification + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/LogSpecification.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/LogSpecification.TypeConverter.cs new file mode 100644 index 000000000000..60173b4af5b2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/LogSpecification.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class LogSpecificationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return LogSpecification.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return LogSpecification.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return LogSpecification.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/LogSpecification.cs b/src/Cdn/generated/api/Models/Api20210601/LogSpecification.cs new file mode 100644 index 000000000000..08d318a3d22d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/LogSpecification.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Log specification of operation. + public partial class LogSpecification : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecificationInternal + { + + /// Backing field for property. + private string _blobDuration; + + /// Blob duration of specification. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string BlobDuration { get => this._blobDuration; set => this._blobDuration = value; } + + /// Backing field for property. + private string _displayName; + + /// Display name of log specification. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private string _logFilterPattern; + + /// Pattern to filter based on name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string LogFilterPattern { get => this._logFilterPattern; set => this._logFilterPattern = value; } + + /// Backing field for property. + private string _name; + + /// Name of log specification. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Creates an new instance. + public LogSpecification() + { + + } + } + /// Log specification of operation. + public partial interface ILogSpecification : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Blob duration of specification. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Blob duration of specification.", + SerializedName = @"blobDuration", + PossibleTypes = new [] { typeof(string) })] + string BlobDuration { get; set; } + /// Display name of log specification. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display name of log specification.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Pattern to filter based on name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Pattern to filter based on name", + SerializedName = @"logFilterPattern", + PossibleTypes = new [] { typeof(string) })] + string LogFilterPattern { get; set; } + /// Name of log specification. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of log specification.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + + } + /// Log specification of operation. + internal partial interface ILogSpecificationInternal + + { + /// Blob duration of specification. + string BlobDuration { get; set; } + /// Display name of log specification. + string DisplayName { get; set; } + /// Pattern to filter based on name + string LogFilterPattern { get; set; } + /// Name of log specification. + string Name { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/LogSpecification.json.cs b/src/Cdn/generated/api/Models/Api20210601/LogSpecification.json.cs new file mode 100644 index 000000000000..433e55673f81 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/LogSpecification.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Log specification of operation. + public partial class LogSpecification + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new LogSpecification(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal LogSpecification(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_blobDuration = If( json?.PropertyT("blobDuration"), out var __jsonBlobDuration) ? (string)__jsonBlobDuration : (string)BlobDuration;} + {_logFilterPattern = If( json?.PropertyT("logFilterPattern"), out var __jsonLogFilterPattern) ? (string)__jsonLogFilterPattern : (string)LogFilterPattern;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AddIf( null != (((object)this._blobDuration)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._blobDuration.ToString()) : null, "blobDuration" ,container.Add ); + AddIf( null != (((object)this._logFilterPattern)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._logFilterPattern.ToString()) : null, "logFilterPattern" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ManagedCertificate.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ManagedCertificate.PowerShell.cs new file mode 100644 index 000000000000..f710d9cfbbea --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ManagedCertificate.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Managed Certificate used for https + [System.ComponentModel.TypeConverter(typeof(ManagedCertificateTypeConverter))] + public partial class ManagedCertificate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedCertificate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedCertificate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ManagedCertificate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("ExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).ExpirationDate = (string) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).ExpirationDate, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedCertificate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("ExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).ExpirationDate = (string) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)this).ExpirationDate, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Managed Certificate used for https + [System.ComponentModel.TypeConverter(typeof(ManagedCertificateTypeConverter))] + public partial interface IManagedCertificate + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ManagedCertificate.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ManagedCertificate.TypeConverter.cs new file mode 100644 index 000000000000..6abff0053d07 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ManagedCertificate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedCertificateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedCertificate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedCertificate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedCertificate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ManagedCertificate.cs b/src/Cdn/generated/api/Models/Api20210601/ManagedCertificate.cs new file mode 100644 index 000000000000..d88ef3f1e183 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ManagedCertificate.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Managed Certificate used for https + public partial class ManagedCertificate : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificate, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificate __certificate = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Certificate(); + + /// Certificate expiration date. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string ExpirationDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).ExpirationDate; } + + /// Internal Acessors for ExpirationDate + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal.ExpirationDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).ExpirationDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).ExpirationDate = value; } + + /// Internal Acessors for Subject + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal.Subject { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).Subject; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).Subject = value; } + + /// Subject name in the certificate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Subject { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).Subject; } + + /// The type of the secret resource. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType? Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal)__certificate).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType)""); } + + /// Creates an new instance. + public ManagedCertificate() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__certificate), __certificate); + await eventListener.AssertObjectIsValid(nameof(__certificate), __certificate); + } + } + /// Managed Certificate used for https + public partial interface IManagedCertificate : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificate + { + + } + /// Managed Certificate used for https + internal partial interface IManagedCertificateInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICertificateInternal + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ManagedCertificate.json.cs b/src/Cdn/generated/api/Models/Api20210601/ManagedCertificate.json.cs new file mode 100644 index 000000000000..67ea7dec3e7c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ManagedCertificate.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Managed Certificate used for https + public partial class ManagedCertificate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ManagedCertificate(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ManagedCertificate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __certificate = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Certificate(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __certificate?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ManagedCertificateParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ManagedCertificateParameters.PowerShell.cs new file mode 100644 index 000000000000..643f281a866c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ManagedCertificateParameters.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Managed Certificate used for https + [System.ComponentModel.TypeConverter(typeof(ManagedCertificateParametersTypeConverter))] + public partial class ManagedCertificateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedCertificateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedCertificateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ManagedCertificateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParametersInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParametersInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("ExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParametersInternal)this).ExpirationDate = (string) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParametersInternal)this).ExpirationDate, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedCertificateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Subject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParametersInternal)this).Subject = (string) content.GetValueForProperty("Subject",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParametersInternal)this).Subject, global::System.Convert.ToString); + } + if (content.Contains("ExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParametersInternal)this).ExpirationDate = (string) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParametersInternal)this).ExpirationDate, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Managed Certificate used for https + [System.ComponentModel.TypeConverter(typeof(ManagedCertificateParametersTypeConverter))] + public partial interface IManagedCertificateParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ManagedCertificateParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ManagedCertificateParameters.TypeConverter.cs new file mode 100644 index 000000000000..6a57346144fa --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ManagedCertificateParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedCertificateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedCertificateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedCertificateParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedCertificateParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ManagedCertificateParameters.cs b/src/Cdn/generated/api/Models/Api20210601/ManagedCertificateParameters.cs new file mode 100644 index 000000000000..3d89268aa4fc --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ManagedCertificateParameters.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Managed Certificate used for https + public partial class ManagedCertificateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParametersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters __secretParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretParameters(); + + /// Backing field for property. + private string _expirationDate; + + /// Certificate expiration date. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ExpirationDate { get => this._expirationDate; } + + /// Internal Acessors for ExpirationDate + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParametersInternal.ExpirationDate { get => this._expirationDate; set { {_expirationDate = value;} } } + + /// Internal Acessors for Subject + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParametersInternal.Subject { get => this._subject; set { {_subject = value;} } } + + /// Backing field for property. + private string _subject; + + /// Subject name in the certificate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Subject { get => this._subject; } + + /// The type of the secret resource. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)__secretParameters).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)__secretParameters).Type = value ; } + + /// Creates an new instance. + public ManagedCertificateParameters() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__secretParameters), __secretParameters); + await eventListener.AssertObjectIsValid(nameof(__secretParameters), __secretParameters); + } + } + /// Managed Certificate used for https + public partial interface IManagedCertificateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters + { + /// Certificate expiration date. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Certificate expiration date.", + SerializedName = @"expirationDate", + PossibleTypes = new [] { typeof(string) })] + string ExpirationDate { get; } + /// Subject name in the certificate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Subject name in the certificate.", + SerializedName = @"subject", + PossibleTypes = new [] { typeof(string) })] + string Subject { get; } + + } + /// Managed Certificate used for https + internal partial interface IManagedCertificateParametersInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal + { + /// Certificate expiration date. + string ExpirationDate { get; set; } + /// Subject name in the certificate. + string Subject { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ManagedCertificateParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/ManagedCertificateParameters.json.cs new file mode 100644 index 000000000000..90fe09575bff --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ManagedCertificateParameters.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Managed Certificate used for https + public partial class ManagedCertificateParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IManagedCertificateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ManagedCertificateParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ManagedCertificateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __secretParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretParameters(json); + {_subject = If( json?.PropertyT("subject"), out var __jsonSubject) ? (string)__jsonSubject : (string)Subject;} + {_expirationDate = If( json?.PropertyT("expirationDate"), out var __jsonExpirationDate) ? (string)__jsonExpirationDate : (string)ExpirationDate;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __secretParameters?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._subject)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._subject.ToString()) : null, "subject" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._expirationDate)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._expirationDate.ToString()) : null, "expirationDate" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricAvailability.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/MetricAvailability.PowerShell.cs new file mode 100644 index 000000000000..59b83681572d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricAvailability.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Retention policy of a resource metric. + [System.ComponentModel.TypeConverter(typeof(MetricAvailabilityTypeConverter))] + public partial class MetricAvailability + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MetricAvailability(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MetricAvailability(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MetricAvailability(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TimeGrain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailabilityInternal)this).TimeGrain = (string) content.GetValueForProperty("TimeGrain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailabilityInternal)this).TimeGrain, global::System.Convert.ToString); + } + if (content.Contains("BlobDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailabilityInternal)this).BlobDuration = (string) content.GetValueForProperty("BlobDuration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailabilityInternal)this).BlobDuration, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MetricAvailability(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TimeGrain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailabilityInternal)this).TimeGrain = (string) content.GetValueForProperty("TimeGrain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailabilityInternal)this).TimeGrain, global::System.Convert.ToString); + } + if (content.Contains("BlobDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailabilityInternal)this).BlobDuration = (string) content.GetValueForProperty("BlobDuration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailabilityInternal)this).BlobDuration, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Retention policy of a resource metric. + [System.ComponentModel.TypeConverter(typeof(MetricAvailabilityTypeConverter))] + public partial interface IMetricAvailability + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricAvailability.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/MetricAvailability.TypeConverter.cs new file mode 100644 index 000000000000..c2d7deb796ce --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricAvailability.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MetricAvailabilityTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MetricAvailability.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MetricAvailability.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MetricAvailability.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricAvailability.cs b/src/Cdn/generated/api/Models/Api20210601/MetricAvailability.cs new file mode 100644 index 000000000000..b5c1231596b6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricAvailability.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Retention policy of a resource metric. + public partial class MetricAvailability : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailabilityInternal + { + + /// Backing field for property. + private string _blobDuration; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string BlobDuration { get => this._blobDuration; set => this._blobDuration = value; } + + /// Backing field for property. + private string _timeGrain; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TimeGrain { get => this._timeGrain; set => this._timeGrain = value; } + + /// Creates an new instance. + public MetricAvailability() + { + + } + } + /// Retention policy of a resource metric. + public partial interface IMetricAvailability : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"blobDuration", + PossibleTypes = new [] { typeof(string) })] + string BlobDuration { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"timeGrain", + PossibleTypes = new [] { typeof(string) })] + string TimeGrain { get; set; } + + } + /// Retention policy of a resource metric. + internal partial interface IMetricAvailabilityInternal + + { + string BlobDuration { get; set; } + + string TimeGrain { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricAvailability.json.cs b/src/Cdn/generated/api/Models/Api20210601/MetricAvailability.json.cs new file mode 100644 index 000000000000..a920d575005b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricAvailability.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Retention policy of a resource metric. + public partial class MetricAvailability + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new MetricAvailability(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal MetricAvailability(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_timeGrain = If( json?.PropertyT("timeGrain"), out var __jsonTimeGrain) ? (string)__jsonTimeGrain : (string)TimeGrain;} + {_blobDuration = If( json?.PropertyT("blobDuration"), out var __jsonBlobDuration) ? (string)__jsonBlobDuration : (string)BlobDuration;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._timeGrain)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._timeGrain.ToString()) : null, "timeGrain" ,container.Add ); + AddIf( null != (((object)this._blobDuration)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._blobDuration.ToString()) : null, "blobDuration" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricSpecification.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/MetricSpecification.PowerShell.cs new file mode 100644 index 000000000000..d6b314d7a989 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricSpecification.PowerShell.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Metric specification of operation. + [System.ComponentModel.TypeConverter(typeof(MetricSpecificationTypeConverter))] + public partial class MetricSpecification + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MetricSpecification(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MetricSpecification(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MetricSpecification(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("DisplayDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).DisplayDescription, global::System.Convert.ToString); + } + if (content.Contains("Unit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).Unit, global::System.Convert.ToString); + } + if (content.Contains("AggregationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).AggregationType = (string) content.GetValueForProperty("AggregationType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).AggregationType, global::System.Convert.ToString); + } + if (content.Contains("Availability")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).Availability = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability[]) content.GetValueForProperty("Availability",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).Availability, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricAvailabilityTypeConverter.ConvertFrom)); + } + if (content.Contains("SupportedTimeGrainType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).SupportedTimeGrainType = (string[]) content.GetValueForProperty("SupportedTimeGrainType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).SupportedTimeGrainType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Dimension")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).Dimension = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties[]) content.GetValueForProperty("Dimension",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).Dimension, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DimensionPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("FillGapWithZero")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).FillGapWithZero = (bool?) content.GetValueForProperty("FillGapWithZero",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).FillGapWithZero, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MetricFilterPattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).MetricFilterPattern = (string) content.GetValueForProperty("MetricFilterPattern",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).MetricFilterPattern, global::System.Convert.ToString); + } + if (content.Contains("IsInternal")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).IsInternal = (bool?) content.GetValueForProperty("IsInternal",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).IsInternal, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MetricSpecification(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("DisplayDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).DisplayDescription, global::System.Convert.ToString); + } + if (content.Contains("Unit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).Unit, global::System.Convert.ToString); + } + if (content.Contains("AggregationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).AggregationType = (string) content.GetValueForProperty("AggregationType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).AggregationType, global::System.Convert.ToString); + } + if (content.Contains("Availability")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).Availability = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability[]) content.GetValueForProperty("Availability",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).Availability, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricAvailabilityTypeConverter.ConvertFrom)); + } + if (content.Contains("SupportedTimeGrainType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).SupportedTimeGrainType = (string[]) content.GetValueForProperty("SupportedTimeGrainType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).SupportedTimeGrainType, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Dimension")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).Dimension = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties[]) content.GetValueForProperty("Dimension",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).Dimension, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DimensionPropertiesTypeConverter.ConvertFrom)); + } + if (content.Contains("FillGapWithZero")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).FillGapWithZero = (bool?) content.GetValueForProperty("FillGapWithZero",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).FillGapWithZero, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MetricFilterPattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).MetricFilterPattern = (string) content.GetValueForProperty("MetricFilterPattern",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).MetricFilterPattern, global::System.Convert.ToString); + } + if (content.Contains("IsInternal")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).IsInternal = (bool?) content.GetValueForProperty("IsInternal",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal)this).IsInternal, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Metric specification of operation. + [System.ComponentModel.TypeConverter(typeof(MetricSpecificationTypeConverter))] + public partial interface IMetricSpecification + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricSpecification.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/MetricSpecification.TypeConverter.cs new file mode 100644 index 000000000000..1dcfca1af223 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricSpecification.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MetricSpecificationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MetricSpecification.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MetricSpecification.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MetricSpecification.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricSpecification.cs b/src/Cdn/generated/api/Models/Api20210601/MetricSpecification.cs new file mode 100644 index 000000000000..3f505dbac764 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricSpecification.cs @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Metric specification of operation. + public partial class MetricSpecification : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecificationInternal + { + + /// Backing field for property. + private string _aggregationType; + + /// + /// The metric aggregation type. Possible values include: 'Average', 'Count', 'Total'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string AggregationType { get => this._aggregationType; set => this._aggregationType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability[] _availability; + + /// Retention policies of a resource metric. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability[] Availability { get => this._availability; set => this._availability = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties[] _dimension; + + /// The dimensions of metric + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties[] Dimension { get => this._dimension; set => this._dimension = value; } + + /// Backing field for property. + private string _displayDescription; + + /// Display description of metric specification. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string DisplayDescription { get => this._displayDescription; set => this._displayDescription = value; } + + /// Backing field for property. + private string _displayName; + + /// Display name of metric specification. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private bool? _fillGapWithZero; + + /// Property to specify whether to fill gap with zero. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? FillGapWithZero { get => this._fillGapWithZero; set => this._fillGapWithZero = value; } + + /// Backing field for property. + private bool? _isInternal; + + /// Property to specify metric is internal or not. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? IsInternal { get => this._isInternal; set => this._isInternal = value; } + + /// Backing field for property. + private string _metricFilterPattern; + + /// Pattern to filter based on name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string MetricFilterPattern { get => this._metricFilterPattern; set => this._metricFilterPattern = value; } + + /// Backing field for property. + private string _name; + + /// Name of metric specification. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string[] _supportedTimeGrainType; + + /// The supported time grain types for the metrics. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] SupportedTimeGrainType { get => this._supportedTimeGrainType; set => this._supportedTimeGrainType = value; } + + /// Backing field for property. + private string _unit; + + /// The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Unit { get => this._unit; set => this._unit = value; } + + /// Creates an new instance. + public MetricSpecification() + { + + } + } + /// Metric specification of operation. + public partial interface IMetricSpecification : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// The metric aggregation type. Possible values include: 'Average', 'Count', 'Total'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The metric aggregation type. Possible values include: 'Average', 'Count', 'Total'.", + SerializedName = @"aggregationType", + PossibleTypes = new [] { typeof(string) })] + string AggregationType { get; set; } + /// Retention policies of a resource metric. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention policies of a resource metric.", + SerializedName = @"availabilities", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability[] Availability { get; set; } + /// The dimensions of metric + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The dimensions of metric", + SerializedName = @"dimensions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties[] Dimension { get; set; } + /// Display description of metric specification. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display description of metric specification.", + SerializedName = @"displayDescription", + PossibleTypes = new [] { typeof(string) })] + string DisplayDescription { get; set; } + /// Display name of metric specification. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display name of metric specification.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Property to specify whether to fill gap with zero. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Property to specify whether to fill gap with zero.", + SerializedName = @"fillGapWithZero", + PossibleTypes = new [] { typeof(bool) })] + bool? FillGapWithZero { get; set; } + /// Property to specify metric is internal or not. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Property to specify metric is internal or not.", + SerializedName = @"isInternal", + PossibleTypes = new [] { typeof(bool) })] + bool? IsInternal { get; set; } + /// Pattern to filter based on name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Pattern to filter based on name", + SerializedName = @"metricFilterPattern", + PossibleTypes = new [] { typeof(string) })] + string MetricFilterPattern { get; set; } + /// Name of metric specification. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of metric specification.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// The supported time grain types for the metrics. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The supported time grain types for the metrics.", + SerializedName = @"supportedTimeGrainTypes", + PossibleTypes = new [] { typeof(string) })] + string[] SupportedTimeGrainType { get; set; } + /// The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'.", + SerializedName = @"unit", + PossibleTypes = new [] { typeof(string) })] + string Unit { get; set; } + + } + /// Metric specification of operation. + internal partial interface IMetricSpecificationInternal + + { + /// + /// The metric aggregation type. Possible values include: 'Average', 'Count', 'Total'. + /// + string AggregationType { get; set; } + /// Retention policies of a resource metric. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability[] Availability { get; set; } + /// The dimensions of metric + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties[] Dimension { get; set; } + /// Display description of metric specification. + string DisplayDescription { get; set; } + /// Display name of metric specification. + string DisplayName { get; set; } + /// Property to specify whether to fill gap with zero. + bool? FillGapWithZero { get; set; } + /// Property to specify metric is internal or not. + bool? IsInternal { get; set; } + /// Pattern to filter based on name + string MetricFilterPattern { get; set; } + /// Name of metric specification. + string Name { get; set; } + /// The supported time grain types for the metrics. + string[] SupportedTimeGrainType { get; set; } + /// The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'. + string Unit { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricSpecification.json.cs b/src/Cdn/generated/api/Models/Api20210601/MetricSpecification.json.cs new file mode 100644 index 000000000000..8686b432add5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricSpecification.json.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Metric specification of operation. + public partial class MetricSpecification + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new MetricSpecification(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal MetricSpecification(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_displayDescription = If( json?.PropertyT("displayDescription"), out var __jsonDisplayDescription) ? (string)__jsonDisplayDescription : (string)DisplayDescription;} + {_unit = If( json?.PropertyT("unit"), out var __jsonUnit) ? (string)__jsonUnit : (string)Unit;} + {_aggregationType = If( json?.PropertyT("aggregationType"), out var __jsonAggregationType) ? (string)__jsonAggregationType : (string)AggregationType;} + {_availability = If( json?.PropertyT("availabilities"), out var __jsonAvailabilities) ? If( __jsonAvailabilities as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricAvailability) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricAvailability.FromJson(__u) )) ))() : null : Availability;} + {_supportedTimeGrainType = If( json?.PropertyT("supportedTimeGrainTypes"), out var __jsonSupportedTimeGrainTypes) ? If( __jsonSupportedTimeGrainTypes as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : SupportedTimeGrainType;} + {_dimension = If( json?.PropertyT("dimensions"), out var __jsonDimensions) ? If( __jsonDimensions as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDimensionProperties) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DimensionProperties.FromJson(__k) )) ))() : null : Dimension;} + {_fillGapWithZero = If( json?.PropertyT("fillGapWithZero"), out var __jsonFillGapWithZero) ? (bool?)__jsonFillGapWithZero : FillGapWithZero;} + {_metricFilterPattern = If( json?.PropertyT("metricFilterPattern"), out var __jsonMetricFilterPattern) ? (string)__jsonMetricFilterPattern : (string)MetricFilterPattern;} + {_isInternal = If( json?.PropertyT("isInternal"), out var __jsonIsInternal) ? (bool?)__jsonIsInternal : IsInternal;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AddIf( null != (((object)this._displayDescription)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._displayDescription.ToString()) : null, "displayDescription" ,container.Add ); + AddIf( null != (((object)this._unit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._unit.ToString()) : null, "unit" ,container.Add ); + AddIf( null != (((object)this._aggregationType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._aggregationType.ToString()) : null, "aggregationType" ,container.Add ); + if (null != this._availability) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._availability ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("availabilities",__w); + } + if (null != this._supportedTimeGrainType) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._supportedTimeGrainType ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("supportedTimeGrainTypes",__r); + } + if (null != this._dimension) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __n in this._dimension ) + { + AddIf(__n?.ToJson(null, serializationMode) ,__m.Add); + } + container.Add("dimensions",__m); + } + AddIf( null != this._fillGapWithZero ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._fillGapWithZero) : null, "fillGapWithZero" ,container.Add ); + AddIf( null != (((object)this._metricFilterPattern)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._metricFilterPattern.ToString()) : null, "metricFilterPattern" ,container.Add ); + AddIf( null != this._isInternal ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._isInternal) : null, "isInternal" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricsResponse.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/MetricsResponse.PowerShell.cs new file mode 100644 index 000000000000..66fb601994b0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricsResponse.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Metrics Response + [System.ComponentModel.TypeConverter(typeof(MetricsResponseTypeConverter))] + public partial class MetricsResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MetricsResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MetricsResponse(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MetricsResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DateTimeBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseInternal)this).DateTimeBegin = (global::System.DateTime?) content.GetValueForProperty("DateTimeBegin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseInternal)this).DateTimeBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("DateTimeEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseInternal)this).DateTimeEnd = (global::System.DateTime?) content.GetValueForProperty("DateTimeEnd",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseInternal)this).DateTimeEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Granularity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseInternal)this).Granularity = (string) content.GetValueForProperty("Granularity",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseInternal)this).Granularity, global::System.Convert.ToString); + } + if (content.Contains("Series")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseInternal)this).Series = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItem[]) content.GetValueForProperty("Series",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseInternal)this).Series, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricsResponseSeriesItemTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MetricsResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DateTimeBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseInternal)this).DateTimeBegin = (global::System.DateTime?) content.GetValueForProperty("DateTimeBegin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseInternal)this).DateTimeBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("DateTimeEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseInternal)this).DateTimeEnd = (global::System.DateTime?) content.GetValueForProperty("DateTimeEnd",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseInternal)this).DateTimeEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Granularity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseInternal)this).Granularity = (string) content.GetValueForProperty("Granularity",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseInternal)this).Granularity, global::System.Convert.ToString); + } + if (content.Contains("Series")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseInternal)this).Series = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItem[]) content.GetValueForProperty("Series",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseInternal)this).Series, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricsResponseSeriesItemTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Metrics Response + [System.ComponentModel.TypeConverter(typeof(MetricsResponseTypeConverter))] + public partial interface IMetricsResponse + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricsResponse.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/MetricsResponse.TypeConverter.cs new file mode 100644 index 000000000000..2fec5b1b6dba --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricsResponse.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MetricsResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MetricsResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MetricsResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MetricsResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricsResponse.cs b/src/Cdn/generated/api/Models/Api20210601/MetricsResponse.cs new file mode 100644 index 000000000000..358963ff0946 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricsResponse.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Metrics Response + public partial class MetricsResponse : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponse, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseInternal + { + + /// Backing field for property. + private global::System.DateTime? _dateTimeBegin; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public global::System.DateTime? DateTimeBegin { get => this._dateTimeBegin; set => this._dateTimeBegin = value; } + + /// Backing field for property. + private global::System.DateTime? _dateTimeEnd; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public global::System.DateTime? DateTimeEnd { get => this._dateTimeEnd; set => this._dateTimeEnd = value; } + + /// Backing field for property. + private string _granularity; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Granularity { get => this._granularity; set => this._granularity = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItem[] _series; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItem[] Series { get => this._series; set => this._series = value; } + + /// Creates an new instance. + public MetricsResponse() + { + + } + } + /// Metrics Response + public partial interface IMetricsResponse : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeBegin", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DateTimeBegin { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DateTimeEnd { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"granularity", + PossibleTypes = new [] { typeof(string) })] + string Granularity { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"series", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItem[] Series { get; set; } + + } + /// Metrics Response + internal partial interface IMetricsResponseInternal + + { + global::System.DateTime? DateTimeBegin { get; set; } + + global::System.DateTime? DateTimeEnd { get; set; } + + string Granularity { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItem[] Series { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricsResponse.json.cs b/src/Cdn/generated/api/Models/Api20210601/MetricsResponse.json.cs new file mode 100644 index 000000000000..ea98219da29b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricsResponse.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Metrics Response + public partial class MetricsResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new MetricsResponse(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal MetricsResponse(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dateTimeBegin = If( json?.PropertyT("dateTimeBegin"), out var __jsonDateTimeBegin) ? global::System.DateTime.TryParse((string)__jsonDateTimeBegin, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonDateTimeBeginValue) ? __jsonDateTimeBeginValue : DateTimeBegin : DateTimeBegin;} + {_dateTimeEnd = If( json?.PropertyT("dateTimeEnd"), out var __jsonDateTimeEnd) ? global::System.DateTime.TryParse((string)__jsonDateTimeEnd, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonDateTimeEndValue) ? __jsonDateTimeEndValue : DateTimeEnd : DateTimeEnd;} + {_granularity = If( json?.PropertyT("granularity"), out var __jsonGranularity) ? (string)__jsonGranularity : (string)Granularity;} + {_series = If( json?.PropertyT("series"), out var __jsonSeries) ? If( __jsonSeries as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItem) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricsResponseSeriesItem.FromJson(__u) )) ))() : null : Series;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._dateTimeBegin ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._dateTimeBegin?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "dateTimeBegin" ,container.Add ); + AddIf( null != this._dateTimeEnd ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._dateTimeEnd?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "dateTimeEnd" ,container.Add ); + AddIf( null != (((object)this._granularity)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._granularity.ToString()) : null, "granularity" ,container.Add ); + if (null != this._series) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._series ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("series",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesItem.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesItem.PowerShell.cs new file mode 100644 index 000000000000..7646539d006c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesItem.PowerShell.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(MetricsResponseSeriesItemTypeConverter))] + public partial class MetricsResponseSeriesItem + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MetricsResponseSeriesItem(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MetricsResponseSeriesItem(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MetricsResponseSeriesItem(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Metric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItemInternal)this).Metric = (string) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItemInternal)this).Metric, global::System.Convert.ToString); + } + if (content.Contains("Unit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItemInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItemInternal)this).Unit, global::System.Convert.ToString); + } + if (content.Contains("Group")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItemInternal)this).Group = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItem[]) content.GetValueForProperty("Group",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItemInternal)this).Group, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricsResponseSeriesPropertiesItemsItemTypeConverter.ConvertFrom)); + } + if (content.Contains("Data")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItemInternal)this).Data = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems[]) content.GetValueForProperty("Data",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItemInternal)this).Data, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItemsTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MetricsResponseSeriesItem(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Metric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItemInternal)this).Metric = (string) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItemInternal)this).Metric, global::System.Convert.ToString); + } + if (content.Contains("Unit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItemInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItemInternal)this).Unit, global::System.Convert.ToString); + } + if (content.Contains("Group")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItemInternal)this).Group = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItem[]) content.GetValueForProperty("Group",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItemInternal)this).Group, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricsResponseSeriesPropertiesItemsItemTypeConverter.ConvertFrom)); + } + if (content.Contains("Data")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItemInternal)this).Data = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems[]) content.GetValueForProperty("Data",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItemInternal)this).Data, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItemsTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(MetricsResponseSeriesItemTypeConverter))] + public partial interface IMetricsResponseSeriesItem + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesItem.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesItem.TypeConverter.cs new file mode 100644 index 000000000000..6d2873a7a2dc --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesItem.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MetricsResponseSeriesItemTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItem ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItem).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MetricsResponseSeriesItem.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MetricsResponseSeriesItem.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MetricsResponseSeriesItem.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesItem.cs b/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesItem.cs new file mode 100644 index 000000000000..7efd56c49095 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesItem.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class MetricsResponseSeriesItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItem, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItemInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems[] _data; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems[] Data { get => this._data; set => this._data = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItem[] _group; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItem[] Group { get => this._group; set => this._group = value; } + + /// Backing field for property. + private string _metric; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Metric { get => this._metric; set => this._metric = value; } + + /// Backing field for property. + private string _unit; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Unit { get => this._unit; set => this._unit = value; } + + /// Creates an new instance. + public MetricsResponseSeriesItem() + { + + } + } + public partial interface IMetricsResponseSeriesItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"data", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems[] Data { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"groups", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItem[] Group { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"metric", + PossibleTypes = new [] { typeof(string) })] + string Metric { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"unit", + PossibleTypes = new [] { typeof(string) })] + string Unit { get; set; } + + } + internal partial interface IMetricsResponseSeriesItemInternal + + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems[] Data { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItem[] Group { get; set; } + + string Metric { get; set; } + + string Unit { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesItem.json.cs b/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesItem.json.cs new file mode 100644 index 000000000000..f57015eaa02d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesItem.json.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class MetricsResponseSeriesItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new MetricsResponseSeriesItem(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal MetricsResponseSeriesItem(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_metric = If( json?.PropertyT("metric"), out var __jsonMetric) ? (string)__jsonMetric : (string)Metric;} + {_unit = If( json?.PropertyT("unit"), out var __jsonUnit) ? (string)__jsonUnit : (string)Unit;} + {_group = If( json?.PropertyT("groups"), out var __jsonGroups) ? If( __jsonGroups as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItem) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricsResponseSeriesPropertiesItemsItem.FromJson(__u) )) ))() : null : Group;} + {_data = If( json?.PropertyT("data"), out var __jsonData) ? If( __jsonData as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.FromJson(__p) )) ))() : null : Data;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._metric)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._metric.ToString()) : null, "metric" ,container.Add ); + AddIf( null != (((object)this._unit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._unit.ToString()) : null, "unit" ,container.Add ); + if (null != this._group) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._group ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("groups",__w); + } + if (null != this._data) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._data ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("data",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesPropertiesItemsItem.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesPropertiesItemsItem.PowerShell.cs new file mode 100644 index 000000000000..9b0eb14503f2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesPropertiesItemsItem.PowerShell.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(MetricsResponseSeriesPropertiesItemsItemTypeConverter))] + public partial class MetricsResponseSeriesPropertiesItemsItem + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MetricsResponseSeriesPropertiesItemsItem(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MetricsResponseSeriesPropertiesItemsItem(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MetricsResponseSeriesPropertiesItemsItem(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItemInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItemInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItemInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItemInternal)this).Value, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MetricsResponseSeriesPropertiesItemsItem(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItemInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItemInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItemInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItemInternal)this).Value, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(MetricsResponseSeriesPropertiesItemsItemTypeConverter))] + public partial interface IMetricsResponseSeriesPropertiesItemsItem + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesPropertiesItemsItem.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesPropertiesItemsItem.TypeConverter.cs new file mode 100644 index 000000000000..7ad25a350e93 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesPropertiesItemsItem.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MetricsResponseSeriesPropertiesItemsItemTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItem ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItem).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MetricsResponseSeriesPropertiesItemsItem.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MetricsResponseSeriesPropertiesItemsItem.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MetricsResponseSeriesPropertiesItemsItem.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesPropertiesItemsItem.cs b/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesPropertiesItemsItem.cs new file mode 100644 index 000000000000..75f0589ca240 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesPropertiesItemsItem.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class MetricsResponseSeriesPropertiesItemsItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItem, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItemInternal + { + + /// Backing field for property. + private string _name; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _value; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Value { get => this._value; set => this._value = value; } + + /// + /// Creates an new instance. + /// + public MetricsResponseSeriesPropertiesItemsItem() + { + + } + } + public partial interface IMetricsResponseSeriesPropertiesItemsItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"value", + PossibleTypes = new [] { typeof(string) })] + string Value { get; set; } + + } + internal partial interface IMetricsResponseSeriesPropertiesItemsItemInternal + + { + string Name { get; set; } + + string Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesPropertiesItemsItem.json.cs b/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesPropertiesItemsItem.json.cs new file mode 100644 index 000000000000..3059208a5431 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/MetricsResponseSeriesPropertiesItemsItem.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class MetricsResponseSeriesPropertiesItemsItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponseSeriesPropertiesItemsItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new MetricsResponseSeriesPropertiesItemsItem(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal MetricsResponseSeriesPropertiesItemsItem(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)Value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._value.ToString()) : null, "value" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Operation.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/Operation.PowerShell.cs new file mode 100644 index 000000000000..bbe1da512d79 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Operation.PowerShell.cs @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// CDN REST API operation + [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))] + public partial class Operation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Operation(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Operation(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Operation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Display")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OperationDisplayTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OperationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("IsDataAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).Origin, global::System.Convert.ToString); + } + if (content.Contains("PropertyServiceSpecification")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).PropertyServiceSpecification = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification) content.GetValueForProperty("PropertyServiceSpecification",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).PropertyServiceSpecification, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ServiceSpecificationTypeConverter.ConvertFrom); + } + if (content.Contains("DisplayProvider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + } + if (content.Contains("DisplayResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + } + if (content.Contains("DisplayOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + } + if (content.Contains("DisplayDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + } + if (content.Contains("ServiceSpecificationLogSpecification")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).ServiceSpecificationLogSpecification = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification[]) content.GetValueForProperty("ServiceSpecificationLogSpecification",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).ServiceSpecificationLogSpecification, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LogSpecificationTypeConverter.ConvertFrom)); + } + if (content.Contains("ServiceSpecificationMetricSpecification")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).ServiceSpecificationMetricSpecification = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification[]) content.GetValueForProperty("ServiceSpecificationMetricSpecification",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).ServiceSpecificationMetricSpecification, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricSpecificationTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Operation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Display")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OperationDisplayTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OperationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("IsDataAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).Origin, global::System.Convert.ToString); + } + if (content.Contains("PropertyServiceSpecification")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).PropertyServiceSpecification = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification) content.GetValueForProperty("PropertyServiceSpecification",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).PropertyServiceSpecification, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ServiceSpecificationTypeConverter.ConvertFrom); + } + if (content.Contains("DisplayProvider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + } + if (content.Contains("DisplayResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + } + if (content.Contains("DisplayOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + } + if (content.Contains("DisplayDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + } + if (content.Contains("ServiceSpecificationLogSpecification")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).ServiceSpecificationLogSpecification = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification[]) content.GetValueForProperty("ServiceSpecificationLogSpecification",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).ServiceSpecificationLogSpecification, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LogSpecificationTypeConverter.ConvertFrom)); + } + if (content.Contains("ServiceSpecificationMetricSpecification")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).ServiceSpecificationMetricSpecification = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification[]) content.GetValueForProperty("ServiceSpecificationMetricSpecification",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal)this).ServiceSpecificationMetricSpecification, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricSpecificationTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// CDN REST API operation + [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))] + public partial interface IOperation + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Operation.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/Operation.TypeConverter.cs new file mode 100644 index 000000000000..28a523710a5d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Operation.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Operation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Operation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Operation.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Operation.cs b/src/Cdn/generated/api/Models/Api20210601/Operation.cs new file mode 100644 index 000000000000..b7d66b454d9c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Operation.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// CDN REST API operation + public partial class Operation : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplay _display; + + /// The object that represents the operation. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OperationDisplay()); set => this._display = value; } + + /// Description of operation. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)Display).Description; } + + /// Operation type: Read, write, delete, etc. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)Display).Operation; } + + /// Service provider: Microsoft.Cdn + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)Display).Provider; } + + /// Resource on which the operation is performed: Profile, endpoint, etc. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)Display).Resource; } + + /// Backing field for property. + private bool? _isDataAction; + + /// Indicates whether the operation is a data action + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? IsDataAction { get => this._isDataAction; set => this._isDataAction = value; } + + /// Internal Acessors for Display + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OperationDisplay()); set { {_display = value;} } } + + /// Internal Acessors for DisplayDescription + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)Display).Description = value; } + + /// Internal Acessors for DisplayOperation + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)Display).Operation = value; } + + /// Internal Acessors for DisplayProvider + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)Display).Provider = value; } + + /// Internal Acessors for DisplayResource + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)Display).Resource = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for Origin + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal.Origin { get => this._origin; set { {_origin = value;} } } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OperationProperties()); set { {_property = value;} } } + + /// Internal Acessors for PropertyServiceSpecification + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationInternal.PropertyServiceSpecification { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal)Property).ServiceSpecification; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal)Property).ServiceSpecification = value; } + + /// Backing field for property. + private string _name; + + /// Operation name: {provider}/{resource}/{operation} + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private string _origin; + + /// The origin of operations. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Origin { get => this._origin; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationProperties _property; + + /// Properties of operation, include metric specifications. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OperationProperties()); set => this._property = value; } + + /// Log specifications of operation. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification[] ServiceSpecificationLogSpecification { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal)Property).ServiceSpecificationLogSpecification; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal)Property).ServiceSpecificationLogSpecification = value ?? null /* arrayOf */; } + + /// Metric specifications of operation. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification[] ServiceSpecificationMetricSpecification { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal)Property).ServiceSpecificationMetricSpecification; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal)Property).ServiceSpecificationMetricSpecification = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public Operation() + { + + } + } + /// CDN REST API operation + public partial interface IOperation : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Description of operation. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Description of operation.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string DisplayDescription { get; } + /// Operation type: Read, write, delete, etc. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Operation type: Read, write, delete, etc.", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string DisplayOperation { get; } + /// Service provider: Microsoft.Cdn + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Service provider: Microsoft.Cdn", + SerializedName = @"provider", + PossibleTypes = new [] { typeof(string) })] + string DisplayProvider { get; } + /// Resource on which the operation is performed: Profile, endpoint, etc. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource on which the operation is performed: Profile, endpoint, etc.", + SerializedName = @"resource", + PossibleTypes = new [] { typeof(string) })] + string DisplayResource { get; } + /// Indicates whether the operation is a data action + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the operation is a data action", + SerializedName = @"isDataAction", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDataAction { get; set; } + /// Operation name: {provider}/{resource}/{operation} + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Operation name: {provider}/{resource}/{operation}", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The origin of operations. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The origin of operations.", + SerializedName = @"origin", + PossibleTypes = new [] { typeof(string) })] + string Origin { get; } + /// Log specifications of operation. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Log specifications of operation.", + SerializedName = @"logSpecifications", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification[] ServiceSpecificationLogSpecification { get; set; } + /// Metric specifications of operation. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Metric specifications of operation.", + SerializedName = @"metricSpecifications", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification[] ServiceSpecificationMetricSpecification { get; set; } + + } + /// CDN REST API operation + internal partial interface IOperationInternal + + { + /// The object that represents the operation. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplay Display { get; set; } + /// Description of operation. + string DisplayDescription { get; set; } + /// Operation type: Read, write, delete, etc. + string DisplayOperation { get; set; } + /// Service provider: Microsoft.Cdn + string DisplayProvider { get; set; } + /// Resource on which the operation is performed: Profile, endpoint, etc. + string DisplayResource { get; set; } + /// Indicates whether the operation is a data action + bool? IsDataAction { get; set; } + /// Operation name: {provider}/{resource}/{operation} + string Name { get; set; } + /// The origin of operations. + string Origin { get; set; } + /// Properties of operation, include metric specifications. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationProperties Property { get; set; } + /// One property of operation, include metric specifications. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification PropertyServiceSpecification { get; set; } + /// Log specifications of operation. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification[] ServiceSpecificationLogSpecification { get; set; } + /// Metric specifications of operation. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification[] ServiceSpecificationMetricSpecification { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Operation.json.cs b/src/Cdn/generated/api/Models/Api20210601/Operation.json.cs new file mode 100644 index 000000000000..764be69c3984 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Operation.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// CDN REST API operation + public partial class Operation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new Operation(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal Operation(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OperationDisplay.FromJson(__jsonDisplay) : Display;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OperationProperties.FromJson(__jsonProperties) : Property;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : IsDataAction;} + {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + AddIf( null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OperationDisplay.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/OperationDisplay.PowerShell.cs new file mode 100644 index 000000000000..6fce50d2d6c5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OperationDisplay.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The object that represents the operation. + [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))] + public partial class OperationDisplay + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationDisplay(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationDisplay(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationDisplay(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Provider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + } + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationDisplay(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Provider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + } + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The object that represents the operation. + [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))] + public partial interface IOperationDisplay + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OperationDisplay.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/OperationDisplay.TypeConverter.cs new file mode 100644 index 000000000000..2c6b865a0fdb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OperationDisplay.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationDisplayTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplay ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplay).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationDisplay.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationDisplay.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationDisplay.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OperationDisplay.cs b/src/Cdn/generated/api/Models/Api20210601/OperationDisplay.cs new file mode 100644 index 000000000000..2da642e6b156 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OperationDisplay.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The object that represents the operation. + public partial class OperationDisplay : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplay, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal + { + + /// Backing field for property. + private string _description; + + /// Description of operation. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Description { get => this._description; } + + /// Internal Acessors for Description + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal.Description { get => this._description; set { {_description = value;} } } + + /// Internal Acessors for Operation + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } + + /// Internal Acessors for Provider + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } + + /// Internal Acessors for Resource + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } } + + /// Backing field for property. + private string _operation; + + /// Operation type: Read, write, delete, etc. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Operation { get => this._operation; } + + /// Backing field for property. + private string _provider; + + /// Service provider: Microsoft.Cdn + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Provider { get => this._provider; } + + /// Backing field for property. + private string _resource; + + /// Resource on which the operation is performed: Profile, endpoint, etc. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Resource { get => this._resource; } + + /// Creates an new instance. + public OperationDisplay() + { + + } + } + /// The object that represents the operation. + public partial interface IOperationDisplay : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Description of operation. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Description of operation.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; } + /// Operation type: Read, write, delete, etc. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Operation type: Read, write, delete, etc.", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string Operation { get; } + /// Service provider: Microsoft.Cdn + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Service provider: Microsoft.Cdn", + SerializedName = @"provider", + PossibleTypes = new [] { typeof(string) })] + string Provider { get; } + /// Resource on which the operation is performed: Profile, endpoint, etc. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource on which the operation is performed: Profile, endpoint, etc.", + SerializedName = @"resource", + PossibleTypes = new [] { typeof(string) })] + string Resource { get; } + + } + /// The object that represents the operation. + internal partial interface IOperationDisplayInternal + + { + /// Description of operation. + string Description { get; set; } + /// Operation type: Read, write, delete, etc. + string Operation { get; set; } + /// Service provider: Microsoft.Cdn + string Provider { get; set; } + /// Resource on which the operation is performed: Profile, endpoint, etc. + string Resource { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OperationDisplay.json.cs b/src/Cdn/generated/api/Models/Api20210601/OperationDisplay.json.cs new file mode 100644 index 000000000000..c789b04610ae --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OperationDisplay.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The object that represents the operation. + public partial class OperationDisplay + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplay. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplay. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider;} + {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OperationProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/OperationProperties.PowerShell.cs new file mode 100644 index 000000000000..8afbeb24d315 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OperationProperties.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Properties of operation, include metric specifications. + [System.ComponentModel.TypeConverter(typeof(OperationPropertiesTypeConverter))] + public partial class OperationProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ServiceSpecification")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal)this).ServiceSpecification = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification) content.GetValueForProperty("ServiceSpecification",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal)this).ServiceSpecification, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ServiceSpecificationTypeConverter.ConvertFrom); + } + if (content.Contains("ServiceSpecificationLogSpecification")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal)this).ServiceSpecificationLogSpecification = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification[]) content.GetValueForProperty("ServiceSpecificationLogSpecification",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal)this).ServiceSpecificationLogSpecification, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LogSpecificationTypeConverter.ConvertFrom)); + } + if (content.Contains("ServiceSpecificationMetricSpecification")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal)this).ServiceSpecificationMetricSpecification = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification[]) content.GetValueForProperty("ServiceSpecificationMetricSpecification",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal)this).ServiceSpecificationMetricSpecification, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricSpecificationTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ServiceSpecification")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal)this).ServiceSpecification = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification) content.GetValueForProperty("ServiceSpecification",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal)this).ServiceSpecification, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ServiceSpecificationTypeConverter.ConvertFrom); + } + if (content.Contains("ServiceSpecificationLogSpecification")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal)this).ServiceSpecificationLogSpecification = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification[]) content.GetValueForProperty("ServiceSpecificationLogSpecification",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal)this).ServiceSpecificationLogSpecification, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LogSpecificationTypeConverter.ConvertFrom)); + } + if (content.Contains("ServiceSpecificationMetricSpecification")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal)this).ServiceSpecificationMetricSpecification = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification[]) content.GetValueForProperty("ServiceSpecificationMetricSpecification",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal)this).ServiceSpecificationMetricSpecification, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricSpecificationTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties of operation, include metric specifications. + [System.ComponentModel.TypeConverter(typeof(OperationPropertiesTypeConverter))] + public partial interface IOperationProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OperationProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/OperationProperties.TypeConverter.cs new file mode 100644 index 000000000000..35bf13b7228b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OperationProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OperationProperties.cs b/src/Cdn/generated/api/Models/Api20210601/OperationProperties.cs new file mode 100644 index 000000000000..9259b9354fe7 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OperationProperties.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Properties of operation, include metric specifications. + public partial class OperationProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal + { + + /// Internal Acessors for ServiceSpecification + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationPropertiesInternal.ServiceSpecification { get => (this._serviceSpecification = this._serviceSpecification ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ServiceSpecification()); set { {_serviceSpecification = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification _serviceSpecification; + + /// One property of operation, include metric specifications. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification ServiceSpecification { get => (this._serviceSpecification = this._serviceSpecification ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ServiceSpecification()); set => this._serviceSpecification = value; } + + /// Log specifications of operation. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification[] ServiceSpecificationLogSpecification { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecificationInternal)ServiceSpecification).LogSpecification; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecificationInternal)ServiceSpecification).LogSpecification = value ?? null /* arrayOf */; } + + /// Metric specifications of operation. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification[] ServiceSpecificationMetricSpecification { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecificationInternal)ServiceSpecification).MetricSpecification; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecificationInternal)ServiceSpecification).MetricSpecification = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public OperationProperties() + { + + } + } + /// Properties of operation, include metric specifications. + public partial interface IOperationProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Log specifications of operation. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Log specifications of operation.", + SerializedName = @"logSpecifications", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification[] ServiceSpecificationLogSpecification { get; set; } + /// Metric specifications of operation. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Metric specifications of operation.", + SerializedName = @"metricSpecifications", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification[] ServiceSpecificationMetricSpecification { get; set; } + + } + /// Properties of operation, include metric specifications. + internal partial interface IOperationPropertiesInternal + + { + /// One property of operation, include metric specifications. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification ServiceSpecification { get; set; } + /// Log specifications of operation. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification[] ServiceSpecificationLogSpecification { get; set; } + /// Metric specifications of operation. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification[] ServiceSpecificationMetricSpecification { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OperationProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/OperationProperties.json.cs new file mode 100644 index 000000000000..cb63c65a43d2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OperationProperties.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Properties of operation, include metric specifications. + public partial class OperationProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new OperationProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal OperationProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_serviceSpecification = If( json?.PropertyT("serviceSpecification"), out var __jsonServiceSpecification) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ServiceSpecification.FromJson(__jsonServiceSpecification) : ServiceSpecification;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._serviceSpecification ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._serviceSpecification.ToJson(null,serializationMode) : null, "serviceSpecification" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OperationsListResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/OperationsListResult.PowerShell.cs new file mode 100644 index 000000000000..e2aad65d440d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OperationsListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Result of the request to list CDN operations. It contains a list of operations and a URL link to get the next set of results. + /// + [System.ComponentModel.TypeConverter(typeof(OperationsListResultTypeConverter))] + public partial class OperationsListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationsListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationsListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationsListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationsListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationsListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationsListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationsListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationsListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OperationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationsListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationsListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationsListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationsListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationsListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OperationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationsListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationsListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the request to list CDN operations. It contains a list of operations and a URL link to get the next set of results. + [System.ComponentModel.TypeConverter(typeof(OperationsListResultTypeConverter))] + public partial interface IOperationsListResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OperationsListResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/OperationsListResult.TypeConverter.cs new file mode 100644 index 000000000000..5cce669675b4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OperationsListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationsListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationsListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationsListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationsListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationsListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationsListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OperationsListResult.cs b/src/Cdn/generated/api/Models/Api20210601/OperationsListResult.cs new file mode 100644 index 000000000000..289c60e864d1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OperationsListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list CDN operations. It contains a list of operations and a URL link to get the next set of results. + /// + public partial class OperationsListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationsListResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationsListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of operation list results if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation[] _value; + + /// List of CDN operations supported by the CDN resource provider. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public OperationsListResult() + { + + } + } + /// Result of the request to list CDN operations. It contains a list of operations and a URL link to get the next set of results. + public partial interface IOperationsListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// URL to get the next set of operation list results if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL to get the next set of operation list results if there are any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// List of CDN operations supported by the CDN resource provider. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of CDN operations supported by the CDN resource provider.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation[] Value { get; set; } + + } + /// Result of the request to list CDN operations. It contains a list of operations and a URL link to get the next set of results. + internal partial interface IOperationsListResultInternal + + { + /// URL to get the next set of operation list results if there are any. + string NextLink { get; set; } + /// List of CDN operations supported by the CDN resource provider. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OperationsListResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/OperationsListResult.json.cs new file mode 100644 index 000000000000..2437bb5596af --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OperationsListResult.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list CDN operations. It contains a list of operations and a URL link to get the next set of results. + /// + public partial class OperationsListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationsListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationsListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperationsListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new OperationsListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal OperationsListResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Operation.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Origin.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/Origin.PowerShell.cs new file mode 100644 index 000000000000..2673b141d3f8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Origin.PowerShell.cs @@ -0,0 +1,358 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not + /// have the requested content cached, they attempt to fetch it from one or more of the configured origins. + /// + [System.ComponentModel.TypeConverter(typeof(OriginTypeConverter))] + public partial class Origin + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Origin(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Origin(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Origin(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).HostHeader = (string) content.GetValueForProperty("HostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).HostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateLinkAlias")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateLinkAlias = (string) content.GetValueForProperty("PrivateLinkAlias",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateLinkAlias, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateLinkResourceId = (string) content.GetValueForProperty("PrivateLinkResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateLinkResourceId, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateLinkLocation = (string) content.GetValueForProperty("PrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkApprovalMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateLinkApprovalMessage = (string) content.GetValueForProperty("PrivateLinkApprovalMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateLinkApprovalMessage, global::System.Convert.ToString); + } + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateEndpointStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus?) content.GetValueForProperty("PrivateEndpointStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateEndpointStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Origin(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).HostHeader = (string) content.GetValueForProperty("HostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).HostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateLinkAlias")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateLinkAlias = (string) content.GetValueForProperty("PrivateLinkAlias",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateLinkAlias, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateLinkResourceId = (string) content.GetValueForProperty("PrivateLinkResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateLinkResourceId, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateLinkLocation = (string) content.GetValueForProperty("PrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkApprovalMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateLinkApprovalMessage = (string) content.GetValueForProperty("PrivateLinkApprovalMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateLinkApprovalMessage, global::System.Convert.ToString); + } + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateEndpointStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus?) content.GetValueForProperty("PrivateEndpointStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal)this).PrivateEndpointStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not + /// have the requested content cached, they attempt to fetch it from one or more of the configured origins. + [System.ComponentModel.TypeConverter(typeof(OriginTypeConverter))] + public partial interface IOrigin + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Origin.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/Origin.TypeConverter.cs new file mode 100644 index 000000000000..4d4527a947a9 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Origin.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OriginTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Origin.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Origin.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Origin.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Origin.cs b/src/Cdn/generated/api/Models/Api20210601/Origin.cs new file mode 100644 index 000000000000..44d34f2d19be --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Origin.cs @@ -0,0 +1,398 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not + /// have the requested content cached, they attempt to fetch it from one or more of the configured origins. + /// + public partial class Origin : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(); + + /// Origin is enabled for load balancing or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? Enabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).Enabled = value ?? default(bool); } + + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string HostHeader { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).OriginHostHeader; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).OriginHostHeader = value ?? null; } + + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string HostName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).HostName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).HostName = value ?? null; } + + /// The value of the HTTP port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? HttpPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).HttpPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).HttpPort = value ?? default(int); } + + /// The value of the HTTPS port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? HttpsPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).HttpsPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).HttpsPort = value ?? default(int); } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; } + + /// Internal Acessors for PrivateEndpointStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal.PrivateEndpointStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)Property).PrivateEndpointStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)Property).PrivateEndpointStatus = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for ResourceState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginInternal.ResourceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)Property).ResourceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)Property).ResourceState = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type = value; } + + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; } + + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? Priority { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).Priority; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).Priority = value ?? default(int); } + + /// The approval status for the connection to the Private Link + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus? PrivateEndpointStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)Property).PrivateEndpointStatus; } + + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PrivateLinkAlias { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).PrivateLinkAlias; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).PrivateLinkAlias = value ?? null; } + + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PrivateLinkApprovalMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).PrivateLinkApprovalMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).PrivateLinkApprovalMessage = value ?? null; } + + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PrivateLinkLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).PrivateLinkLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).PrivateLinkLocation = value ?? null; } + + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PrivateLinkResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).PrivateLinkResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).PrivateLinkResourceId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginProperties _property; + + /// The JSON object that contains the properties of the origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginProperties()); set => this._property = value; } + + /// Provisioning status of the origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.FormatTable] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// Resource status of the origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState? ResourceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)Property).ResourceState; } + + /// Read only system data + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; } + + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? Weight { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).Weight; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).Weight = value ?? default(int); } + + /// Creates an new instance. + public Origin() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not + /// have the requested content cached, they attempt to fetch it from one or more of the configured origins. + public partial interface IOrigin : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource + { + /// Origin is enabled for load balancing or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Origin is enabled for load balancing or not", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + string HostHeader { get; set; } + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; set; } + /// The value of the HTTP port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTP port. Must be between 1 and 65535.", + SerializedName = @"httpPort", + PossibleTypes = new [] { typeof(int) })] + int? HttpPort { get; set; } + /// The value of the HTTPS port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTPS port. Must be between 1 and 65535.", + SerializedName = @"httpsPort", + PossibleTypes = new [] { typeof(int) })] + int? HttpsPort { get; set; } + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5", + SerializedName = @"priority", + PossibleTypes = new [] { typeof(int) })] + int? Priority { get; set; } + /// The approval status for the connection to the Private Link + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The approval status for the connection to the Private Link", + SerializedName = @"privateEndpointStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus? PrivateEndpointStatus { get; } + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'", + SerializedName = @"privateLinkAlias", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkAlias { get; set; } + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A custom message to be included in the approval request to connect to the Private Link.", + SerializedName = @"privateLinkApprovalMessage", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkApprovalMessage { get; set; } + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated", + SerializedName = @"privateLinkLocation", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkLocation { get; set; } + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'", + SerializedName = @"privateLinkResourceId", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkResourceId { get; set; } + /// Provisioning status of the origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status of the origin.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// Resource status of the origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource status of the origin.", + SerializedName = @"resourceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState? ResourceState { get; } + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Weight of the origin in given origin group for load balancing. Must be between 1 and 1000", + SerializedName = @"weight", + PossibleTypes = new [] { typeof(int) })] + int? Weight { get; set; } + + } + /// CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not + /// have the requested content cached, they attempt to fetch it from one or more of the configured origins. + internal partial interface IOriginInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal + { + /// Origin is enabled for load balancing or not + bool? Enabled { get; set; } + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + string HostHeader { get; set; } + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + string HostName { get; set; } + /// The value of the HTTP port. Must be between 1 and 65535. + int? HttpPort { get; set; } + /// The value of the HTTPS port. Must be between 1 and 65535. + int? HttpsPort { get; set; } + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + int? Priority { get; set; } + /// The approval status for the connection to the Private Link + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus? PrivateEndpointStatus { get; set; } + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + string PrivateLinkAlias { get; set; } + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + string PrivateLinkApprovalMessage { get; set; } + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + string PrivateLinkLocation { get; set; } + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + string PrivateLinkResourceId { get; set; } + /// The JSON object that contains the properties of the origin. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginProperties Property { get; set; } + /// Provisioning status of the origin. + string ProvisioningState { get; set; } + /// Resource status of the origin. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState? ResourceState { get; set; } + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + int? Weight { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Origin.json.cs b/src/Cdn/generated/api/Models/Api20210601/Origin.json.cs new file mode 100644 index 000000000000..6983a00fd0d4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Origin.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not + /// have the requested content cached, they attempt to fetch it from one or more of the configured origins. + /// + public partial class Origin + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new Origin(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroup.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroup.PowerShell.cs new file mode 100644 index 000000000000..1e6188a72599 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroup.PowerShell.cs @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Origin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + /// + [System.ComponentModel.TypeConverter(typeof(OriginGroupTypeConverter))] + public partial class OriginGroup + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OriginGroup(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OriginGroup(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OriginGroup(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).Origin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ResponseBasedOriginErrorDetectionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).ResponseBasedOriginErrorDetectionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) content.GetValueForProperty("ResponseBasedOriginErrorDetectionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).ResponseBasedOriginErrorDetectionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OriginGroup(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).Origin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ResponseBasedOriginErrorDetectionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).ResponseBasedOriginErrorDetectionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) content.GetValueForProperty("ResponseBasedOriginErrorDetectionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).ResponseBasedOriginErrorDetectionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Origin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + [System.ComponentModel.TypeConverter(typeof(OriginGroupTypeConverter))] + public partial interface IOriginGroup + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroup.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroup.TypeConverter.cs new file mode 100644 index 000000000000..5dcffa7a871b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroup.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OriginGroupTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OriginGroup.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OriginGroup.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OriginGroup.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroup.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroup.cs new file mode 100644 index 000000000000..185171c8d996 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroup.cs @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Origin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + /// + public partial class OriginGroup : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(); + + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)Property).HealthProbeSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)Property).HealthProbeSetting = value ?? null /* model class */; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for ResourceState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupInternal.ResourceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupPropertiesInternal)Property).ResourceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupPropertiesInternal)Property).ResourceState = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type = value; } + + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; } + + /// The source of the content being delivered via CDN within given origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)Property).Origin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)Property).Origin = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupProperties _property; + + /// The JSON object that contains the properties of the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupProperties()); set => this._property = value; } + + /// Provisioning status of the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.FormatTable] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// Resource status of the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState? ResourceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupPropertiesInternal)Property).ResourceState; } + + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is + /// currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)Property).ResponseBasedOriginErrorDetectionSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)Property).ResponseBasedOriginErrorDetectionSetting = value ?? null /* model class */; } + + /// Read only system data + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)Property).TrafficRestorationTimeToHealedOrNewEndpointsInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)Property).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = value ?? default(int); } + + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public OriginGroup() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Origin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + public partial interface IOriginGroup : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource + { + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health probe settings to the origin that is used to determine the health of the origin.", + SerializedName = @"healthProbeSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get; set; } + /// The source of the content being delivered via CDN within given origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The source of the content being delivered via CDN within given origin group.", + SerializedName = @"origins", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get; set; } + /// Provisioning status of the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status of the origin group.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// Resource status of the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource status of the origin group.", + SerializedName = @"resourceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState? ResourceState { get; } + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is + /// currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported.", + SerializedName = @"responseBasedOriginErrorDetectionSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get; set; } + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.", + SerializedName = @"trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + PossibleTypes = new [] { typeof(int) })] + int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get; set; } + + } + /// Origin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + internal partial interface IOriginGroupInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal + { + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get; set; } + /// The source of the content being delivered via CDN within given origin group. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get; set; } + /// The JSON object that contains the properties of the origin group. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupProperties Property { get; set; } + /// Provisioning status of the origin group. + string ProvisioningState { get; set; } + /// Resource status of the origin group. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState? ResourceState { get; set; } + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is + /// currently not supported. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get; set; } + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroup.json.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroup.json.cs new file mode 100644 index 000000000000..9756e418a08c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroup.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Origin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + /// + public partial class OriginGroup + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new OriginGroup(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal OriginGroup(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupListResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupListResult.PowerShell.cs new file mode 100644 index 000000000000..8e99ed52bd3c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupListResult.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next + /// set of results. + /// + [System.ComponentModel.TypeConverter(typeof(OriginGroupListResultTypeConverter))] + public partial class OriginGroupListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OriginGroupListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OriginGroupListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OriginGroupListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OriginGroupListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next + /// set of results. + [System.ComponentModel.TypeConverter(typeof(OriginGroupListResultTypeConverter))] + public partial interface IOriginGroupListResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupListResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupListResult.TypeConverter.cs new file mode 100644 index 000000000000..8d1445c9802c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OriginGroupListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OriginGroupListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OriginGroupListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OriginGroupListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupListResult.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupListResult.cs new file mode 100644 index 000000000000..765288ee7871 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupListResult.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next + /// set of results. + /// + public partial class OriginGroupListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResultInternal + { + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of origin objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup[] _value; + + /// List of CDN origin groups within an endpoint + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup[] Value { get => this._value; } + + /// Creates an new instance. + public OriginGroupListResult() + { + + } + } + /// Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next + /// set of results. + public partial interface IOriginGroupListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// URL to get the next set of origin objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL to get the next set of origin objects if there are any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// List of CDN origin groups within an endpoint + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of CDN origin groups within an endpoint", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup[] Value { get; } + + } + /// Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next + /// set of results. + internal partial interface IOriginGroupListResultInternal + + { + /// URL to get the next set of origin objects if there are any. + string NextLink { get; set; } + /// List of CDN origin groups within an endpoint + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupListResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupListResult.json.cs new file mode 100644 index 000000000000..b189dee33c0a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupListResult.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next + /// set of results. + /// + public partial class OriginGroupListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new OriginGroupListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal OriginGroupListResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroup.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverride.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverride.PowerShell.cs new file mode 100644 index 000000000000..e3e61ead055d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverride.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for the origin group override configuration. + [System.ComponentModel.TypeConverter(typeof(OriginGroupOverrideTypeConverter))] + public partial class OriginGroupOverride + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OriginGroupOverride(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OriginGroupOverride(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OriginGroupOverride(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal)this).OriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("OriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal)this).OriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ForwardingProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal)this).ForwardingProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol?) content.GetValueForProperty("ForwardingProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal)this).ForwardingProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol.CreateFrom); + } + if (content.Contains("OriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal)this).OriginGroupId = (string) content.GetValueForProperty("OriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal)this).OriginGroupId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OriginGroupOverride(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal)this).OriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("OriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal)this).OriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ForwardingProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal)this).ForwardingProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol?) content.GetValueForProperty("ForwardingProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal)this).ForwardingProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol.CreateFrom); + } + if (content.Contains("OriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal)this).OriginGroupId = (string) content.GetValueForProperty("OriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal)this).OriginGroupId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for the origin group override configuration. + [System.ComponentModel.TypeConverter(typeof(OriginGroupOverrideTypeConverter))] + public partial interface IOriginGroupOverride + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverride.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverride.TypeConverter.cs new file mode 100644 index 000000000000..68de616637a2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverride.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OriginGroupOverrideTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OriginGroupOverride.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OriginGroupOverride.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OriginGroupOverride.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverride.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverride.cs new file mode 100644 index 000000000000..9cc92559c06b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverride.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for the origin group override configuration. + public partial class OriginGroupOverride : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? _forwardingProtocol; + + /// Protocol this rule will use when forwarding traffic to backends. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? ForwardingProtocol { get => this._forwardingProtocol; set => this._forwardingProtocol = value; } + + /// Internal Acessors for OriginGroup + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal.OriginGroup { get => (this._originGroup = this._originGroup ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set { {_originGroup = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference _originGroup; + + /// defines the OriginGroup that would override the DefaultOriginGroup on route. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference OriginGroup { get => (this._originGroup = this._originGroup ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set => this._originGroup = value; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)OriginGroup).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)OriginGroup).Id = value ?? null; } + + /// Creates an new instance. + public OriginGroupOverride() + { + + } + } + /// Defines the parameters for the origin group override configuration. + public partial interface IOriginGroupOverride : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Protocol this rule will use when forwarding traffic to backends. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protocol this rule will use when forwarding traffic to backends.", + SerializedName = @"forwardingProtocol", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? ForwardingProtocol { get; set; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string OriginGroupId { get; set; } + + } + /// Defines the parameters for the origin group override configuration. + internal partial interface IOriginGroupOverrideInternal + + { + /// Protocol this rule will use when forwarding traffic to backends. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? ForwardingProtocol { get; set; } + /// defines the OriginGroup that would override the DefaultOriginGroup on route. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference OriginGroup { get; set; } + /// Resource ID. + string OriginGroupId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverride.json.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverride.json.cs new file mode 100644 index 000000000000..ef490077635b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverride.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for the origin group override configuration. + public partial class OriginGroupOverride + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new OriginGroupOverride(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal OriginGroupOverride(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_originGroup = If( json?.PropertyT("originGroup"), out var __jsonOriginGroup) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonOriginGroup) : OriginGroup;} + {_forwardingProtocol = If( json?.PropertyT("forwardingProtocol"), out var __jsonForwardingProtocol) ? (string)__jsonForwardingProtocol : (string)ForwardingProtocol;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._originGroup ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._originGroup.ToJson(null,serializationMode) : null, "originGroup" ,container.Add ); + AddIf( null != (((object)this._forwardingProtocol)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._forwardingProtocol.ToString()) : null, "forwardingProtocol" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideAction.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideAction.PowerShell.cs new file mode 100644 index 000000000000..d1e5356b220e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideAction.PowerShell.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the origin group override action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(OriginGroupOverrideActionTypeConverter))] + public partial class OriginGroupOverrideAction + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OriginGroupOverrideAction(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OriginGroupOverrideAction(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OriginGroupOverrideAction(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverrideActionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + if (content.Contains("ParameterOriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal)this).ParameterOriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("ParameterOriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal)this).ParameterOriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("OriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal)this).OriginGroupId = (string) content.GetValueForProperty("OriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal)this).OriginGroupId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OriginGroupOverrideAction(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverrideActionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + if (content.Contains("ParameterOriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal)this).ParameterOriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("ParameterOriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal)this).ParameterOriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("OriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal)this).OriginGroupId = (string) content.GetValueForProperty("OriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal)this).OriginGroupId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the origin group override action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(OriginGroupOverrideActionTypeConverter))] + public partial interface IOriginGroupOverrideAction + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideAction.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideAction.TypeConverter.cs new file mode 100644 index 000000000000..43c76add14ca --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideAction.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OriginGroupOverrideActionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideAction ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideAction).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OriginGroupOverrideAction.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OriginGroupOverrideAction.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OriginGroupOverrideAction.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideAction.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideAction.cs new file mode 100644 index 000000000000..ec35ecab504f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideAction.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the origin group override action for the delivery rule. + public partial class OriginGroupOverrideAction : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideAction, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverrideActionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterOriginGroup + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal.ParameterOriginGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)Parameter).OriginGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)Parameter).OriginGroup = value; } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)Parameter).TypeName = value; } + + /// The name of the action for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)__deliveryRuleAction1).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)__deliveryRuleAction1).Name = value ; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)Parameter).OriginGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)Parameter).OriginGroupId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParameters _parameter; + + /// Defines the parameters for the action. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverrideActionParameters()); set => this._parameter = value; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public OriginGroupOverrideAction() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleAction1), __deliveryRuleAction1); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleAction1), __deliveryRuleAction1); + } + } + /// Defines the origin group override action for the delivery rule. + public partial interface IOriginGroupOverrideAction : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 + { + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string OriginGroupId { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the origin group override action for the delivery rule. + internal partial interface IOriginGroupOverrideActionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal + { + /// Resource ID. + string OriginGroupId { get; set; } + /// Defines the parameters for the action. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParameters Parameter { get; set; } + /// defines the OriginGroup that would override the DefaultOriginGroup. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference ParameterOriginGroup { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideAction.json.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideAction.json.cs new file mode 100644 index 000000000000..ffc640b597cf --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideAction.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the origin group override action for the delivery rule. + public partial class OriginGroupOverrideAction + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideAction. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideAction. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new OriginGroupOverrideAction(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal OriginGroupOverrideAction(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverrideActionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleAction1?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideActionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideActionParameters.PowerShell.cs new file mode 100644 index 000000000000..8460a2156f49 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideActionParameters.PowerShell.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for the origin group override action. + [System.ComponentModel.TypeConverter(typeof(OriginGroupOverrideActionParametersTypeConverter))] + public partial class OriginGroupOverrideActionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OriginGroupOverrideActionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OriginGroupOverrideActionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OriginGroupOverrideActionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)this).OriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("OriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)this).OriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("OriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)this).OriginGroupId = (string) content.GetValueForProperty("OriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)this).OriginGroupId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OriginGroupOverrideActionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)this).OriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("OriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)this).OriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("OriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)this).OriginGroupId = (string) content.GetValueForProperty("OriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal)this).OriginGroupId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for the origin group override action. + [System.ComponentModel.TypeConverter(typeof(OriginGroupOverrideActionParametersTypeConverter))] + public partial interface IOriginGroupOverrideActionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideActionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideActionParameters.TypeConverter.cs new file mode 100644 index 000000000000..ea33b5a662f0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideActionParameters.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OriginGroupOverrideActionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OriginGroupOverrideActionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OriginGroupOverrideActionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OriginGroupOverrideActionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideActionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideActionParameters.cs new file mode 100644 index 000000000000..8ac7739e7d5d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideActionParameters.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for the origin group override action. + public partial class OriginGroupOverrideActionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal + { + + /// Internal Acessors for OriginGroup + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal.OriginGroup { get => (this._originGroup = this._originGroup ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set { {_originGroup = value;} } } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference _originGroup; + + /// defines the OriginGroup that would override the DefaultOriginGroup. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference OriginGroup { get => (this._originGroup = this._originGroup ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set => this._originGroup = value; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)OriginGroup).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)OriginGroup).Id = value ?? null; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleOriginGroupOverrideActionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public OriginGroupOverrideActionParameters() + { + + } + } + /// Defines the parameters for the origin group override action. + public partial interface IOriginGroupOverrideActionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string OriginGroupId { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for the origin group override action. + internal partial interface IOriginGroupOverrideActionParametersInternal + + { + /// defines the OriginGroup that would override the DefaultOriginGroup. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference OriginGroup { get; set; } + /// Resource ID. + string OriginGroupId { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideActionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideActionParameters.json.cs new file mode 100644 index 000000000000..1856139f3f56 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupOverrideActionParameters.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for the origin group override action. + public partial class OriginGroupOverrideActionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideActionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new OriginGroupOverrideActionParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal OriginGroupOverrideActionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_originGroup = If( json?.PropertyT("originGroup"), out var __jsonOriginGroup) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonOriginGroup) : OriginGroup;} + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._originGroup ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._originGroup.ToJson(null,serializationMode) : null, "originGroup" ,container.Add ); + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupProperties.PowerShell.cs new file mode 100644 index 000000000000..fa4bc488ee1d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupProperties.PowerShell.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties of the origin group. + [System.ComponentModel.TypeConverter(typeof(OriginGroupPropertiesTypeConverter))] + public partial class OriginGroupProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OriginGroupProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OriginGroupProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OriginGroupProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupPropertiesInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupPropertiesInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).Origin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ResponseBasedOriginErrorDetectionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).ResponseBasedOriginErrorDetectionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) content.GetValueForProperty("ResponseBasedOriginErrorDetectionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).ResponseBasedOriginErrorDetectionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParametersTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OriginGroupProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupPropertiesInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupPropertiesInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).Origin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ResponseBasedOriginErrorDetectionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).ResponseBasedOriginErrorDetectionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) content.GetValueForProperty("ResponseBasedOriginErrorDetectionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).ResponseBasedOriginErrorDetectionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParametersTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties of the origin group. + [System.ComponentModel.TypeConverter(typeof(OriginGroupPropertiesTypeConverter))] + public partial interface IOriginGroupProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupProperties.TypeConverter.cs new file mode 100644 index 000000000000..f1e855d35452 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OriginGroupPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OriginGroupProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OriginGroupProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OriginGroupProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupProperties.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupProperties.cs new file mode 100644 index 000000000000..45d61160b8cf --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupProperties.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the origin group. + public partial class OriginGroupProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParameters __originGroupUpdatePropertiesParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupUpdatePropertiesParameters(); + + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)__originGroupUpdatePropertiesParameters).HealthProbeSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)__originGroupUpdatePropertiesParameters).HealthProbeSetting = value ?? null /* model class */; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for ResourceState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupPropertiesInternal.ResourceState { get => this._resourceState; set { {_resourceState = value;} } } + + /// The source of the content being delivered via CDN within given origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)__originGroupUpdatePropertiesParameters).Origin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)__originGroupUpdatePropertiesParameters).Origin = value ?? null /* arrayOf */; } + + /// Backing field for property. + private string _provisioningState; + + /// Provisioning status of the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState? _resourceState; + + /// Resource status of the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState? ResourceState { get => this._resourceState; } + + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is + /// currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)__originGroupUpdatePropertiesParameters).ResponseBasedOriginErrorDetectionSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)__originGroupUpdatePropertiesParameters).ResponseBasedOriginErrorDetectionSetting = value ?? null /* model class */; } + + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)__originGroupUpdatePropertiesParameters).TrafficRestorationTimeToHealedOrNewEndpointsInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)__originGroupUpdatePropertiesParameters).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = value ?? default(int); } + + /// Creates an new instance. + public OriginGroupProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__originGroupUpdatePropertiesParameters), __originGroupUpdatePropertiesParameters); + await eventListener.AssertObjectIsValid(nameof(__originGroupUpdatePropertiesParameters), __originGroupUpdatePropertiesParameters); + } + } + /// The JSON object that contains the properties of the origin group. + public partial interface IOriginGroupProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParameters + { + /// Provisioning status of the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status of the origin group.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// Resource status of the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource status of the origin group.", + SerializedName = @"resourceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState? ResourceState { get; } + + } + /// The JSON object that contains the properties of the origin group. + internal partial interface IOriginGroupPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal + { + /// Provisioning status of the origin group. + string ProvisioningState { get; set; } + /// Resource status of the origin group. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState? ResourceState { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupProperties.json.cs new file mode 100644 index 000000000000..80173cc3b549 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupProperties.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the origin group. + public partial class OriginGroupProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new OriginGroupProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal OriginGroupProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __originGroupUpdatePropertiesParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupUpdatePropertiesParameters(json); + {_resourceState = If( json?.PropertyT("resourceState"), out var __jsonResourceState) ? (string)__jsonResourceState : (string)ResourceState;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __originGroupUpdatePropertiesParameters?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._resourceState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._resourceState.ToString()) : null, "resourceState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdateParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..e8614cf3353b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdateParameters.PowerShell.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Origin group properties needed for origin group creation or update. + [System.ComponentModel.TypeConverter(typeof(OriginGroupUpdateParametersTypeConverter))] + public partial class OriginGroupUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OriginGroupUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OriginGroupUpdateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OriginGroupUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupUpdatePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).Origin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ResponseBasedOriginErrorDetectionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).ResponseBasedOriginErrorDetectionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) content.GetValueForProperty("ResponseBasedOriginErrorDetectionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).ResponseBasedOriginErrorDetectionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParametersTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OriginGroupUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupUpdatePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).Origin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ResponseBasedOriginErrorDetectionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).ResponseBasedOriginErrorDetectionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) content.GetValueForProperty("ResponseBasedOriginErrorDetectionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal)this).ResponseBasedOriginErrorDetectionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParametersTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Origin group properties needed for origin group creation or update. + [System.ComponentModel.TypeConverter(typeof(OriginGroupUpdateParametersTypeConverter))] + public partial interface IOriginGroupUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdateParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdateParameters.TypeConverter.cs new file mode 100644 index 000000000000..ae9e059343fe --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdateParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OriginGroupUpdateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OriginGroupUpdateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OriginGroupUpdateParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OriginGroupUpdateParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdateParameters.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdateParameters.cs new file mode 100644 index 000000000000..7a4e95dfe272 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdateParameters.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Origin group properties needed for origin group creation or update. + public partial class OriginGroupUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal + { + + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)Property).HealthProbeSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)Property).HealthProbeSetting = value ?? null /* model class */; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupUpdatePropertiesParameters()); set { {_property = value;} } } + + /// The source of the content being delivered via CDN within given origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)Property).Origin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)Property).Origin = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParameters _property; + + /// The JSON object that contains the properties of the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParameters Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupUpdatePropertiesParameters()); set => this._property = value; } + + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is + /// currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)Property).ResponseBasedOriginErrorDetectionSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)Property).ResponseBasedOriginErrorDetectionSetting = value ?? null /* model class */; } + + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)Property).TrafficRestorationTimeToHealedOrNewEndpointsInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)Property).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = value ?? default(int); } + + /// Creates an new instance. + public OriginGroupUpdateParameters() + { + + } + } + /// Origin group properties needed for origin group creation or update. + public partial interface IOriginGroupUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health probe settings to the origin that is used to determine the health of the origin.", + SerializedName = @"healthProbeSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get; set; } + /// The source of the content being delivered via CDN within given origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The source of the content being delivered via CDN within given origin group.", + SerializedName = @"origins", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get; set; } + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is + /// currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported.", + SerializedName = @"responseBasedOriginErrorDetectionSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get; set; } + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.", + SerializedName = @"trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + PossibleTypes = new [] { typeof(int) })] + int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get; set; } + + } + /// Origin group properties needed for origin group creation or update. + internal partial interface IOriginGroupUpdateParametersInternal + + { + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get; set; } + /// The source of the content being delivered via CDN within given origin group. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get; set; } + /// The JSON object that contains the properties of the origin group. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParameters Property { get; set; } + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is + /// currently not supported. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get; set; } + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdateParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdateParameters.json.cs new file mode 100644 index 000000000000..a06a733b6528 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdateParameters.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Origin group properties needed for origin group creation or update. + public partial class OriginGroupUpdateParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new OriginGroupUpdateParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal OriginGroupUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupUpdatePropertiesParameters.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdatePropertiesParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdatePropertiesParameters.PowerShell.cs new file mode 100644 index 000000000000..b22f310c7071 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdatePropertiesParameters.PowerShell.cs @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties of the origin group. + [System.ComponentModel.TypeConverter(typeof(OriginGroupUpdatePropertiesParametersTypeConverter))] + public partial class OriginGroupUpdatePropertiesParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OriginGroupUpdatePropertiesParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OriginGroupUpdatePropertiesParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OriginGroupUpdatePropertiesParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).Origin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ResponseBasedOriginErrorDetectionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).ResponseBasedOriginErrorDetectionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) content.GetValueForProperty("ResponseBasedOriginErrorDetectionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).ResponseBasedOriginErrorDetectionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParametersTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OriginGroupUpdatePropertiesParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HealthProbeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).HealthProbeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) content.GetValueForProperty("HealthProbeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).HealthProbeSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).Origin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("TrafficRestorationTimeToHealedOrNewEndpointsInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute = (int?) content.GetValueForProperty("TrafficRestorationTimeToHealedOrNewEndpointsInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).TrafficRestorationTimeToHealedOrNewEndpointsInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ResponseBasedOriginErrorDetectionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).ResponseBasedOriginErrorDetectionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) content.GetValueForProperty("ResponseBasedOriginErrorDetectionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal)this).ResponseBasedOriginErrorDetectionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParametersTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties of the origin group. + [System.ComponentModel.TypeConverter(typeof(OriginGroupUpdatePropertiesParametersTypeConverter))] + public partial interface IOriginGroupUpdatePropertiesParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdatePropertiesParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdatePropertiesParameters.TypeConverter.cs new file mode 100644 index 000000000000..3944a74708aa --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdatePropertiesParameters.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OriginGroupUpdatePropertiesParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OriginGroupUpdatePropertiesParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OriginGroupUpdatePropertiesParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OriginGroupUpdatePropertiesParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdatePropertiesParameters.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdatePropertiesParameters.cs new file mode 100644 index 000000000000..1f9865e1d92f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdatePropertiesParameters.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the origin group. + public partial class OriginGroupUpdatePropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParametersInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters _healthProbeSetting; + + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get => (this._healthProbeSetting = this._healthProbeSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters()); set => this._healthProbeSetting = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] _origin; + + /// The source of the content being delivered via CDN within given origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get => this._origin; set => this._origin = value; } + + /// + /// Backing field for property. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters _responseBasedOriginErrorDetectionSetting; + + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is + /// currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get => (this._responseBasedOriginErrorDetectionSetting = this._responseBasedOriginErrorDetectionSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParameters()); set => this._responseBasedOriginErrorDetectionSetting = value; } + + /// + /// Backing field for property. + /// + private int? _trafficRestorationTimeToHealedOrNewEndpointsInMinute; + + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get => this._trafficRestorationTimeToHealedOrNewEndpointsInMinute; set => this._trafficRestorationTimeToHealedOrNewEndpointsInMinute = value; } + + /// Creates an new instance. + public OriginGroupUpdatePropertiesParameters() + { + + } + } + /// The JSON object that contains the properties of the origin group. + public partial interface IOriginGroupUpdatePropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health probe settings to the origin that is used to determine the health of the origin.", + SerializedName = @"healthProbeSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get; set; } + /// The source of the content being delivered via CDN within given origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The source of the content being delivered via CDN within given origin group.", + SerializedName = @"origins", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get; set; } + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is + /// currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported.", + SerializedName = @"responseBasedOriginErrorDetectionSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get; set; } + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.", + SerializedName = @"trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + PossibleTypes = new [] { typeof(int) })] + int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get; set; } + + } + /// The JSON object that contains the properties of the origin group. + internal partial interface IOriginGroupUpdatePropertiesParametersInternal + + { + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get; set; } + /// The source of the content being delivered via CDN within given origin group. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get; set; } + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is + /// currently not supported. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get; set; } + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + int? TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdatePropertiesParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdatePropertiesParameters.json.cs new file mode 100644 index 000000000000..c13060660ce4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginGroupUpdatePropertiesParameters.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the origin group. + public partial class OriginGroupUpdatePropertiesParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdatePropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new OriginGroupUpdatePropertiesParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal OriginGroupUpdatePropertiesParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_healthProbeSetting = If( json?.PropertyT("healthProbeSettings"), out var __jsonHealthProbeSettings) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HealthProbeParameters.FromJson(__jsonHealthProbeSettings) : HealthProbeSetting;} + {_origin = If( json?.PropertyT("origins"), out var __jsonOrigins) ? If( __jsonOrigins as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__u) )) ))() : null : Origin;} + {_trafficRestorationTimeToHealedOrNewEndpointsInMinute = If( json?.PropertyT("trafficRestorationTimeToHealedOrNewEndpointsInMinutes"), out var __jsonTrafficRestorationTimeToHealedOrNewEndpointsInMinutes) ? (int?)__jsonTrafficRestorationTimeToHealedOrNewEndpointsInMinutes : TrafficRestorationTimeToHealedOrNewEndpointsInMinute;} + {_responseBasedOriginErrorDetectionSetting = If( json?.PropertyT("responseBasedOriginErrorDetectionSettings"), out var __jsonResponseBasedOriginErrorDetectionSettings) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResponseBasedOriginErrorDetectionParameters.FromJson(__jsonResponseBasedOriginErrorDetectionSettings) : ResponseBasedOriginErrorDetectionSetting;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._healthProbeSetting ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._healthProbeSetting.ToJson(null,serializationMode) : null, "healthProbeSettings" ,container.Add ); + if (null != this._origin) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._origin ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("origins",__w); + } + AddIf( null != this._trafficRestorationTimeToHealedOrNewEndpointsInMinute ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._trafficRestorationTimeToHealedOrNewEndpointsInMinute) : null, "trafficRestorationTimeToHealedOrNewEndpointsInMinutes" ,container.Add ); + AddIf( null != this._responseBasedOriginErrorDetectionSetting ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._responseBasedOriginErrorDetectionSetting.ToJson(null,serializationMode) : null, "responseBasedOriginErrorDetectionSettings" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginListResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/OriginListResult.PowerShell.cs new file mode 100644 index 000000000000..a7edf105123b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results. + /// + [System.ComponentModel.TypeConverter(typeof(OriginListResultTypeConverter))] + public partial class OriginListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OriginListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OriginListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OriginListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OriginListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results. + [System.ComponentModel.TypeConverter(typeof(OriginListResultTypeConverter))] + public partial interface IOriginListResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginListResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/OriginListResult.TypeConverter.cs new file mode 100644 index 000000000000..354f219289d1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginListResult.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OriginListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OriginListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OriginListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OriginListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginListResult.cs b/src/Cdn/generated/api/Models/Api20210601/OriginListResult.cs new file mode 100644 index 000000000000..3f7e40a20e86 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginListResult.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results. + /// + public partial class OriginListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResultInternal + { + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of origin objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin[] _value; + + /// List of CDN origins within an endpoint + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin[] Value { get => this._value; } + + /// Creates an new instance. + public OriginListResult() + { + + } + } + /// Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results. + public partial interface IOriginListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// URL to get the next set of origin objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL to get the next set of origin objects if there are any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// List of CDN origins within an endpoint + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of CDN origins within an endpoint", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin[] Value { get; } + + } + /// Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results. + internal partial interface IOriginListResultInternal + + { + /// URL to get the next set of origin objects if there are any. + string NextLink { get; set; } + /// List of CDN origins within an endpoint + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginListResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/OriginListResult.json.cs new file mode 100644 index 000000000000..05e80542fca1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginListResult.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results. + /// + public partial class OriginListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new OriginListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal OriginListResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Origin.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/OriginProperties.PowerShell.cs new file mode 100644 index 000000000000..3eded6b68c57 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginProperties.PowerShell.cs @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties of the origin. + [System.ComponentModel.TypeConverter(typeof(OriginPropertiesTypeConverter))] + public partial class OriginProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OriginProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OriginProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OriginProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)this).PrivateEndpointStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus?) content.GetValueForProperty("PrivateEndpointStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)this).PrivateEndpointStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus.CreateFrom); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateLinkAlias")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkAlias = (string) content.GetValueForProperty("PrivateLinkAlias",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkAlias, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkResourceId = (string) content.GetValueForProperty("PrivateLinkResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkResourceId, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkLocation = (string) content.GetValueForProperty("PrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkApprovalMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkApprovalMessage = (string) content.GetValueForProperty("PrivateLinkApprovalMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkApprovalMessage, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OriginProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)this).PrivateEndpointStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus?) content.GetValueForProperty("PrivateEndpointStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal)this).PrivateEndpointStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus.CreateFrom); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateLinkAlias")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkAlias = (string) content.GetValueForProperty("PrivateLinkAlias",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkAlias, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkResourceId = (string) content.GetValueForProperty("PrivateLinkResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkResourceId, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkLocation = (string) content.GetValueForProperty("PrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkApprovalMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkApprovalMessage = (string) content.GetValueForProperty("PrivateLinkApprovalMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkApprovalMessage, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties of the origin. + [System.ComponentModel.TypeConverter(typeof(OriginPropertiesTypeConverter))] + public partial interface IOriginProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/OriginProperties.TypeConverter.cs new file mode 100644 index 000000000000..a7c52ad8fc3a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginProperties.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OriginPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OriginProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OriginProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OriginProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginProperties.cs b/src/Cdn/generated/api/Models/Api20210601/OriginProperties.cs new file mode 100644 index 000000000000..d5fc61f1878b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginProperties.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the origin. + public partial class OriginProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParameters __originUpdatePropertiesParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginUpdatePropertiesParameters(); + + /// Origin is enabled for load balancing or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public bool? Enabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).Enabled = value ?? default(bool); } + + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string HostName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).HostName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).HostName = value ?? null; } + + /// The value of the HTTP port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public int? HttpPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).HttpPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).HttpPort = value ?? default(int); } + + /// The value of the HTTPS port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public int? HttpsPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).HttpsPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).HttpsPort = value ?? default(int); } + + /// Internal Acessors for PrivateEndpointStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal.PrivateEndpointStatus { get => this._privateEndpointStatus; set { {_privateEndpointStatus = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for ResourceState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginPropertiesInternal.ResourceState { get => this._resourceState; set { {_resourceState = value;} } } + + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string OriginHostHeader { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).OriginHostHeader; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).OriginHostHeader = value ?? null; } + + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public int? Priority { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).Priority; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).Priority = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus? _privateEndpointStatus; + + /// The approval status for the connection to the Private Link + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus? PrivateEndpointStatus { get => this._privateEndpointStatus; } + + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string PrivateLinkAlias { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).PrivateLinkAlias; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).PrivateLinkAlias = value ?? null; } + + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string PrivateLinkApprovalMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).PrivateLinkApprovalMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).PrivateLinkApprovalMessage = value ?? null; } + + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string PrivateLinkLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).PrivateLinkLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).PrivateLinkLocation = value ?? null; } + + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string PrivateLinkResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).PrivateLinkResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).PrivateLinkResourceId = value ?? null; } + + /// Backing field for property. + private string _provisioningState; + + /// Provisioning status of the origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState? _resourceState; + + /// Resource status of the origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState? ResourceState { get => this._resourceState; } + + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public int? Weight { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).Weight; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)__originUpdatePropertiesParameters).Weight = value ?? default(int); } + + /// Creates an new instance. + public OriginProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__originUpdatePropertiesParameters), __originUpdatePropertiesParameters); + await eventListener.AssertObjectIsValid(nameof(__originUpdatePropertiesParameters), __originUpdatePropertiesParameters); + } + } + /// The JSON object that contains the properties of the origin. + public partial interface IOriginProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParameters + { + /// The approval status for the connection to the Private Link + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The approval status for the connection to the Private Link", + SerializedName = @"privateEndpointStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus? PrivateEndpointStatus { get; } + /// Provisioning status of the origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status of the origin.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// Resource status of the origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource status of the origin.", + SerializedName = @"resourceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState? ResourceState { get; } + + } + /// The JSON object that contains the properties of the origin. + internal partial interface IOriginPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal + { + /// The approval status for the connection to the Private Link + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus? PrivateEndpointStatus { get; set; } + /// Provisioning status of the origin. + string ProvisioningState { get; set; } + /// Resource status of the origin. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState? ResourceState { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/OriginProperties.json.cs new file mode 100644 index 000000000000..b9f251e026f6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginProperties.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the origin. + public partial class OriginProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new OriginProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal OriginProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __originUpdatePropertiesParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginUpdatePropertiesParameters(json); + {_resourceState = If( json?.PropertyT("resourceState"), out var __jsonResourceState) ? (string)__jsonResourceState : (string)ResourceState;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_privateEndpointStatus = If( json?.PropertyT("privateEndpointStatus"), out var __jsonPrivateEndpointStatus) ? (string)__jsonPrivateEndpointStatus : (string)PrivateEndpointStatus;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __originUpdatePropertiesParameters?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._resourceState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._resourceState.ToString()) : null, "resourceState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._privateEndpointStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._privateEndpointStatus.ToString()) : null, "privateEndpointStatus" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginUpdateParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/OriginUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..26a788ea1f83 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginUpdateParameters.PowerShell.cs @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Origin properties needed for origin update. + [System.ComponentModel.TypeConverter(typeof(OriginUpdateParametersTypeConverter))] + public partial class OriginUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OriginUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OriginUpdateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OriginUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginUpdatePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateLinkAlias")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).PrivateLinkAlias = (string) content.GetValueForProperty("PrivateLinkAlias",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).PrivateLinkAlias, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).PrivateLinkResourceId = (string) content.GetValueForProperty("PrivateLinkResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).PrivateLinkResourceId, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).PrivateLinkLocation = (string) content.GetValueForProperty("PrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).PrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkApprovalMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).PrivateLinkApprovalMessage = (string) content.GetValueForProperty("PrivateLinkApprovalMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).PrivateLinkApprovalMessage, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OriginUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginUpdatePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateLinkAlias")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).PrivateLinkAlias = (string) content.GetValueForProperty("PrivateLinkAlias",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).PrivateLinkAlias, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).PrivateLinkResourceId = (string) content.GetValueForProperty("PrivateLinkResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).PrivateLinkResourceId, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).PrivateLinkLocation = (string) content.GetValueForProperty("PrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).PrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkApprovalMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).PrivateLinkApprovalMessage = (string) content.GetValueForProperty("PrivateLinkApprovalMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal)this).PrivateLinkApprovalMessage, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Origin properties needed for origin update. + [System.ComponentModel.TypeConverter(typeof(OriginUpdateParametersTypeConverter))] + public partial interface IOriginUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginUpdateParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/OriginUpdateParameters.TypeConverter.cs new file mode 100644 index 000000000000..01cf27e49dfb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginUpdateParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OriginUpdateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OriginUpdateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OriginUpdateParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OriginUpdateParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginUpdateParameters.cs b/src/Cdn/generated/api/Models/Api20210601/OriginUpdateParameters.cs new file mode 100644 index 000000000000..29b21957277c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginUpdateParameters.cs @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Origin properties needed for origin update. + public partial class OriginUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal + { + + /// Origin is enabled for load balancing or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? Enabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).Enabled = value ?? default(bool); } + + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string HostName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).HostName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).HostName = value ?? null; } + + /// The value of the HTTP port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? HttpPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).HttpPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).HttpPort = value ?? default(int); } + + /// The value of the HTTPS port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? HttpsPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).HttpsPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).HttpsPort = value ?? default(int); } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginUpdatePropertiesParameters()); set { {_property = value;} } } + + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginHostHeader { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).OriginHostHeader; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).OriginHostHeader = value ?? null; } + + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? Priority { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).Priority; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).Priority = value ?? default(int); } + + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PrivateLinkAlias { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).PrivateLinkAlias; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).PrivateLinkAlias = value ?? null; } + + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PrivateLinkApprovalMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).PrivateLinkApprovalMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).PrivateLinkApprovalMessage = value ?? null; } + + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PrivateLinkLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).PrivateLinkLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).PrivateLinkLocation = value ?? null; } + + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PrivateLinkResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).PrivateLinkResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).PrivateLinkResourceId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParameters _property; + + /// The JSON object that contains the properties of the origin. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParameters Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginUpdatePropertiesParameters()); set => this._property = value; } + + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? Weight { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).Weight; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)Property).Weight = value ?? default(int); } + + /// Creates an new instance. + public OriginUpdateParameters() + { + + } + } + /// Origin properties needed for origin update. + public partial interface IOriginUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Origin is enabled for load balancing or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Origin is enabled for load balancing or not", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; set; } + /// The value of the HTTP port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTP port. Must be between 1 and 65535.", + SerializedName = @"httpPort", + PossibleTypes = new [] { typeof(int) })] + int? HttpPort { get; set; } + /// The value of the HTTPS port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTPS port. Must be between 1 and 65535.", + SerializedName = @"httpsPort", + PossibleTypes = new [] { typeof(int) })] + int? HttpsPort { get; set; } + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + string OriginHostHeader { get; set; } + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5", + SerializedName = @"priority", + PossibleTypes = new [] { typeof(int) })] + int? Priority { get; set; } + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'", + SerializedName = @"privateLinkAlias", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkAlias { get; set; } + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A custom message to be included in the approval request to connect to the Private Link.", + SerializedName = @"privateLinkApprovalMessage", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkApprovalMessage { get; set; } + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated", + SerializedName = @"privateLinkLocation", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkLocation { get; set; } + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'", + SerializedName = @"privateLinkResourceId", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkResourceId { get; set; } + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Weight of the origin in given origin group for load balancing. Must be between 1 and 1000", + SerializedName = @"weight", + PossibleTypes = new [] { typeof(int) })] + int? Weight { get; set; } + + } + /// Origin properties needed for origin update. + internal partial interface IOriginUpdateParametersInternal + + { + /// Origin is enabled for load balancing or not + bool? Enabled { get; set; } + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + string HostName { get; set; } + /// The value of the HTTP port. Must be between 1 and 65535. + int? HttpPort { get; set; } + /// The value of the HTTPS port. Must be between 1 and 65535. + int? HttpsPort { get; set; } + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + string OriginHostHeader { get; set; } + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + int? Priority { get; set; } + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + string PrivateLinkAlias { get; set; } + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + string PrivateLinkApprovalMessage { get; set; } + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + string PrivateLinkLocation { get; set; } + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + string PrivateLinkResourceId { get; set; } + /// The JSON object that contains the properties of the origin. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParameters Property { get; set; } + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + int? Weight { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginUpdateParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/OriginUpdateParameters.json.cs new file mode 100644 index 000000000000..407fd5dd2fa8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginUpdateParameters.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Origin properties needed for origin update. + public partial class OriginUpdateParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new OriginUpdateParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal OriginUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginUpdatePropertiesParameters.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginUpdatePropertiesParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/OriginUpdatePropertiesParameters.PowerShell.cs new file mode 100644 index 000000000000..25111633670a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginUpdatePropertiesParameters.PowerShell.cs @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties of the origin. + [System.ComponentModel.TypeConverter(typeof(OriginUpdatePropertiesParametersTypeConverter))] + public partial class OriginUpdatePropertiesParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OriginUpdatePropertiesParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OriginUpdatePropertiesParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OriginUpdatePropertiesParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateLinkAlias")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkAlias = (string) content.GetValueForProperty("PrivateLinkAlias",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkAlias, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkResourceId = (string) content.GetValueForProperty("PrivateLinkResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkResourceId, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkLocation = (string) content.GetValueForProperty("PrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkApprovalMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkApprovalMessage = (string) content.GetValueForProperty("PrivateLinkApprovalMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkApprovalMessage, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OriginUpdatePropertiesParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HostName, global::System.Convert.ToString); + } + if (content.Contains("HttpPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HttpPort = (int?) content.GetValueForProperty("HttpPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HttpPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpsPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HttpsPort = (int?) content.GetValueForProperty("HttpsPort",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).HttpsPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OriginHostHeader")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).OriginHostHeader = (string) content.GetValueForProperty("OriginHostHeader",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).OriginHostHeader, global::System.Convert.ToString); + } + if (content.Contains("Priority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Priority = (int?) content.GetValueForProperty("Priority",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Priority, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Weight")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Weight = (int?) content.GetValueForProperty("Weight",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Weight, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateLinkAlias")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkAlias = (string) content.GetValueForProperty("PrivateLinkAlias",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkAlias, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkResourceId = (string) content.GetValueForProperty("PrivateLinkResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkResourceId, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkLocation = (string) content.GetValueForProperty("PrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("PrivateLinkApprovalMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkApprovalMessage = (string) content.GetValueForProperty("PrivateLinkApprovalMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal)this).PrivateLinkApprovalMessage, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties of the origin. + [System.ComponentModel.TypeConverter(typeof(OriginUpdatePropertiesParametersTypeConverter))] + public partial interface IOriginUpdatePropertiesParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginUpdatePropertiesParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/OriginUpdatePropertiesParameters.TypeConverter.cs new file mode 100644 index 000000000000..0f13d9802a63 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginUpdatePropertiesParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OriginUpdatePropertiesParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OriginUpdatePropertiesParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OriginUpdatePropertiesParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OriginUpdatePropertiesParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginUpdatePropertiesParameters.cs b/src/Cdn/generated/api/Models/Api20210601/OriginUpdatePropertiesParameters.cs new file mode 100644 index 000000000000..9cbfea7cf56f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginUpdatePropertiesParameters.cs @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the origin. + public partial class OriginUpdatePropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParametersInternal + { + + /// Backing field for property. + private bool? _enabled; + + /// Origin is enabled for load balancing or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? Enabled { get => this._enabled; set => this._enabled = value; } + + /// Backing field for property. + private string _hostName; + + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string HostName { get => this._hostName; set => this._hostName = value; } + + /// Backing field for property. + private int? _httpPort; + + /// The value of the HTTP port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? HttpPort { get => this._httpPort; set => this._httpPort = value; } + + /// Backing field for property. + private int? _httpsPort; + + /// The value of the HTTPS port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? HttpsPort { get => this._httpsPort; set => this._httpsPort = value; } + + /// Backing field for property. + private string _originHostHeader; + + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string OriginHostHeader { get => this._originHostHeader; set => this._originHostHeader = value; } + + /// Backing field for property. + private int? _priority; + + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? Priority { get => this._priority; set => this._priority = value; } + + /// Backing field for property. + private string _privateLinkAlias; + + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string PrivateLinkAlias { get => this._privateLinkAlias; set => this._privateLinkAlias = value; } + + /// Backing field for property. + private string _privateLinkApprovalMessage; + + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string PrivateLinkApprovalMessage { get => this._privateLinkApprovalMessage; set => this._privateLinkApprovalMessage = value; } + + /// Backing field for property. + private string _privateLinkLocation; + + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string PrivateLinkLocation { get => this._privateLinkLocation; set => this._privateLinkLocation = value; } + + /// Backing field for property. + private string _privateLinkResourceId; + + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string PrivateLinkResourceId { get => this._privateLinkResourceId; set => this._privateLinkResourceId = value; } + + /// Backing field for property. + private int? _weight; + + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? Weight { get => this._weight; set => this._weight = value; } + + /// Creates an new instance. + public OriginUpdatePropertiesParameters() + { + + } + } + /// The JSON object that contains the properties of the origin. + public partial interface IOriginUpdatePropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Origin is enabled for load balancing or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Origin is enabled for load balancing or not", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; set; } + /// The value of the HTTP port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTP port. Must be between 1 and 65535.", + SerializedName = @"httpPort", + PossibleTypes = new [] { typeof(int) })] + int? HttpPort { get; set; } + /// The value of the HTTPS port. Must be between 1 and 65535. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTPS port. Must be between 1 and 65535.", + SerializedName = @"httpsPort", + PossibleTypes = new [] { typeof(int) })] + int? HttpsPort { get; set; } + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + string OriginHostHeader { get; set; } + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5", + SerializedName = @"priority", + PossibleTypes = new [] { typeof(int) })] + int? Priority { get; set; } + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'", + SerializedName = @"privateLinkAlias", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkAlias { get; set; } + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A custom message to be included in the approval request to connect to the Private Link.", + SerializedName = @"privateLinkApprovalMessage", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkApprovalMessage { get; set; } + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated", + SerializedName = @"privateLinkLocation", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkLocation { get; set; } + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'", + SerializedName = @"privateLinkResourceId", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkResourceId { get; set; } + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Weight of the origin in given origin group for load balancing. Must be between 1 and 1000", + SerializedName = @"weight", + PossibleTypes = new [] { typeof(int) })] + int? Weight { get; set; } + + } + /// The JSON object that contains the properties of the origin. + internal partial interface IOriginUpdatePropertiesParametersInternal + + { + /// Origin is enabled for load balancing or not + bool? Enabled { get; set; } + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + string HostName { get; set; } + /// The value of the HTTP port. Must be between 1 and 65535. + int? HttpPort { get; set; } + /// The value of the HTTPS port. Must be between 1 and 65535. + int? HttpsPort { get; set; } + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + string OriginHostHeader { get; set; } + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + int? Priority { get; set; } + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + string PrivateLinkAlias { get; set; } + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + string PrivateLinkApprovalMessage { get; set; } + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + string PrivateLinkLocation { get; set; } + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + string PrivateLinkResourceId { get; set; } + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + int? Weight { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/OriginUpdatePropertiesParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/OriginUpdatePropertiesParameters.json.cs new file mode 100644 index 000000000000..354bd5b0a548 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/OriginUpdatePropertiesParameters.json.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the origin. + public partial class OriginUpdatePropertiesParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdatePropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new OriginUpdatePropertiesParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal OriginUpdatePropertiesParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_hostName = If( json?.PropertyT("hostName"), out var __jsonHostName) ? (string)__jsonHostName : (string)HostName;} + {_httpPort = If( json?.PropertyT("httpPort"), out var __jsonHttpPort) ? (int?)__jsonHttpPort : HttpPort;} + {_httpsPort = If( json?.PropertyT("httpsPort"), out var __jsonHttpsPort) ? (int?)__jsonHttpsPort : HttpsPort;} + {_originHostHeader = If( json?.PropertyT("originHostHeader"), out var __jsonOriginHostHeader) ? (string)__jsonOriginHostHeader : (string)OriginHostHeader;} + {_priority = If( json?.PropertyT("priority"), out var __jsonPriority) ? (int?)__jsonPriority : Priority;} + {_weight = If( json?.PropertyT("weight"), out var __jsonWeight) ? (int?)__jsonWeight : Weight;} + {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : Enabled;} + {_privateLinkAlias = If( json?.PropertyT("privateLinkAlias"), out var __jsonPrivateLinkAlias) ? (string)__jsonPrivateLinkAlias : (string)PrivateLinkAlias;} + {_privateLinkResourceId = If( json?.PropertyT("privateLinkResourceId"), out var __jsonPrivateLinkResourceId) ? (string)__jsonPrivateLinkResourceId : (string)PrivateLinkResourceId;} + {_privateLinkLocation = If( json?.PropertyT("privateLinkLocation"), out var __jsonPrivateLinkLocation) ? (string)__jsonPrivateLinkLocation : (string)PrivateLinkLocation;} + {_privateLinkApprovalMessage = If( json?.PropertyT("privateLinkApprovalMessage"), out var __jsonPrivateLinkApprovalMessage) ? (string)__jsonPrivateLinkApprovalMessage : (string)PrivateLinkApprovalMessage;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._hostName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._hostName.ToString()) : null, "hostName" ,container.Add ); + AddIf( null != this._httpPort ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._httpPort) : null, "httpPort" ,container.Add ); + AddIf( null != this._httpsPort ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._httpsPort) : null, "httpsPort" ,container.Add ); + AddIf( null != (((object)this._originHostHeader)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._originHostHeader.ToString()) : null, "originHostHeader" ,container.Add ); + AddIf( null != this._priority ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._priority) : null, "priority" ,container.Add ); + AddIf( null != this._weight ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._weight) : null, "weight" ,container.Add ); + AddIf( null != this._enabled ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._enabled) : null, "enabled" ,container.Add ); + AddIf( null != (((object)this._privateLinkAlias)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._privateLinkAlias.ToString()) : null, "privateLinkAlias" ,container.Add ); + AddIf( null != (((object)this._privateLinkResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._privateLinkResourceId.ToString()) : null, "privateLinkResourceId" ,container.Add ); + AddIf( null != (((object)this._privateLinkLocation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._privateLinkLocation.ToString()) : null, "privateLinkLocation" ,container.Add ); + AddIf( null != (((object)this._privateLinkApprovalMessage)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._privateLinkApprovalMessage.ToString()) : null, "privateLinkApprovalMessage" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/PostArgsMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/PostArgsMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..2717cc6b0593 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/PostArgsMatchConditionParameters.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for PostArgs match conditions + [System.ComponentModel.TypeConverter(typeof(PostArgsMatchConditionParametersTypeConverter))] + public partial class PostArgsMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PostArgsMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PostArgsMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PostArgsMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Selector")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).Selector = (string) content.GetValueForProperty("Selector",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).Selector, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PostArgsMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Selector")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).Selector = (string) content.GetValueForProperty("Selector",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).Selector, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for PostArgs match conditions + [System.ComponentModel.TypeConverter(typeof(PostArgsMatchConditionParametersTypeConverter))] + public partial interface IPostArgsMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/PostArgsMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/PostArgsMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..52db0456c414 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/PostArgsMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PostArgsMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PostArgsMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PostArgsMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PostArgsMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/PostArgsMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/PostArgsMatchConditionParameters.cs new file mode 100644 index 000000000000..8930313a9753 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/PostArgsMatchConditionParameters.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for PostArgs match conditions + public partial class PostArgsMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal + { + + /// Backing field for property. + private string[] _matchValue; + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator _operator; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator Operator { get => this._operator; set => this._operator = value; } + + /// Backing field for property. + private string _selector; + + /// Name of PostArg to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Selector { get => this._selector; set => this._selector = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRulePostArgsConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public PostArgsMatchConditionParameters() + { + + } + } + /// Defines the parameters for PostArgs match conditions + public partial interface IPostArgsMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator Operator { get; set; } + /// Name of PostArg to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of PostArg to be matched", + SerializedName = @"selector", + PossibleTypes = new [] { typeof(string) })] + string Selector { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for PostArgs match conditions + internal partial interface IPostArgsMatchConditionParametersInternal + + { + /// The match value for the condition of the delivery rule + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator Operator { get; set; } + /// Name of PostArg to be matched + string Selector { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/PostArgsMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/PostArgsMatchConditionParameters.json.cs new file mode 100644 index 000000000000..69dabee18b86 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/PostArgsMatchConditionParameters.json.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for PostArgs match conditions + public partial class PostArgsMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPostArgsMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new PostArgsMatchConditionParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal PostArgsMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_selector = If( json?.PropertyT("selector"), out var __jsonSelector) ? (string)__jsonSelector : (string)Selector;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MatchValue;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._selector)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._selector.ToString()) : null, "selector" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._matchValue) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._matchValue ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("matchValues",__w); + } + if (null != this._transform) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._transform ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("transforms",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Profile.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/Profile.PowerShell.cs new file mode 100644 index 000000000000..34d724d133ec --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Profile.PowerShell.cs @@ -0,0 +1,314 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// A profile is a logical grouping of endpoints that share the same settings. + [System.ComponentModel.TypeConverter(typeof(ProfileTypeConverter))] + public partial class Profile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Profile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Profile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Profile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SkuTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfilePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName?) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName.CreateFrom); + } + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("FrontDoorId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).FrontDoorId = (string) content.GetValueForProperty("FrontDoorId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).FrontDoorId, global::System.Convert.ToString); + } + if (content.Contains("OriginResponseTimeoutSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).OriginResponseTimeoutSecond = (int?) content.GetValueForProperty("OriginResponseTimeoutSecond",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).OriginResponseTimeoutSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Profile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SkuTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfilePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName?) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName.CreateFrom); + } + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("FrontDoorId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).FrontDoorId = (string) content.GetValueForProperty("FrontDoorId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).FrontDoorId, global::System.Convert.ToString); + } + if (content.Contains("OriginResponseTimeoutSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).OriginResponseTimeoutSecond = (int?) content.GetValueForProperty("OriginResponseTimeoutSecond",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal)this).OriginResponseTimeoutSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// A profile is a logical grouping of endpoints that share the same settings. + [System.ComponentModel.TypeConverter(typeof(ProfileTypeConverter))] + public partial interface IProfile + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Profile.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/Profile.TypeConverter.cs new file mode 100644 index 000000000000..f7ed9a972f90 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Profile.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Profile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Profile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Profile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Profile.cs b/src/Cdn/generated/api/Models/Api20210601/Profile.cs new file mode 100644 index 000000000000..172f38bda59c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Profile.cs @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// A profile is a logical grouping of endpoints that share the same settings. + public partial class Profile : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResource(); + + /// The Id of the frontdoor. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string FrontDoorId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)Property).FrontDoorId; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Id; } + + /// Backing field for property. + private string _kind; + + /// + /// Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD profile. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Kind { get => this._kind; } + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// Internal Acessors for FrontDoorId + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal.FrontDoorId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)Property).FrontDoorId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)Property).FrontDoorId = value; } + + /// Internal Acessors for Kind + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal.Kind { get => this._kind; set { {_kind = value;} } } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for ResourceState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal.ResourceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)Property).ResourceState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)Property).ResourceState = value; } + + /// Internal Acessors for Sku + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISku Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Sku()); set { {_sku = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Type = value; } + + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Name; } + + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? OriginResponseTimeoutSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)Property).OriginResponseTimeoutSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)Property).OriginResponseTimeoutSecond = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileProperties _property; + + /// The JSON object that contains the properties required to create a profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileProperties()); set => this._property = value; } + + /// Provisioning status of the profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.FormatTable] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// Resource status of the profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState? ResourceState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)Property).ResourceState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISku _sku; + + /// + /// The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Sku()); set => this._sku = value; } + + /// Name of the pricing tier. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName? SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISkuInternal)Sku).Name = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName)""); } + + /// Read only system data + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemData; } + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__trackedResource).Type; } + + /// Creates an new instance. + public Profile() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// A profile is a logical grouping of endpoints that share the same settings. + public partial interface IProfile : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResource + { + /// The Id of the frontdoor. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Id of the frontdoor.", + SerializedName = @"frontDoorId", + PossibleTypes = new [] { typeof(string) })] + string FrontDoorId { get; } + /// + /// Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD profile. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD profile.", + SerializedName = @"kind", + PossibleTypes = new [] { typeof(string) })] + string Kind { get; } + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns.", + SerializedName = @"originResponseTimeoutSeconds", + PossibleTypes = new [] { typeof(int) })] + int? OriginResponseTimeoutSecond { get; set; } + /// Provisioning status of the profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status of the profile.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// Resource status of the profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource status of the profile.", + SerializedName = @"resourceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState? ResourceState { get; } + /// Name of the pricing tier. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the pricing tier.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName? SkuName { get; set; } + + } + /// A profile is a logical grouping of endpoints that share the same settings. + internal partial interface IProfileInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal + { + /// The Id of the frontdoor. + string FrontDoorId { get; set; } + /// + /// Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD profile. + /// + string Kind { get; set; } + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// + int? OriginResponseTimeoutSecond { get; set; } + /// The JSON object that contains the properties required to create a profile. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileProperties Property { get; set; } + /// Provisioning status of the profile. + string ProvisioningState { get; set; } + /// Resource status of the profile. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState? ResourceState { get; set; } + /// + /// The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISku Sku { get; set; } + /// Name of the pricing tier. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName? SkuName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Profile.json.cs b/src/Cdn/generated/api/Models/Api20210601/Profile.json.cs new file mode 100644 index 000000000000..3eda4d80b1b2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Profile.json.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// A profile is a logical grouping of endpoints that share the same settings. + public partial class Profile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new Profile(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal Profile(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResource(json); + {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Sku.FromJson(__jsonSku) : Sku;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileProperties.FromJson(__jsonProperties) : Property;} + {_kind = If( json?.PropertyT("kind"), out var __jsonKind) ? (string)__jsonKind : (string)Kind;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResource?.ToJson(container, serializationMode); + AddIf( null != this._sku ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._sku.ToJson(null,serializationMode) : null, "sku" ,container.Add ); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._kind)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._kind.ToString()) : null, "kind" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfileListResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ProfileListResult.PowerShell.cs new file mode 100644 index 000000000000..5b7631439083 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfileListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Result of the request to list profiles. It contains a list of profile objects and a URL link to get the next set of results. + /// + [System.ComponentModel.TypeConverter(typeof(ProfileListResultTypeConverter))] + public partial class ProfileListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProfileListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProfileListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProfileListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProfileListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the request to list profiles. It contains a list of profile objects and a URL link to get the next set of results. + [System.ComponentModel.TypeConverter(typeof(ProfileListResultTypeConverter))] + public partial interface IProfileListResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfileListResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ProfileListResult.TypeConverter.cs new file mode 100644 index 000000000000..e0c9ec88f472 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfileListResult.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProfileListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProfileListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProfileListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProfileListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfileListResult.cs b/src/Cdn/generated/api/Models/Api20210601/ProfileListResult.cs new file mode 100644 index 000000000000..d8a0cc76c77c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfileListResult.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list profiles. It contains a list of profile objects and a URL link to get the next set of results. + /// + public partial class ProfileListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResultInternal + { + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of profile objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile[] _value; + + /// List of CDN profiles within a resource group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile[] Value { get => this._value; } + + /// Creates an new instance. + public ProfileListResult() + { + + } + } + /// Result of the request to list profiles. It contains a list of profile objects and a URL link to get the next set of results. + public partial interface IProfileListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// URL to get the next set of profile objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL to get the next set of profile objects if there are any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// List of CDN profiles within a resource group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of CDN profiles within a resource group.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile[] Value { get; } + + } + /// Result of the request to list profiles. It contains a list of profile objects and a URL link to get the next set of results. + internal partial interface IProfileListResultInternal + + { + /// URL to get the next set of profile objects if there are any. + string NextLink { get; set; } + /// List of CDN profiles within a resource group. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfileListResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/ProfileListResult.json.cs new file mode 100644 index 000000000000..dd96cbe8ffc5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfileListResult.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list profiles. It contains a list of profile objects and a URL link to get the next set of results. + /// + public partial class ProfileListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ProfileListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ProfileListResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Profile.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfileProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ProfileProperties.PowerShell.cs new file mode 100644 index 000000000000..a45dd9faedcf --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfileProperties.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties required to create a profile. + [System.ComponentModel.TypeConverter(typeof(ProfilePropertiesTypeConverter))] + public partial class ProfileProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProfileProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProfileProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProfileProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("FrontDoorId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)this).FrontDoorId = (string) content.GetValueForProperty("FrontDoorId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)this).FrontDoorId, global::System.Convert.ToString); + } + if (content.Contains("OriginResponseTimeoutSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)this).OriginResponseTimeoutSecond = (int?) content.GetValueForProperty("OriginResponseTimeoutSecond",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)this).OriginResponseTimeoutSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProfileProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ResourceState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)this).ResourceState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState?) content.GetValueForProperty("ResourceState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)this).ResourceState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("FrontDoorId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)this).FrontDoorId = (string) content.GetValueForProperty("FrontDoorId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)this).FrontDoorId, global::System.Convert.ToString); + } + if (content.Contains("OriginResponseTimeoutSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)this).OriginResponseTimeoutSecond = (int?) content.GetValueForProperty("OriginResponseTimeoutSecond",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal)this).OriginResponseTimeoutSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties required to create a profile. + [System.ComponentModel.TypeConverter(typeof(ProfilePropertiesTypeConverter))] + public partial interface IProfileProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfileProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ProfileProperties.TypeConverter.cs new file mode 100644 index 000000000000..3070d51331c2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfileProperties.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProfilePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProfileProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProfileProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProfileProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfileProperties.cs b/src/Cdn/generated/api/Models/Api20210601/ProfileProperties.cs new file mode 100644 index 000000000000..c4e745dc99c0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfileProperties.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties required to create a profile. + public partial class ProfileProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal + { + + /// Backing field for property. + private string _frontDoorId; + + /// The Id of the frontdoor. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string FrontDoorId { get => this._frontDoorId; } + + /// Internal Acessors for FrontDoorId + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal.FrontDoorId { get => this._frontDoorId; set { {_frontDoorId = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for ResourceState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesInternal.ResourceState { get => this._resourceState; set { {_resourceState = value;} } } + + /// Backing field for property. + private int? _originResponseTimeoutSecond; + + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? OriginResponseTimeoutSecond { get => this._originResponseTimeoutSecond; set => this._originResponseTimeoutSecond = value; } + + /// Backing field for property. + private string _provisioningState; + + /// Provisioning status of the profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState? _resourceState; + + /// Resource status of the profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState? ResourceState { get => this._resourceState; } + + /// Creates an new instance. + public ProfileProperties() + { + + } + } + /// The JSON object that contains the properties required to create a profile. + public partial interface IProfileProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The Id of the frontdoor. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Id of the frontdoor.", + SerializedName = @"frontDoorId", + PossibleTypes = new [] { typeof(string) })] + string FrontDoorId { get; } + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns.", + SerializedName = @"originResponseTimeoutSeconds", + PossibleTypes = new [] { typeof(int) })] + int? OriginResponseTimeoutSecond { get; set; } + /// Provisioning status of the profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status of the profile.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// Resource status of the profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource status of the profile.", + SerializedName = @"resourceState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState? ResourceState { get; } + + } + /// The JSON object that contains the properties required to create a profile. + internal partial interface IProfilePropertiesInternal + + { + /// The Id of the frontdoor. + string FrontDoorId { get; set; } + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// + int? OriginResponseTimeoutSecond { get; set; } + /// Provisioning status of the profile. + string ProvisioningState { get; set; } + /// Resource status of the profile. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState? ResourceState { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfileProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/ProfileProperties.json.cs new file mode 100644 index 000000000000..7a9147a7b065 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfileProperties.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties required to create a profile. + public partial class ProfileProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ProfileProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ProfileProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_resourceState = If( json?.PropertyT("resourceState"), out var __jsonResourceState) ? (string)__jsonResourceState : (string)ResourceState;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_frontDoorId = If( json?.PropertyT("frontDoorId"), out var __jsonFrontDoorId) ? (string)__jsonFrontDoorId : (string)FrontDoorId;} + {_originResponseTimeoutSecond = If( json?.PropertyT("originResponseTimeoutSeconds"), out var __jsonOriginResponseTimeoutSeconds) ? (int?)__jsonOriginResponseTimeoutSeconds : OriginResponseTimeoutSecond;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._resourceState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._resourceState.ToString()) : null, "resourceState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._frontDoorId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._frontDoorId.ToString()) : null, "frontDoorId" ,container.Add ); + } + AddIf( null != this._originResponseTimeoutSecond ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._originResponseTimeoutSecond) : null, "originResponseTimeoutSeconds" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfilePropertiesUpdateParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ProfilePropertiesUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..05fe4e9ed337 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfilePropertiesUpdateParameters.PowerShell.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object containing profile update parameters. + [System.ComponentModel.TypeConverter(typeof(ProfilePropertiesUpdateParametersTypeConverter))] + public partial class ProfilePropertiesUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProfilePropertiesUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProfilePropertiesUpdateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProfilePropertiesUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OriginResponseTimeoutSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParametersInternal)this).OriginResponseTimeoutSecond = (int?) content.GetValueForProperty("OriginResponseTimeoutSecond",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParametersInternal)this).OriginResponseTimeoutSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProfilePropertiesUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OriginResponseTimeoutSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParametersInternal)this).OriginResponseTimeoutSecond = (int?) content.GetValueForProperty("OriginResponseTimeoutSecond",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParametersInternal)this).OriginResponseTimeoutSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object containing profile update parameters. + [System.ComponentModel.TypeConverter(typeof(ProfilePropertiesUpdateParametersTypeConverter))] + public partial interface IProfilePropertiesUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfilePropertiesUpdateParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ProfilePropertiesUpdateParameters.TypeConverter.cs new file mode 100644 index 000000000000..370e9a21fd0e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfilePropertiesUpdateParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProfilePropertiesUpdateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProfilePropertiesUpdateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProfilePropertiesUpdateParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProfilePropertiesUpdateParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfilePropertiesUpdateParameters.cs b/src/Cdn/generated/api/Models/Api20210601/ProfilePropertiesUpdateParameters.cs new file mode 100644 index 000000000000..4197d5943aa6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfilePropertiesUpdateParameters.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object containing profile update parameters. + public partial class ProfilePropertiesUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParametersInternal + { + + /// Backing field for property. + private int? _originResponseTimeoutSecond; + + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? OriginResponseTimeoutSecond { get => this._originResponseTimeoutSecond; set => this._originResponseTimeoutSecond = value; } + + /// Creates an new instance. + public ProfilePropertiesUpdateParameters() + { + + } + } + /// The JSON object containing profile update parameters. + public partial interface IProfilePropertiesUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns.", + SerializedName = @"originResponseTimeoutSeconds", + PossibleTypes = new [] { typeof(int) })] + int? OriginResponseTimeoutSecond { get; set; } + + } + /// The JSON object containing profile update parameters. + internal partial interface IProfilePropertiesUpdateParametersInternal + + { + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// + int? OriginResponseTimeoutSecond { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfilePropertiesUpdateParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/ProfilePropertiesUpdateParameters.json.cs new file mode 100644 index 000000000000..0f77aeecc72d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfilePropertiesUpdateParameters.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object containing profile update parameters. + public partial class ProfilePropertiesUpdateParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ProfilePropertiesUpdateParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ProfilePropertiesUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_originResponseTimeoutSecond = If( json?.PropertyT("originResponseTimeoutSeconds"), out var __jsonOriginResponseTimeoutSeconds) ? (int?)__jsonOriginResponseTimeoutSeconds : OriginResponseTimeoutSecond;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._originResponseTimeoutSecond ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._originResponseTimeoutSecond) : null, "originResponseTimeoutSeconds" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..e21872854b38 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParameters.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Properties required to update a profile. + [System.ComponentModel.TypeConverter(typeof(ProfileUpdateParametersTypeConverter))] + public partial class ProfileUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProfileUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProfileUpdateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProfileUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfilePropertiesUpdateParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileUpdateParametersTagsTypeConverter.ConvertFrom); + } + if (content.Contains("OriginResponseTimeoutSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersInternal)this).OriginResponseTimeoutSecond = (int?) content.GetValueForProperty("OriginResponseTimeoutSecond",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersInternal)this).OriginResponseTimeoutSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProfileUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfilePropertiesUpdateParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileUpdateParametersTagsTypeConverter.ConvertFrom); + } + if (content.Contains("OriginResponseTimeoutSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersInternal)this).OriginResponseTimeoutSecond = (int?) content.GetValueForProperty("OriginResponseTimeoutSecond",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersInternal)this).OriginResponseTimeoutSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties required to update a profile. + [System.ComponentModel.TypeConverter(typeof(ProfileUpdateParametersTypeConverter))] + public partial interface IProfileUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParameters.TypeConverter.cs new file mode 100644 index 000000000000..761a82f98944 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProfileUpdateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProfileUpdateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProfileUpdateParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProfileUpdateParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParameters.cs b/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParameters.cs new file mode 100644 index 000000000000..0c7c7b6104ce --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParameters.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Properties required to update a profile. + public partial class ProfileUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersInternal + { + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfilePropertiesUpdateParameters()); set { {_property = value;} } } + + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? OriginResponseTimeoutSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParametersInternal)Property).OriginResponseTimeoutSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParametersInternal)Property).OriginResponseTimeoutSecond = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParameters _property; + + /// The JSON object containing profile update parameters. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParameters Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfilePropertiesUpdateParameters()); set => this._property = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags _tag; + + /// Profile tags + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileUpdateParametersTags()); set => this._tag = value; } + + /// Creates an new instance. + public ProfileUpdateParameters() + { + + } + } + /// Properties required to update a profile. + public partial interface IProfileUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns.", + SerializedName = @"originResponseTimeoutSeconds", + PossibleTypes = new [] { typeof(int) })] + int? OriginResponseTimeoutSecond { get; set; } + /// Profile tags + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Profile tags", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags Tag { get; set; } + + } + /// Properties required to update a profile. + internal partial interface IProfileUpdateParametersInternal + + { + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// + int? OriginResponseTimeoutSecond { get; set; } + /// The JSON object containing profile update parameters. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfilePropertiesUpdateParameters Property { get; set; } + /// Profile tags + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParameters.json.cs new file mode 100644 index 000000000000..13f1be4c69f4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParameters.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Properties required to update a profile. + public partial class ProfileUpdateParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ProfileUpdateParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ProfileUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfilePropertiesUpdateParameters.FromJson(__jsonProperties) : Property;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileUpdateParametersTags.FromJson(__jsonTags) : Tag;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.PowerShell.cs new file mode 100644 index 000000000000..cb3561332adf --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.PowerShell.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Profile tags + [System.ComponentModel.TypeConverter(typeof(ProfileUpdateParametersTagsTypeConverter))] + public partial class ProfileUpdateParametersTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProfileUpdateParametersTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProfileUpdateParametersTags(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProfileUpdateParametersTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProfileUpdateParametersTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Profile tags + [System.ComponentModel.TypeConverter(typeof(ProfileUpdateParametersTagsTypeConverter))] + public partial interface IProfileUpdateParametersTags + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.TypeConverter.cs new file mode 100644 index 000000000000..285b7101c3c5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProfileUpdateParametersTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProfileUpdateParametersTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProfileUpdateParametersTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProfileUpdateParametersTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.cs b/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.cs new file mode 100644 index 000000000000..808a142cfb20 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Profile tags + public partial class ProfileUpdateParametersTags : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTagsInternal + { + + /// Creates an new instance. + public ProfileUpdateParametersTags() + { + + } + } + /// Profile tags + public partial interface IProfileUpdateParametersTags : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray + { + + } + /// Profile tags + internal partial interface IProfileUpdateParametersTagsInternal + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.dictionary.cs b/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.dictionary.cs new file mode 100644 index 000000000000..c5166fdb11de --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class ProfileUpdateParametersTags : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileUpdateParametersTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.json.cs b/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.json.cs new file mode 100644 index 000000000000..a97ddeb5ec69 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProfileUpdateParametersTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Profile tags + public partial class ProfileUpdateParametersTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ProfileUpdateParametersTags(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + /// + internal ProfileUpdateParametersTags(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProxyResource.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ProxyResource.PowerShell.cs new file mode 100644 index 000000000000..d7f0a212fb21 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProxyResource.PowerShell.cs @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// The resource model definition for a ARM proxy resource. It will have everything other than required location and tags + /// + [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] + public partial class ProxyResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProxyResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProxyResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProxyResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProxyResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The resource model definition for a ARM proxy resource. It will have everything other than required location and tags + [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] + public partial interface IProxyResource + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProxyResource.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ProxyResource.TypeConverter.cs new file mode 100644 index 000000000000..c4cc1d0e8dae --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProxyResource.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProxyResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProxyResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProxyResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProxyResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProxyResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProxyResource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProxyResource.cs b/src/Cdn/generated/api/Models/Api20210601/ProxyResource.cs new file mode 100644 index 000000000000..d09e144b8b42 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProxyResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// The resource model definition for a ARM proxy resource. It will have everything other than required location and tags + /// + public partial class ProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProxyResource, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProxyResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(); + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type = value; } + + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; } + + /// Read only system data + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ProxyResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for a ARM proxy resource. It will have everything other than required location and tags + public partial interface IProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource + { + + } + /// The resource model definition for a ARM proxy resource. It will have everything other than required location and tags + internal partial interface IProxyResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ProxyResource.json.cs b/src/Cdn/generated/api/Models/Api20210601/ProxyResource.json.cs new file mode 100644 index 000000000000..9bc91952d01b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ProxyResource.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// The resource model definition for a ARM proxy resource. It will have everything other than required location and tags + /// + public partial class ProxyResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProxyResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProxyResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ProxyResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/PurgeParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/PurgeParameters.PowerShell.cs new file mode 100644 index 000000000000..cf1e35e717f9 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/PurgeParameters.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Parameters required for content purge. + [System.ComponentModel.TypeConverter(typeof(PurgeParametersTypeConverter))] + public partial class PurgeParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PurgeParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PurgeParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PurgeParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ContentPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParametersInternal)this).ContentPath = (string[]) content.GetValueForProperty("ContentPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParametersInternal)this).ContentPath, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PurgeParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ContentPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParametersInternal)this).ContentPath = (string[]) content.GetValueForProperty("ContentPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParametersInternal)this).ContentPath, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Parameters required for content purge. + [System.ComponentModel.TypeConverter(typeof(PurgeParametersTypeConverter))] + public partial interface IPurgeParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/PurgeParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/PurgeParameters.TypeConverter.cs new file mode 100644 index 000000000000..fb9754fcd4bd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/PurgeParameters.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PurgeParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PurgeParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PurgeParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PurgeParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/PurgeParameters.cs b/src/Cdn/generated/api/Models/Api20210601/PurgeParameters.cs new file mode 100644 index 000000000000..c6b4423d0733 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/PurgeParameters.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Parameters required for content purge. + public partial class PurgeParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParametersInternal + { + + /// Backing field for property. + private string[] _contentPath; + + /// + /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] ContentPath { get => this._contentPath; set => this._contentPath = value; } + + /// Creates an new instance. + public PurgeParameters() + { + + } + } + /// Parameters required for content purge. + public partial interface IPurgeParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The path to the content to be purged. Can describe a file path or a wild card directory.", + SerializedName = @"contentPaths", + PossibleTypes = new [] { typeof(string) })] + string[] ContentPath { get; set; } + + } + /// Parameters required for content purge. + internal partial interface IPurgeParametersInternal + + { + /// + /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// + string[] ContentPath { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/PurgeParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/PurgeParameters.json.cs new file mode 100644 index 000000000000..837a575218f6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/PurgeParameters.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Parameters required for content purge. + public partial class PurgeParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new PurgeParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal PurgeParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_contentPath = If( json?.PropertyT("contentPaths"), out var __jsonContentPaths) ? If( __jsonContentPaths as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : ContentPath;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._contentPath) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._contentPath ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("contentPaths",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/QueryStringMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/QueryStringMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..603f8c78e9e7 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/QueryStringMatchConditionParameters.PowerShell.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for QueryString match conditions + [System.ComponentModel.TypeConverter(typeof(QueryStringMatchConditionParametersTypeConverter))] + public partial class QueryStringMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new QueryStringMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new QueryStringMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal QueryStringMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal QueryStringMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for QueryString match conditions + [System.ComponentModel.TypeConverter(typeof(QueryStringMatchConditionParametersTypeConverter))] + public partial interface IQueryStringMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/QueryStringMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/QueryStringMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..8cca59920529 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/QueryStringMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class QueryStringMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return QueryStringMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return QueryStringMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return QueryStringMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/QueryStringMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/QueryStringMatchConditionParameters.cs new file mode 100644 index 000000000000..3003f1abe151 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/QueryStringMatchConditionParameters.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for QueryString match conditions + public partial class QueryStringMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal + { + + /// Backing field for property. + private string[] _matchValue; + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator _operator; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator Operator { get => this._operator; set => this._operator = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleQueryStringConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public QueryStringMatchConditionParameters() + { + + } + } + /// Defines the parameters for QueryString match conditions + public partial interface IQueryStringMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator Operator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for QueryString match conditions + internal partial interface IQueryStringMatchConditionParametersInternal + + { + /// The match value for the condition of the delivery rule + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator Operator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/QueryStringMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/QueryStringMatchConditionParameters.json.cs new file mode 100644 index 000000000000..fb80f3f76f4c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/QueryStringMatchConditionParameters.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for QueryString match conditions + public partial class QueryStringMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IQueryStringMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new QueryStringMatchConditionParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal QueryStringMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MatchValue;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._matchValue) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._matchValue ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("matchValues",__w); + } + if (null != this._transform) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._transform ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("transforms",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RankingsResponse.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RankingsResponse.PowerShell.cs new file mode 100644 index 000000000000..1e8602acab34 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RankingsResponse.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Rankings Response + [System.ComponentModel.TypeConverter(typeof(RankingsResponseTypeConverter))] + public partial class RankingsResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RankingsResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RankingsResponse(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RankingsResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DateTimeBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseInternal)this).DateTimeBegin = (global::System.DateTime?) content.GetValueForProperty("DateTimeBegin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseInternal)this).DateTimeBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("DateTimeEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseInternal)this).DateTimeEnd = (global::System.DateTime?) content.GetValueForProperty("DateTimeEnd",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseInternal)this).DateTimeEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseInternal)this).Table = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItem[]) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseInternal)this).Table, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RankingsResponseTablesItemTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RankingsResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DateTimeBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseInternal)this).DateTimeBegin = (global::System.DateTime?) content.GetValueForProperty("DateTimeBegin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseInternal)this).DateTimeBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("DateTimeEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseInternal)this).DateTimeEnd = (global::System.DateTime?) content.GetValueForProperty("DateTimeEnd",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseInternal)this).DateTimeEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseInternal)this).Table = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItem[]) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseInternal)this).Table, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RankingsResponseTablesItemTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Rankings Response + [System.ComponentModel.TypeConverter(typeof(RankingsResponseTypeConverter))] + public partial interface IRankingsResponse + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RankingsResponse.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RankingsResponse.TypeConverter.cs new file mode 100644 index 000000000000..739206a8eaba --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RankingsResponse.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RankingsResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RankingsResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RankingsResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RankingsResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RankingsResponse.cs b/src/Cdn/generated/api/Models/Api20210601/RankingsResponse.cs new file mode 100644 index 000000000000..1eb91f145fd2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RankingsResponse.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Rankings Response + public partial class RankingsResponse : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponse, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseInternal + { + + /// Backing field for property. + private global::System.DateTime? _dateTimeBegin; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public global::System.DateTime? DateTimeBegin { get => this._dateTimeBegin; set => this._dateTimeBegin = value; } + + /// Backing field for property. + private global::System.DateTime? _dateTimeEnd; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public global::System.DateTime? DateTimeEnd { get => this._dateTimeEnd; set => this._dateTimeEnd = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItem[] _table; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItem[] Table { get => this._table; set => this._table = value; } + + /// Creates an new instance. + public RankingsResponse() + { + + } + } + /// Rankings Response + public partial interface IRankingsResponse : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeBegin", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DateTimeBegin { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DateTimeEnd { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"tables", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItem[] Table { get; set; } + + } + /// Rankings Response + internal partial interface IRankingsResponseInternal + + { + global::System.DateTime? DateTimeBegin { get; set; } + + global::System.DateTime? DateTimeEnd { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItem[] Table { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RankingsResponse.json.cs b/src/Cdn/generated/api/Models/Api20210601/RankingsResponse.json.cs new file mode 100644 index 000000000000..ef350b5cc21f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RankingsResponse.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Rankings Response + public partial class RankingsResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RankingsResponse(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RankingsResponse(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dateTimeBegin = If( json?.PropertyT("dateTimeBegin"), out var __jsonDateTimeBegin) ? global::System.DateTime.TryParse((string)__jsonDateTimeBegin, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonDateTimeBeginValue) ? __jsonDateTimeBeginValue : DateTimeBegin : DateTimeBegin;} + {_dateTimeEnd = If( json?.PropertyT("dateTimeEnd"), out var __jsonDateTimeEnd) ? global::System.DateTime.TryParse((string)__jsonDateTimeEnd, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonDateTimeEndValue) ? __jsonDateTimeEndValue : DateTimeEnd : DateTimeEnd;} + {_table = If( json?.PropertyT("tables"), out var __jsonTables) ? If( __jsonTables as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItem) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RankingsResponseTablesItem.FromJson(__u) )) ))() : null : Table;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._dateTimeBegin ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._dateTimeBegin?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "dateTimeBegin" ,container.Add ); + AddIf( null != this._dateTimeEnd ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._dateTimeEnd?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "dateTimeEnd" ,container.Add ); + if (null != this._table) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._table ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("tables",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesItem.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesItem.PowerShell.cs new file mode 100644 index 000000000000..d287bac29e57 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesItem.PowerShell.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(RankingsResponseTablesItemTypeConverter))] + public partial class RankingsResponseTablesItem + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RankingsResponseTablesItem(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RankingsResponseTablesItem(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RankingsResponseTablesItem(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ranking")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItemInternal)this).Ranking = (string) content.GetValueForProperty("Ranking",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItemInternal)this).Ranking, global::System.Convert.ToString); + } + if (content.Contains("Data")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItemInternal)this).Data = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItem[]) content.GetValueForProperty("Data",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItemInternal)this).Data, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RankingsResponseTablesPropertiesItemsItemTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RankingsResponseTablesItem(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ranking")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItemInternal)this).Ranking = (string) content.GetValueForProperty("Ranking",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItemInternal)this).Ranking, global::System.Convert.ToString); + } + if (content.Contains("Data")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItemInternal)this).Data = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItem[]) content.GetValueForProperty("Data",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItemInternal)this).Data, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RankingsResponseTablesPropertiesItemsItemTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(RankingsResponseTablesItemTypeConverter))] + public partial interface IRankingsResponseTablesItem + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesItem.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesItem.TypeConverter.cs new file mode 100644 index 000000000000..cabdc05beabc --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesItem.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RankingsResponseTablesItemTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItem ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItem).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RankingsResponseTablesItem.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RankingsResponseTablesItem.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RankingsResponseTablesItem.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesItem.cs b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesItem.cs new file mode 100644 index 000000000000..1b01ba82327b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesItem.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class RankingsResponseTablesItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItem, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItemInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItem[] _data; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItem[] Data { get => this._data; set => this._data = value; } + + /// Backing field for property. + private string _ranking; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Ranking { get => this._ranking; set => this._ranking = value; } + + /// Creates an new instance. + public RankingsResponseTablesItem() + { + + } + } + public partial interface IRankingsResponseTablesItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"data", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItem[] Data { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"ranking", + PossibleTypes = new [] { typeof(string) })] + string Ranking { get; set; } + + } + internal partial interface IRankingsResponseTablesItemInternal + + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItem[] Data { get; set; } + + string Ranking { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesItem.json.cs b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesItem.json.cs new file mode 100644 index 000000000000..c9faf245e7cd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesItem.json.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class RankingsResponseTablesItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RankingsResponseTablesItem(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RankingsResponseTablesItem(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_ranking = If( json?.PropertyT("ranking"), out var __jsonRanking) ? (string)__jsonRanking : (string)Ranking;} + {_data = If( json?.PropertyT("data"), out var __jsonData) ? If( __jsonData as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItem) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RankingsResponseTablesPropertiesItemsItem.FromJson(__u) )) ))() : null : Data;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._ranking)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._ranking.ToString()) : null, "ranking" ,container.Add ); + if (null != this._data) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._data ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("data",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsItem.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsItem.PowerShell.cs new file mode 100644 index 000000000000..aa7288ea0d95 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsItem.PowerShell.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(RankingsResponseTablesPropertiesItemsItemTypeConverter))] + public partial class RankingsResponseTablesPropertiesItemsItem + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RankingsResponseTablesPropertiesItemsItem(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RankingsResponseTablesPropertiesItemsItem(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RankingsResponseTablesPropertiesItemsItem(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItemInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItemInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Metric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItemInternal)this).Metric = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItem[]) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItemInternal)this).Metric, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RankingsResponseTablesPropertiesItemsMetricsItemTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RankingsResponseTablesPropertiesItemsItem(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItemInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItemInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Metric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItemInternal)this).Metric = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItem[]) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItemInternal)this).Metric, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RankingsResponseTablesPropertiesItemsMetricsItemTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(RankingsResponseTablesPropertiesItemsItemTypeConverter))] + public partial interface IRankingsResponseTablesPropertiesItemsItem + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsItem.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsItem.TypeConverter.cs new file mode 100644 index 000000000000..3bd5c97ec152 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsItem.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RankingsResponseTablesPropertiesItemsItemTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItem ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItem).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RankingsResponseTablesPropertiesItemsItem.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RankingsResponseTablesPropertiesItemsItem.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RankingsResponseTablesPropertiesItemsItem.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsItem.cs b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsItem.cs new file mode 100644 index 000000000000..590a9ca2190c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsItem.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class RankingsResponseTablesPropertiesItemsItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItem, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItemInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItem[] _metric; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItem[] Metric { get => this._metric; set => this._metric = value; } + + /// Backing field for property. + private string _name; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// Creates an new instance. + /// + public RankingsResponseTablesPropertiesItemsItem() + { + + } + } + public partial interface IRankingsResponseTablesPropertiesItemsItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"metrics", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItem[] Metric { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + + } + internal partial interface IRankingsResponseTablesPropertiesItemsItemInternal + + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItem[] Metric { get; set; } + + string Name { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsItem.json.cs b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsItem.json.cs new file mode 100644 index 000000000000..0df156271a39 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsItem.json.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class RankingsResponseTablesPropertiesItemsItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RankingsResponseTablesPropertiesItemsItem(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RankingsResponseTablesPropertiesItemsItem(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_metric = If( json?.PropertyT("metrics"), out var __jsonMetrics) ? If( __jsonMetrics as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItem) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RankingsResponseTablesPropertiesItemsMetricsItem.FromJson(__u) )) ))() : null : Metric;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + if (null != this._metric) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._metric ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("metrics",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsMetricsItem.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsMetricsItem.PowerShell.cs new file mode 100644 index 000000000000..e0ea9de68674 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsMetricsItem.PowerShell.cs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(RankingsResponseTablesPropertiesItemsMetricsItemTypeConverter))] + public partial class RankingsResponseTablesPropertiesItemsMetricsItem + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RankingsResponseTablesPropertiesItemsMetricsItem(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RankingsResponseTablesPropertiesItemsMetricsItem(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RankingsResponseTablesPropertiesItemsMetricsItem(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Metric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItemInternal)this).Metric = (string) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItemInternal)this).Metric, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItemInternal)this).Value = (long?) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItemInternal)this).Value, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("Percentage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItemInternal)this).Percentage = (float?) content.GetValueForProperty("Percentage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItemInternal)this).Percentage, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RankingsResponseTablesPropertiesItemsMetricsItem(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Metric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItemInternal)this).Metric = (string) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItemInternal)this).Metric, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItemInternal)this).Value = (long?) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItemInternal)this).Value, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("Percentage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItemInternal)this).Percentage = (float?) content.GetValueForProperty("Percentage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItemInternal)this).Percentage, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(RankingsResponseTablesPropertiesItemsMetricsItemTypeConverter))] + public partial interface IRankingsResponseTablesPropertiesItemsMetricsItem + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsMetricsItem.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsMetricsItem.TypeConverter.cs new file mode 100644 index 000000000000..64a3ea11bf14 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsMetricsItem.TypeConverter.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RankingsResponseTablesPropertiesItemsMetricsItemTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItem ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItem).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RankingsResponseTablesPropertiesItemsMetricsItem.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RankingsResponseTablesPropertiesItemsMetricsItem.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RankingsResponseTablesPropertiesItemsMetricsItem.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsMetricsItem.cs b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsMetricsItem.cs new file mode 100644 index 000000000000..302dc741561b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsMetricsItem.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class RankingsResponseTablesPropertiesItemsMetricsItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItem, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItemInternal + { + + /// Backing field for property. + private string _metric; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Metric { get => this._metric; set => this._metric = value; } + + /// Backing field for property. + private float? _percentage; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public float? Percentage { get => this._percentage; set => this._percentage = value; } + + /// Backing field for property. + private long? _value; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public long? Value { get => this._value; set => this._value = value; } + + /// + /// Creates an new instance. + /// + public RankingsResponseTablesPropertiesItemsMetricsItem() + { + + } + } + public partial interface IRankingsResponseTablesPropertiesItemsMetricsItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"metric", + PossibleTypes = new [] { typeof(string) })] + string Metric { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"percentage", + PossibleTypes = new [] { typeof(float) })] + float? Percentage { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"value", + PossibleTypes = new [] { typeof(long) })] + long? Value { get; set; } + + } + internal partial interface IRankingsResponseTablesPropertiesItemsMetricsItemInternal + + { + string Metric { get; set; } + + float? Percentage { get; set; } + + long? Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsMetricsItem.json.cs b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsMetricsItem.json.cs new file mode 100644 index 000000000000..f41256cb2543 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RankingsResponseTablesPropertiesItemsMetricsItem.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class RankingsResponseTablesPropertiesItemsMetricsItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponseTablesPropertiesItemsMetricsItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RankingsResponseTablesPropertiesItemsMetricsItem(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RankingsResponseTablesPropertiesItemsMetricsItem(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_metric = If( json?.PropertyT("metric"), out var __jsonMetric) ? (string)__jsonMetric : (string)Metric;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (long?)__jsonValue : Value;} + {_percentage = If( json?.PropertyT("percentage"), out var __jsonPercentage) ? (float?)__jsonPercentage : Percentage;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._metric)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._metric.ToString()) : null, "metric" ,container.Add ); + AddIf( null != this._value ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((long)this._value) : null, "value" ,container.Add ); + AddIf( null != this._percentage ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((float)this._percentage) : null, "percentage" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RemoteAddressMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RemoteAddressMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..4ca218a88368 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RemoteAddressMatchConditionParameters.PowerShell.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for RemoteAddress match conditions + [System.ComponentModel.TypeConverter(typeof(RemoteAddressMatchConditionParametersTypeConverter))] + public partial class RemoteAddressMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RemoteAddressMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RemoteAddressMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RemoteAddressMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RemoteAddressMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for RemoteAddress match conditions + [System.ComponentModel.TypeConverter(typeof(RemoteAddressMatchConditionParametersTypeConverter))] + public partial interface IRemoteAddressMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RemoteAddressMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RemoteAddressMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..6d9df89abf52 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RemoteAddressMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RemoteAddressMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RemoteAddressMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RemoteAddressMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RemoteAddressMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RemoteAddressMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/RemoteAddressMatchConditionParameters.cs new file mode 100644 index 000000000000..9dc0c876c439 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RemoteAddressMatchConditionParameters.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for RemoteAddress match conditions + public partial class RemoteAddressMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal + { + + /// Backing field for property. + private string[] _matchValue; + + /// + /// Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the + /// variable with the given operator this match condition is considered a match. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator _operator; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator Operator { get => this._operator; set => this._operator = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleRemoteAddressConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public RemoteAddressMatchConditionParameters() + { + + } + } + /// Defines the parameters for RemoteAddress match conditions + public partial interface IRemoteAddressMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the + /// variable with the given operator this match condition is considered a match. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the variable with the given operator this match condition is considered a match.", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator Operator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for RemoteAddress match conditions + internal partial interface IRemoteAddressMatchConditionParametersInternal + + { + /// + /// Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the + /// variable with the given operator this match condition is considered a match. + /// + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator Operator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RemoteAddressMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/RemoteAddressMatchConditionParameters.json.cs new file mode 100644 index 000000000000..811274628a78 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RemoteAddressMatchConditionParameters.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for RemoteAddress match conditions + public partial class RemoteAddressMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRemoteAddressMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RemoteAddressMatchConditionParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RemoteAddressMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MatchValue;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._matchValue) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._matchValue ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("matchValues",__w); + } + if (null != this._transform) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._transform ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("transforms",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestBodyMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RequestBodyMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..fddb07017526 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestBodyMatchConditionParameters.PowerShell.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for RequestBody match conditions + [System.ComponentModel.TypeConverter(typeof(RequestBodyMatchConditionParametersTypeConverter))] + public partial class RequestBodyMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RequestBodyMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RequestBodyMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RequestBodyMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RequestBodyMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for RequestBody match conditions + [System.ComponentModel.TypeConverter(typeof(RequestBodyMatchConditionParametersTypeConverter))] + public partial interface IRequestBodyMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestBodyMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RequestBodyMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..8e0957d3c57a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestBodyMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RequestBodyMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RequestBodyMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RequestBodyMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RequestBodyMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestBodyMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/RequestBodyMatchConditionParameters.cs new file mode 100644 index 000000000000..da56f3ac45af --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestBodyMatchConditionParameters.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for RequestBody match conditions + public partial class RequestBodyMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal + { + + /// Backing field for property. + private string[] _matchValue; + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator _operator; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator Operator { get => this._operator; set => this._operator = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleRequestBodyConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public RequestBodyMatchConditionParameters() + { + + } + } + /// Defines the parameters for RequestBody match conditions + public partial interface IRequestBodyMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator Operator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for RequestBody match conditions + internal partial interface IRequestBodyMatchConditionParametersInternal + + { + /// The match value for the condition of the delivery rule + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator Operator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestBodyMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/RequestBodyMatchConditionParameters.json.cs new file mode 100644 index 000000000000..1e0014aea817 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestBodyMatchConditionParameters.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for RequestBody match conditions + public partial class RequestBodyMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestBodyMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RequestBodyMatchConditionParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RequestBodyMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MatchValue;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._matchValue) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._matchValue ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("matchValues",__w); + } + if (null != this._transform) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._transform ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("transforms",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestHeaderMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RequestHeaderMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..c4f1f5e4b128 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestHeaderMatchConditionParameters.PowerShell.cs @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for RequestHeader match conditions + [System.ComponentModel.TypeConverter(typeof(RequestHeaderMatchConditionParametersTypeConverter))] + public partial class RequestHeaderMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RequestHeaderMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RequestHeaderMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RequestHeaderMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Selector")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).Selector = (string) content.GetValueForProperty("Selector",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).Selector, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RequestHeaderMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Selector")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).Selector = (string) content.GetValueForProperty("Selector",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).Selector, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for RequestHeader match conditions + [System.ComponentModel.TypeConverter(typeof(RequestHeaderMatchConditionParametersTypeConverter))] + public partial interface IRequestHeaderMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestHeaderMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RequestHeaderMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..1af90b9d25c0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestHeaderMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RequestHeaderMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RequestHeaderMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RequestHeaderMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RequestHeaderMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestHeaderMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/RequestHeaderMatchConditionParameters.cs new file mode 100644 index 000000000000..a42a43aaf0bd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestHeaderMatchConditionParameters.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for RequestHeader match conditions + public partial class RequestHeaderMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal + { + + /// Backing field for property. + private string[] _matchValue; + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator _operator; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator Operator { get => this._operator; set => this._operator = value; } + + /// Backing field for property. + private string _selector; + + /// Name of Header to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Selector { get => this._selector; set => this._selector = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleRequestHeaderConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public RequestHeaderMatchConditionParameters() + { + + } + } + /// Defines the parameters for RequestHeader match conditions + public partial interface IRequestHeaderMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator Operator { get; set; } + /// Name of Header to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of Header to be matched", + SerializedName = @"selector", + PossibleTypes = new [] { typeof(string) })] + string Selector { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for RequestHeader match conditions + internal partial interface IRequestHeaderMatchConditionParametersInternal + + { + /// The match value for the condition of the delivery rule + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator Operator { get; set; } + /// Name of Header to be matched + string Selector { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestHeaderMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/RequestHeaderMatchConditionParameters.json.cs new file mode 100644 index 000000000000..ee6758db4226 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestHeaderMatchConditionParameters.json.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for RequestHeader match conditions + public partial class RequestHeaderMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestHeaderMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RequestHeaderMatchConditionParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RequestHeaderMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_selector = If( json?.PropertyT("selector"), out var __jsonSelector) ? (string)__jsonSelector : (string)Selector;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MatchValue;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._selector)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._selector.ToString()) : null, "selector" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._matchValue) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._matchValue ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("matchValues",__w); + } + if (null != this._transform) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._transform ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("transforms",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestMethodMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RequestMethodMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..a9ce257de8f4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestMethodMatchConditionParameters.PowerShell.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for RequestMethod match conditions + [System.ComponentModel.TypeConverter(typeof(RequestMethodMatchConditionParametersTypeConverter))] + public partial class RequestMethodMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RequestMethodMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RequestMethodMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RequestMethodMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).Operator = (string) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).Operator, global::System.Convert.ToString); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RequestMethodMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).Operator = (string) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).Operator, global::System.Convert.ToString); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for RequestMethod match conditions + [System.ComponentModel.TypeConverter(typeof(RequestMethodMatchConditionParametersTypeConverter))] + public partial interface IRequestMethodMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestMethodMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RequestMethodMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..44787ba8cf2c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestMethodMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RequestMethodMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RequestMethodMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RequestMethodMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RequestMethodMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestMethodMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/RequestMethodMatchConditionParameters.cs new file mode 100644 index 000000000000..4a2c0ceb71eb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestMethodMatchConditionParameters.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for RequestMethod match conditions + public partial class RequestMethodMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal + { + + /// Backing field for property. + private string[] _matchValue; + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for Operator + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal.Operator { get => this._operator; set { {_operator = value;} } } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private string _operator= @"Equal"; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Operator { get => this._operator; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleRequestMethodConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public RequestMethodMatchConditionParameters() + { + + } + } + /// Defines the parameters for RequestMethod match conditions + public partial interface IRequestMethodMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(string) })] + string Operator { get; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for RequestMethod match conditions + internal partial interface IRequestMethodMatchConditionParametersInternal + + { + /// The match value for the condition of the delivery rule + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + string Operator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestMethodMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/RequestMethodMatchConditionParameters.json.cs new file mode 100644 index 000000000000..8e4d25170ffc --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestMethodMatchConditionParameters.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for RequestMethod match conditions + public partial class RequestMethodMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestMethodMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RequestMethodMatchConditionParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RequestMethodMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : MatchValue;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._transform) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._transform ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("transforms",__w); + } + if (null != this._matchValue) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._matchValue ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("matchValues",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestSchemeMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RequestSchemeMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..eda7854572de --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestSchemeMatchConditionParameters.PowerShell.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for RequestScheme match conditions + [System.ComponentModel.TypeConverter(typeof(RequestSchemeMatchConditionParametersTypeConverter))] + public partial class RequestSchemeMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RequestSchemeMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RequestSchemeMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RequestSchemeMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).Operator = (string) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).Operator, global::System.Convert.ToString); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RequestSchemeMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).Operator = (string) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).Operator, global::System.Convert.ToString); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for RequestScheme match conditions + [System.ComponentModel.TypeConverter(typeof(RequestSchemeMatchConditionParametersTypeConverter))] + public partial interface IRequestSchemeMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestSchemeMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RequestSchemeMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..02612b9a28d1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestSchemeMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RequestSchemeMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RequestSchemeMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RequestSchemeMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RequestSchemeMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestSchemeMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/RequestSchemeMatchConditionParameters.cs new file mode 100644 index 000000000000..faf9ce95494e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestSchemeMatchConditionParameters.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for RequestScheme match conditions + public partial class RequestSchemeMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal + { + + /// Backing field for property. + private string[] _matchValue; + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for Operator + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal.Operator { get => this._operator; set { {_operator = value;} } } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private string _operator= @"Equal"; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Operator { get => this._operator; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleRequestSchemeConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public RequestSchemeMatchConditionParameters() + { + + } + } + /// Defines the parameters for RequestScheme match conditions + public partial interface IRequestSchemeMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(string) })] + string Operator { get; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for RequestScheme match conditions + internal partial interface IRequestSchemeMatchConditionParametersInternal + + { + /// The match value for the condition of the delivery rule + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + string Operator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestSchemeMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/RequestSchemeMatchConditionParameters.json.cs new file mode 100644 index 000000000000..a63903e51dd5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestSchemeMatchConditionParameters.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for RequestScheme match conditions + public partial class RequestSchemeMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestSchemeMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RequestSchemeMatchConditionParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RequestSchemeMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : MatchValue;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._transform) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._transform ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("transforms",__w); + } + if (null != this._matchValue) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._matchValue ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("matchValues",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestUriMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RequestUriMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..c49ee1a621cd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestUriMatchConditionParameters.PowerShell.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for RequestUri match conditions + [System.ComponentModel.TypeConverter(typeof(RequestUriMatchConditionParametersTypeConverter))] + public partial class RequestUriMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RequestUriMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RequestUriMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RequestUriMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RequestUriMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for RequestUri match conditions + [System.ComponentModel.TypeConverter(typeof(RequestUriMatchConditionParametersTypeConverter))] + public partial interface IRequestUriMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestUriMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RequestUriMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..fa2d939aa7f0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestUriMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RequestUriMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RequestUriMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RequestUriMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RequestUriMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestUriMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/RequestUriMatchConditionParameters.cs new file mode 100644 index 000000000000..a798a28cd4a9 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestUriMatchConditionParameters.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for RequestUri match conditions + public partial class RequestUriMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal + { + + /// Backing field for property. + private string[] _matchValue; + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator _operator; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator Operator { get => this._operator; set => this._operator = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleRequestUriConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public RequestUriMatchConditionParameters() + { + + } + } + /// Defines the parameters for RequestUri match conditions + public partial interface IRequestUriMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator Operator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for RequestUri match conditions + internal partial interface IRequestUriMatchConditionParametersInternal + + { + /// The match value for the condition of the delivery rule + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator Operator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RequestUriMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/RequestUriMatchConditionParameters.json.cs new file mode 100644 index 000000000000..15f383e2ba8b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RequestUriMatchConditionParameters.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for RequestUri match conditions + public partial class RequestUriMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRequestUriMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RequestUriMatchConditionParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RequestUriMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MatchValue;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._matchValue) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._matchValue ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("matchValues",__w); + } + if (null != this._transform) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._transform ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("transforms",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Resource.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/Resource.PowerShell.cs new file mode 100644 index 000000000000..ee302590cb2e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Resource.PowerShell.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The core properties of ARM resources + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial class Resource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Resource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Resource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Resource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Resource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The core properties of ARM resources + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial interface IResource + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Resource.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/Resource.TypeConverter.cs new file mode 100644 index 000000000000..7250411278f5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Resource.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Resource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Resource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Resource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Resource.cs b/src/Cdn/generated/api/Models/Api20210601/Resource.cs new file mode 100644 index 000000000000..89c67f361c87 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Resource.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The core properties of ARM resources + public partial class Resource : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal + { + + /// Backing field for property. + private string _id; + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _name; + + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData _systemData; + + /// Read only system data + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemData()); } + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// Backing field for property. + private string _type; + + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public Resource() + { + + } + } + /// The core properties of ARM resources + public partial interface IResource : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource name.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC)", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An identifier for the identity that created the resource", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An identifier for the identity that last modified the resource", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get; set; } + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource type.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// The core properties of ARM resources + internal partial interface IResourceInternal + + { + /// Resource ID. + string Id { get; set; } + /// Resource name. + string Name { get; set; } + /// Read only system data + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC) + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// An identifier for the identity that created the resource + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// An identifier for the identity that last modified the resource + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get; set; } + /// Resource type. + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Resource.json.cs b/src/Cdn/generated/api/Models/Api20210601/Resource.json.cs new file mode 100644 index 000000000000..2891aad5c4b4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Resource.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The core properties of ARM resources + public partial class Resource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new Resource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal Resource(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemData.FromJson(__jsonSystemData) : SystemData;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourceReference.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ResourceReference.PowerShell.cs new file mode 100644 index 000000000000..1e3c292b83b5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourceReference.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Reference to another resource. + [System.ComponentModel.TypeConverter(typeof(ResourceReferenceTypeConverter))] + public partial class ResourceReference + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ResourceReference(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ResourceReference(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ResourceReference(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)this).Id, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ResourceReference(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)this).Id, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Reference to another resource. + [System.ComponentModel.TypeConverter(typeof(ResourceReferenceTypeConverter))] + public partial interface IResourceReference + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourceReference.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ResourceReference.TypeConverter.cs new file mode 100644 index 000000000000..1e3331f3d5a7 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourceReference.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourceReferenceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ResourceReference.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ResourceReference.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ResourceReference.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourceReference.cs b/src/Cdn/generated/api/Models/Api20210601/ResourceReference.cs new file mode 100644 index 000000000000..097580cb48e9 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourceReference.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Reference to another resource. + public partial class ResourceReference : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal + { + + /// Backing field for property. + private string _id; + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Creates an new instance. + public ResourceReference() + { + + } + } + /// Reference to another resource. + public partial interface IResourceReference : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + + } + /// Reference to another resource. + internal partial interface IResourceReferenceInternal + + { + /// Resource ID. + string Id { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourceReference.json.cs b/src/Cdn/generated/api/Models/Api20210601/ResourceReference.json.cs new file mode 100644 index 000000000000..e33955d9c076 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourceReference.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Reference to another resource. + public partial class ResourceReference + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ResourceReference(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ResourceReference(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourceUsage.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ResourceUsage.PowerShell.cs new file mode 100644 index 000000000000..c3bb9f6d8c5c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourceUsage.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Output of check resource usage API. + [System.ComponentModel.TypeConverter(typeof(ResourceUsageTypeConverter))] + public partial class ResourceUsage + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ResourceUsage(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ResourceUsage(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ResourceUsage(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ResourceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal)this).ResourceType, global::System.Convert.ToString); + } + if (content.Contains("Unit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal)this).Unit, global::System.Convert.ToString); + } + if (content.Contains("CurrentValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal)this).CurrentValue = (int?) content.GetValueForProperty("CurrentValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal)this).CurrentValue, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Limit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal)this).Limit = (int?) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal)this).Limit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ResourceUsage(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ResourceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal)this).ResourceType, global::System.Convert.ToString); + } + if (content.Contains("Unit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal)this).Unit, global::System.Convert.ToString); + } + if (content.Contains("CurrentValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal)this).CurrentValue = (int?) content.GetValueForProperty("CurrentValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal)this).CurrentValue, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Limit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal)this).Limit = (int?) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal)this).Limit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Output of check resource usage API. + [System.ComponentModel.TypeConverter(typeof(ResourceUsageTypeConverter))] + public partial interface IResourceUsage + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourceUsage.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ResourceUsage.TypeConverter.cs new file mode 100644 index 000000000000..4d9360d72698 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourceUsage.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourceUsageTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ResourceUsage.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ResourceUsage.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ResourceUsage.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourceUsage.cs b/src/Cdn/generated/api/Models/Api20210601/ResourceUsage.cs new file mode 100644 index 000000000000..ee9fef1c24bb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourceUsage.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Output of check resource usage API. + public partial class ResourceUsage : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal + { + + /// Backing field for property. + private int? _currentValue; + + /// Actual value of usage on the specified resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? CurrentValue { get => this._currentValue; } + + /// Backing field for property. + private int? _limit; + + /// Quota of the specified resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? Limit { get => this._limit; } + + /// Internal Acessors for CurrentValue + int? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal.CurrentValue { get => this._currentValue; set { {_currentValue = value;} } } + + /// Internal Acessors for Limit + int? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal.Limit { get => this._limit; set { {_limit = value;} } } + + /// Internal Acessors for ResourceType + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal.ResourceType { get => this._resourceType; set { {_resourceType = value;} } } + + /// Internal Acessors for Unit + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageInternal.Unit { get => this._unit; set { {_unit = value;} } } + + /// Backing field for property. + private string _resourceType; + + /// Resource type for which the usage is provided. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ResourceType { get => this._resourceType; } + + /// Backing field for property. + private string _unit; + + /// Unit of the usage. e.g. Count. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Unit { get => this._unit; } + + /// Creates an new instance. + public ResourceUsage() + { + + } + } + /// Output of check resource usage API. + public partial interface IResourceUsage : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Actual value of usage on the specified resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Actual value of usage on the specified resource type.", + SerializedName = @"currentValue", + PossibleTypes = new [] { typeof(int) })] + int? CurrentValue { get; } + /// Quota of the specified resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Quota of the specified resource type.", + SerializedName = @"limit", + PossibleTypes = new [] { typeof(int) })] + int? Limit { get; } + /// Resource type for which the usage is provided. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource type for which the usage is provided.", + SerializedName = @"resourceType", + PossibleTypes = new [] { typeof(string) })] + string ResourceType { get; } + /// Unit of the usage. e.g. Count. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Unit of the usage. e.g. Count.", + SerializedName = @"unit", + PossibleTypes = new [] { typeof(string) })] + string Unit { get; } + + } + /// Output of check resource usage API. + internal partial interface IResourceUsageInternal + + { + /// Actual value of usage on the specified resource type. + int? CurrentValue { get; set; } + /// Quota of the specified resource type. + int? Limit { get; set; } + /// Resource type for which the usage is provided. + string ResourceType { get; set; } + /// Unit of the usage. e.g. Count. + string Unit { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourceUsage.json.cs b/src/Cdn/generated/api/Models/Api20210601/ResourceUsage.json.cs new file mode 100644 index 000000000000..e0315fa0ada0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourceUsage.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Output of check resource usage API. + public partial class ResourceUsage + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ResourceUsage(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ResourceUsage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_resourceType = If( json?.PropertyT("resourceType"), out var __jsonResourceType) ? (string)__jsonResourceType : (string)ResourceType;} + {_unit = If( json?.PropertyT("unit"), out var __jsonUnit) ? (string)__jsonUnit : (string)Unit;} + {_currentValue = If( json?.PropertyT("currentValue"), out var __jsonCurrentValue) ? (int?)__jsonCurrentValue : CurrentValue;} + {_limit = If( json?.PropertyT("limit"), out var __jsonLimit) ? (int?)__jsonLimit : Limit;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._resourceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._resourceType.ToString()) : null, "resourceType" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._unit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._unit.ToString()) : null, "unit" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._currentValue ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._currentValue) : null, "currentValue" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._limit ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._limit) : null, "limit" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourceUsageListResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ResourceUsageListResult.PowerShell.cs new file mode 100644 index 000000000000..d3f73c4aa99f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourceUsageListResult.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Output of check resource usage API. + [System.ComponentModel.TypeConverter(typeof(ResourceUsageListResultTypeConverter))] + public partial class ResourceUsageListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ResourceUsageListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ResourceUsageListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ResourceUsageListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceUsageTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ResourceUsageListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceUsageTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Output of check resource usage API. + [System.ComponentModel.TypeConverter(typeof(ResourceUsageListResultTypeConverter))] + public partial interface IResourceUsageListResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourceUsageListResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ResourceUsageListResult.TypeConverter.cs new file mode 100644 index 000000000000..280368ccce8f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourceUsageListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourceUsageListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ResourceUsageListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ResourceUsageListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ResourceUsageListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourceUsageListResult.cs b/src/Cdn/generated/api/Models/Api20210601/ResourceUsageListResult.cs new file mode 100644 index 000000000000..8f9fa054fb59 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourceUsageListResult.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Output of check resource usage API. + public partial class ResourceUsageListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResultInternal + { + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of custom domain objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage[] _value; + + /// List of resource usages. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage[] Value { get => this._value; } + + /// Creates an new instance. + public ResourceUsageListResult() + { + + } + } + /// Output of check resource usage API. + public partial interface IResourceUsageListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// URL to get the next set of custom domain objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL to get the next set of custom domain objects if there are any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// List of resource usages. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of resource usages.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage[] Value { get; } + + } + /// Output of check resource usage API. + internal partial interface IResourceUsageListResultInternal + + { + /// URL to get the next set of custom domain objects if there are any. + string NextLink { get; set; } + /// List of resource usages. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourceUsageListResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/ResourceUsageListResult.json.cs new file mode 100644 index 000000000000..c9a806593306 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourceUsageListResult.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Output of check resource usage API. + public partial class ResourceUsageListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsageListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ResourceUsageListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ResourceUsageListResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceUsage.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourcesResponse.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponse.PowerShell.cs new file mode 100644 index 000000000000..89eedce0ca08 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponse.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Resources Response + [System.ComponentModel.TypeConverter(typeof(ResourcesResponseTypeConverter))] + public partial class ResourcesResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ResourcesResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ResourcesResponse(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ResourcesResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Endpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseInternal)this).Endpoint = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItem[]) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseInternal)this).Endpoint, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourcesResponseEndpointsItemTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseInternal)this).CustomDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItem[]) content.GetValueForProperty("CustomDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseInternal)this).CustomDomain, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourcesResponseCustomDomainsItemTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ResourcesResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Endpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseInternal)this).Endpoint = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItem[]) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseInternal)this).Endpoint, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourcesResponseEndpointsItemTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseInternal)this).CustomDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItem[]) content.GetValueForProperty("CustomDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseInternal)this).CustomDomain, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourcesResponseCustomDomainsItemTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Resources Response + [System.ComponentModel.TypeConverter(typeof(ResourcesResponseTypeConverter))] + public partial interface IResourcesResponse + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourcesResponse.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponse.TypeConverter.cs new file mode 100644 index 000000000000..c98b0127c8bc --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponse.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourcesResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ResourcesResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ResourcesResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ResourcesResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourcesResponse.cs b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponse.cs new file mode 100644 index 000000000000..837c53340bfd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponse.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Resources Response + public partial class ResourcesResponse : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponse, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItem[] _customDomain; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItem[] CustomDomain { get => this._customDomain; set => this._customDomain = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItem[] _endpoint; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItem[] Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// Creates an new instance. + public ResourcesResponse() + { + + } + } + /// Resources Response + public partial interface IResourcesResponse : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"customDomains", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItem[] CustomDomain { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"endpoints", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItem[] Endpoint { get; set; } + + } + /// Resources Response + internal partial interface IResourcesResponseInternal + + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItem[] CustomDomain { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItem[] Endpoint { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourcesResponse.json.cs b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponse.json.cs new file mode 100644 index 000000000000..9ad459821576 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponse.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Resources Response + public partial class ResourcesResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ResourcesResponse(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ResourcesResponse(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_endpoint = If( json?.PropertyT("endpoints"), out var __jsonEndpoints) ? If( __jsonEndpoints as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItem) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourcesResponseEndpointsItem.FromJson(__u) )) ))() : null : Endpoint;} + {_customDomain = If( json?.PropertyT("customDomains"), out var __jsonCustomDomains) ? If( __jsonCustomDomains as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItem) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourcesResponseCustomDomainsItem.FromJson(__p) )) ))() : null : CustomDomain;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._endpoint) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._endpoint ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("endpoints",__w); + } + if (null != this._customDomain) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._customDomain ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("customDomains",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseCustomDomainsItem.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseCustomDomainsItem.PowerShell.cs new file mode 100644 index 000000000000..5289a547aace --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseCustomDomainsItem.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ResourcesResponseCustomDomainsItemTypeConverter))] + public partial class ResourcesResponseCustomDomainsItem + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ResourcesResponseCustomDomainsItem(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ResourcesResponseCustomDomainsItem(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ResourcesResponseCustomDomainsItem(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItemInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItemInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItemInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItemInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("EndpointId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItemInternal)this).EndpointId = (string) content.GetValueForProperty("EndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItemInternal)this).EndpointId, global::System.Convert.ToString); + } + if (content.Contains("History")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItemInternal)this).History = (bool?) content.GetValueForProperty("History",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItemInternal)this).History, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ResourcesResponseCustomDomainsItem(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItemInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItemInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItemInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItemInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("EndpointId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItemInternal)this).EndpointId = (string) content.GetValueForProperty("EndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItemInternal)this).EndpointId, global::System.Convert.ToString); + } + if (content.Contains("History")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItemInternal)this).History = (bool?) content.GetValueForProperty("History",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItemInternal)this).History, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(ResourcesResponseCustomDomainsItemTypeConverter))] + public partial interface IResourcesResponseCustomDomainsItem + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseCustomDomainsItem.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseCustomDomainsItem.TypeConverter.cs new file mode 100644 index 000000000000..0fbb5d6fb028 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseCustomDomainsItem.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourcesResponseCustomDomainsItemTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItem ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItem).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ResourcesResponseCustomDomainsItem.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ResourcesResponseCustomDomainsItem.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ResourcesResponseCustomDomainsItem.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseCustomDomainsItem.cs b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseCustomDomainsItem.cs new file mode 100644 index 000000000000..f32df9e5dd4c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseCustomDomainsItem.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class ResourcesResponseCustomDomainsItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItem, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItemInternal + { + + /// Backing field for property. + private string _endpointId; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string EndpointId { get => this._endpointId; set => this._endpointId = value; } + + /// Backing field for property. + private bool? _history; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? History { get => this._history; set => this._history = value; } + + /// Backing field for property. + private string _id; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Backing field for property. + private string _name; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Creates an new instance. + public ResourcesResponseCustomDomainsItem() + { + + } + } + public partial interface IResourcesResponseCustomDomainsItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"endpointId", + PossibleTypes = new [] { typeof(string) })] + string EndpointId { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"history", + PossibleTypes = new [] { typeof(bool) })] + bool? History { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + + } + internal partial interface IResourcesResponseCustomDomainsItemInternal + + { + string EndpointId { get; set; } + + bool? History { get; set; } + + string Id { get; set; } + + string Name { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseCustomDomainsItem.json.cs b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseCustomDomainsItem.json.cs new file mode 100644 index 000000000000..93f9892970a3 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseCustomDomainsItem.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class ResourcesResponseCustomDomainsItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseCustomDomainsItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ResourcesResponseCustomDomainsItem(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ResourcesResponseCustomDomainsItem(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_endpointId = If( json?.PropertyT("endpointId"), out var __jsonEndpointId) ? (string)__jsonEndpointId : (string)EndpointId;} + {_history = If( json?.PropertyT("history"), out var __jsonHistory) ? (bool?)__jsonHistory : History;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._endpointId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._endpointId.ToString()) : null, "endpointId" ,container.Add ); + AddIf( null != this._history ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._history) : null, "history" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsItem.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsItem.PowerShell.cs new file mode 100644 index 000000000000..2a35794481fb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsItem.PowerShell.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ResourcesResponseEndpointsItemTypeConverter))] + public partial class ResourcesResponseEndpointsItem + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ResourcesResponseEndpointsItem(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ResourcesResponseEndpointsItem(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ResourcesResponseEndpointsItem(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItemInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItemInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItemInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItemInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("History")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItemInternal)this).History = (bool?) content.GetValueForProperty("History",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItemInternal)this).History, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CustomDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItemInternal)this).CustomDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItem[]) content.GetValueForProperty("CustomDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItemInternal)this).CustomDomain, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourcesResponseEndpointsPropertiesItemsItemTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ResourcesResponseEndpointsItem(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItemInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItemInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItemInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItemInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("History")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItemInternal)this).History = (bool?) content.GetValueForProperty("History",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItemInternal)this).History, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CustomDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItemInternal)this).CustomDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItem[]) content.GetValueForProperty("CustomDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItemInternal)this).CustomDomain, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourcesResponseEndpointsPropertiesItemsItemTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(ResourcesResponseEndpointsItemTypeConverter))] + public partial interface IResourcesResponseEndpointsItem + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsItem.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsItem.TypeConverter.cs new file mode 100644 index 000000000000..e263cee3046d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsItem.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourcesResponseEndpointsItemTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItem ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItem).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ResourcesResponseEndpointsItem.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ResourcesResponseEndpointsItem.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ResourcesResponseEndpointsItem.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsItem.cs b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsItem.cs new file mode 100644 index 000000000000..476b8ab92575 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsItem.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class ResourcesResponseEndpointsItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItem, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItemInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItem[] _customDomain; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItem[] CustomDomain { get => this._customDomain; set => this._customDomain = value; } + + /// Backing field for property. + private bool? _history; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? History { get => this._history; set => this._history = value; } + + /// Backing field for property. + private string _id; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Backing field for property. + private string _name; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Creates an new instance. + public ResourcesResponseEndpointsItem() + { + + } + } + public partial interface IResourcesResponseEndpointsItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"customDomains", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItem[] CustomDomain { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"history", + PossibleTypes = new [] { typeof(bool) })] + bool? History { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + + } + internal partial interface IResourcesResponseEndpointsItemInternal + + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItem[] CustomDomain { get; set; } + + bool? History { get; set; } + + string Id { get; set; } + + string Name { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsItem.json.cs b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsItem.json.cs new file mode 100644 index 000000000000..f2d0d93df516 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsItem.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class ResourcesResponseEndpointsItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ResourcesResponseEndpointsItem(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ResourcesResponseEndpointsItem(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_history = If( json?.PropertyT("history"), out var __jsonHistory) ? (bool?)__jsonHistory : History;} + {_customDomain = If( json?.PropertyT("customDomains"), out var __jsonCustomDomains) ? If( __jsonCustomDomains as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItem) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourcesResponseEndpointsPropertiesItemsItem.FromJson(__u) )) ))() : null : CustomDomain;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != this._history ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._history) : null, "history" ,container.Add ); + if (null != this._customDomain) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._customDomain ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("customDomains",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsPropertiesItemsItem.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsPropertiesItemsItem.PowerShell.cs new file mode 100644 index 000000000000..f6d75573253d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsPropertiesItemsItem.PowerShell.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ResourcesResponseEndpointsPropertiesItemsItemTypeConverter))] + public partial class ResourcesResponseEndpointsPropertiesItemsItem + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ResourcesResponseEndpointsPropertiesItemsItem(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ResourcesResponseEndpointsPropertiesItemsItem(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ResourcesResponseEndpointsPropertiesItemsItem(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItemInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItemInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItemInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItemInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("EndpointId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItemInternal)this).EndpointId = (string) content.GetValueForProperty("EndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItemInternal)this).EndpointId, global::System.Convert.ToString); + } + if (content.Contains("History")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItemInternal)this).History = (bool?) content.GetValueForProperty("History",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItemInternal)this).History, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ResourcesResponseEndpointsPropertiesItemsItem(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItemInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItemInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItemInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItemInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("EndpointId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItemInternal)this).EndpointId = (string) content.GetValueForProperty("EndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItemInternal)this).EndpointId, global::System.Convert.ToString); + } + if (content.Contains("History")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItemInternal)this).History = (bool?) content.GetValueForProperty("History",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItemInternal)this).History, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(ResourcesResponseEndpointsPropertiesItemsItemTypeConverter))] + public partial interface IResourcesResponseEndpointsPropertiesItemsItem + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsPropertiesItemsItem.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsPropertiesItemsItem.TypeConverter.cs new file mode 100644 index 000000000000..2b1fe4c3b01e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsPropertiesItemsItem.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourcesResponseEndpointsPropertiesItemsItemTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItem ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItem).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ResourcesResponseEndpointsPropertiesItemsItem.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ResourcesResponseEndpointsPropertiesItemsItem.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ResourcesResponseEndpointsPropertiesItemsItem.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsPropertiesItemsItem.cs b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsPropertiesItemsItem.cs new file mode 100644 index 000000000000..cab75ca46436 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsPropertiesItemsItem.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class ResourcesResponseEndpointsPropertiesItemsItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItem, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItemInternal + { + + /// Backing field for property. + private string _endpointId; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string EndpointId { get => this._endpointId; set => this._endpointId = value; } + + /// Backing field for property. + private bool? _history; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? History { get => this._history; set => this._history = value; } + + /// Backing field for property. + private string _id; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Backing field for property. + private string _name; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// Creates an new instance. + /// + public ResourcesResponseEndpointsPropertiesItemsItem() + { + + } + } + public partial interface IResourcesResponseEndpointsPropertiesItemsItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"endpointId", + PossibleTypes = new [] { typeof(string) })] + string EndpointId { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"history", + PossibleTypes = new [] { typeof(bool) })] + bool? History { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + + } + internal partial interface IResourcesResponseEndpointsPropertiesItemsItemInternal + + { + string EndpointId { get; set; } + + bool? History { get; set; } + + string Id { get; set; } + + string Name { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsPropertiesItemsItem.json.cs b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsPropertiesItemsItem.json.cs new file mode 100644 index 000000000000..e8ef344d05cd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResourcesResponseEndpointsPropertiesItemsItem.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class ResourcesResponseEndpointsPropertiesItemsItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponseEndpointsPropertiesItemsItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ResourcesResponseEndpointsPropertiesItemsItem(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ResourcesResponseEndpointsPropertiesItemsItem(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_endpointId = If( json?.PropertyT("endpointId"), out var __jsonEndpointId) ? (string)__jsonEndpointId : (string)EndpointId;} + {_history = If( json?.PropertyT("history"), out var __jsonHistory) ? (bool?)__jsonHistory : History;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._endpointId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._endpointId.ToString()) : null, "endpointId" ,container.Add ); + AddIf( null != this._history ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._history) : null, "history" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResponseBasedOriginErrorDetectionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ResponseBasedOriginErrorDetectionParameters.PowerShell.cs new file mode 100644 index 000000000000..cf16d5aebd83 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResponseBasedOriginErrorDetectionParameters.PowerShell.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. + /// + [System.ComponentModel.TypeConverter(typeof(ResponseBasedOriginErrorDetectionParametersTypeConverter))] + public partial class ResponseBasedOriginErrorDetectionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ResponseBasedOriginErrorDetectionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ResponseBasedOriginErrorDetectionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a + /// json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ResponseBasedOriginErrorDetectionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ResponseBasedDetectedErrorType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParametersInternal)this).ResponseBasedDetectedErrorType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes?) content.GetValueForProperty("ResponseBasedDetectedErrorType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParametersInternal)this).ResponseBasedDetectedErrorType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes.CreateFrom); + } + if (content.Contains("ResponseBasedFailoverThresholdPercentage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParametersInternal)this).ResponseBasedFailoverThresholdPercentage = (int?) content.GetValueForProperty("ResponseBasedFailoverThresholdPercentage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParametersInternal)this).ResponseBasedFailoverThresholdPercentage, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpErrorRange")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParametersInternal)this).HttpErrorRange = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters[]) content.GetValueForProperty("HttpErrorRange",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParametersInternal)this).HttpErrorRange, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HttpErrorRangeParametersTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ResponseBasedOriginErrorDetectionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ResponseBasedDetectedErrorType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParametersInternal)this).ResponseBasedDetectedErrorType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes?) content.GetValueForProperty("ResponseBasedDetectedErrorType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParametersInternal)this).ResponseBasedDetectedErrorType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes.CreateFrom); + } + if (content.Contains("ResponseBasedFailoverThresholdPercentage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParametersInternal)this).ResponseBasedFailoverThresholdPercentage = (int?) content.GetValueForProperty("ResponseBasedFailoverThresholdPercentage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParametersInternal)this).ResponseBasedFailoverThresholdPercentage, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HttpErrorRange")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParametersInternal)this).HttpErrorRange = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters[]) content.GetValueForProperty("HttpErrorRange",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParametersInternal)this).HttpErrorRange, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HttpErrorRangeParametersTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties to determine origin health using real requests/responses. + [System.ComponentModel.TypeConverter(typeof(ResponseBasedOriginErrorDetectionParametersTypeConverter))] + public partial interface IResponseBasedOriginErrorDetectionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResponseBasedOriginErrorDetectionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ResponseBasedOriginErrorDetectionParameters.TypeConverter.cs new file mode 100644 index 000000000000..7c97d15816df --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResponseBasedOriginErrorDetectionParameters.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResponseBasedOriginErrorDetectionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ResponseBasedOriginErrorDetectionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ResponseBasedOriginErrorDetectionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ResponseBasedOriginErrorDetectionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResponseBasedOriginErrorDetectionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/ResponseBasedOriginErrorDetectionParameters.cs new file mode 100644 index 000000000000..275e4ea0e47d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResponseBasedOriginErrorDetectionParameters.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. + /// + public partial class ResponseBasedOriginErrorDetectionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParametersInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters[] _httpErrorRange; + + /// + /// The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters[] HttpErrorRange { get => this._httpErrorRange; set => this._httpErrorRange = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes? _responseBasedDetectedErrorType; + + /// + /// Type of response errors for real user requests for which origin will be deemed unhealthy + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes? ResponseBasedDetectedErrorType { get => this._responseBasedDetectedErrorType; set => this._responseBasedDetectedErrorType = value; } + + /// + /// Backing field for property. + /// + private int? _responseBasedFailoverThresholdPercentage; + + /// The percentage of failed requests in the sample where failover should trigger. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? ResponseBasedFailoverThresholdPercentage { get => this._responseBasedFailoverThresholdPercentage; set => this._responseBasedFailoverThresholdPercentage = value; } + + /// + /// Creates an new instance. + /// + public ResponseBasedOriginErrorDetectionParameters() + { + + } + } + /// The JSON object that contains the properties to determine origin health using real requests/responses. + public partial interface IResponseBasedOriginErrorDetectionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy.", + SerializedName = @"httpErrorRanges", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters[] HttpErrorRange { get; set; } + /// + /// Type of response errors for real user requests for which origin will be deemed unhealthy + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of response errors for real user requests for which origin will be deemed unhealthy", + SerializedName = @"responseBasedDetectedErrorTypes", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes? ResponseBasedDetectedErrorType { get; set; } + /// The percentage of failed requests in the sample where failover should trigger. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The percentage of failed requests in the sample where failover should trigger.", + SerializedName = @"responseBasedFailoverThresholdPercentage", + PossibleTypes = new [] { typeof(int) })] + int? ResponseBasedFailoverThresholdPercentage { get; set; } + + } + /// The JSON object that contains the properties to determine origin health using real requests/responses. + internal partial interface IResponseBasedOriginErrorDetectionParametersInternal + + { + /// + /// The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters[] HttpErrorRange { get; set; } + /// + /// Type of response errors for real user requests for which origin will be deemed unhealthy + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes? ResponseBasedDetectedErrorType { get; set; } + /// The percentage of failed requests in the sample where failover should trigger. + int? ResponseBasedFailoverThresholdPercentage { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ResponseBasedOriginErrorDetectionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/ResponseBasedOriginErrorDetectionParameters.json.cs new file mode 100644 index 000000000000..9e8e153dde9c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ResponseBasedOriginErrorDetectionParameters.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. + /// + public partial class ResponseBasedOriginErrorDetectionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ResponseBasedOriginErrorDetectionParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ResponseBasedOriginErrorDetectionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_responseBasedDetectedErrorType = If( json?.PropertyT("responseBasedDetectedErrorTypes"), out var __jsonResponseBasedDetectedErrorTypes) ? (string)__jsonResponseBasedDetectedErrorTypes : (string)ResponseBasedDetectedErrorType;} + {_responseBasedFailoverThresholdPercentage = If( json?.PropertyT("responseBasedFailoverThresholdPercentage"), out var __jsonResponseBasedFailoverThresholdPercentage) ? (int?)__jsonResponseBasedFailoverThresholdPercentage : ResponseBasedFailoverThresholdPercentage;} + {_httpErrorRange = If( json?.PropertyT("httpErrorRanges"), out var __jsonHttpErrorRanges) ? If( __jsonHttpErrorRanges as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.HttpErrorRangeParameters.FromJson(__u) )) ))() : null : HttpErrorRange;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._responseBasedDetectedErrorType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._responseBasedDetectedErrorType.ToString()) : null, "responseBasedDetectedErrorTypes" ,container.Add ); + AddIf( null != this._responseBasedFailoverThresholdPercentage ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._responseBasedFailoverThresholdPercentage) : null, "responseBasedFailoverThresholdPercentage" ,container.Add ); + if (null != this._httpErrorRange) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._httpErrorRange ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("httpErrorRanges",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Route.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/Route.PowerShell.cs new file mode 100644 index 000000000000..3242fd0acff6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Route.PowerShell.cs @@ -0,0 +1,402 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Friendly Routes name mapping to the any Routes or secret related information. + [System.ComponentModel.TypeConverter(typeof(RouteTypeConverter))] + public partial class Route + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Route(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Route(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Route(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RoutePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ForwardingProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).ForwardingProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol?) content.GetValueForProperty("ForwardingProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).ForwardingProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol.CreateFrom); + } + if (content.Contains("HttpsRedirect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).HttpsRedirect = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect?) content.GetValueForProperty("HttpsRedirect",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).HttpsRedirect, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect.CreateFrom); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("CacheConfigurationCompressionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CacheConfigurationCompressionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings) content.GetValueForProperty("CacheConfigurationCompressionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CacheConfigurationCompressionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CompressionSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("OriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).OriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("OriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).OriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("CacheConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CacheConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration) content.GetValueForProperty("CacheConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CacheConfiguration, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdRouteCacheConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("EndpointName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).EndpointName = (string) content.GetValueForProperty("EndpointName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).EndpointName, global::System.Convert.ToString); + } + if (content.Contains("CustomDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CustomDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[]) content.GetValueForProperty("CustomDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CustomDomain, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ActivatedResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("OriginPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).OriginPath = (string) content.GetValueForProperty("OriginPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).OriginPath, global::System.Convert.ToString); + } + if (content.Contains("RuleSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).RuleSet = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("RuleSet",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).RuleSet, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("SupportedProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).SupportedProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[]) content.GetValueForProperty("SupportedProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).SupportedProtocol, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols.CreateFrom)); + } + if (content.Contains("PatternsToMatch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).PatternsToMatch = (string[]) content.GetValueForProperty("PatternsToMatch",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).PatternsToMatch, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LinkToDefaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).LinkToDefaultDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain?) content.GetValueForProperty("LinkToDefaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).LinkToDefaultDomain, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("OriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).OriginGroupId = (string) content.GetValueForProperty("OriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).OriginGroupId, global::System.Convert.ToString); + } + if (content.Contains("CacheConfigurationQueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CacheConfigurationQueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior?) content.GetValueForProperty("CacheConfigurationQueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CacheConfigurationQueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("CacheConfigurationQueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CacheConfigurationQueryParameter = (string) content.GetValueForProperty("CacheConfigurationQueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CacheConfigurationQueryParameter, global::System.Convert.ToString); + } + if (content.Contains("CompressionSettingContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CompressionSettingContentTypesToCompress = (string[]) content.GetValueForProperty("CompressionSettingContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CompressionSettingContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompressionSettingIsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CompressionSettingIsCompressionEnabled = (bool?) content.GetValueForProperty("CompressionSettingIsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CompressionSettingIsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Route(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RoutePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ForwardingProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).ForwardingProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol?) content.GetValueForProperty("ForwardingProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).ForwardingProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol.CreateFrom); + } + if (content.Contains("HttpsRedirect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).HttpsRedirect = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect?) content.GetValueForProperty("HttpsRedirect",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).HttpsRedirect, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect.CreateFrom); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("CacheConfigurationCompressionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CacheConfigurationCompressionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings) content.GetValueForProperty("CacheConfigurationCompressionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CacheConfigurationCompressionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CompressionSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("OriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).OriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("OriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).OriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("CacheConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CacheConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration) content.GetValueForProperty("CacheConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CacheConfiguration, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdRouteCacheConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("EndpointName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).EndpointName = (string) content.GetValueForProperty("EndpointName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).EndpointName, global::System.Convert.ToString); + } + if (content.Contains("CustomDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CustomDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[]) content.GetValueForProperty("CustomDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CustomDomain, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ActivatedResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("OriginPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).OriginPath = (string) content.GetValueForProperty("OriginPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).OriginPath, global::System.Convert.ToString); + } + if (content.Contains("RuleSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).RuleSet = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("RuleSet",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).RuleSet, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("SupportedProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).SupportedProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[]) content.GetValueForProperty("SupportedProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).SupportedProtocol, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols.CreateFrom)); + } + if (content.Contains("PatternsToMatch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).PatternsToMatch = (string[]) content.GetValueForProperty("PatternsToMatch",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).PatternsToMatch, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LinkToDefaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).LinkToDefaultDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain?) content.GetValueForProperty("LinkToDefaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).LinkToDefaultDomain, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("OriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).OriginGroupId = (string) content.GetValueForProperty("OriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).OriginGroupId, global::System.Convert.ToString); + } + if (content.Contains("CacheConfigurationQueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CacheConfigurationQueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior?) content.GetValueForProperty("CacheConfigurationQueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CacheConfigurationQueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("CacheConfigurationQueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CacheConfigurationQueryParameter = (string) content.GetValueForProperty("CacheConfigurationQueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CacheConfigurationQueryParameter, global::System.Convert.ToString); + } + if (content.Contains("CompressionSettingContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CompressionSettingContentTypesToCompress = (string[]) content.GetValueForProperty("CompressionSettingContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CompressionSettingContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompressionSettingIsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CompressionSettingIsCompressionEnabled = (bool?) content.GetValueForProperty("CompressionSettingIsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal)this).CompressionSettingIsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Friendly Routes name mapping to the any Routes or secret related information. + [System.ComponentModel.TypeConverter(typeof(RouteTypeConverter))] + public partial interface IRoute + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Route.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/Route.TypeConverter.cs new file mode 100644 index 000000000000..1459652446b7 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Route.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RouteTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Route.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Route.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Route.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Route.cs b/src/Cdn/generated/api/Models/Api20210601/Route.cs new file mode 100644 index 000000000000..af24f2d1fc07 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Route.cs @@ -0,0 +1,439 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Friendly Routes name mapping to the any Routes or secret related information. + public partial class Route : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(); + + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string CacheConfigurationQueryParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CacheConfigurationQueryParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CacheConfigurationQueryParameter = value ?? null; } + + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior? CacheConfigurationQueryStringCachingBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CacheConfigurationQueryStringCachingBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CacheConfigurationQueryStringCachingBehavior = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior)""); } + + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] CompressionSettingContentTypesToCompress { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CompressionSettingContentTypesToCompress; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CompressionSettingContentTypesToCompress = value ?? null /* arrayOf */; } + + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? CompressionSettingIsCompressionEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CompressionSettingIsCompressionEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CompressionSettingIsCompressionEnabled = value ?? default(bool); } + + /// Domains referenced by this endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] CustomDomain { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CustomDomain; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CustomDomain = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus; } + + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).EnabledState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).EnabledState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); } + + /// The name of the endpoint which holds the route. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string EndpointName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).EndpointName; } + + /// Protocol this rule will use when forwarding traffic to backends. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? ForwardingProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).ForwardingProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).ForwardingProtocol = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol)""); } + + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and + /// it will be the first rule that gets executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect? HttpsRedirect { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).HttpsRedirect; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).HttpsRedirect = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect)""); } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; } + + /// whether this route will be linked to the default endpoint domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain? LinkToDefaultDomain { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).LinkToDefaultDomain; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).LinkToDefaultDomain = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain)""); } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for CacheConfiguration + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal.CacheConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CacheConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CacheConfiguration = value; } + + /// Internal Acessors for CacheConfigurationCompressionSetting + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal.CacheConfigurationCompressionSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CacheConfigurationCompressionSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CacheConfigurationCompressionSetting = value; } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal.DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus = value; } + + /// Internal Acessors for EndpointName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal.EndpointName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).EndpointName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).EndpointName = value; } + + /// Internal Acessors for OriginGroup + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal.OriginGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).OriginGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).OriginGroup = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState = value; } + + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).OriginGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).OriginGroupId = value ?? null; } + + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).OriginPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).OriginPath = value ?? null; } + + /// The route patterns of the rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] PatternsToMatch { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).PatternsToMatch; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).PatternsToMatch = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteProperties _property; + + /// The JSON object that contains the properties of the Routes to create. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteProperties()); set => this._property = value; } + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.FormatTable] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// rule sets referenced by this endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] RuleSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).RuleSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).RuleSet = value ?? null /* arrayOf */; } + + /// List of supported protocols for this route. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[] SupportedProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).SupportedProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).SupportedProtocol = value ?? null /* arrayOf */; } + + /// Read only system data + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public Route() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Friendly Routes name mapping to the any Routes or secret related information. + public partial interface IRoute : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource + { + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"query parameters to include or exclude (comma separated).", + SerializedName = @"queryParameters", + PossibleTypes = new [] { typeof(string) })] + string CacheConfigurationQueryParameter { get; set; } + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.", + SerializedName = @"queryStringCachingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior? CacheConfigurationQueryStringCachingBehavior { get; set; } + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of content types on which compression applies. The value should be a valid MIME type.", + SerializedName = @"contentTypesToCompress", + PossibleTypes = new [] { typeof(string) })] + string[] CompressionSettingContentTypesToCompress { get; set; } + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.", + SerializedName = @"isCompressionEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? CompressionSettingIsCompressionEnabled { get; set; } + /// Domains referenced by this endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Domains referenced by this endpoint.", + SerializedName = @"customDomains", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] CustomDomain { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"", + SerializedName = @"deploymentStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; } + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'", + SerializedName = @"enabledState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get; set; } + /// The name of the endpoint which holds the route. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the endpoint which holds the route.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + string EndpointName { get; } + /// Protocol this rule will use when forwarding traffic to backends. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protocol this rule will use when forwarding traffic to backends.", + SerializedName = @"forwardingProtocol", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? ForwardingProtocol { get; set; } + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and + /// it will be the first rule that gets executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed.", + SerializedName = @"httpsRedirect", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect? HttpsRedirect { get; set; } + /// whether this route will be linked to the default endpoint domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"whether this route will be linked to the default endpoint domain.", + SerializedName = @"linkToDefaultDomain", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain? LinkToDefaultDomain { get; set; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string OriginGroupId { get; set; } + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.", + SerializedName = @"originPath", + PossibleTypes = new [] { typeof(string) })] + string OriginPath { get; set; } + /// The route patterns of the rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The route patterns of the rule.", + SerializedName = @"patternsToMatch", + PossibleTypes = new [] { typeof(string) })] + string[] PatternsToMatch { get; set; } + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; } + /// rule sets referenced by this endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"rule sets referenced by this endpoint.", + SerializedName = @"ruleSets", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] RuleSet { get; set; } + /// List of supported protocols for this route. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of supported protocols for this route.", + SerializedName = @"supportedProtocols", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[] SupportedProtocol { get; set; } + + } + /// Friendly Routes name mapping to the any Routes or secret related information. + internal partial interface IRouteInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal + { + /// + /// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration CacheConfiguration { get; set; } + /// compression settings. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings CacheConfigurationCompressionSetting { get; set; } + /// query parameters to include or exclude (comma separated). + string CacheConfigurationQueryParameter { get; set; } + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior? CacheConfigurationQueryStringCachingBehavior { get; set; } + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + string[] CompressionSettingContentTypesToCompress { get; set; } + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + bool? CompressionSettingIsCompressionEnabled { get; set; } + /// Domains referenced by this endpoint. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] CustomDomain { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; set; } + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get; set; } + /// The name of the endpoint which holds the route. + string EndpointName { get; set; } + /// Protocol this rule will use when forwarding traffic to backends. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? ForwardingProtocol { get; set; } + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and + /// it will be the first rule that gets executed. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect? HttpsRedirect { get; set; } + /// whether this route will be linked to the default endpoint domain. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain? LinkToDefaultDomain { get; set; } + /// A reference to the origin group. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference OriginGroup { get; set; } + /// Resource ID. + string OriginGroupId { get; set; } + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + string OriginPath { get; set; } + /// The route patterns of the rule. + string[] PatternsToMatch { get; set; } + /// The JSON object that contains the properties of the Routes to create. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteProperties Property { get; set; } + /// Provisioning status + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; set; } + /// rule sets referenced by this endpoint. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] RuleSet { get; set; } + /// List of supported protocols for this route. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[] SupportedProtocol { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Route.json.cs b/src/Cdn/generated/api/Models/Api20210601/Route.json.cs new file mode 100644 index 000000000000..e402a5101425 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Route.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Friendly Routes name mapping to the any Routes or secret related information. + public partial class Route + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new Route(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal Route(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteConfigurationOverrideActionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RouteConfigurationOverrideActionParameters.PowerShell.cs new file mode 100644 index 000000000000..a3433069ead7 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteConfigurationOverrideActionParameters.PowerShell.cs @@ -0,0 +1,247 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for the route configuration override action. + [System.ComponentModel.TypeConverter(typeof(RouteConfigurationOverrideActionParametersTypeConverter))] + public partial class RouteConfigurationOverrideActionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RouteConfigurationOverrideActionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RouteConfigurationOverrideActionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a + /// json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RouteConfigurationOverrideActionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OriginGroupOverride")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).OriginGroupOverride = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride) content.GetValueForProperty("OriginGroupOverride",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).OriginGroupOverride, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverrideTypeConverter.ConvertFrom); + } + if (content.Contains("CacheConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration) content.GetValueForProperty("CacheConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfiguration, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("OriginGroupOverrideForwardingProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).OriginGroupOverrideForwardingProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol?) content.GetValueForProperty("OriginGroupOverrideForwardingProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).OriginGroupOverrideForwardingProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol.CreateFrom); + } + if (content.Contains("CacheConfigurationQueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationQueryParameter = (string) content.GetValueForProperty("CacheConfigurationQueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationQueryParameter, global::System.Convert.ToString); + } + if (content.Contains("CacheConfigurationCacheDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationCacheDuration = (string) content.GetValueForProperty("CacheConfigurationCacheDuration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationCacheDuration, global::System.Convert.ToString); + } + if (content.Contains("OriginGroupOverrideOriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).OriginGroupOverrideOriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("OriginGroupOverrideOriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).OriginGroupOverrideOriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("CacheConfigurationQueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationQueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior?) content.GetValueForProperty("CacheConfigurationQueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationQueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("CacheConfigurationIsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationIsCompressionEnabled = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled?) content.GetValueForProperty("CacheConfigurationIsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationIsCompressionEnabled, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled.CreateFrom); + } + if (content.Contains("CacheConfigurationCacheBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationCacheBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior?) content.GetValueForProperty("CacheConfigurationCacheBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationCacheBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior.CreateFrom); + } + if (content.Contains("OriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).OriginGroupId = (string) content.GetValueForProperty("OriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).OriginGroupId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RouteConfigurationOverrideActionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OriginGroupOverride")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).OriginGroupOverride = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride) content.GetValueForProperty("OriginGroupOverride",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).OriginGroupOverride, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverrideTypeConverter.ConvertFrom); + } + if (content.Contains("CacheConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration) content.GetValueForProperty("CacheConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfiguration, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("OriginGroupOverrideForwardingProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).OriginGroupOverrideForwardingProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol?) content.GetValueForProperty("OriginGroupOverrideForwardingProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).OriginGroupOverrideForwardingProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol.CreateFrom); + } + if (content.Contains("CacheConfigurationQueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationQueryParameter = (string) content.GetValueForProperty("CacheConfigurationQueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationQueryParameter, global::System.Convert.ToString); + } + if (content.Contains("CacheConfigurationCacheDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationCacheDuration = (string) content.GetValueForProperty("CacheConfigurationCacheDuration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationCacheDuration, global::System.Convert.ToString); + } + if (content.Contains("OriginGroupOverrideOriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).OriginGroupOverrideOriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("OriginGroupOverrideOriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).OriginGroupOverrideOriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("CacheConfigurationQueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationQueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior?) content.GetValueForProperty("CacheConfigurationQueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationQueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("CacheConfigurationIsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationIsCompressionEnabled = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled?) content.GetValueForProperty("CacheConfigurationIsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationIsCompressionEnabled, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled.CreateFrom); + } + if (content.Contains("CacheConfigurationCacheBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationCacheBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior?) content.GetValueForProperty("CacheConfigurationCacheBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).CacheConfigurationCacheBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior.CreateFrom); + } + if (content.Contains("OriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).OriginGroupId = (string) content.GetValueForProperty("OriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal)this).OriginGroupId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for the route configuration override action. + [System.ComponentModel.TypeConverter(typeof(RouteConfigurationOverrideActionParametersTypeConverter))] + public partial interface IRouteConfigurationOverrideActionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteConfigurationOverrideActionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RouteConfigurationOverrideActionParameters.TypeConverter.cs new file mode 100644 index 000000000000..0447da21303c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteConfigurationOverrideActionParameters.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RouteConfigurationOverrideActionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RouteConfigurationOverrideActionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RouteConfigurationOverrideActionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RouteConfigurationOverrideActionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteConfigurationOverrideActionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/RouteConfigurationOverrideActionParameters.cs new file mode 100644 index 000000000000..6209824cbc7d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteConfigurationOverrideActionParameters.cs @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for the route configuration override action. + public partial class RouteConfigurationOverrideActionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration _cacheConfiguration; + + /// + /// The caching configuration associated with this rule. To disable caching, do not provide a cacheConfiguration object. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration CacheConfiguration { get => (this._cacheConfiguration = this._cacheConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheConfiguration()); set => this._cacheConfiguration = value; } + + /// Caching behavior for the requests + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior? CacheConfigurationCacheBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)CacheConfiguration).CacheBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)CacheConfiguration).CacheBehavior = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior)""); } + + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string CacheConfigurationCacheDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)CacheConfiguration).CacheDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)CacheConfiguration).CacheDuration = value ?? null; } + + /// + /// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user + /// requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than + /// 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled? CacheConfigurationIsCompressionEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)CacheConfiguration).IsCompressionEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)CacheConfiguration).IsCompressionEnabled = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled)""); } + + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string CacheConfigurationQueryParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)CacheConfiguration).QueryParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)CacheConfiguration).QueryParameter = value ?? null; } + + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior? CacheConfigurationQueryStringCachingBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)CacheConfiguration).QueryStringCachingBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfigurationInternal)CacheConfiguration).QueryStringCachingBehavior = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior)""); } + + /// Internal Acessors for CacheConfiguration + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal.CacheConfiguration { get => (this._cacheConfiguration = this._cacheConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheConfiguration()); set { {_cacheConfiguration = value;} } } + + /// Internal Acessors for OriginGroupOverride + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal.OriginGroupOverride { get => (this._originGroupOverride = this._originGroupOverride ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverride()); set { {_originGroupOverride = value;} } } + + /// Internal Acessors for OriginGroupOverrideOriginGroup + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal.OriginGroupOverrideOriginGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal)OriginGroupOverride).OriginGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal)OriginGroupOverride).OriginGroup = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal)OriginGroupOverride).OriginGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal)OriginGroupOverride).OriginGroupId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride _originGroupOverride; + + /// + /// A reference to the origin group override configuration. Leave empty to use the default origin group on route. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride OriginGroupOverride { get => (this._originGroupOverride = this._originGroupOverride ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverride()); set => this._originGroupOverride = value; } + + /// Protocol this rule will use when forwarding traffic to backends. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? OriginGroupOverrideForwardingProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal)OriginGroupOverride).ForwardingProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverrideInternal)OriginGroupOverride).ForwardingProtocol = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol)""); } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleRouteConfigurationOverrideActionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// + /// Creates an new instance. + /// + public RouteConfigurationOverrideActionParameters() + { + + } + } + /// Defines the parameters for the route configuration override action. + public partial interface IRouteConfigurationOverrideActionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Caching behavior for the requests + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Caching behavior for the requests", + SerializedName = @"cacheBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior? CacheConfigurationCacheBehavior { get; set; } + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss", + SerializedName = @"cacheDuration", + PossibleTypes = new [] { typeof(string) })] + string CacheConfigurationCacheDuration { get; set; } + /// + /// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user + /// requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than + /// 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.", + SerializedName = @"isCompressionEnabled", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled? CacheConfigurationIsCompressionEnabled { get; set; } + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"query parameters to include or exclude (comma separated).", + SerializedName = @"queryParameters", + PossibleTypes = new [] { typeof(string) })] + string CacheConfigurationQueryParameter { get; set; } + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.", + SerializedName = @"queryStringCachingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior? CacheConfigurationQueryStringCachingBehavior { get; set; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string OriginGroupId { get; set; } + /// Protocol this rule will use when forwarding traffic to backends. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protocol this rule will use when forwarding traffic to backends.", + SerializedName = @"forwardingProtocol", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? OriginGroupOverrideForwardingProtocol { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for the route configuration override action. + internal partial interface IRouteConfigurationOverrideActionParametersInternal + + { + /// + /// The caching configuration associated with this rule. To disable caching, do not provide a cacheConfiguration object. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICacheConfiguration CacheConfiguration { get; set; } + /// Caching behavior for the requests + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior? CacheConfigurationCacheBehavior { get; set; } + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// + string CacheConfigurationCacheDuration { get; set; } + /// + /// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user + /// requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than + /// 1 byte or larger than 1 MB. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled? CacheConfigurationIsCompressionEnabled { get; set; } + /// query parameters to include or exclude (comma separated). + string CacheConfigurationQueryParameter { get; set; } + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior? CacheConfigurationQueryStringCachingBehavior { get; set; } + /// Resource ID. + string OriginGroupId { get; set; } + /// + /// A reference to the origin group override configuration. Leave empty to use the default origin group on route. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupOverride OriginGroupOverride { get; set; } + /// Protocol this rule will use when forwarding traffic to backends. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? OriginGroupOverrideForwardingProtocol { get; set; } + /// defines the OriginGroup that would override the DefaultOriginGroup on route. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference OriginGroupOverrideOriginGroup { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteConfigurationOverrideActionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/RouteConfigurationOverrideActionParameters.json.cs new file mode 100644 index 000000000000..68caa0be3c1c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteConfigurationOverrideActionParameters.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for the route configuration override action. + public partial class RouteConfigurationOverrideActionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteConfigurationOverrideActionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RouteConfigurationOverrideActionParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RouteConfigurationOverrideActionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_originGroupOverride = If( json?.PropertyT("originGroupOverride"), out var __jsonOriginGroupOverride) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupOverride.FromJson(__jsonOriginGroupOverride) : OriginGroupOverride;} + {_cacheConfiguration = If( json?.PropertyT("cacheConfiguration"), out var __jsonCacheConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CacheConfiguration.FromJson(__jsonCacheConfiguration) : CacheConfiguration;} + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._originGroupOverride ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._originGroupOverride.ToJson(null,serializationMode) : null, "originGroupOverride" ,container.Add ); + AddIf( null != this._cacheConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._cacheConfiguration.ToJson(null,serializationMode) : null, "cacheConfiguration" ,container.Add ); + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteListResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RouteListResult.PowerShell.cs new file mode 100644 index 000000000000..0bf6fee4facb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Result of the request to list routes. It contains a list of route objects and a URL link to get the next set of results. + /// + [System.ComponentModel.TypeConverter(typeof(RouteListResultTypeConverter))] + public partial class RouteListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RouteListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RouteListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RouteListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RouteListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the request to list routes. It contains a list of route objects and a URL link to get the next set of results. + [System.ComponentModel.TypeConverter(typeof(RouteListResultTypeConverter))] + public partial interface IRouteListResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteListResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RouteListResult.TypeConverter.cs new file mode 100644 index 000000000000..65a290019bee --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteListResult.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RouteListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RouteListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RouteListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RouteListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteListResult.cs b/src/Cdn/generated/api/Models/Api20210601/RouteListResult.cs new file mode 100644 index 000000000000..b170db5311a3 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteListResult.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list routes. It contains a list of route objects and a URL link to get the next set of results. + /// + public partial class RouteListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResultInternal + { + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of route objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute[] _value; + + /// List of AzureFrontDoor routes within a profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute[] Value { get => this._value; } + + /// Creates an new instance. + public RouteListResult() + { + + } + } + /// Result of the request to list routes. It contains a list of route objects and a URL link to get the next set of results. + public partial interface IRouteListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// URL to get the next set of route objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL to get the next set of route objects if there are any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// List of AzureFrontDoor routes within a profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of AzureFrontDoor routes within a profile.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute[] Value { get; } + + } + /// Result of the request to list routes. It contains a list of route objects and a URL link to get the next set of results. + internal partial interface IRouteListResultInternal + + { + /// URL to get the next set of route objects if there are any. + string NextLink { get; set; } + /// List of AzureFrontDoor routes within a profile. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteListResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/RouteListResult.json.cs new file mode 100644 index 000000000000..69ae29b600c3 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteListResult.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list routes. It contains a list of route objects and a URL link to get the next set of results. + /// + public partial class RouteListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RouteListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RouteListResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Route.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RouteProperties.PowerShell.cs new file mode 100644 index 000000000000..e23a0d821db5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteProperties.PowerShell.cs @@ -0,0 +1,314 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties of the Routes to create. + [System.ComponentModel.TypeConverter(typeof(RoutePropertiesTypeConverter))] + public partial class RouteProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RouteProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RouteProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RouteProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CacheConfigurationCompressionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationCompressionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings) content.GetValueForProperty("CacheConfigurationCompressionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationCompressionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CompressionSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("OriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginGroupId = (string) content.GetValueForProperty("OriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginGroupId, global::System.Convert.ToString); + } + if (content.Contains("CacheConfigurationQueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationQueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior?) content.GetValueForProperty("CacheConfigurationQueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationQueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("CacheConfigurationQueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationQueryParameter = (string) content.GetValueForProperty("CacheConfigurationQueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationQueryParameter, global::System.Convert.ToString); + } + if (content.Contains("CompressionSettingContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CompressionSettingContentTypesToCompress = (string[]) content.GetValueForProperty("CompressionSettingContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CompressionSettingContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompressionSettingIsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CompressionSettingIsCompressionEnabled = (bool?) content.GetValueForProperty("CompressionSettingIsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CompressionSettingIsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("OriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("OriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("CacheConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration) content.GetValueForProperty("CacheConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfiguration, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdRouteCacheConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("EndpointName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).EndpointName = (string) content.GetValueForProperty("EndpointName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).EndpointName, global::System.Convert.ToString); + } + if (content.Contains("CustomDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CustomDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[]) content.GetValueForProperty("CustomDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CustomDomain, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ActivatedResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("OriginPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginPath = (string) content.GetValueForProperty("OriginPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginPath, global::System.Convert.ToString); + } + if (content.Contains("RuleSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).RuleSet = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("RuleSet",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).RuleSet, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("SupportedProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).SupportedProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[]) content.GetValueForProperty("SupportedProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).SupportedProtocol, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols.CreateFrom)); + } + if (content.Contains("PatternsToMatch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).PatternsToMatch = (string[]) content.GetValueForProperty("PatternsToMatch",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).PatternsToMatch, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ForwardingProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).ForwardingProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol?) content.GetValueForProperty("ForwardingProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).ForwardingProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol.CreateFrom); + } + if (content.Contains("LinkToDefaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).LinkToDefaultDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain?) content.GetValueForProperty("LinkToDefaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).LinkToDefaultDomain, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain.CreateFrom); + } + if (content.Contains("HttpsRedirect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).HttpsRedirect = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect?) content.GetValueForProperty("HttpsRedirect",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).HttpsRedirect, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect.CreateFrom); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RouteProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CacheConfigurationCompressionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationCompressionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings) content.GetValueForProperty("CacheConfigurationCompressionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationCompressionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CompressionSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("OriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginGroupId = (string) content.GetValueForProperty("OriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginGroupId, global::System.Convert.ToString); + } + if (content.Contains("CacheConfigurationQueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationQueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior?) content.GetValueForProperty("CacheConfigurationQueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationQueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("CacheConfigurationQueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationQueryParameter = (string) content.GetValueForProperty("CacheConfigurationQueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationQueryParameter, global::System.Convert.ToString); + } + if (content.Contains("CompressionSettingContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CompressionSettingContentTypesToCompress = (string[]) content.GetValueForProperty("CompressionSettingContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CompressionSettingContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompressionSettingIsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CompressionSettingIsCompressionEnabled = (bool?) content.GetValueForProperty("CompressionSettingIsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CompressionSettingIsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("OriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("OriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("CacheConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration) content.GetValueForProperty("CacheConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfiguration, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdRouteCacheConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("EndpointName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).EndpointName = (string) content.GetValueForProperty("EndpointName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).EndpointName, global::System.Convert.ToString); + } + if (content.Contains("CustomDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CustomDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[]) content.GetValueForProperty("CustomDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CustomDomain, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ActivatedResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("OriginPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginPath = (string) content.GetValueForProperty("OriginPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginPath, global::System.Convert.ToString); + } + if (content.Contains("RuleSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).RuleSet = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("RuleSet",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).RuleSet, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("SupportedProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).SupportedProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[]) content.GetValueForProperty("SupportedProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).SupportedProtocol, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols.CreateFrom)); + } + if (content.Contains("PatternsToMatch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).PatternsToMatch = (string[]) content.GetValueForProperty("PatternsToMatch",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).PatternsToMatch, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ForwardingProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).ForwardingProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol?) content.GetValueForProperty("ForwardingProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).ForwardingProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol.CreateFrom); + } + if (content.Contains("LinkToDefaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).LinkToDefaultDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain?) content.GetValueForProperty("LinkToDefaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).LinkToDefaultDomain, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain.CreateFrom); + } + if (content.Contains("HttpsRedirect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).HttpsRedirect = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect?) content.GetValueForProperty("HttpsRedirect",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).HttpsRedirect, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect.CreateFrom); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties of the Routes to create. + [System.ComponentModel.TypeConverter(typeof(RoutePropertiesTypeConverter))] + public partial interface IRouteProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RouteProperties.TypeConverter.cs new file mode 100644 index 000000000000..450298a3fcf6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteProperties.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RoutePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RouteProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RouteProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RouteProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteProperties.cs b/src/Cdn/generated/api/Models/Api20210601/RouteProperties.cs new file mode 100644 index 000000000000..d1ce99e99096 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteProperties.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the Routes to create. + public partial class RouteProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoutePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(); + + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParameters __routeUpdatePropertiesParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteUpdatePropertiesParameters(); + + /// + /// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration CacheConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).CacheConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).CacheConfiguration = value ?? null /* model class */; } + + /// compression settings. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings CacheConfigurationCompressionSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).CacheConfigurationCompressionSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).CacheConfigurationCompressionSetting = value ?? null /* model class */; } + + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string CacheConfigurationQueryParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).CacheConfigurationQueryParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).CacheConfigurationQueryParameter = value ?? null; } + + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior? CacheConfigurationQueryStringCachingBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).CacheConfigurationQueryStringCachingBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).CacheConfigurationQueryStringCachingBehavior = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior)""); } + + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string[] CompressionSettingContentTypesToCompress { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).CompressionSettingContentTypesToCompress; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).CompressionSettingContentTypesToCompress = value ?? null /* arrayOf */; } + + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public bool? CompressionSettingIsCompressionEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).CompressionSettingIsCompressionEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).CompressionSettingIsCompressionEnabled = value ?? default(bool); } + + /// Domains referenced by this endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] CustomDomain { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).CustomDomain; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).CustomDomain = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus; } + + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).EnabledState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).EnabledState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); } + + /// The name of the endpoint which holds the route. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string EndpointName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).EndpointName; } + + /// Protocol this rule will use when forwarding traffic to backends. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? ForwardingProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).ForwardingProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).ForwardingProtocol = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol)""); } + + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and + /// it will be the first rule that gets executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect? HttpsRedirect { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).HttpsRedirect; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).HttpsRedirect = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect)""); } + + /// whether this route will be linked to the default endpoint domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain? LinkToDefaultDomain { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).LinkToDefaultDomain; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).LinkToDefaultDomain = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain)""); } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState = value; } + + /// Internal Acessors for EndpointName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal.EndpointName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).EndpointName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).EndpointName = value; } + + /// A reference to the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference OriginGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).OriginGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).OriginGroup = value ?? null /* model class */; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string OriginGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).OriginGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).OriginGroupId = value ?? null; } + + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string OriginPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).OriginPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).OriginPath = value ?? null; } + + /// The route patterns of the rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string[] PatternsToMatch { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).PatternsToMatch; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).PatternsToMatch = value ?? null /* arrayOf */; } + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState; } + + /// rule sets referenced by this endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] RuleSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).RuleSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).RuleSet = value ?? null /* arrayOf */; } + + /// List of supported protocols for this route. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[] SupportedProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).SupportedProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)__routeUpdatePropertiesParameters).SupportedProtocol = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public RouteProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__routeUpdatePropertiesParameters), __routeUpdatePropertiesParameters); + await eventListener.AssertObjectIsValid(nameof(__routeUpdatePropertiesParameters), __routeUpdatePropertiesParameters); + await eventListener.AssertNotNull(nameof(__afdStateProperties), __afdStateProperties); + await eventListener.AssertObjectIsValid(nameof(__afdStateProperties), __afdStateProperties); + } + } + /// The JSON object that contains the properties of the Routes to create. + public partial interface IRouteProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties + { + + } + /// The JSON object that contains the properties of the Routes to create. + internal partial interface IRoutePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/RouteProperties.json.cs new file mode 100644 index 000000000000..151308885c3f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteProperties.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the Routes to create. + public partial class RouteProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RouteProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RouteProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __routeUpdatePropertiesParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteUpdatePropertiesParameters(json); + __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __routeUpdatePropertiesParameters?.ToJson(container, serializationMode); + __afdStateProperties?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteUpdateParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RouteUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..fbd3dff27506 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteUpdateParameters.PowerShell.cs @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The domain JSON object required for domain creation or update. + [System.ComponentModel.TypeConverter(typeof(RouteUpdateParametersTypeConverter))] + public partial class RouteUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RouteUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RouteUpdateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RouteUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteUpdatePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("ForwardingProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).ForwardingProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol?) content.GetValueForProperty("ForwardingProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).ForwardingProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol.CreateFrom); + } + if (content.Contains("HttpsRedirect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).HttpsRedirect = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect?) content.GetValueForProperty("HttpsRedirect",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).HttpsRedirect, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect.CreateFrom); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("OriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).OriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("OriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).OriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("CacheConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CacheConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration) content.GetValueForProperty("CacheConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CacheConfiguration, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdRouteCacheConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("EndpointName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).EndpointName = (string) content.GetValueForProperty("EndpointName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).EndpointName, global::System.Convert.ToString); + } + if (content.Contains("CustomDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CustomDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[]) content.GetValueForProperty("CustomDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CustomDomain, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ActivatedResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("OriginPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).OriginPath = (string) content.GetValueForProperty("OriginPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).OriginPath, global::System.Convert.ToString); + } + if (content.Contains("RuleSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).RuleSet = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("RuleSet",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).RuleSet, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("SupportedProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).SupportedProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[]) content.GetValueForProperty("SupportedProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).SupportedProtocol, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols.CreateFrom)); + } + if (content.Contains("PatternsToMatch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).PatternsToMatch = (string[]) content.GetValueForProperty("PatternsToMatch",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).PatternsToMatch, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LinkToDefaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).LinkToDefaultDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain?) content.GetValueForProperty("LinkToDefaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).LinkToDefaultDomain, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain.CreateFrom); + } + if (content.Contains("CacheConfigurationCompressionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CacheConfigurationCompressionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings) content.GetValueForProperty("CacheConfigurationCompressionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CacheConfigurationCompressionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CompressionSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("OriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).OriginGroupId = (string) content.GetValueForProperty("OriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).OriginGroupId, global::System.Convert.ToString); + } + if (content.Contains("CacheConfigurationQueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CacheConfigurationQueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior?) content.GetValueForProperty("CacheConfigurationQueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CacheConfigurationQueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("CacheConfigurationQueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CacheConfigurationQueryParameter = (string) content.GetValueForProperty("CacheConfigurationQueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CacheConfigurationQueryParameter, global::System.Convert.ToString); + } + if (content.Contains("CompressionSettingContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CompressionSettingContentTypesToCompress = (string[]) content.GetValueForProperty("CompressionSettingContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CompressionSettingContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompressionSettingIsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CompressionSettingIsCompressionEnabled = (bool?) content.GetValueForProperty("CompressionSettingIsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CompressionSettingIsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RouteUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteUpdatePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("ForwardingProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).ForwardingProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol?) content.GetValueForProperty("ForwardingProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).ForwardingProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol.CreateFrom); + } + if (content.Contains("HttpsRedirect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).HttpsRedirect = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect?) content.GetValueForProperty("HttpsRedirect",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).HttpsRedirect, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect.CreateFrom); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("OriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).OriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("OriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).OriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("CacheConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CacheConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration) content.GetValueForProperty("CacheConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CacheConfiguration, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdRouteCacheConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("EndpointName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).EndpointName = (string) content.GetValueForProperty("EndpointName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).EndpointName, global::System.Convert.ToString); + } + if (content.Contains("CustomDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CustomDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[]) content.GetValueForProperty("CustomDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CustomDomain, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ActivatedResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("OriginPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).OriginPath = (string) content.GetValueForProperty("OriginPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).OriginPath, global::System.Convert.ToString); + } + if (content.Contains("RuleSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).RuleSet = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("RuleSet",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).RuleSet, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("SupportedProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).SupportedProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[]) content.GetValueForProperty("SupportedProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).SupportedProtocol, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols.CreateFrom)); + } + if (content.Contains("PatternsToMatch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).PatternsToMatch = (string[]) content.GetValueForProperty("PatternsToMatch",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).PatternsToMatch, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LinkToDefaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).LinkToDefaultDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain?) content.GetValueForProperty("LinkToDefaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).LinkToDefaultDomain, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain.CreateFrom); + } + if (content.Contains("CacheConfigurationCompressionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CacheConfigurationCompressionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings) content.GetValueForProperty("CacheConfigurationCompressionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CacheConfigurationCompressionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CompressionSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("OriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).OriginGroupId = (string) content.GetValueForProperty("OriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).OriginGroupId, global::System.Convert.ToString); + } + if (content.Contains("CacheConfigurationQueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CacheConfigurationQueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior?) content.GetValueForProperty("CacheConfigurationQueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CacheConfigurationQueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("CacheConfigurationQueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CacheConfigurationQueryParameter = (string) content.GetValueForProperty("CacheConfigurationQueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CacheConfigurationQueryParameter, global::System.Convert.ToString); + } + if (content.Contains("CompressionSettingContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CompressionSettingContentTypesToCompress = (string[]) content.GetValueForProperty("CompressionSettingContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CompressionSettingContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompressionSettingIsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CompressionSettingIsCompressionEnabled = (bool?) content.GetValueForProperty("CompressionSettingIsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal)this).CompressionSettingIsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The domain JSON object required for domain creation or update. + [System.ComponentModel.TypeConverter(typeof(RouteUpdateParametersTypeConverter))] + public partial interface IRouteUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteUpdateParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RouteUpdateParameters.TypeConverter.cs new file mode 100644 index 000000000000..77069768796f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteUpdateParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RouteUpdateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RouteUpdateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RouteUpdateParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RouteUpdateParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteUpdateParameters.cs b/src/Cdn/generated/api/Models/Api20210601/RouteUpdateParameters.cs new file mode 100644 index 000000000000..6d6d875ce53d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteUpdateParameters.cs @@ -0,0 +1,324 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The domain JSON object required for domain creation or update. + public partial class RouteUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal + { + + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string CacheConfigurationQueryParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CacheConfigurationQueryParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CacheConfigurationQueryParameter = value ?? null; } + + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior? CacheConfigurationQueryStringCachingBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CacheConfigurationQueryStringCachingBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CacheConfigurationQueryStringCachingBehavior = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior)""); } + + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] CompressionSettingContentTypesToCompress { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CompressionSettingContentTypesToCompress; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CompressionSettingContentTypesToCompress = value ?? null /* arrayOf */; } + + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? CompressionSettingIsCompressionEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CompressionSettingIsCompressionEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CompressionSettingIsCompressionEnabled = value ?? default(bool); } + + /// Domains referenced by this endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] CustomDomain { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CustomDomain; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CustomDomain = value ?? null /* arrayOf */; } + + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).EnabledState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).EnabledState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); } + + /// The name of the endpoint which holds the route. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string EndpointName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).EndpointName; } + + /// Protocol this rule will use when forwarding traffic to backends. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? ForwardingProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).ForwardingProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).ForwardingProtocol = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol)""); } + + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and + /// it will be the first rule that gets executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect? HttpsRedirect { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).HttpsRedirect; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).HttpsRedirect = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect)""); } + + /// whether this route will be linked to the default endpoint domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain? LinkToDefaultDomain { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).LinkToDefaultDomain; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).LinkToDefaultDomain = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain)""); } + + /// Internal Acessors for CacheConfiguration + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal.CacheConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CacheConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CacheConfiguration = value; } + + /// Internal Acessors for CacheConfigurationCompressionSetting + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal.CacheConfigurationCompressionSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CacheConfigurationCompressionSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).CacheConfigurationCompressionSetting = value; } + + /// Internal Acessors for EndpointName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal.EndpointName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).EndpointName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).EndpointName = value; } + + /// Internal Acessors for OriginGroup + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal.OriginGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).OriginGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).OriginGroup = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteUpdatePropertiesParameters()); set { {_property = value;} } } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).OriginGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).OriginGroupId = value ?? null; } + + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).OriginPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).OriginPath = value ?? null; } + + /// The route patterns of the rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] PatternsToMatch { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).PatternsToMatch; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).PatternsToMatch = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParameters _property; + + /// The JSON object that contains the properties of the domain to create. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParameters Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteUpdatePropertiesParameters()); set => this._property = value; } + + /// rule sets referenced by this endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] RuleSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).RuleSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).RuleSet = value ?? null /* arrayOf */; } + + /// List of supported protocols for this route. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[] SupportedProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).SupportedProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)Property).SupportedProtocol = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public RouteUpdateParameters() + { + + } + } + /// The domain JSON object required for domain creation or update. + public partial interface IRouteUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"query parameters to include or exclude (comma separated).", + SerializedName = @"queryParameters", + PossibleTypes = new [] { typeof(string) })] + string CacheConfigurationQueryParameter { get; set; } + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.", + SerializedName = @"queryStringCachingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior? CacheConfigurationQueryStringCachingBehavior { get; set; } + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of content types on which compression applies. The value should be a valid MIME type.", + SerializedName = @"contentTypesToCompress", + PossibleTypes = new [] { typeof(string) })] + string[] CompressionSettingContentTypesToCompress { get; set; } + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.", + SerializedName = @"isCompressionEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? CompressionSettingIsCompressionEnabled { get; set; } + /// Domains referenced by this endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Domains referenced by this endpoint.", + SerializedName = @"customDomains", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] CustomDomain { get; set; } + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'", + SerializedName = @"enabledState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get; set; } + /// The name of the endpoint which holds the route. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the endpoint which holds the route.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + string EndpointName { get; } + /// Protocol this rule will use when forwarding traffic to backends. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protocol this rule will use when forwarding traffic to backends.", + SerializedName = @"forwardingProtocol", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? ForwardingProtocol { get; set; } + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and + /// it will be the first rule that gets executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed.", + SerializedName = @"httpsRedirect", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect? HttpsRedirect { get; set; } + /// whether this route will be linked to the default endpoint domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"whether this route will be linked to the default endpoint domain.", + SerializedName = @"linkToDefaultDomain", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain? LinkToDefaultDomain { get; set; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string OriginGroupId { get; set; } + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.", + SerializedName = @"originPath", + PossibleTypes = new [] { typeof(string) })] + string OriginPath { get; set; } + /// The route patterns of the rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The route patterns of the rule.", + SerializedName = @"patternsToMatch", + PossibleTypes = new [] { typeof(string) })] + string[] PatternsToMatch { get; set; } + /// rule sets referenced by this endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"rule sets referenced by this endpoint.", + SerializedName = @"ruleSets", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] RuleSet { get; set; } + /// List of supported protocols for this route. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of supported protocols for this route.", + SerializedName = @"supportedProtocols", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[] SupportedProtocol { get; set; } + + } + /// The domain JSON object required for domain creation or update. + internal partial interface IRouteUpdateParametersInternal + + { + /// + /// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration CacheConfiguration { get; set; } + /// compression settings. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings CacheConfigurationCompressionSetting { get; set; } + /// query parameters to include or exclude (comma separated). + string CacheConfigurationQueryParameter { get; set; } + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior? CacheConfigurationQueryStringCachingBehavior { get; set; } + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + string[] CompressionSettingContentTypesToCompress { get; set; } + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + bool? CompressionSettingIsCompressionEnabled { get; set; } + /// Domains referenced by this endpoint. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] CustomDomain { get; set; } + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get; set; } + /// The name of the endpoint which holds the route. + string EndpointName { get; set; } + /// Protocol this rule will use when forwarding traffic to backends. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? ForwardingProtocol { get; set; } + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and + /// it will be the first rule that gets executed. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect? HttpsRedirect { get; set; } + /// whether this route will be linked to the default endpoint domain. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain? LinkToDefaultDomain { get; set; } + /// A reference to the origin group. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference OriginGroup { get; set; } + /// Resource ID. + string OriginGroupId { get; set; } + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + string OriginPath { get; set; } + /// The route patterns of the rule. + string[] PatternsToMatch { get; set; } + /// The JSON object that contains the properties of the domain to create. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParameters Property { get; set; } + /// rule sets referenced by this endpoint. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] RuleSet { get; set; } + /// List of supported protocols for this route. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[] SupportedProtocol { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteUpdateParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/RouteUpdateParameters.json.cs new file mode 100644 index 000000000000..f958fc087fb5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteUpdateParameters.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The domain JSON object required for domain creation or update. + public partial class RouteUpdateParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RouteUpdateParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RouteUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteUpdatePropertiesParameters.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteUpdatePropertiesParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RouteUpdatePropertiesParameters.PowerShell.cs new file mode 100644 index 000000000000..e9e2e398dea4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteUpdatePropertiesParameters.PowerShell.cs @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties of the domain to create. + [System.ComponentModel.TypeConverter(typeof(RouteUpdatePropertiesParametersTypeConverter))] + public partial class RouteUpdatePropertiesParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RouteUpdatePropertiesParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RouteUpdatePropertiesParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RouteUpdatePropertiesParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("OriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("CacheConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration) content.GetValueForProperty("CacheConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfiguration, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdRouteCacheConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("EndpointName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).EndpointName = (string) content.GetValueForProperty("EndpointName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).EndpointName, global::System.Convert.ToString); + } + if (content.Contains("CustomDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CustomDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[]) content.GetValueForProperty("CustomDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CustomDomain, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ActivatedResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("OriginPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginPath = (string) content.GetValueForProperty("OriginPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginPath, global::System.Convert.ToString); + } + if (content.Contains("RuleSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).RuleSet = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("RuleSet",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).RuleSet, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("SupportedProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).SupportedProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[]) content.GetValueForProperty("SupportedProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).SupportedProtocol, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols.CreateFrom)); + } + if (content.Contains("PatternsToMatch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).PatternsToMatch = (string[]) content.GetValueForProperty("PatternsToMatch",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).PatternsToMatch, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ForwardingProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).ForwardingProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol?) content.GetValueForProperty("ForwardingProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).ForwardingProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol.CreateFrom); + } + if (content.Contains("LinkToDefaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).LinkToDefaultDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain?) content.GetValueForProperty("LinkToDefaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).LinkToDefaultDomain, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain.CreateFrom); + } + if (content.Contains("HttpsRedirect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).HttpsRedirect = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect?) content.GetValueForProperty("HttpsRedirect",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).HttpsRedirect, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect.CreateFrom); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("CacheConfigurationCompressionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationCompressionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings) content.GetValueForProperty("CacheConfigurationCompressionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationCompressionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CompressionSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("OriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginGroupId = (string) content.GetValueForProperty("OriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginGroupId, global::System.Convert.ToString); + } + if (content.Contains("CacheConfigurationQueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationQueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior?) content.GetValueForProperty("CacheConfigurationQueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationQueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("CacheConfigurationQueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationQueryParameter = (string) content.GetValueForProperty("CacheConfigurationQueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationQueryParameter, global::System.Convert.ToString); + } + if (content.Contains("CompressionSettingContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CompressionSettingContentTypesToCompress = (string[]) content.GetValueForProperty("CompressionSettingContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CompressionSettingContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompressionSettingIsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CompressionSettingIsCompressionEnabled = (bool?) content.GetValueForProperty("CompressionSettingIsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CompressionSettingIsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RouteUpdatePropertiesParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OriginGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginGroup = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("OriginGroup",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginGroup, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("CacheConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration) content.GetValueForProperty("CacheConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfiguration, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdRouteCacheConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("EndpointName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).EndpointName = (string) content.GetValueForProperty("EndpointName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).EndpointName, global::System.Convert.ToString); + } + if (content.Contains("CustomDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CustomDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[]) content.GetValueForProperty("CustomDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CustomDomain, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ActivatedResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("OriginPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginPath = (string) content.GetValueForProperty("OriginPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginPath, global::System.Convert.ToString); + } + if (content.Contains("RuleSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).RuleSet = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[]) content.GetValueForProperty("RuleSet",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).RuleSet, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("SupportedProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).SupportedProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[]) content.GetValueForProperty("SupportedProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).SupportedProtocol, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols.CreateFrom)); + } + if (content.Contains("PatternsToMatch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).PatternsToMatch = (string[]) content.GetValueForProperty("PatternsToMatch",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).PatternsToMatch, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ForwardingProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).ForwardingProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol?) content.GetValueForProperty("ForwardingProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).ForwardingProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol.CreateFrom); + } + if (content.Contains("LinkToDefaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).LinkToDefaultDomain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain?) content.GetValueForProperty("LinkToDefaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).LinkToDefaultDomain, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain.CreateFrom); + } + if (content.Contains("HttpsRedirect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).HttpsRedirect = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect?) content.GetValueForProperty("HttpsRedirect",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).HttpsRedirect, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect.CreateFrom); + } + if (content.Contains("EnabledState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).EnabledState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState?) content.GetValueForProperty("EnabledState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).EnabledState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState.CreateFrom); + } + if (content.Contains("CacheConfigurationCompressionSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationCompressionSetting = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings) content.GetValueForProperty("CacheConfigurationCompressionSetting",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationCompressionSetting, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CompressionSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("OriginGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginGroupId = (string) content.GetValueForProperty("OriginGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).OriginGroupId, global::System.Convert.ToString); + } + if (content.Contains("CacheConfigurationQueryStringCachingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationQueryStringCachingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior?) content.GetValueForProperty("CacheConfigurationQueryStringCachingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationQueryStringCachingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior.CreateFrom); + } + if (content.Contains("CacheConfigurationQueryParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationQueryParameter = (string) content.GetValueForProperty("CacheConfigurationQueryParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CacheConfigurationQueryParameter, global::System.Convert.ToString); + } + if (content.Contains("CompressionSettingContentTypesToCompress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CompressionSettingContentTypesToCompress = (string[]) content.GetValueForProperty("CompressionSettingContentTypesToCompress",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CompressionSettingContentTypesToCompress, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompressionSettingIsCompressionEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CompressionSettingIsCompressionEnabled = (bool?) content.GetValueForProperty("CompressionSettingIsCompressionEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal)this).CompressionSettingIsCompressionEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties of the domain to create. + [System.ComponentModel.TypeConverter(typeof(RouteUpdatePropertiesParametersTypeConverter))] + public partial interface IRouteUpdatePropertiesParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteUpdatePropertiesParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RouteUpdatePropertiesParameters.TypeConverter.cs new file mode 100644 index 000000000000..449d70d019db --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteUpdatePropertiesParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RouteUpdatePropertiesParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RouteUpdatePropertiesParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RouteUpdatePropertiesParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RouteUpdatePropertiesParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteUpdatePropertiesParameters.cs b/src/Cdn/generated/api/Models/Api20210601/RouteUpdatePropertiesParameters.cs new file mode 100644 index 000000000000..1d945334c32e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteUpdatePropertiesParameters.cs @@ -0,0 +1,358 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the domain to create. + public partial class RouteUpdatePropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration _cacheConfiguration; + + /// + /// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration CacheConfiguration { get => (this._cacheConfiguration = this._cacheConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdRouteCacheConfiguration()); set => this._cacheConfiguration = value; } + + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string CacheConfigurationQueryParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)CacheConfiguration).QueryParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)CacheConfiguration).QueryParameter = value ?? null; } + + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior? CacheConfigurationQueryStringCachingBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)CacheConfiguration).QueryStringCachingBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)CacheConfiguration).QueryStringCachingBehavior = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior)""); } + + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string[] CompressionSettingContentTypesToCompress { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)CacheConfiguration).CompressionSettingContentTypesToCompress; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)CacheConfiguration).CompressionSettingContentTypesToCompress = value ?? null /* arrayOf */; } + + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? CompressionSettingIsCompressionEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)CacheConfiguration).CompressionSettingIsCompressionEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)CacheConfiguration).CompressionSettingIsCompressionEnabled = value ?? default(bool); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] _customDomain; + + /// Domains referenced by this endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] CustomDomain { get => this._customDomain; set => this._customDomain = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? _enabledState; + + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get => this._enabledState; set => this._enabledState = value; } + + /// Backing field for property. + private string _endpointName; + + /// The name of the endpoint which holds the route. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string EndpointName { get => this._endpointName; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? _forwardingProtocol; + + /// Protocol this rule will use when forwarding traffic to backends. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? ForwardingProtocol { get => this._forwardingProtocol; set => this._forwardingProtocol = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect? _httpsRedirect; + + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and + /// it will be the first rule that gets executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect? HttpsRedirect { get => this._httpsRedirect; set => this._httpsRedirect = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain? _linkToDefaultDomain; + + /// whether this route will be linked to the default endpoint domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain? LinkToDefaultDomain { get => this._linkToDefaultDomain; set => this._linkToDefaultDomain = value; } + + /// Internal Acessors for CacheConfiguration + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal.CacheConfiguration { get => (this._cacheConfiguration = this._cacheConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdRouteCacheConfiguration()); set { {_cacheConfiguration = value;} } } + + /// Internal Acessors for CacheConfigurationCompressionSetting + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal.CacheConfigurationCompressionSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)CacheConfiguration).CompressionSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfigurationInternal)CacheConfiguration).CompressionSetting = value; } + + /// Internal Acessors for EndpointName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal.EndpointName { get => this._endpointName; set { {_endpointName = value;} } } + + /// Internal Acessors for OriginGroup + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParametersInternal.OriginGroup { get => (this._originGroup = this._originGroup ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set { {_originGroup = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference _originGroup; + + /// A reference to the origin group. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference OriginGroup { get => (this._originGroup = this._originGroup ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set => this._originGroup = value; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string OriginGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)OriginGroup).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)OriginGroup).Id = value ?? null; } + + /// Backing field for property. + private string _originPath; + + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string OriginPath { get => this._originPath; set => this._originPath = value; } + + /// Backing field for property. + private string[] _patternsToMatch; + + /// The route patterns of the rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] PatternsToMatch { get => this._patternsToMatch; set => this._patternsToMatch = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] _ruleSet; + + /// rule sets referenced by this endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] RuleSet { get => this._ruleSet; set => this._ruleSet = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[] _supportedProtocol; + + /// List of supported protocols for this route. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[] SupportedProtocol { get => this._supportedProtocol; set => this._supportedProtocol = value; } + + /// Creates an new instance. + public RouteUpdatePropertiesParameters() + { + + } + } + /// The JSON object that contains the properties of the domain to create. + public partial interface IRouteUpdatePropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// query parameters to include or exclude (comma separated). + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"query parameters to include or exclude (comma separated).", + SerializedName = @"queryParameters", + PossibleTypes = new [] { typeof(string) })] + string CacheConfigurationQueryParameter { get; set; } + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.", + SerializedName = @"queryStringCachingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior? CacheConfigurationQueryStringCachingBehavior { get; set; } + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of content types on which compression applies. The value should be a valid MIME type.", + SerializedName = @"contentTypesToCompress", + PossibleTypes = new [] { typeof(string) })] + string[] CompressionSettingContentTypesToCompress { get; set; } + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.", + SerializedName = @"isCompressionEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? CompressionSettingIsCompressionEnabled { get; set; } + /// Domains referenced by this endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Domains referenced by this endpoint.", + SerializedName = @"customDomains", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] CustomDomain { get; set; } + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'", + SerializedName = @"enabledState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get; set; } + /// The name of the endpoint which holds the route. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the endpoint which holds the route.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + string EndpointName { get; } + /// Protocol this rule will use when forwarding traffic to backends. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protocol this rule will use when forwarding traffic to backends.", + SerializedName = @"forwardingProtocol", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? ForwardingProtocol { get; set; } + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and + /// it will be the first rule that gets executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed.", + SerializedName = @"httpsRedirect", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect? HttpsRedirect { get; set; } + /// whether this route will be linked to the default endpoint domain. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"whether this route will be linked to the default endpoint domain.", + SerializedName = @"linkToDefaultDomain", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain? LinkToDefaultDomain { get; set; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string OriginGroupId { get; set; } + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.", + SerializedName = @"originPath", + PossibleTypes = new [] { typeof(string) })] + string OriginPath { get; set; } + /// The route patterns of the rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The route patterns of the rule.", + SerializedName = @"patternsToMatch", + PossibleTypes = new [] { typeof(string) })] + string[] PatternsToMatch { get; set; } + /// rule sets referenced by this endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"rule sets referenced by this endpoint.", + SerializedName = @"ruleSets", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] RuleSet { get; set; } + /// List of supported protocols for this route. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of supported protocols for this route.", + SerializedName = @"supportedProtocols", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[] SupportedProtocol { get; set; } + + } + /// The JSON object that contains the properties of the domain to create. + internal partial interface IRouteUpdatePropertiesParametersInternal + + { + /// + /// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdRouteCacheConfiguration CacheConfiguration { get; set; } + /// compression settings. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICompressionSettings CacheConfigurationCompressionSetting { get; set; } + /// query parameters to include or exclude (comma separated). + string CacheConfigurationQueryParameter { get; set; } + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior? CacheConfigurationQueryStringCachingBehavior { get; set; } + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + string[] CompressionSettingContentTypesToCompress { get; set; } + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + bool? CompressionSettingIsCompressionEnabled { get; set; } + /// Domains referenced by this endpoint. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] CustomDomain { get; set; } + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState? EnabledState { get; set; } + /// The name of the endpoint which holds the route. + string EndpointName { get; set; } + /// Protocol this rule will use when forwarding traffic to backends. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol? ForwardingProtocol { get; set; } + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and + /// it will be the first rule that gets executed. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect? HttpsRedirect { get; set; } + /// whether this route will be linked to the default endpoint domain. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain? LinkToDefaultDomain { get; set; } + /// A reference to the origin group. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference OriginGroup { get; set; } + /// Resource ID. + string OriginGroupId { get; set; } + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + string OriginPath { get; set; } + /// The route patterns of the rule. + string[] PatternsToMatch { get; set; } + /// rule sets referenced by this endpoint. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] RuleSet { get; set; } + /// List of supported protocols for this route. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[] SupportedProtocol { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RouteUpdatePropertiesParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/RouteUpdatePropertiesParameters.json.cs new file mode 100644 index 000000000000..c47c886212d8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RouteUpdatePropertiesParameters.json.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the domain to create. + public partial class RouteUpdatePropertiesParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdatePropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RouteUpdatePropertiesParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RouteUpdatePropertiesParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_originGroup = If( json?.PropertyT("originGroup"), out var __jsonOriginGroup) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonOriginGroup) : OriginGroup;} + {_cacheConfiguration = If( json?.PropertyT("cacheConfiguration"), out var __jsonCacheConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdRouteCacheConfiguration.FromJson(__jsonCacheConfiguration) : CacheConfiguration;} + {_endpointName = If( json?.PropertyT("endpointName"), out var __jsonEndpointName) ? (string)__jsonEndpointName : (string)EndpointName;} + {_customDomain = If( json?.PropertyT("customDomains"), out var __jsonCustomDomains) ? If( __jsonCustomDomains as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ActivatedResourceReference.FromJson(__u) )) ))() : null : CustomDomain;} + {_originPath = If( json?.PropertyT("originPath"), out var __jsonOriginPath) ? (string)__jsonOriginPath : (string)OriginPath;} + {_ruleSet = If( json?.PropertyT("ruleSets"), out var __jsonRuleSets) ? If( __jsonRuleSets as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__p) )) ))() : null : RuleSet;} + {_supportedProtocol = If( json?.PropertyT("supportedProtocols"), out var __jsonSupportedProtocols) ? If( __jsonSupportedProtocols as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols) (__k is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __j ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols)(__j.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols)""))) ))() : null : SupportedProtocol;} + {_patternsToMatch = If( json?.PropertyT("patternsToMatch"), out var __jsonPatternsToMatch) ? If( __jsonPatternsToMatch as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __g) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__g, (__f)=>(string) (__f is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __e ? (string)(__e.ToString()) : null)) ))() : null : PatternsToMatch;} + {_forwardingProtocol = If( json?.PropertyT("forwardingProtocol"), out var __jsonForwardingProtocol) ? (string)__jsonForwardingProtocol : (string)ForwardingProtocol;} + {_linkToDefaultDomain = If( json?.PropertyT("linkToDefaultDomain"), out var __jsonLinkToDefaultDomain) ? (string)__jsonLinkToDefaultDomain : (string)LinkToDefaultDomain;} + {_httpsRedirect = If( json?.PropertyT("httpsRedirect"), out var __jsonHttpsRedirect) ? (string)__jsonHttpsRedirect : (string)HttpsRedirect;} + {_enabledState = If( json?.PropertyT("enabledState"), out var __jsonEnabledState) ? (string)__jsonEnabledState : (string)EnabledState;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._originGroup ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._originGroup.ToJson(null,serializationMode) : null, "originGroup" ,container.Add ); + AddIf( null != this._cacheConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._cacheConfiguration.ToJson(null,serializationMode) : null, "cacheConfiguration" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._endpointName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._endpointName.ToString()) : null, "endpointName" ,container.Add ); + } + if (null != this._customDomain) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._customDomain ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("customDomains",__w); + } + AddIf( null != (((object)this._originPath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._originPath.ToString()) : null, "originPath" ,container.Add ); + if (null != this._ruleSet) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._ruleSet ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("ruleSets",__r); + } + if (null != this._supportedProtocol) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __n in this._supportedProtocol ) + { + AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__n.ToString()) : null ,__m.Add); + } + container.Add("supportedProtocols",__m); + } + if (null != this._patternsToMatch) + { + var __h = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __i in this._patternsToMatch ) + { + AddIf(null != (((object)__i)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__i.ToString()) : null ,__h.Add); + } + container.Add("patternsToMatch",__h); + } + AddIf( null != (((object)this._forwardingProtocol)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._forwardingProtocol.ToString()) : null, "forwardingProtocol" ,container.Add ); + AddIf( null != (((object)this._linkToDefaultDomain)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._linkToDefaultDomain.ToString()) : null, "linkToDefaultDomain" ,container.Add ); + AddIf( null != (((object)this._httpsRedirect)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._httpsRedirect.ToString()) : null, "httpsRedirect" ,container.Add ); + AddIf( null != (((object)this._enabledState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._enabledState.ToString()) : null, "enabledState" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Rule.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/Rule.PowerShell.cs new file mode 100644 index 000000000000..6fdce96936f5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Rule.PowerShell.cs @@ -0,0 +1,298 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Friendly Rules name mapping to the any Rules or secret related information. + [System.ComponentModel.TypeConverter(typeof(RuleTypeConverter))] + public partial class Rule + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Rule(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Rule(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Rule(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RulePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("SetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).SetName = (string) content.GetValueForProperty("SetName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).SetName, global::System.Convert.ToString); + } + if (content.Contains("Order")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).Order = (int?) content.GetValueForProperty("Order",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).Order, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Condition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).Condition = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[]) content.GetValueForProperty("Condition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).Condition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleConditionTypeConverter.ConvertFrom)); + } + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[]) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).Action, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1TypeConverter.ConvertFrom)); + } + if (content.Contains("MatchProcessingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).MatchProcessingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior?) content.GetValueForProperty("MatchProcessingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).MatchProcessingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Rule(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RulePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("SetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).SetName = (string) content.GetValueForProperty("SetName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).SetName, global::System.Convert.ToString); + } + if (content.Contains("Order")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).Order = (int?) content.GetValueForProperty("Order",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).Order, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Condition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).Condition = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[]) content.GetValueForProperty("Condition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).Condition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleConditionTypeConverter.ConvertFrom)); + } + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[]) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).Action, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1TypeConverter.ConvertFrom)); + } + if (content.Contains("MatchProcessingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).MatchProcessingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior?) content.GetValueForProperty("MatchProcessingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).MatchProcessingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Friendly Rules name mapping to the any Rules or secret related information. + [System.ComponentModel.TypeConverter(typeof(RuleTypeConverter))] + public partial interface IRule + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Rule.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/Rule.TypeConverter.cs new file mode 100644 index 000000000000..aa9b1ccb5356 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Rule.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RuleTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Rule.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Rule.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Rule.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Rule.cs b/src/Cdn/generated/api/Models/Api20210601/Rule.cs new file mode 100644 index 000000000000..babe22ab0a87 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Rule.cs @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Friendly Rules name mapping to the any Rules or secret related information. + public partial class Rule : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(); + + /// + /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] Action { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).Action; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).Action = value ?? null /* arrayOf */; } + + /// A list of conditions that must be matched for the actions to be executed + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] Condition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).Condition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).Condition = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; } + + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults + /// to Continue. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior? MatchProcessingBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).MatchProcessingBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).MatchProcessingBehavior = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior)""); } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal.DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for SetName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleInternal.SetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).RuleSetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).RuleSetName = value; } + + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; } + + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + /// be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition + /// and actions listed in it will always be applied. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? Order { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).Order; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).Order = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleProperties _property; + + /// The JSON object that contains the properties of the Rules to create. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleProperties()); set => this._property = value; } + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.FormatTable] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// The name of the rule set containing the rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string SetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).RuleSetName; } + + /// Read only system data + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public Rule() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Friendly Rules name mapping to the any Rules or secret related information. + public partial interface IRule : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource + { + /// + /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of actions that are executed when all the conditions of a rule are satisfied.", + SerializedName = @"actions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] Action { get; set; } + /// A list of conditions that must be matched for the actions to be executed + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of conditions that must be matched for the actions to be executed", + SerializedName = @"conditions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] Condition { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"", + SerializedName = @"deploymentStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; } + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults + /// to Continue. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.", + SerializedName = @"matchProcessingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior? MatchProcessingBehavior { get; set; } + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + /// be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition + /// and actions listed in it will always be applied. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.", + SerializedName = @"order", + PossibleTypes = new [] { typeof(int) })] + int? Order { get; set; } + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; } + /// The name of the rule set containing the rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the rule set containing the rule.", + SerializedName = @"ruleSetName", + PossibleTypes = new [] { typeof(string) })] + string SetName { get; } + + } + /// Friendly Rules name mapping to the any Rules or secret related information. + internal partial interface IRuleInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal + { + /// + /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] Action { get; set; } + /// A list of conditions that must be matched for the actions to be executed + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] Condition { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; set; } + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults + /// to Continue. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior? MatchProcessingBehavior { get; set; } + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + /// be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition + /// and actions listed in it will always be applied. + /// + int? Order { get; set; } + /// The JSON object that contains the properties of the Rules to create. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleProperties Property { get; set; } + /// Provisioning status + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; set; } + /// The name of the rule set containing the rule. + string SetName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Rule.json.cs b/src/Cdn/generated/api/Models/Api20210601/Rule.json.cs new file mode 100644 index 000000000000..3b39316cc1cc --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Rule.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Friendly Rules name mapping to the any Rules or secret related information. + public partial class Rule + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new Rule(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal Rule(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleListResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RuleListResult.PowerShell.cs new file mode 100644 index 000000000000..106ce4188b66 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Result of the request to list rules. It contains a list of rule objects and a URL link to get the next set of results. + /// + [System.ComponentModel.TypeConverter(typeof(RuleListResultTypeConverter))] + public partial class RuleListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RuleListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RuleListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RuleListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RuleListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the request to list rules. It contains a list of rule objects and a URL link to get the next set of results. + [System.ComponentModel.TypeConverter(typeof(RuleListResultTypeConverter))] + public partial interface IRuleListResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleListResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RuleListResult.TypeConverter.cs new file mode 100644 index 000000000000..6870693f1699 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleListResult.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RuleListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RuleListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RuleListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RuleListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleListResult.cs b/src/Cdn/generated/api/Models/Api20210601/RuleListResult.cs new file mode 100644 index 000000000000..20afd21799ad --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleListResult.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list rules. It contains a list of rule objects and a URL link to get the next set of results. + /// + public partial class RuleListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResultInternal + { + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of rule objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule[] _value; + + /// List of AzureFrontDoor rules within a rule set. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule[] Value { get => this._value; } + + /// Creates an new instance. + public RuleListResult() + { + + } + } + /// Result of the request to list rules. It contains a list of rule objects and a URL link to get the next set of results. + public partial interface IRuleListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// URL to get the next set of rule objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL to get the next set of rule objects if there are any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// List of AzureFrontDoor rules within a rule set. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of AzureFrontDoor rules within a rule set.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule[] Value { get; } + + } + /// Result of the request to list rules. It contains a list of rule objects and a URL link to get the next set of results. + internal partial interface IRuleListResultInternal + + { + /// URL to get the next set of rule objects if there are any. + string NextLink { get; set; } + /// List of AzureFrontDoor rules within a rule set. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleListResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/RuleListResult.json.cs new file mode 100644 index 000000000000..d967c76100c3 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleListResult.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list rules. It contains a list of rule objects and a URL link to get the next set of results. + /// + public partial class RuleListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RuleListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RuleListResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Rule.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RuleProperties.PowerShell.cs new file mode 100644 index 000000000000..4dc124429c18 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleProperties.PowerShell.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties of the Rules to create. + [System.ComponentModel.TypeConverter(typeof(RulePropertiesTypeConverter))] + public partial class RuleProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RuleProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RuleProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RuleProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RuleSetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).RuleSetName = (string) content.GetValueForProperty("RuleSetName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).RuleSetName, global::System.Convert.ToString); + } + if (content.Contains("Order")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Order = (int?) content.GetValueForProperty("Order",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Order, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Condition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Condition = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[]) content.GetValueForProperty("Condition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Condition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleConditionTypeConverter.ConvertFrom)); + } + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[]) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Action, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1TypeConverter.ConvertFrom)); + } + if (content.Contains("MatchProcessingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).MatchProcessingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior?) content.GetValueForProperty("MatchProcessingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).MatchProcessingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RuleProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RuleSetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).RuleSetName = (string) content.GetValueForProperty("RuleSetName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).RuleSetName, global::System.Convert.ToString); + } + if (content.Contains("Order")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Order = (int?) content.GetValueForProperty("Order",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Order, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Condition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Condition = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[]) content.GetValueForProperty("Condition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Condition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleConditionTypeConverter.ConvertFrom)); + } + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[]) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Action, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1TypeConverter.ConvertFrom)); + } + if (content.Contains("MatchProcessingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).MatchProcessingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior?) content.GetValueForProperty("MatchProcessingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).MatchProcessingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties of the Rules to create. + [System.ComponentModel.TypeConverter(typeof(RulePropertiesTypeConverter))] + public partial interface IRuleProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RuleProperties.TypeConverter.cs new file mode 100644 index 000000000000..0161f7ebe730 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleProperties.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RulePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RuleProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RuleProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RuleProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleProperties.cs b/src/Cdn/generated/api/Models/Api20210601/RuleProperties.cs new file mode 100644 index 000000000000..db64bd7b815d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleProperties.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the Rules to create. + public partial class RuleProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRulePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(); + + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParameters __ruleUpdatePropertiesParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleUpdatePropertiesParameters(); + + /// + /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] Action { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)__ruleUpdatePropertiesParameters).Action; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)__ruleUpdatePropertiesParameters).Action = value ?? null /* arrayOf */; } + + /// A list of conditions that must be matched for the actions to be executed + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] Condition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)__ruleUpdatePropertiesParameters).Condition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)__ruleUpdatePropertiesParameters).Condition = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus; } + + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults + /// to Continue. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior? MatchProcessingBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)__ruleUpdatePropertiesParameters).MatchProcessingBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)__ruleUpdatePropertiesParameters).MatchProcessingBehavior = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior)""); } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState = value; } + + /// Internal Acessors for RuleSetName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal.RuleSetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)__ruleUpdatePropertiesParameters).RuleSetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)__ruleUpdatePropertiesParameters).RuleSetName = value; } + + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + /// be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition + /// and actions listed in it will always be applied. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public int? Order { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)__ruleUpdatePropertiesParameters).Order; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)__ruleUpdatePropertiesParameters).Order = value ?? default(int); } + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState; } + + /// The name of the rule set containing the rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string RuleSetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)__ruleUpdatePropertiesParameters).RuleSetName; } + + /// Creates an new instance. + public RuleProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__ruleUpdatePropertiesParameters), __ruleUpdatePropertiesParameters); + await eventListener.AssertObjectIsValid(nameof(__ruleUpdatePropertiesParameters), __ruleUpdatePropertiesParameters); + await eventListener.AssertNotNull(nameof(__afdStateProperties), __afdStateProperties); + await eventListener.AssertObjectIsValid(nameof(__afdStateProperties), __afdStateProperties); + } + } + /// The JSON object that contains the properties of the Rules to create. + public partial interface IRuleProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties + { + + } + /// The JSON object that contains the properties of the Rules to create. + internal partial interface IRulePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/RuleProperties.json.cs new file mode 100644 index 000000000000..40c20c038c46 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleProperties.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the Rules to create. + public partial class RuleProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RuleProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RuleProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __ruleUpdatePropertiesParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleUpdatePropertiesParameters(json); + __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __ruleUpdatePropertiesParameters?.ToJson(container, serializationMode); + __afdStateProperties?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleSet.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RuleSet.PowerShell.cs new file mode 100644 index 000000000000..f33716b4bc50 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleSet.PowerShell.cs @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Friendly RuleSet name mapping to the any RuleSet or secret related information. + [System.ComponentModel.TypeConverter(typeof(RuleSetTypeConverter))] + public partial class RuleSet + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RuleSet(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RuleSet(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RuleSet(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleSetPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal)this).ProfileName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RuleSet(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleSetPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal)this).ProfileName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Friendly RuleSet name mapping to the any RuleSet or secret related information. + [System.ComponentModel.TypeConverter(typeof(RuleSetTypeConverter))] + public partial interface IRuleSet + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleSet.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RuleSet.TypeConverter.cs new file mode 100644 index 000000000000..ae298e0fef57 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleSet.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RuleSetTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RuleSet.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RuleSet.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RuleSet.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleSet.cs b/src/Cdn/generated/api/Models/Api20210601/RuleSet.cs new file mode 100644 index 000000000000..178ed1e55a53 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleSet.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Friendly RuleSet name mapping to the any RuleSet or secret related information. + public partial class RuleSet : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(); + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal.DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus = value; } + + /// Internal Acessors for ProfileName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal.ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetPropertiesInternal)Property).ProfileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetPropertiesInternal)Property).ProfileName = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleSetProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState = value; } + + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; } + + /// The name of the profile which holds the rule set. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetPropertiesInternal)Property).ProfileName; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetProperties _property; + + /// The JSON object that contains the properties of the Rule Set to create. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleSetProperties()); set => this._property = value; } + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.FormatTable] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// Read only system data + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public RuleSet() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Friendly RuleSet name mapping to the any RuleSet or secret related information. + public partial interface IRuleSet : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"", + SerializedName = @"deploymentStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; } + /// The name of the profile which holds the rule set. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the profile which holds the rule set.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + string ProfileName { get; } + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; } + + } + /// Friendly RuleSet name mapping to the any RuleSet or secret related information. + internal partial interface IRuleSetInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; set; } + /// The name of the profile which holds the rule set. + string ProfileName { get; set; } + /// The JSON object that contains the properties of the Rule Set to create. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetProperties Property { get; set; } + /// Provisioning status + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleSet.json.cs b/src/Cdn/generated/api/Models/Api20210601/RuleSet.json.cs new file mode 100644 index 000000000000..54a24676ca69 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleSet.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Friendly RuleSet name mapping to the any RuleSet or secret related information. + public partial class RuleSet + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RuleSet(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RuleSet(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleSetProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleSetListResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RuleSetListResult.PowerShell.cs new file mode 100644 index 000000000000..a842ec89293d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleSetListResult.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Result of the request to list rule sets. It contains a list of rule set objects and a URL link to get the next set of + /// results. + /// + [System.ComponentModel.TypeConverter(typeof(RuleSetListResultTypeConverter))] + public partial class RuleSetListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RuleSetListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RuleSetListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RuleSetListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleSetTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RuleSetListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleSetTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the request to list rule sets. It contains a list of rule set objects and a URL link to get the next set of + /// results. + [System.ComponentModel.TypeConverter(typeof(RuleSetListResultTypeConverter))] + public partial interface IRuleSetListResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleSetListResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RuleSetListResult.TypeConverter.cs new file mode 100644 index 000000000000..b7cad2450ef3 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleSetListResult.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RuleSetListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RuleSetListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RuleSetListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RuleSetListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleSetListResult.cs b/src/Cdn/generated/api/Models/Api20210601/RuleSetListResult.cs new file mode 100644 index 000000000000..c76f1d4342d2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleSetListResult.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list rule sets. It contains a list of rule set objects and a URL link to get the next set of + /// results. + /// + public partial class RuleSetListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResultInternal + { + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of rule set objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet[] _value; + + /// List of AzureFrontDoor rule sets within a profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet[] Value { get => this._value; } + + /// Creates an new instance. + public RuleSetListResult() + { + + } + } + /// Result of the request to list rule sets. It contains a list of rule set objects and a URL link to get the next set of + /// results. + public partial interface IRuleSetListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// URL to get the next set of rule set objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL to get the next set of rule set objects if there are any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// List of AzureFrontDoor rule sets within a profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of AzureFrontDoor rule sets within a profile.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet[] Value { get; } + + } + /// Result of the request to list rule sets. It contains a list of rule set objects and a URL link to get the next set of + /// results. + internal partial interface IRuleSetListResultInternal + + { + /// URL to get the next set of rule set objects if there are any. + string NextLink { get; set; } + /// List of AzureFrontDoor rule sets within a profile. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleSetListResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/RuleSetListResult.json.cs new file mode 100644 index 000000000000..afca5cc7584f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleSetListResult.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list rule sets. It contains a list of rule set objects and a URL link to get the next set of + /// results. + /// + public partial class RuleSetListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RuleSetListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RuleSetListResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleSet.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleSetProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RuleSetProperties.PowerShell.cs new file mode 100644 index 000000000000..1ca9d024d1c6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleSetProperties.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties of the Rule Set to create. + [System.ComponentModel.TypeConverter(typeof(RuleSetPropertiesTypeConverter))] + public partial class RuleSetProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RuleSetProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RuleSetProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RuleSetProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetPropertiesInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetPropertiesInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RuleSetProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetPropertiesInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetPropertiesInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties of the Rule Set to create. + [System.ComponentModel.TypeConverter(typeof(RuleSetPropertiesTypeConverter))] + public partial interface IRuleSetProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleSetProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RuleSetProperties.TypeConverter.cs new file mode 100644 index 000000000000..afe859cb3f65 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleSetProperties.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RuleSetPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RuleSetProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RuleSetProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RuleSetProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleSetProperties.cs b/src/Cdn/generated/api/Models/Api20210601/RuleSetProperties.cs new file mode 100644 index 000000000000..2d5d835797d1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleSetProperties.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the Rule Set to create. + public partial class RuleSetProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(); + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus; } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState = value; } + + /// Internal Acessors for ProfileName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetPropertiesInternal.ProfileName { get => this._profileName; set { {_profileName = value;} } } + + /// Backing field for property. + private string _profileName; + + /// The name of the profile which holds the rule set. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ProfileName { get => this._profileName; } + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState; } + + /// Creates an new instance. + public RuleSetProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__afdStateProperties), __afdStateProperties); + await eventListener.AssertObjectIsValid(nameof(__afdStateProperties), __afdStateProperties); + } + } + /// The JSON object that contains the properties of the Rule Set to create. + public partial interface IRuleSetProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties + { + /// The name of the profile which holds the rule set. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the profile which holds the rule set.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + string ProfileName { get; } + + } + /// The JSON object that contains the properties of the Rule Set to create. + internal partial interface IRuleSetPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal + { + /// The name of the profile which holds the rule set. + string ProfileName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleSetProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/RuleSetProperties.json.cs new file mode 100644 index 000000000000..777e3bffc4dc --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleSetProperties.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the Rule Set to create. + public partial class RuleSetProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSetProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RuleSetProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RuleSetProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(json); + {_profileName = If( json?.PropertyT("profileName"), out var __jsonProfileName) ? (string)__jsonProfileName : (string)ProfileName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __afdStateProperties?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._profileName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._profileName.ToString()) : null, "profileName" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleUpdateParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RuleUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..bc2bd521ec23 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleUpdateParameters.PowerShell.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The domain JSON object required for domain creation or update. + [System.ComponentModel.TypeConverter(typeof(RuleUpdateParametersTypeConverter))] + public partial class RuleUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RuleUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RuleUpdateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RuleUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleUpdatePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("RuleSetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).RuleSetName = (string) content.GetValueForProperty("RuleSetName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).RuleSetName, global::System.Convert.ToString); + } + if (content.Contains("Order")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).Order = (int?) content.GetValueForProperty("Order",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).Order, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Condition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).Condition = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[]) content.GetValueForProperty("Condition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).Condition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleConditionTypeConverter.ConvertFrom)); + } + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[]) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).Action, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1TypeConverter.ConvertFrom)); + } + if (content.Contains("MatchProcessingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).MatchProcessingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior?) content.GetValueForProperty("MatchProcessingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).MatchProcessingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RuleUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParameters) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleUpdatePropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("RuleSetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).RuleSetName = (string) content.GetValueForProperty("RuleSetName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).RuleSetName, global::System.Convert.ToString); + } + if (content.Contains("Order")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).Order = (int?) content.GetValueForProperty("Order",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).Order, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Condition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).Condition = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[]) content.GetValueForProperty("Condition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).Condition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleConditionTypeConverter.ConvertFrom)); + } + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[]) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).Action, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1TypeConverter.ConvertFrom)); + } + if (content.Contains("MatchProcessingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).MatchProcessingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior?) content.GetValueForProperty("MatchProcessingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal)this).MatchProcessingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The domain JSON object required for domain creation or update. + [System.ComponentModel.TypeConverter(typeof(RuleUpdateParametersTypeConverter))] + public partial interface IRuleUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleUpdateParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RuleUpdateParameters.TypeConverter.cs new file mode 100644 index 000000000000..31c5fdab230d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleUpdateParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RuleUpdateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RuleUpdateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RuleUpdateParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RuleUpdateParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleUpdateParameters.cs b/src/Cdn/generated/api/Models/Api20210601/RuleUpdateParameters.cs new file mode 100644 index 000000000000..d329d29cf7da --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleUpdateParameters.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The domain JSON object required for domain creation or update. + public partial class RuleUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal + { + + /// + /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] Action { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).Action; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).Action = value ?? null /* arrayOf */; } + + /// A list of conditions that must be matched for the actions to be executed + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] Condition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).Condition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).Condition = value ?? null /* arrayOf */; } + + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults + /// to Continue. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior? MatchProcessingBehavior { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).MatchProcessingBehavior; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).MatchProcessingBehavior = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior)""); } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleUpdatePropertiesParameters()); set { {_property = value;} } } + + /// Internal Acessors for RuleSetName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParametersInternal.RuleSetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).RuleSetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).RuleSetName = value; } + + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + /// be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition + /// and actions listed in it will always be applied. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public int? Order { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).Order; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).Order = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParameters _property; + + /// The JSON object that contains the properties of the rule to update. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParameters Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleUpdatePropertiesParameters()); set => this._property = value; } + + /// The name of the rule set containing the rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string RuleSetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)Property).RuleSetName; } + + /// Creates an new instance. + public RuleUpdateParameters() + { + + } + } + /// The domain JSON object required for domain creation or update. + public partial interface IRuleUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of actions that are executed when all the conditions of a rule are satisfied.", + SerializedName = @"actions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] Action { get; set; } + /// A list of conditions that must be matched for the actions to be executed + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of conditions that must be matched for the actions to be executed", + SerializedName = @"conditions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] Condition { get; set; } + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults + /// to Continue. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.", + SerializedName = @"matchProcessingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior? MatchProcessingBehavior { get; set; } + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + /// be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition + /// and actions listed in it will always be applied. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.", + SerializedName = @"order", + PossibleTypes = new [] { typeof(int) })] + int? Order { get; set; } + /// The name of the rule set containing the rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the rule set containing the rule.", + SerializedName = @"ruleSetName", + PossibleTypes = new [] { typeof(string) })] + string RuleSetName { get; } + + } + /// The domain JSON object required for domain creation or update. + internal partial interface IRuleUpdateParametersInternal + + { + /// + /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] Action { get; set; } + /// A list of conditions that must be matched for the actions to be executed + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] Condition { get; set; } + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults + /// to Continue. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior? MatchProcessingBehavior { get; set; } + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + /// be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition + /// and actions listed in it will always be applied. + /// + int? Order { get; set; } + /// The JSON object that contains the properties of the rule to update. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParameters Property { get; set; } + /// The name of the rule set containing the rule. + string RuleSetName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleUpdateParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/RuleUpdateParameters.json.cs new file mode 100644 index 000000000000..c14b8d089705 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleUpdateParameters.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The domain JSON object required for domain creation or update. + public partial class RuleUpdateParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RuleUpdateParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RuleUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleUpdatePropertiesParameters.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleUpdatePropertiesParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/RuleUpdatePropertiesParameters.PowerShell.cs new file mode 100644 index 000000000000..1038c7ffcbe8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleUpdatePropertiesParameters.PowerShell.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties of the rule to update. + [System.ComponentModel.TypeConverter(typeof(RuleUpdatePropertiesParametersTypeConverter))] + public partial class RuleUpdatePropertiesParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RuleUpdatePropertiesParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RuleUpdatePropertiesParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RuleUpdatePropertiesParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RuleSetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).RuleSetName = (string) content.GetValueForProperty("RuleSetName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).RuleSetName, global::System.Convert.ToString); + } + if (content.Contains("Order")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Order = (int?) content.GetValueForProperty("Order",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Order, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Condition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Condition = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[]) content.GetValueForProperty("Condition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Condition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleConditionTypeConverter.ConvertFrom)); + } + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[]) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Action, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1TypeConverter.ConvertFrom)); + } + if (content.Contains("MatchProcessingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).MatchProcessingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior?) content.GetValueForProperty("MatchProcessingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).MatchProcessingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RuleUpdatePropertiesParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RuleSetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).RuleSetName = (string) content.GetValueForProperty("RuleSetName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).RuleSetName, global::System.Convert.ToString); + } + if (content.Contains("Order")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Order = (int?) content.GetValueForProperty("Order",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Order, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Condition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Condition = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[]) content.GetValueForProperty("Condition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Condition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleConditionTypeConverter.ConvertFrom)); + } + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[]) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).Action, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1TypeConverter.ConvertFrom)); + } + if (content.Contains("MatchProcessingBehavior")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).MatchProcessingBehavior = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior?) content.GetValueForProperty("MatchProcessingBehavior",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal)this).MatchProcessingBehavior, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties of the rule to update. + [System.ComponentModel.TypeConverter(typeof(RuleUpdatePropertiesParametersTypeConverter))] + public partial interface IRuleUpdatePropertiesParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleUpdatePropertiesParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/RuleUpdatePropertiesParameters.TypeConverter.cs new file mode 100644 index 000000000000..83528d5c4174 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleUpdatePropertiesParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RuleUpdatePropertiesParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RuleUpdatePropertiesParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RuleUpdatePropertiesParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RuleUpdatePropertiesParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleUpdatePropertiesParameters.cs b/src/Cdn/generated/api/Models/Api20210601/RuleUpdatePropertiesParameters.cs new file mode 100644 index 000000000000..70bf8f7e8b01 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleUpdatePropertiesParameters.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the rule to update. + public partial class RuleUpdatePropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] _action; + + /// + /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] Action { get => this._action; set => this._action = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] _condition; + + /// A list of conditions that must be matched for the actions to be executed + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] Condition { get => this._condition; set => this._condition = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior? _matchProcessingBehavior; + + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults + /// to Continue. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior? MatchProcessingBehavior { get => this._matchProcessingBehavior; set => this._matchProcessingBehavior = value; } + + /// Internal Acessors for RuleSetName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParametersInternal.RuleSetName { get => this._ruleSetName; set { {_ruleSetName = value;} } } + + /// Backing field for property. + private int? _order; + + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + /// be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition + /// and actions listed in it will always be applied. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public int? Order { get => this._order; set => this._order = value; } + + /// Backing field for property. + private string _ruleSetName; + + /// The name of the rule set containing the rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string RuleSetName { get => this._ruleSetName; } + + /// Creates an new instance. + public RuleUpdatePropertiesParameters() + { + + } + } + /// The JSON object that contains the properties of the rule to update. + public partial interface IRuleUpdatePropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of actions that are executed when all the conditions of a rule are satisfied.", + SerializedName = @"actions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] Action { get; set; } + /// A list of conditions that must be matched for the actions to be executed + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of conditions that must be matched for the actions to be executed", + SerializedName = @"conditions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] Condition { get; set; } + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults + /// to Continue. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.", + SerializedName = @"matchProcessingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior? MatchProcessingBehavior { get; set; } + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + /// be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition + /// and actions listed in it will always be applied. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.", + SerializedName = @"order", + PossibleTypes = new [] { typeof(int) })] + int? Order { get; set; } + /// The name of the rule set containing the rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the rule set containing the rule.", + SerializedName = @"ruleSetName", + PossibleTypes = new [] { typeof(string) })] + string RuleSetName { get; } + + } + /// The JSON object that contains the properties of the rule to update. + internal partial interface IRuleUpdatePropertiesParametersInternal + + { + /// + /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] Action { get; set; } + /// A list of conditions that must be matched for the actions to be executed + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] Condition { get; set; } + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults + /// to Continue. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior? MatchProcessingBehavior { get; set; } + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + /// be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition + /// and actions listed in it will always be applied. + /// + int? Order { get; set; } + /// The name of the rule set containing the rule. + string RuleSetName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/RuleUpdatePropertiesParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/RuleUpdatePropertiesParameters.json.cs new file mode 100644 index 000000000000..3ee3fc27e525 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/RuleUpdatePropertiesParameters.json.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the rule to update. + public partial class RuleUpdatePropertiesParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdatePropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new RuleUpdatePropertiesParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal RuleUpdatePropertiesParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_ruleSetName = If( json?.PropertyT("ruleSetName"), out var __jsonRuleSetName) ? (string)__jsonRuleSetName : (string)RuleSetName;} + {_order = If( json?.PropertyT("order"), out var __jsonOrder) ? (int?)__jsonOrder : Order;} + {_condition = If( json?.PropertyT("conditions"), out var __jsonConditions) ? If( __jsonConditions as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleCondition.FromJson(__u) )) ))() : null : Condition;} + {_action = If( json?.PropertyT("actions"), out var __jsonActions) ? If( __jsonActions as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1.FromJson(__p) )) ))() : null : Action;} + {_matchProcessingBehavior = If( json?.PropertyT("matchProcessingBehavior"), out var __jsonMatchProcessingBehavior) ? (string)__jsonMatchProcessingBehavior : (string)MatchProcessingBehavior;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._ruleSetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._ruleSetName.ToString()) : null, "ruleSetName" ,container.Add ); + } + AddIf( null != this._order ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber((int)this._order) : null, "order" ,container.Add ); + if (null != this._condition) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._condition ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("conditions",__w); + } + if (null != this._action) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._action ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("actions",__r); + } + AddIf( null != (((object)this._matchProcessingBehavior)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._matchProcessingBehavior.ToString()) : null, "matchProcessingBehavior" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Secret.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/Secret.PowerShell.cs new file mode 100644 index 000000000000..63c5170ba21a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Secret.PowerShell.cs @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Friendly Secret name mapping to the any Secret or secret related information. + [System.ComponentModel.TypeConverter(typeof(SecretTypeConverter))] + public partial class Secret + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Secret(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Secret(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Secret(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretParametersTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Secret(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretParametersTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Friendly Secret name mapping to the any Secret or secret related information. + [System.ComponentModel.TypeConverter(typeof(SecretTypeConverter))] + public partial interface ISecret + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Secret.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/Secret.TypeConverter.cs new file mode 100644 index 000000000000..0ae19f94d816 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Secret.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SecretTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Secret.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Secret.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Secret.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Secret.cs b/src/Cdn/generated/api/Models/Api20210601/Secret.cs new file mode 100644 index 000000000000..c7848ee951d4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Secret.cs @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Friendly Secret name mapping to the any Secret or secret related information. + public partial class Secret : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(); + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal.DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus = value; } + + /// Internal Acessors for ProfileName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal.ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretPropertiesInternal)Property).ProfileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretPropertiesInternal)Property).ProfileName = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState = value; } + + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; } + + /// object which contains secret parameters + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretPropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretPropertiesInternal)Property).Parameter = value ?? null /* model class */; } + + /// The name of the profile which holds the secret. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretPropertiesInternal)Property).ProfileName; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretProperties _property; + + /// The JSON object that contains the properties of the Secret to create. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretProperties()); set => this._property = value; } + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.FormatTable] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// Read only system data + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public Secret() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Friendly Secret name mapping to the any Secret or secret related information. + public partial interface ISecret : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"", + SerializedName = @"deploymentStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; } + /// object which contains secret parameters + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"object which contains secret parameters", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters Parameter { get; set; } + /// The name of the profile which holds the secret. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the profile which holds the secret.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + string ProfileName { get; } + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; } + + } + /// Friendly Secret name mapping to the any Secret or secret related information. + internal partial interface ISecretInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; set; } + /// object which contains secret parameters + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters Parameter { get; set; } + /// The name of the profile which holds the secret. + string ProfileName { get; set; } + /// The JSON object that contains the properties of the Secret to create. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretProperties Property { get; set; } + /// Provisioning status + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Secret.json.cs b/src/Cdn/generated/api/Models/Api20210601/Secret.json.cs new file mode 100644 index 000000000000..d92db0406c9a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Secret.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Friendly Secret name mapping to the any Secret or secret related information. + public partial class Secret + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new Secret(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal Secret(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecretListResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/SecretListResult.PowerShell.cs new file mode 100644 index 000000000000..8d5db0943586 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecretListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Result of the request to list secrets. It contains a list of Secret objects and a URL link to get the next set of results. + /// + [System.ComponentModel.TypeConverter(typeof(SecretListResultTypeConverter))] + public partial class SecretListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SecretListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SecretListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SecretListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SecretListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the request to list secrets. It contains a list of Secret objects and a URL link to get the next set of results. + [System.ComponentModel.TypeConverter(typeof(SecretListResultTypeConverter))] + public partial interface ISecretListResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecretListResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/SecretListResult.TypeConverter.cs new file mode 100644 index 000000000000..dff17ef31253 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecretListResult.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SecretListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SecretListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SecretListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SecretListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecretListResult.cs b/src/Cdn/generated/api/Models/Api20210601/SecretListResult.cs new file mode 100644 index 000000000000..aae9094a2be4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecretListResult.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list secrets. It contains a list of Secret objects and a URL link to get the next set of results. + /// + public partial class SecretListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResultInternal + { + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of Secret objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret[] _value; + + /// List of AzureFrontDoor secrets within a profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret[] Value { get => this._value; } + + /// Creates an new instance. + public SecretListResult() + { + + } + } + /// Result of the request to list secrets. It contains a list of Secret objects and a URL link to get the next set of results. + public partial interface ISecretListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// URL to get the next set of Secret objects if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL to get the next set of Secret objects if there are any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// List of AzureFrontDoor secrets within a profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of AzureFrontDoor secrets within a profile.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret[] Value { get; } + + } + /// Result of the request to list secrets. It contains a list of Secret objects and a URL link to get the next set of results. + internal partial interface ISecretListResultInternal + + { + /// URL to get the next set of Secret objects if there are any. + string NextLink { get; set; } + /// List of AzureFrontDoor secrets within a profile. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecretListResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/SecretListResult.json.cs new file mode 100644 index 000000000000..c1121a6ebf8b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecretListResult.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list secrets. It contains a list of Secret objects and a URL link to get the next set of results. + /// + public partial class SecretListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new SecretListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal SecretListResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Secret.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecretParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/SecretParameters.PowerShell.cs new file mode 100644 index 000000000000..8325afc046af --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecretParameters.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The json object containing secret parameters + [System.ComponentModel.TypeConverter(typeof(SecretParametersTypeConverter))] + public partial class SecretParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SecretParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SecretParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SecretParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SecretParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The json object containing secret parameters + [System.ComponentModel.TypeConverter(typeof(SecretParametersTypeConverter))] + public partial interface ISecretParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecretParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/SecretParameters.TypeConverter.cs new file mode 100644 index 000000000000..83e5d84ca141 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecretParameters.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SecretParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SecretParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SecretParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SecretParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecretParameters.cs b/src/Cdn/generated/api/Models/Api20210601/SecretParameters.cs new file mode 100644 index 000000000000..d64cb9135bd6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecretParameters.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The json object containing secret parameters + public partial class SecretParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType _type; + + /// The type of the secret resource. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public SecretParameters() + { + + } + } + /// The json object containing secret parameters + public partial interface ISecretParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The type of the secret resource. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The type of the secret resource.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType Type { get; set; } + + } + /// The json object containing secret parameters + internal partial interface ISecretParametersInternal + + { + /// The type of the secret resource. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecretParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/SecretParameters.json.cs new file mode 100644 index 000000000000..428e0ca53944 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecretParameters.json.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The json object containing secret parameters + public partial class SecretParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters interface is polymorphic, and the + /// precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("type") ) + { + case "UrlSigningKey": + { + return new UrlSigningKeyParameters(json); + } + case "ManagedCertificate": + { + return new ManagedCertificateParameters(json); + } + case "CustomerCertificate": + { + return new CustomerCertificateParameters(json); + } + case "AzureFirstPartyManagedCertificate": + { + return new AzureFirstPartyManagedCertificateParameters(json); + } + } + return new SecretParameters(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal SecretParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecretProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/SecretProperties.PowerShell.cs new file mode 100644 index 000000000000..fe1f04879cc6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecretProperties.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object that contains the properties of the Secret to create. + [System.ComponentModel.TypeConverter(typeof(SecretPropertiesTypeConverter))] + public partial class SecretProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SecretProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SecretProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SecretProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretPropertiesInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretPropertiesInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretPropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretPropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretParametersTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SecretProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretPropertiesInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretPropertiesInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretPropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretPropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretParametersTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object that contains the properties of the Secret to create. + [System.ComponentModel.TypeConverter(typeof(SecretPropertiesTypeConverter))] + public partial interface ISecretProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecretProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/SecretProperties.TypeConverter.cs new file mode 100644 index 000000000000..cd07df820309 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecretProperties.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SecretPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SecretProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SecretProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SecretProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecretProperties.cs b/src/Cdn/generated/api/Models/Api20210601/SecretProperties.cs new file mode 100644 index 000000000000..a86a781281e7 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecretProperties.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the Secret to create. + public partial class SecretProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(); + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus; } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState = value; } + + /// Internal Acessors for ProfileName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretPropertiesInternal.ProfileName { get => this._profileName; set { {_profileName = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters _parameter; + + /// object which contains secret parameters + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretParameters()); set => this._parameter = value; } + + /// Backing field for property. + private string _profileName; + + /// The name of the profile which holds the secret. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ProfileName { get => this._profileName; } + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState; } + + /// Creates an new instance. + public SecretProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__afdStateProperties), __afdStateProperties); + await eventListener.AssertObjectIsValid(nameof(__afdStateProperties), __afdStateProperties); + } + } + /// The JSON object that contains the properties of the Secret to create. + public partial interface ISecretProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties + { + /// object which contains secret parameters + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"object which contains secret parameters", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters Parameter { get; set; } + /// The name of the profile which holds the secret. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the profile which holds the secret.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + string ProfileName { get; } + + } + /// The JSON object that contains the properties of the Secret to create. + internal partial interface ISecretPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal + { + /// object which contains secret parameters + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters Parameter { get; set; } + /// The name of the profile which holds the secret. + string ProfileName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecretProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/SecretProperties.json.cs new file mode 100644 index 000000000000..173e3a44d9ce --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecretProperties.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object that contains the properties of the Secret to create. + public partial class SecretProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new SecretProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal SecretProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(json); + {_profileName = If( json?.PropertyT("profileName"), out var __jsonProfileName) ? (string)__jsonProfileName : (string)ProfileName;} + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __afdStateProperties?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._profileName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._profileName.ToString()) : null, "profileName" ,container.Add ); + } + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicy.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicy.PowerShell.cs new file mode 100644 index 000000000000..a59e1230ba8c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicy.PowerShell.cs @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// SecurityPolicy association for AzureFrontDoor profile + [System.ComponentModel.TypeConverter(typeof(SecurityPolicyTypeConverter))] + public partial class SecurityPolicy + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SecurityPolicy(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SecurityPolicy(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SecurityPolicy(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyPropertiesParametersTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SecurityPolicy(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyPropertiesParametersTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// SecurityPolicy association for AzureFrontDoor profile + [System.ComponentModel.TypeConverter(typeof(SecurityPolicyTypeConverter))] + public partial interface ISecurityPolicy + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicy.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicy.TypeConverter.cs new file mode 100644 index 000000000000..76d2077bc8b1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicy.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SecurityPolicyTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SecurityPolicy.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SecurityPolicy.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SecurityPolicy.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicy.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicy.cs new file mode 100644 index 000000000000..de056c33e765 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicy.cs @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// SecurityPolicy association for AzureFrontDoor profile + public partial class SecurityPolicy : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(); + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal.DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).DeploymentStatus = value; } + + /// Internal Acessors for ProfileName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal.ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesInternal)Property).ProfileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesInternal)Property).ProfileName = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState = value; } + + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; } + + /// object which contains security policy parameters + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesInternal)Property).Parameter = value ?? null /* model class */; } + + /// The name of the profile which holds the security policy. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesInternal)Property).ProfileName; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyProperties _property; + + /// The json object that contains properties required to create a security policy + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyProperties()); set => this._property = value; } + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.FormatTable] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// Read only system data + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public SecurityPolicy() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// SecurityPolicy association for AzureFrontDoor profile + public partial interface ISecurityPolicy : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"", + SerializedName = @"deploymentStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; } + /// object which contains security policy parameters + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"object which contains security policy parameters", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters Parameter { get; set; } + /// The name of the profile which holds the security policy. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the profile which holds the security policy.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + string ProfileName { get; } + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning status", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; } + + } + /// SecurityPolicy association for AzureFrontDoor profile + internal partial interface ISecurityPolicyInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get; set; } + /// object which contains security policy parameters + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters Parameter { get; set; } + /// The name of the profile which holds the security policy. + string ProfileName { get; set; } + /// The json object that contains properties required to create a security policy + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyProperties Property { get; set; } + /// Provisioning status + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicy.json.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicy.json.cs new file mode 100644 index 000000000000..336465a8dd3e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicy.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// SecurityPolicy association for AzureFrontDoor profile + public partial class SecurityPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new SecurityPolicy(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal SecurityPolicy(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyListResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyListResult.PowerShell.cs new file mode 100644 index 000000000000..d08a84cef98e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyListResult.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Result of the request to list security policies. It contains a list of security policy objects and a URL link to get the + /// next set of results. + /// + [System.ComponentModel.TypeConverter(typeof(SecurityPolicyListResultTypeConverter))] + public partial class SecurityPolicyListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SecurityPolicyListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SecurityPolicyListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SecurityPolicyListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SecurityPolicyListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the request to list security policies. It contains a list of security policy objects and a URL link to get the + /// next set of results. + [System.ComponentModel.TypeConverter(typeof(SecurityPolicyListResultTypeConverter))] + public partial interface ISecurityPolicyListResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyListResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyListResult.TypeConverter.cs new file mode 100644 index 000000000000..a887993b4419 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SecurityPolicyListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SecurityPolicyListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SecurityPolicyListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SecurityPolicyListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyListResult.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyListResult.cs new file mode 100644 index 000000000000..cc8fab967f07 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyListResult.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list security policies. It contains a list of security policy objects and a URL link to get the + /// next set of results. + /// + public partial class SecurityPolicyListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResultInternal + { + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of security policy objects if there is any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy[] _value; + + /// List of Security policies within a profile + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy[] Value { get => this._value; } + + /// Creates an new instance. + public SecurityPolicyListResult() + { + + } + } + /// Result of the request to list security policies. It contains a list of security policy objects and a URL link to get the + /// next set of results. + public partial interface ISecurityPolicyListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// URL to get the next set of security policy objects if there is any. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL to get the next set of security policy objects if there is any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// List of Security policies within a profile + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of Security policies within a profile", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy[] Value { get; } + + } + /// Result of the request to list security policies. It contains a list of security policy objects and a URL link to get the + /// next set of results. + internal partial interface ISecurityPolicyListResultInternal + + { + /// URL to get the next set of security policy objects if there is any. + string NextLink { get; set; } + /// List of Security policies within a profile + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyListResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyListResult.json.cs new file mode 100644 index 000000000000..3df4972f3b87 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyListResult.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Result of the request to list security policies. It contains a list of security policy objects and a URL link to get the + /// next set of results. + /// + public partial class SecurityPolicyListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new SecurityPolicyListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal SecurityPolicyListResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicy.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyProperties.PowerShell.cs new file mode 100644 index 000000000000..f30185543af5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyProperties.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The json object that contains properties required to create a security policy + [System.ComponentModel.TypeConverter(typeof(SecurityPolicyPropertiesTypeConverter))] + public partial class SecurityPolicyProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SecurityPolicyProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SecurityPolicyProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SecurityPolicyProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyPropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SecurityPolicyProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyPropertiesParametersTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState.CreateFrom); + } + if (content.Contains("DeploymentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus?) content.GetValueForProperty("DeploymentStatus",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)this).DeploymentStatus, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The json object that contains properties required to create a security policy + [System.ComponentModel.TypeConverter(typeof(SecurityPolicyPropertiesTypeConverter))] + public partial interface ISecurityPolicyProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyProperties.TypeConverter.cs new file mode 100644 index 000000000000..9605f0366f2e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SecurityPolicyPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SecurityPolicyProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SecurityPolicyProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SecurityPolicyProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyProperties.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyProperties.cs new file mode 100644 index 000000000000..9e8fe4f1863f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyProperties.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The json object that contains properties required to create a security policy + public partial class SecurityPolicyProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(); + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus; } + + /// Internal Acessors for DeploymentStatus + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.DeploymentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).DeploymentStatus = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState = value; } + + /// Internal Acessors for ProfileName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesInternal.ProfileName { get => this._profileName; set { {_profileName = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters _parameter; + + /// object which contains security policy parameters + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyPropertiesParameters()); set => this._parameter = value; } + + /// Backing field for property. + private string _profileName; + + /// The name of the profile which holds the security policy. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ProfileName { get => this._profileName; } + + /// Provisioning status + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal)__afdStateProperties).ProvisioningState; } + + /// Creates an new instance. + public SecurityPolicyProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__afdStateProperties), __afdStateProperties); + await eventListener.AssertObjectIsValid(nameof(__afdStateProperties), __afdStateProperties); + } + } + /// The json object that contains properties required to create a security policy + public partial interface ISecurityPolicyProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStateProperties + { + /// object which contains security policy parameters + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"object which contains security policy parameters", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters Parameter { get; set; } + /// The name of the profile which holds the security policy. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the profile which holds the security policy.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + string ProfileName { get; } + + } + /// The json object that contains properties required to create a security policy + internal partial interface ISecurityPolicyPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdStatePropertiesInternal + { + /// object which contains security policy parameters + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters Parameter { get; set; } + /// The name of the profile which holds the security policy. + string ProfileName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyProperties.json.cs new file mode 100644 index 000000000000..8898a39962f8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyProperties.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The json object that contains properties required to create a security policy + public partial class SecurityPolicyProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new SecurityPolicyProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal SecurityPolicyProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __afdStateProperties = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdStateProperties(json); + {_profileName = If( json?.PropertyT("profileName"), out var __jsonProfileName) ? (string)__jsonProfileName : (string)ProfileName;} + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyPropertiesParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __afdStateProperties?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._profileName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._profileName.ToString()) : null, "profileName" ,container.Add ); + } + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyPropertiesParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyPropertiesParameters.PowerShell.cs new file mode 100644 index 000000000000..466b025da57e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyPropertiesParameters.PowerShell.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The json object containing security policy parameters + [System.ComponentModel.TypeConverter(typeof(SecurityPolicyPropertiesParametersTypeConverter))] + public partial class SecurityPolicyPropertiesParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SecurityPolicyPropertiesParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SecurityPolicyPropertiesParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SecurityPolicyPropertiesParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParametersInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParametersInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SecurityPolicyPropertiesParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParametersInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParametersInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The json object containing security policy parameters + [System.ComponentModel.TypeConverter(typeof(SecurityPolicyPropertiesParametersTypeConverter))] + public partial interface ISecurityPolicyPropertiesParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyPropertiesParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyPropertiesParameters.TypeConverter.cs new file mode 100644 index 000000000000..f25a962770e2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyPropertiesParameters.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SecurityPolicyPropertiesParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SecurityPolicyPropertiesParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SecurityPolicyPropertiesParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SecurityPolicyPropertiesParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyPropertiesParameters.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyPropertiesParameters.cs new file mode 100644 index 000000000000..2d98724e4a9a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyPropertiesParameters.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The json object containing security policy parameters + public partial class SecurityPolicyPropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParametersInternal + { + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParametersInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _type= @"WebApplicationFirewall"; + + /// The type of the Security policy to create. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public SecurityPolicyPropertiesParameters() + { + + } + } + /// The json object containing security policy parameters + public partial interface ISecurityPolicyPropertiesParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The type of the Security policy to create. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"The type of the Security policy to create.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// The json object containing security policy parameters + internal partial interface ISecurityPolicyPropertiesParametersInternal + + { + /// The type of the Security policy to create. + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyPropertiesParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyPropertiesParameters.json.cs new file mode 100644 index 000000000000..f218e5f67ff5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyPropertiesParameters.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The json object containing security policy parameters + public partial class SecurityPolicyPropertiesParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("type") ) + { + case "WebApplicationFirewall": + { + return new SecurityPolicyWebApplicationFirewallParameters(json); + } + } + return new SecurityPolicyPropertiesParameters(json); + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal SecurityPolicyPropertiesParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..65bd283dd070 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateParameters.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The JSON object containing security policy update parameters. + [System.ComponentModel.TypeConverter(typeof(SecurityPolicyUpdateParametersTypeConverter))] + public partial class SecurityPolicyUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SecurityPolicyUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SecurityPolicyUpdateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SecurityPolicyUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParametersInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParametersInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyPropertiesParametersTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SecurityPolicyUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParametersInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParametersInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyPropertiesParametersTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The JSON object containing security policy update parameters. + [System.ComponentModel.TypeConverter(typeof(SecurityPolicyUpdateParametersTypeConverter))] + public partial interface ISecurityPolicyUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateParameters.TypeConverter.cs new file mode 100644 index 000000000000..9c82a9289821 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SecurityPolicyUpdateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SecurityPolicyUpdateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SecurityPolicyUpdateParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SecurityPolicyUpdateParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateParameters.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateParameters.cs new file mode 100644 index 000000000000..cc540a7c2774 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateParameters.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object containing security policy update parameters. + public partial class SecurityPolicyUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParametersInternal + { + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyUpdateProperties()); set { {_property = value;} } } + + /// object which contains security policy parameters + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdatePropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdatePropertiesInternal)Property).Parameter = value ?? null /* model class */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateProperties _property; + + /// The json object that contains properties required to update a security policy + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyUpdateProperties()); set => this._property = value; } + + /// Creates an new instance. + public SecurityPolicyUpdateParameters() + { + + } + } + /// The JSON object containing security policy update parameters. + public partial interface ISecurityPolicyUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// object which contains security policy parameters + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"object which contains security policy parameters", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters Parameter { get; set; } + + } + /// The JSON object containing security policy update parameters. + internal partial interface ISecurityPolicyUpdateParametersInternal + + { + /// object which contains security policy parameters + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters Parameter { get; set; } + /// The json object that contains properties required to update a security policy + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateParameters.json.cs new file mode 100644 index 000000000000..cf2645be3345 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateParameters.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The JSON object containing security policy update parameters. + public partial class SecurityPolicyUpdateParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new SecurityPolicyUpdateParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal SecurityPolicyUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyUpdateProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..756f9cd9af46 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateProperties.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The json object that contains properties required to update a security policy + [System.ComponentModel.TypeConverter(typeof(SecurityPolicyUpdatePropertiesTypeConverter))] + public partial class SecurityPolicyUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SecurityPolicyUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SecurityPolicyUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SecurityPolicyUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdatePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdatePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyPropertiesParametersTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SecurityPolicyUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdatePropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdatePropertiesInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyPropertiesParametersTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The json object that contains properties required to update a security policy + [System.ComponentModel.TypeConverter(typeof(SecurityPolicyUpdatePropertiesTypeConverter))] + public partial interface ISecurityPolicyUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateProperties.TypeConverter.cs new file mode 100644 index 000000000000..e5a2e8cc4c99 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SecurityPolicyUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SecurityPolicyUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SecurityPolicyUpdateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SecurityPolicyUpdateProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateProperties.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateProperties.cs new file mode 100644 index 000000000000..ad0033ba3e1d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateProperties.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The json object that contains properties required to update a security policy + public partial class SecurityPolicyUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdatePropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters _parameter; + + /// object which contains security policy parameters + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyPropertiesParameters()); set => this._parameter = value; } + + /// Creates an new instance. + public SecurityPolicyUpdateProperties() + { + + } + } + /// The json object that contains properties required to update a security policy + public partial interface ISecurityPolicyUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// object which contains security policy parameters + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"object which contains security policy parameters", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters Parameter { get; set; } + + } + /// The json object that contains properties required to update a security policy + internal partial interface ISecurityPolicyUpdatePropertiesInternal + + { + /// object which contains security policy parameters + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters Parameter { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateProperties.json.cs new file mode 100644 index 000000000000..bd7eaa964634 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyUpdateProperties.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The json object that contains properties required to update a security policy + public partial class SecurityPolicyUpdateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new SecurityPolicyUpdateProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal SecurityPolicyUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyPropertiesParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallAssociation.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallAssociation.PowerShell.cs new file mode 100644 index 000000000000..7aa89be9120e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallAssociation.PowerShell.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// settings for security policy patterns to match + [System.ComponentModel.TypeConverter(typeof(SecurityPolicyWebApplicationFirewallAssociationTypeConverter))] + public partial class SecurityPolicyWebApplicationFirewallAssociation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SecurityPolicyWebApplicationFirewallAssociation(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SecurityPolicyWebApplicationFirewallAssociation(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SecurityPolicyWebApplicationFirewallAssociation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociationInternal)this).Domain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[]) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociationInternal)this).Domain, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ActivatedResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("PatternsToMatch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociationInternal)this).PatternsToMatch = (string[]) content.GetValueForProperty("PatternsToMatch",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociationInternal)this).PatternsToMatch, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SecurityPolicyWebApplicationFirewallAssociation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociationInternal)this).Domain = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[]) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociationInternal)this).Domain, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ActivatedResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("PatternsToMatch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociationInternal)this).PatternsToMatch = (string[]) content.GetValueForProperty("PatternsToMatch",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociationInternal)this).PatternsToMatch, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// settings for security policy patterns to match + [System.ComponentModel.TypeConverter(typeof(SecurityPolicyWebApplicationFirewallAssociationTypeConverter))] + public partial interface ISecurityPolicyWebApplicationFirewallAssociation + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallAssociation.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallAssociation.TypeConverter.cs new file mode 100644 index 000000000000..b5b34f5bdb5d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallAssociation.TypeConverter.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SecurityPolicyWebApplicationFirewallAssociationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SecurityPolicyWebApplicationFirewallAssociation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SecurityPolicyWebApplicationFirewallAssociation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SecurityPolicyWebApplicationFirewallAssociation.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallAssociation.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallAssociation.cs new file mode 100644 index 000000000000..89b05dd83314 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallAssociation.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// settings for security policy patterns to match + public partial class SecurityPolicyWebApplicationFirewallAssociation : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] _domain; + + /// List of domains. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] Domain { get => this._domain; set => this._domain = value; } + + /// Backing field for property. + private string[] _patternsToMatch; + + /// List of paths + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] PatternsToMatch { get => this._patternsToMatch; set => this._patternsToMatch = value; } + + /// + /// Creates an new instance. + /// + public SecurityPolicyWebApplicationFirewallAssociation() + { + + } + } + /// settings for security policy patterns to match + public partial interface ISecurityPolicyWebApplicationFirewallAssociation : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// List of domains. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of domains.", + SerializedName = @"domains", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] Domain { get; set; } + /// List of paths + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of paths", + SerializedName = @"patternsToMatch", + PossibleTypes = new [] { typeof(string) })] + string[] PatternsToMatch { get; set; } + + } + /// settings for security policy patterns to match + internal partial interface ISecurityPolicyWebApplicationFirewallAssociationInternal + + { + /// List of domains. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] Domain { get; set; } + /// List of paths + string[] PatternsToMatch { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallAssociation.json.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallAssociation.json.cs new file mode 100644 index 000000000000..8f20618b3776 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallAssociation.json.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// settings for security policy patterns to match + public partial class SecurityPolicyWebApplicationFirewallAssociation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new SecurityPolicyWebApplicationFirewallAssociation(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal SecurityPolicyWebApplicationFirewallAssociation(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_domain = If( json?.PropertyT("domains"), out var __jsonDomains) ? If( __jsonDomains as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ActivatedResourceReference.FromJson(__u) )) ))() : null : Domain;} + {_patternsToMatch = If( json?.PropertyT("patternsToMatch"), out var __jsonPatternsToMatch) ? If( __jsonPatternsToMatch as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : PatternsToMatch;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._domain) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._domain ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("domains",__w); + } + if (null != this._patternsToMatch) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._patternsToMatch ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("patternsToMatch",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallParameters.PowerShell.cs new file mode 100644 index 000000000000..12b39545f8c0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallParameters.PowerShell.cs @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The json object containing security policy waf parameters + [System.ComponentModel.TypeConverter(typeof(SecurityPolicyWebApplicationFirewallParametersTypeConverter))] + public partial class SecurityPolicyWebApplicationFirewallParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SecurityPolicyWebApplicationFirewallParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SecurityPolicyWebApplicationFirewallParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SecurityPolicyWebApplicationFirewallParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("WafPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParametersInternal)this).WafPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("WafPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParametersInternal)this).WafPolicy, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("Association")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParametersInternal)this).Association = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation[]) content.GetValueForProperty("Association",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParametersInternal)this).Association, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallAssociationTypeConverter.ConvertFrom)); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParametersInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParametersInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("WafPolicyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParametersInternal)this).WafPolicyId = (string) content.GetValueForProperty("WafPolicyId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParametersInternal)this).WafPolicyId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SecurityPolicyWebApplicationFirewallParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("WafPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParametersInternal)this).WafPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("WafPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParametersInternal)this).WafPolicy, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("Association")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParametersInternal)this).Association = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation[]) content.GetValueForProperty("Association",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParametersInternal)this).Association, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallAssociationTypeConverter.ConvertFrom)); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParametersInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParametersInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("WafPolicyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParametersInternal)this).WafPolicyId = (string) content.GetValueForProperty("WafPolicyId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParametersInternal)this).WafPolicyId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The json object containing security policy waf parameters + [System.ComponentModel.TypeConverter(typeof(SecurityPolicyWebApplicationFirewallParametersTypeConverter))] + public partial interface ISecurityPolicyWebApplicationFirewallParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallParameters.TypeConverter.cs new file mode 100644 index 000000000000..31548711387e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallParameters.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SecurityPolicyWebApplicationFirewallParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SecurityPolicyWebApplicationFirewallParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SecurityPolicyWebApplicationFirewallParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SecurityPolicyWebApplicationFirewallParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallParameters.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallParameters.cs new file mode 100644 index 000000000000..369eddbc9933 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallParameters.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The json object containing security policy waf parameters + public partial class SecurityPolicyWebApplicationFirewallParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParametersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters __securityPolicyPropertiesParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyPropertiesParameters(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation[] _association; + + /// Waf associations + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation[] Association { get => this._association; set => this._association = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParametersInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParametersInternal)__securityPolicyPropertiesParameters).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParametersInternal)__securityPolicyPropertiesParameters).Type = value; } + + /// Internal Acessors for WafPolicy + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParametersInternal.WafPolicy { get => (this._wafPolicy = this._wafPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set { {_wafPolicy = value;} } } + + /// The type of the Security policy to create. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParametersInternal)__securityPolicyPropertiesParameters).Type; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference _wafPolicy; + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference WafPolicy { get => (this._wafPolicy = this._wafPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set => this._wafPolicy = value; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string WafPolicyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)WafPolicy).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)WafPolicy).Id = value ?? null; } + + /// + /// Creates an new instance. + /// + public SecurityPolicyWebApplicationFirewallParameters() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__securityPolicyPropertiesParameters), __securityPolicyPropertiesParameters); + await eventListener.AssertObjectIsValid(nameof(__securityPolicyPropertiesParameters), __securityPolicyPropertiesParameters); + } + } + /// The json object containing security policy waf parameters + public partial interface ISecurityPolicyWebApplicationFirewallParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters + { + /// Waf associations + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Waf associations", + SerializedName = @"associations", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation[] Association { get; set; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string WafPolicyId { get; set; } + + } + /// The json object containing security policy waf parameters + internal partial interface ISecurityPolicyWebApplicationFirewallParametersInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParametersInternal + { + /// Waf associations + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation[] Association { get; set; } + /// Resource ID. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference WafPolicy { get; set; } + /// Resource ID. + string WafPolicyId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallParameters.json.cs new file mode 100644 index 000000000000..f189dac8c70d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SecurityPolicyWebApplicationFirewallParameters.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The json object containing security policy waf parameters + public partial class SecurityPolicyWebApplicationFirewallParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new SecurityPolicyWebApplicationFirewallParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal SecurityPolicyWebApplicationFirewallParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __securityPolicyPropertiesParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyPropertiesParameters(json); + {_wafPolicy = If( json?.PropertyT("wafPolicy"), out var __jsonWafPolicy) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonWafPolicy) : WafPolicy;} + {_association = If( json?.PropertyT("associations"), out var __jsonAssociations) ? If( __jsonAssociations as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyWebApplicationFirewallAssociation.FromJson(__u) )) ))() : null : Association;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __securityPolicyPropertiesParameters?.ToJson(container, serializationMode); + AddIf( null != this._wafPolicy ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._wafPolicy.ToJson(null,serializationMode) : null, "wafPolicy" ,container.Add ); + if (null != this._association) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._association ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("associations",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ServerPortMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ServerPortMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..10488401522a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ServerPortMatchConditionParameters.PowerShell.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for ServerPort match conditions + [System.ComponentModel.TypeConverter(typeof(ServerPortMatchConditionParametersTypeConverter))] + public partial class ServerPortMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ServerPortMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ServerPortMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ServerPortMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ServerPortMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for ServerPort match conditions + [System.ComponentModel.TypeConverter(typeof(ServerPortMatchConditionParametersTypeConverter))] + public partial interface IServerPortMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ServerPortMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ServerPortMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..e4def9078cf7 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ServerPortMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ServerPortMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ServerPortMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ServerPortMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ServerPortMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ServerPortMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/ServerPortMatchConditionParameters.cs new file mode 100644 index 000000000000..6f27ee640b18 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ServerPortMatchConditionParameters.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for ServerPort match conditions + public partial class ServerPortMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal + { + + /// Backing field for property. + private string[] _matchValue; + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator _operator; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator Operator { get => this._operator; set => this._operator = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleServerPortConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public ServerPortMatchConditionParameters() + { + + } + } + /// Defines the parameters for ServerPort match conditions + public partial interface IServerPortMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator Operator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for ServerPort match conditions + internal partial interface IServerPortMatchConditionParametersInternal + + { + /// The match value for the condition of the delivery rule + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator Operator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ServerPortMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/ServerPortMatchConditionParameters.json.cs new file mode 100644 index 000000000000..e8952eb706b0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ServerPortMatchConditionParameters.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for ServerPort match conditions + public partial class ServerPortMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServerPortMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ServerPortMatchConditionParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ServerPortMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MatchValue;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._matchValue) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._matchValue ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("matchValues",__w); + } + if (null != this._transform) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._transform ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("transforms",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ServiceSpecification.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ServiceSpecification.PowerShell.cs new file mode 100644 index 000000000000..d192071b448c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ServiceSpecification.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// One property of operation, include log specifications. + [System.ComponentModel.TypeConverter(typeof(ServiceSpecificationTypeConverter))] + public partial class ServiceSpecification + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ServiceSpecification(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ServiceSpecification(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ServiceSpecification(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LogSpecification")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecificationInternal)this).LogSpecification = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification[]) content.GetValueForProperty("LogSpecification",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecificationInternal)this).LogSpecification, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LogSpecificationTypeConverter.ConvertFrom)); + } + if (content.Contains("MetricSpecification")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecificationInternal)this).MetricSpecification = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification[]) content.GetValueForProperty("MetricSpecification",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecificationInternal)this).MetricSpecification, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricSpecificationTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ServiceSpecification(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LogSpecification")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecificationInternal)this).LogSpecification = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification[]) content.GetValueForProperty("LogSpecification",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecificationInternal)this).LogSpecification, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LogSpecificationTypeConverter.ConvertFrom)); + } + if (content.Contains("MetricSpecification")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecificationInternal)this).MetricSpecification = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification[]) content.GetValueForProperty("MetricSpecification",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecificationInternal)this).MetricSpecification, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricSpecificationTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// One property of operation, include log specifications. + [System.ComponentModel.TypeConverter(typeof(ServiceSpecificationTypeConverter))] + public partial interface IServiceSpecification + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ServiceSpecification.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ServiceSpecification.TypeConverter.cs new file mode 100644 index 000000000000..966e139d27c8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ServiceSpecification.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ServiceSpecificationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ServiceSpecification.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ServiceSpecification.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ServiceSpecification.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ServiceSpecification.cs b/src/Cdn/generated/api/Models/Api20210601/ServiceSpecification.cs new file mode 100644 index 000000000000..69d7a445bb90 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ServiceSpecification.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// One property of operation, include log specifications. + public partial class ServiceSpecification : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecificationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification[] _logSpecification; + + /// Log specifications of operation. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification[] LogSpecification { get => this._logSpecification; set => this._logSpecification = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification[] _metricSpecification; + + /// Metric specifications of operation. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification[] MetricSpecification { get => this._metricSpecification; set => this._metricSpecification = value; } + + /// Creates an new instance. + public ServiceSpecification() + { + + } + } + /// One property of operation, include log specifications. + public partial interface IServiceSpecification : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Log specifications of operation. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Log specifications of operation.", + SerializedName = @"logSpecifications", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification[] LogSpecification { get; set; } + /// Metric specifications of operation. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Metric specifications of operation.", + SerializedName = @"metricSpecifications", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification[] MetricSpecification { get; set; } + + } + /// One property of operation, include log specifications. + internal partial interface IServiceSpecificationInternal + + { + /// Log specifications of operation. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification[] LogSpecification { get; set; } + /// Metric specifications of operation. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification[] MetricSpecification { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ServiceSpecification.json.cs b/src/Cdn/generated/api/Models/Api20210601/ServiceSpecification.json.cs new file mode 100644 index 000000000000..a7059134b9f2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ServiceSpecification.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// One property of operation, include log specifications. + public partial class ServiceSpecification + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IServiceSpecification FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ServiceSpecification(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ServiceSpecification(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_logSpecification = If( json?.PropertyT("logSpecifications"), out var __jsonLogSpecifications) ? If( __jsonLogSpecifications as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILogSpecification) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LogSpecification.FromJson(__u) )) ))() : null : LogSpecification;} + {_metricSpecification = If( json?.PropertyT("metricSpecifications"), out var __jsonMetricSpecifications) ? If( __jsonMetricSpecifications as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricSpecification) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.MetricSpecification.FromJson(__p) )) ))() : null : MetricSpecification;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._logSpecification) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._logSpecification ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("logSpecifications",__w); + } + if (null != this._metricSpecification) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._metricSpecification ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("metricSpecifications",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SharedPrivateLinkResourceProperties.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/SharedPrivateLinkResourceProperties.PowerShell.cs new file mode 100644 index 000000000000..0c9b4284c88a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SharedPrivateLinkResourceProperties.PowerShell.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Describes the properties of an existing Shared Private Link Resource to use when connecting to a private origin. + /// + [System.ComponentModel.TypeConverter(typeof(SharedPrivateLinkResourcePropertiesTypeConverter))] + public partial class SharedPrivateLinkResourceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SharedPrivateLinkResourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SharedPrivateLinkResourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SharedPrivateLinkResourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PrivateLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).PrivateLink = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("PrivateLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).PrivateLink, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("PrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).PrivateLinkLocation = (string) content.GetValueForProperty("PrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).PrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("GroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).GroupId, global::System.Convert.ToString); + } + if (content.Contains("RequestMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).RequestMessage = (string) content.GetValueForProperty("RequestMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).RequestMessage, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus.CreateFrom); + } + if (content.Contains("PrivateLinkId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).PrivateLinkId = (string) content.GetValueForProperty("PrivateLinkId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).PrivateLinkId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SharedPrivateLinkResourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PrivateLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).PrivateLink = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("PrivateLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).PrivateLink, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("PrivateLinkLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).PrivateLinkLocation = (string) content.GetValueForProperty("PrivateLinkLocation",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).PrivateLinkLocation, global::System.Convert.ToString); + } + if (content.Contains("GroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).GroupId, global::System.Convert.ToString); + } + if (content.Contains("RequestMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).RequestMessage = (string) content.GetValueForProperty("RequestMessage",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).RequestMessage, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus.CreateFrom); + } + if (content.Contains("PrivateLinkId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).PrivateLinkId = (string) content.GetValueForProperty("PrivateLinkId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal)this).PrivateLinkId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Describes the properties of an existing Shared Private Link Resource to use when connecting to a private origin. + [System.ComponentModel.TypeConverter(typeof(SharedPrivateLinkResourcePropertiesTypeConverter))] + public partial interface ISharedPrivateLinkResourceProperties + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SharedPrivateLinkResourceProperties.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/SharedPrivateLinkResourceProperties.TypeConverter.cs new file mode 100644 index 000000000000..0357ff3d54db --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SharedPrivateLinkResourceProperties.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SharedPrivateLinkResourcePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SharedPrivateLinkResourceProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SharedPrivateLinkResourceProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SharedPrivateLinkResourceProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SharedPrivateLinkResourceProperties.cs b/src/Cdn/generated/api/Models/Api20210601/SharedPrivateLinkResourceProperties.cs new file mode 100644 index 000000000000..1bcf350b1b85 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SharedPrivateLinkResourceProperties.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Describes the properties of an existing Shared Private Link Resource to use when connecting to a private origin. + /// + public partial class SharedPrivateLinkResourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal + { + + /// Backing field for property. + private string _groupId; + + /// + /// The group id from the provider of resource the shared private link resource is for. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string GroupId { get => this._groupId; set => this._groupId = value; } + + /// Internal Acessors for PrivateLink + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourcePropertiesInternal.PrivateLink { get => (this._privateLink = this._privateLink ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set { {_privateLink = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference _privateLink; + + /// The resource id of the resource the shared private link resource is for. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference PrivateLink { get => (this._privateLink = this._privateLink ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set => this._privateLink = value; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string PrivateLinkId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)PrivateLink).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)PrivateLink).Id = value ?? null; } + + /// Backing field for property. + private string _privateLinkLocation; + + /// The location of the shared private link resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string PrivateLinkLocation { get => this._privateLinkLocation; set => this._privateLinkLocation = value; } + + /// Backing field for property. + private string _requestMessage; + + /// + /// The request message for requesting approval of the shared private link resource. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string RequestMessage { get => this._requestMessage; set => this._requestMessage = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus? _status; + + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus? Status { get => this._status; set => this._status = value; } + + /// Creates an new instance. + public SharedPrivateLinkResourceProperties() + { + + } + } + /// Describes the properties of an existing Shared Private Link Resource to use when connecting to a private origin. + public partial interface ISharedPrivateLinkResourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// The group id from the provider of resource the shared private link resource is for. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The group id from the provider of resource the shared private link resource is for.", + SerializedName = @"groupId", + PossibleTypes = new [] { typeof(string) })] + string GroupId { get; set; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkId { get; set; } + /// The location of the shared private link resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location of the shared private link resource", + SerializedName = @"privateLinkLocation", + PossibleTypes = new [] { typeof(string) })] + string PrivateLinkLocation { get; set; } + /// + /// The request message for requesting approval of the shared private link resource. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The request message for requesting approval of the shared private link resource.", + SerializedName = @"requestMessage", + PossibleTypes = new [] { typeof(string) })] + string RequestMessage { get; set; } + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus? Status { get; set; } + + } + /// Describes the properties of an existing Shared Private Link Resource to use when connecting to a private origin. + internal partial interface ISharedPrivateLinkResourcePropertiesInternal + + { + /// + /// The group id from the provider of resource the shared private link resource is for. + /// + string GroupId { get; set; } + /// The resource id of the resource the shared private link resource is for. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference PrivateLink { get; set; } + /// Resource ID. + string PrivateLinkId { get; set; } + /// The location of the shared private link resource + string PrivateLinkLocation { get; set; } + /// + /// The request message for requesting approval of the shared private link resource. + /// + string RequestMessage { get; set; } + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus? Status { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SharedPrivateLinkResourceProperties.json.cs b/src/Cdn/generated/api/Models/Api20210601/SharedPrivateLinkResourceProperties.json.cs new file mode 100644 index 000000000000..a10e31998283 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SharedPrivateLinkResourceProperties.json.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Describes the properties of an existing Shared Private Link Resource to use when connecting to a private origin. + /// + public partial class SharedPrivateLinkResourceProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISharedPrivateLinkResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new SharedPrivateLinkResourceProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal SharedPrivateLinkResourceProperties(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_privateLink = If( json?.PropertyT("privateLink"), out var __jsonPrivateLink) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonPrivateLink) : PrivateLink;} + {_privateLinkLocation = If( json?.PropertyT("privateLinkLocation"), out var __jsonPrivateLinkLocation) ? (string)__jsonPrivateLinkLocation : (string)PrivateLinkLocation;} + {_groupId = If( json?.PropertyT("groupId"), out var __jsonGroupId) ? (string)__jsonGroupId : (string)GroupId;} + {_requestMessage = If( json?.PropertyT("requestMessage"), out var __jsonRequestMessage) ? (string)__jsonRequestMessage : (string)RequestMessage;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._privateLink ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._privateLink.ToJson(null,serializationMode) : null, "privateLink" ,container.Add ); + AddIf( null != (((object)this._privateLinkLocation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._privateLinkLocation.ToString()) : null, "privateLinkLocation" ,container.Add ); + AddIf( null != (((object)this._groupId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._groupId.ToString()) : null, "groupId" ,container.Add ); + AddIf( null != (((object)this._requestMessage)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._requestMessage.ToString()) : null, "requestMessage" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Sku.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/Sku.PowerShell.cs new file mode 100644 index 000000000000..593d626f23c3 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Sku.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Standard_Verizon = The SKU name for a Standard Verizon CDN profile. + /// Premium_Verizon = The SKU name for a Premium Verizon CDN profile. + /// Custom_Verizon = The SKU name for a Custom Verizon CDN profile. + /// Standard_Akamai = The SKU name for an Akamai CDN profile. + /// Standard_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using GB based billing model. + /// Standard_Microsoft = The SKU name for a Standard Microsoft CDN profile. + /// Standard_AzureFrontDoor = The SKU name for an Azure Front Door Standard profile. + /// Premium_AzureFrontDoor = The SKU name for an Azure Front Door Premium profile. + /// Standard_955BandWidth_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using 95-5 peak + /// bandwidth billing model. + /// Standard_AvgBandWidth_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using monthly + /// average peak bandwidth billing model. + /// StandardPlus_ChinaCdn = The SKU name for a China CDN profile for live-streaming using GB based billing model. + /// StandardPlus_955BandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using 95-5 peak bandwidth billing + /// model. + /// StandardPlus_AvgBandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using monthly average peak bandwidth + /// billing model. + /// + [System.ComponentModel.TypeConverter(typeof(SkuTypeConverter))] + public partial class Sku + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISku DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Sku(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISku DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Sku(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISku FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Sku(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISkuInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName?) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISkuInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Sku(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISkuInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName?) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISkuInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Standard_Verizon = The SKU name for a Standard Verizon CDN profile. + /// Premium_Verizon = The SKU name for a Premium Verizon CDN profile. + /// Custom_Verizon = The SKU name for a Custom Verizon CDN profile. + /// Standard_Akamai = The SKU name for an Akamai CDN profile. + /// Standard_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using GB based billing model. + /// Standard_Microsoft = The SKU name for a Standard Microsoft CDN profile. + /// Standard_AzureFrontDoor = The SKU name for an Azure Front Door Standard profile. + /// Premium_AzureFrontDoor = The SKU name for an Azure Front Door Premium profile. + /// Standard_955BandWidth_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using 95-5 peak + /// bandwidth billing model. + /// Standard_AvgBandWidth_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using monthly + /// average peak bandwidth billing model. + /// StandardPlus_ChinaCdn = The SKU name for a China CDN profile for live-streaming using GB based billing model. + /// StandardPlus_955BandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using 95-5 peak bandwidth billing + /// model. + /// StandardPlus_AvgBandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using monthly average peak bandwidth + /// billing model. + [System.ComponentModel.TypeConverter(typeof(SkuTypeConverter))] + public partial interface ISku + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Sku.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/Sku.TypeConverter.cs new file mode 100644 index 000000000000..e0600cefa095 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Sku.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SkuTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISku ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISku).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Sku.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Sku.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Sku.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Sku.cs b/src/Cdn/generated/api/Models/Api20210601/Sku.cs new file mode 100644 index 000000000000..e298d0a5b919 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Sku.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Standard_Verizon = The SKU name for a Standard Verizon CDN profile. + /// Premium_Verizon = The SKU name for a Premium Verizon CDN profile. + /// Custom_Verizon = The SKU name for a Custom Verizon CDN profile. + /// Standard_Akamai = The SKU name for an Akamai CDN profile. + /// Standard_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using GB based billing model. + /// Standard_Microsoft = The SKU name for a Standard Microsoft CDN profile. + /// Standard_AzureFrontDoor = The SKU name for an Azure Front Door Standard profile. + /// Premium_AzureFrontDoor = The SKU name for an Azure Front Door Premium profile. + /// Standard_955BandWidth_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using 95-5 peak + /// bandwidth billing model. + /// Standard_AvgBandWidth_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using monthly + /// average peak bandwidth billing model. + /// StandardPlus_ChinaCdn = The SKU name for a China CDN profile for live-streaming using GB based billing model. + /// StandardPlus_955BandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using 95-5 peak bandwidth billing + /// model. + /// StandardPlus_AvgBandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using monthly average peak bandwidth + /// billing model. + /// + public partial class Sku : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISku, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISkuInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName? _name; + + /// Name of the pricing tier. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName? Name { get => this._name; set => this._name = value; } + + /// Creates an new instance. + public Sku() + { + + } + } + /// Standard_Verizon = The SKU name for a Standard Verizon CDN profile. + /// Premium_Verizon = The SKU name for a Premium Verizon CDN profile. + /// Custom_Verizon = The SKU name for a Custom Verizon CDN profile. + /// Standard_Akamai = The SKU name for an Akamai CDN profile. + /// Standard_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using GB based billing model. + /// Standard_Microsoft = The SKU name for a Standard Microsoft CDN profile. + /// Standard_AzureFrontDoor = The SKU name for an Azure Front Door Standard profile. + /// Premium_AzureFrontDoor = The SKU name for an Azure Front Door Premium profile. + /// Standard_955BandWidth_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using 95-5 peak + /// bandwidth billing model. + /// Standard_AvgBandWidth_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using monthly + /// average peak bandwidth billing model. + /// StandardPlus_ChinaCdn = The SKU name for a China CDN profile for live-streaming using GB based billing model. + /// StandardPlus_955BandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using 95-5 peak bandwidth billing + /// model. + /// StandardPlus_AvgBandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using monthly average peak bandwidth + /// billing model. + public partial interface ISku : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Name of the pricing tier. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the pricing tier.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName? Name { get; set; } + + } + /// Standard_Verizon = The SKU name for a Standard Verizon CDN profile. + /// Premium_Verizon = The SKU name for a Premium Verizon CDN profile. + /// Custom_Verizon = The SKU name for a Custom Verizon CDN profile. + /// Standard_Akamai = The SKU name for an Akamai CDN profile. + /// Standard_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using GB based billing model. + /// Standard_Microsoft = The SKU name for a Standard Microsoft CDN profile. + /// Standard_AzureFrontDoor = The SKU name for an Azure Front Door Standard profile. + /// Premium_AzureFrontDoor = The SKU name for an Azure Front Door Premium profile. + /// Standard_955BandWidth_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using 95-5 peak + /// bandwidth billing model. + /// Standard_AvgBandWidth_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using monthly + /// average peak bandwidth billing model. + /// StandardPlus_ChinaCdn = The SKU name for a China CDN profile for live-streaming using GB based billing model. + /// StandardPlus_955BandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using 95-5 peak bandwidth billing + /// model. + /// StandardPlus_AvgBandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using monthly average peak bandwidth + /// billing model. + internal partial interface ISkuInternal + + { + /// Name of the pricing tier. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName? Name { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Sku.json.cs b/src/Cdn/generated/api/Models/Api20210601/Sku.json.cs new file mode 100644 index 000000000000..d80da5d19cdb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Sku.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Standard_Verizon = The SKU name for a Standard Verizon CDN profile. + /// Premium_Verizon = The SKU name for a Premium Verizon CDN profile. + /// Custom_Verizon = The SKU name for a Custom Verizon CDN profile. + /// Standard_Akamai = The SKU name for an Akamai CDN profile. + /// Standard_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using GB based billing model. + /// Standard_Microsoft = The SKU name for a Standard Microsoft CDN profile. + /// Standard_AzureFrontDoor = The SKU name for an Azure Front Door Standard profile. + /// Premium_AzureFrontDoor = The SKU name for an Azure Front Door Premium profile. + /// Standard_955BandWidth_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using 95-5 peak + /// bandwidth billing model. + /// Standard_AvgBandWidth_ChinaCdn = The SKU name for a China CDN profile for VOD, Web and download scenarios using monthly + /// average peak bandwidth billing model. + /// StandardPlus_ChinaCdn = The SKU name for a China CDN profile for live-streaming using GB based billing model. + /// StandardPlus_955BandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using 95-5 peak bandwidth billing + /// model. + /// StandardPlus_AvgBandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using monthly average peak bandwidth + /// billing model. + /// + public partial class Sku + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISku. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISku. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISku FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new Sku(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal Sku(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SocketAddrMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/SocketAddrMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..f67f1b8724d6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SocketAddrMatchConditionParameters.PowerShell.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for SocketAddress match conditions + [System.ComponentModel.TypeConverter(typeof(SocketAddrMatchConditionParametersTypeConverter))] + public partial class SocketAddrMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SocketAddrMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SocketAddrMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SocketAddrMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SocketAddrMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for SocketAddress match conditions + [System.ComponentModel.TypeConverter(typeof(SocketAddrMatchConditionParametersTypeConverter))] + public partial interface ISocketAddrMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SocketAddrMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/SocketAddrMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..fc6de41838b4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SocketAddrMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SocketAddrMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SocketAddrMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SocketAddrMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SocketAddrMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SocketAddrMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/SocketAddrMatchConditionParameters.cs new file mode 100644 index 000000000000..6208f1e93ed9 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SocketAddrMatchConditionParameters.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for SocketAddress match conditions + public partial class SocketAddrMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal + { + + /// Backing field for property. + private string[] _matchValue; + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator _operator; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator Operator { get => this._operator; set => this._operator = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleSocketAddrConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public SocketAddrMatchConditionParameters() + { + + } + } + /// Defines the parameters for SocketAddress match conditions + public partial interface ISocketAddrMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator Operator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for SocketAddress match conditions + internal partial interface ISocketAddrMatchConditionParametersInternal + + { + /// The match value for the condition of the delivery rule + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator Operator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SocketAddrMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/SocketAddrMatchConditionParameters.json.cs new file mode 100644 index 000000000000..04dbee6bfde1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SocketAddrMatchConditionParameters.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for SocketAddress match conditions + public partial class SocketAddrMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISocketAddrMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new SocketAddrMatchConditionParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal SocketAddrMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MatchValue;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._matchValue) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._matchValue ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("matchValues",__w); + } + if (null != this._transform) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._transform ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("transforms",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SslProtocolMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/SslProtocolMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..0e0ad816f6fd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SslProtocolMatchConditionParameters.PowerShell.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for SslProtocol match conditions + [System.ComponentModel.TypeConverter(typeof(SslProtocolMatchConditionParametersTypeConverter))] + public partial class SslProtocolMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SslProtocolMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SslProtocolMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SslProtocolMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).Operator = (string) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).Operator, global::System.Convert.ToString); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).MatchValue = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol.CreateFrom)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SslProtocolMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).Operator = (string) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).Operator, global::System.Convert.ToString); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).MatchValue = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol.CreateFrom)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Defines the parameters for SslProtocol match conditions + [System.ComponentModel.TypeConverter(typeof(SslProtocolMatchConditionParametersTypeConverter))] + public partial interface ISslProtocolMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SslProtocolMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/SslProtocolMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..2dacfe41e49a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SslProtocolMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SslProtocolMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SslProtocolMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SslProtocolMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SslProtocolMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SslProtocolMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/SslProtocolMatchConditionParameters.cs new file mode 100644 index 000000000000..d0ba7ca08c80 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SslProtocolMatchConditionParameters.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for SslProtocol match conditions + public partial class SslProtocolMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol[] _matchValue; + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for Operator + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal.Operator { get => this._operator; set { {_operator = value;} } } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private string _operator= @"Equal"; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Operator { get => this._operator; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleSslProtocolConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public SslProtocolMatchConditionParameters() + { + + } + } + /// Defines the parameters for SslProtocol match conditions + public partial interface ISslProtocolMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(string) })] + string Operator { get; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for SslProtocol match conditions + internal partial interface ISslProtocolMatchConditionParametersInternal + + { + /// The match value for the condition of the delivery rule + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + string Operator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SslProtocolMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/SslProtocolMatchConditionParameters.json.cs new file mode 100644 index 000000000000..470e9767ea85 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SslProtocolMatchConditionParameters.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for SslProtocol match conditions + public partial class SslProtocolMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISslProtocolMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new SslProtocolMatchConditionParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal SslProtocolMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol)""))) ))() : null : MatchValue;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._matchValue) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._matchValue ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("matchValues",__w); + } + if (null != this._transform) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._transform ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("transforms",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SsoUri.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/SsoUri.PowerShell.cs new file mode 100644 index 000000000000..2f4811f46177 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SsoUri.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The URI required to login to the supplemental portal from the Azure portal. + [System.ComponentModel.TypeConverter(typeof(SsoUriTypeConverter))] + public partial class SsoUri + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISsoUri DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SsoUri(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISsoUri DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SsoUri(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISsoUri FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SsoUri(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISsoUriInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISsoUriInternal)this).Value, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SsoUri(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISsoUriInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISsoUriInternal)this).Value, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The URI required to login to the supplemental portal from the Azure portal. + [System.ComponentModel.TypeConverter(typeof(SsoUriTypeConverter))] + public partial interface ISsoUri + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SsoUri.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/SsoUri.TypeConverter.cs new file mode 100644 index 000000000000..7f863d6beb91 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SsoUri.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SsoUriTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISsoUri ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISsoUri).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SsoUri.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SsoUri.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SsoUri.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SsoUri.cs b/src/Cdn/generated/api/Models/Api20210601/SsoUri.cs new file mode 100644 index 000000000000..b7bf334fae48 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SsoUri.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The URI required to login to the supplemental portal from the Azure portal. + public partial class SsoUri : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISsoUri, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISsoUriInternal + { + + /// Internal Acessors for Value + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISsoUriInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _value; + + /// The URI used to login to the supplemental portal. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Value { get => this._value; } + + /// Creates an new instance. + public SsoUri() + { + + } + } + /// The URI required to login to the supplemental portal from the Azure portal. + public partial interface ISsoUri : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The URI used to login to the supplemental portal. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The URI used to login to the supplemental portal.", + SerializedName = @"ssoUriValue", + PossibleTypes = new [] { typeof(string) })] + string Value { get; } + + } + /// The URI required to login to the supplemental portal from the Azure portal. + internal partial interface ISsoUriInternal + + { + /// The URI used to login to the supplemental portal. + string Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SsoUri.json.cs b/src/Cdn/generated/api/Models/Api20210601/SsoUri.json.cs new file mode 100644 index 000000000000..5abb7de554f7 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SsoUri.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The URI required to login to the supplemental portal from the Azure portal. + public partial class SsoUri + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISsoUri. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISsoUri. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISsoUri FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new SsoUri(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal SsoUri(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("ssoUriValue"), out var __jsonSsoUriValue) ? (string)__jsonSsoUriValue : (string)Value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._value.ToString()) : null, "ssoUriValue" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SupportedOptimizationTypesListResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/SupportedOptimizationTypesListResult.PowerShell.cs new file mode 100644 index 000000000000..edd41080ed7d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SupportedOptimizationTypesListResult.PowerShell.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The result of the GetSupportedOptimizationTypes API + [System.ComponentModel.TypeConverter(typeof(SupportedOptimizationTypesListResultTypeConverter))] + public partial class SupportedOptimizationTypesListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISupportedOptimizationTypesListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SupportedOptimizationTypesListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISupportedOptimizationTypesListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SupportedOptimizationTypesListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISupportedOptimizationTypesListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SupportedOptimizationTypesListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SupportedOptimizationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISupportedOptimizationTypesListResultInternal)this).SupportedOptimizationType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType[]) content.GetValueForProperty("SupportedOptimizationType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISupportedOptimizationTypesListResultInternal)this).SupportedOptimizationType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SupportedOptimizationTypesListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SupportedOptimizationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISupportedOptimizationTypesListResultInternal)this).SupportedOptimizationType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType[]) content.GetValueForProperty("SupportedOptimizationType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISupportedOptimizationTypesListResultInternal)this).SupportedOptimizationType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The result of the GetSupportedOptimizationTypes API + [System.ComponentModel.TypeConverter(typeof(SupportedOptimizationTypesListResultTypeConverter))] + public partial interface ISupportedOptimizationTypesListResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SupportedOptimizationTypesListResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/SupportedOptimizationTypesListResult.TypeConverter.cs new file mode 100644 index 000000000000..9c921620670b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SupportedOptimizationTypesListResult.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SupportedOptimizationTypesListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISupportedOptimizationTypesListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISupportedOptimizationTypesListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SupportedOptimizationTypesListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SupportedOptimizationTypesListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SupportedOptimizationTypesListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SupportedOptimizationTypesListResult.cs b/src/Cdn/generated/api/Models/Api20210601/SupportedOptimizationTypesListResult.cs new file mode 100644 index 000000000000..e07aa2463129 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SupportedOptimizationTypesListResult.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The result of the GetSupportedOptimizationTypes API + public partial class SupportedOptimizationTypesListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISupportedOptimizationTypesListResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISupportedOptimizationTypesListResultInternal + { + + /// Internal Acessors for SupportedOptimizationType + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType[] Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISupportedOptimizationTypesListResultInternal.SupportedOptimizationType { get => this._supportedOptimizationType; set { {_supportedOptimizationType = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType[] _supportedOptimizationType; + + /// Supported optimization types for a profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType[] SupportedOptimizationType { get => this._supportedOptimizationType; } + + /// Creates an new instance. + public SupportedOptimizationTypesListResult() + { + + } + } + /// The result of the GetSupportedOptimizationTypes API + public partial interface ISupportedOptimizationTypesListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Supported optimization types for a profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Supported optimization types for a profile.", + SerializedName = @"supportedOptimizationTypes", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType[] SupportedOptimizationType { get; } + + } + /// The result of the GetSupportedOptimizationTypes API + internal partial interface ISupportedOptimizationTypesListResultInternal + + { + /// Supported optimization types for a profile. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType[] SupportedOptimizationType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SupportedOptimizationTypesListResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/SupportedOptimizationTypesListResult.json.cs new file mode 100644 index 000000000000..cc982311ee47 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SupportedOptimizationTypesListResult.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The result of the GetSupportedOptimizationTypes API + public partial class SupportedOptimizationTypesListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISupportedOptimizationTypesListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISupportedOptimizationTypesListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISupportedOptimizationTypesListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new SupportedOptimizationTypesListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal SupportedOptimizationTypesListResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_supportedOptimizationType = If( json?.PropertyT("supportedOptimizationTypes"), out var __jsonSupportedOptimizationTypes) ? If( __jsonSupportedOptimizationTypes as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType)""))) ))() : null : SupportedOptimizationType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._supportedOptimizationType) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._supportedOptimizationType ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("supportedOptimizationTypes",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SystemData.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/SystemData.PowerShell.cs new file mode 100644 index 000000000000..f9f4fba33471 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SystemData.PowerShell.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Read only system data + [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] + public partial class SystemData + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SystemData(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SystemData(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SystemData(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SystemData(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Read only system data + [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] + public partial interface ISystemData + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SystemData.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/SystemData.TypeConverter.cs new file mode 100644 index 000000000000..99282bb89562 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SystemData.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemDataTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemData.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemData.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemData.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SystemData.cs b/src/Cdn/generated/api/Models/Api20210601/SystemData.cs new file mode 100644 index 000000000000..0c061419d18a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SystemData.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Read only system data + public partial class SystemData : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemDataInternal + { + + /// Backing field for property. + private global::System.DateTime? _createdAt; + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public global::System.DateTime? CreatedAt { get => this._createdAt; set => this._createdAt = value; } + + /// Backing field for property. + private string _createdBy; + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string CreatedBy { get => this._createdBy; set => this._createdBy = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? _createdByType; + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? CreatedByType { get => this._createdByType; set => this._createdByType = value; } + + /// Backing field for property. + private global::System.DateTime? _lastModifiedAt; + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public global::System.DateTime? LastModifiedAt { get => this._lastModifiedAt; set => this._lastModifiedAt = value; } + + /// Backing field for property. + private string _lastModifiedBy; + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? _lastModifiedByType; + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } + + /// Creates an new instance. + public SystemData() + { + + } + } + /// Read only system data + public partial interface ISystemData : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC)", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? CreatedAt { get; set; } + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An identifier for the identity that created the resource", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string CreatedBy { get; set; } + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModifiedAt { get; set; } + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An identifier for the identity that last modified the resource", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? LastModifiedByType { get; set; } + + } + /// Read only system data + internal partial interface ISystemDataInternal + + { + /// The timestamp of resource creation (UTC) + global::System.DateTime? CreatedAt { get; set; } + /// An identifier for the identity that created the resource + string CreatedBy { get; set; } + /// The type of identity that created the resource + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? LastModifiedAt { get; set; } + /// An identifier for the identity that last modified the resource + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? LastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/SystemData.json.cs b/src/Cdn/generated/api/Models/Api20210601/SystemData.json.cs new file mode 100644 index 000000000000..5b70ed067c31 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/SystemData.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Read only system data + public partial class SystemData + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new SystemData(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy;} + {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} + {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy;} + {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType;} + {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : LastModifiedAt : LastModifiedAt;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy" ,container.Add ); + AddIf( null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType" ,container.Add ); + AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); + AddIf( null != (((object)this._lastModifiedBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy" ,container.Add ); + AddIf( null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType" ,container.Add ); + AddIf( null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._lastModifiedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModifiedAt" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/TrackedResource.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/TrackedResource.PowerShell.cs new file mode 100644 index 000000000000..784ead8cbffa --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/TrackedResource.PowerShell.cs @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The resource model definition for a ARM tracked top level resource. + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] + public partial class TrackedResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrackedResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrackedResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrackedResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TrackedResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// The resource model definition for a ARM tracked top level resource. + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] + public partial interface ITrackedResource + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/TrackedResource.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/TrackedResource.TypeConverter.cs new file mode 100644 index 000000000000..b8fa7f28ca12 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/TrackedResource.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrackedResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrackedResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrackedResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrackedResource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/TrackedResource.cs b/src/Cdn/generated/api/Models/Api20210601/TrackedResource.cs new file mode 100644 index 000000000000..f6c8aa521ba3 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/TrackedResource.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The resource model definition for a ARM tracked top level resource. + public partial class TrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResource, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(); + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; } + + /// Backing field for property. + private string _location; + + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type = value; } + + /// Resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Name; } + + /// Read only system data + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// An identifier for the identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotFormat] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResourceTags()); set => this._tag = value; } + + /// Resource type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public TrackedResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for a ARM tracked top level resource. + public partial interface ITrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResource + { + /// Resource location. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Resource location.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags Tag { get; set; } + + } + /// The resource model definition for a ARM tracked top level resource. + internal partial interface ITrackedResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceInternal + { + /// Resource location. + string Location { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/TrackedResource.json.cs b/src/Cdn/generated/api/Models/Api20210601/TrackedResource.json.cs new file mode 100644 index 000000000000..466c46124203 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/TrackedResource.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The resource model definition for a ARM tracked top level resource. + public partial class TrackedResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new TrackedResource(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Resource(json); + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResourceTags.FromJson(__jsonTags) : Tag;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.PowerShell.cs new file mode 100644 index 000000000000..523ea2d0f951 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.PowerShell.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] + public partial class TrackedResourceTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrackedResourceTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrackedResourceTags(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrackedResourceTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TrackedResourceTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + } + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] + public partial interface ITrackedResourceTags + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.TypeConverter.cs new file mode 100644 index 000000000000..d8bfbb4136d9 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrackedResourceTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrackedResourceTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrackedResourceTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrackedResourceTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.cs b/src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.cs new file mode 100644 index 000000000000..3ee7617beebb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Resource tags. + public partial class TrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTagsInternal + { + + /// Creates an new instance. + public TrackedResourceTags() + { + + } + } + /// Resource tags. + public partial interface ITrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface ITrackedResourceTagsInternal + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.dictionary.cs b/src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.dictionary.cs new file mode 100644 index 000000000000..2b2159dba364 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class TrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.TrackedResourceTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.json.cs b/src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.json.cs new file mode 100644 index 000000000000..cec1abe61989 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/TrackedResourceTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Resource tags. + public partial class TrackedResourceTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new TrackedResourceTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + /// + internal TrackedResourceTags(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlFileExtensionMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/UrlFileExtensionMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..1542e632882f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlFileExtensionMatchConditionParameters.PowerShell.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for UrlFileExtension match conditions + [System.ComponentModel.TypeConverter(typeof(UrlFileExtensionMatchConditionParametersTypeConverter))] + public partial class UrlFileExtensionMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UrlFileExtensionMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UrlFileExtensionMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UrlFileExtensionMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UrlFileExtensionMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + } + /// Defines the parameters for UrlFileExtension match conditions + [System.ComponentModel.TypeConverter(typeof(UrlFileExtensionMatchConditionParametersTypeConverter))] + public partial interface IUrlFileExtensionMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlFileExtensionMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/UrlFileExtensionMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..5342410cb320 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlFileExtensionMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UrlFileExtensionMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UrlFileExtensionMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UrlFileExtensionMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UrlFileExtensionMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlFileExtensionMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/UrlFileExtensionMatchConditionParameters.cs new file mode 100644 index 000000000000..e274f8d5ebc8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlFileExtensionMatchConditionParameters.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for UrlFileExtension match conditions + public partial class UrlFileExtensionMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal + { + + /// Backing field for property. + private string[] _matchValue; + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator _operator; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator Operator { get => this._operator; set => this._operator = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleUrlFileExtensionMatchConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// + /// Creates an new instance. + /// + public UrlFileExtensionMatchConditionParameters() + { + + } + } + /// Defines the parameters for UrlFileExtension match conditions + public partial interface IUrlFileExtensionMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator Operator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for UrlFileExtension match conditions + internal partial interface IUrlFileExtensionMatchConditionParametersInternal + + { + /// The match value for the condition of the delivery rule + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator Operator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlFileExtensionMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/UrlFileExtensionMatchConditionParameters.json.cs new file mode 100644 index 000000000000..1feb37a82455 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlFileExtensionMatchConditionParameters.json.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for UrlFileExtension match conditions + public partial class UrlFileExtensionMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileExtensionMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new UrlFileExtensionMatchConditionParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._matchValue) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._matchValue ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("matchValues",__w); + } + if (null != this._transform) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._transform ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("transforms",__r); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal UrlFileExtensionMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MatchValue;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlFileNameMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/UrlFileNameMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..1993b1337885 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlFileNameMatchConditionParameters.PowerShell.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for UrlFilename match conditions + [System.ComponentModel.TypeConverter(typeof(UrlFileNameMatchConditionParametersTypeConverter))] + public partial class UrlFileNameMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UrlFileNameMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UrlFileNameMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UrlFileNameMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UrlFileNameMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + } + /// Defines the parameters for UrlFilename match conditions + [System.ComponentModel.TypeConverter(typeof(UrlFileNameMatchConditionParametersTypeConverter))] + public partial interface IUrlFileNameMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlFileNameMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/UrlFileNameMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..f75cb989d1eb --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlFileNameMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UrlFileNameMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UrlFileNameMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UrlFileNameMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UrlFileNameMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlFileNameMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/UrlFileNameMatchConditionParameters.cs new file mode 100644 index 000000000000..3b48e0fd365b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlFileNameMatchConditionParameters.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for UrlFilename match conditions + public partial class UrlFileNameMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal + { + + /// Backing field for property. + private string[] _matchValue; + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator _operator; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator Operator { get => this._operator; set => this._operator = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleUrlFilenameConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public UrlFileNameMatchConditionParameters() + { + + } + } + /// Defines the parameters for UrlFilename match conditions + public partial interface IUrlFileNameMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator Operator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for UrlFilename match conditions + internal partial interface IUrlFileNameMatchConditionParametersInternal + + { + /// The match value for the condition of the delivery rule + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator Operator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlFileNameMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/UrlFileNameMatchConditionParameters.json.cs new file mode 100644 index 000000000000..0f1a4c164ce1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlFileNameMatchConditionParameters.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for UrlFilename match conditions + public partial class UrlFileNameMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlFileNameMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new UrlFileNameMatchConditionParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._matchValue) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._matchValue ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("matchValues",__w); + } + if (null != this._transform) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._transform ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("transforms",__r); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal UrlFileNameMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MatchValue;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlPathMatchConditionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/UrlPathMatchConditionParameters.PowerShell.cs new file mode 100644 index 000000000000..9d7cd1b88443 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlPathMatchConditionParameters.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for UrlPath match conditions + [System.ComponentModel.TypeConverter(typeof(UrlPathMatchConditionParametersTypeConverter))] + public partial class UrlPathMatchConditionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UrlPathMatchConditionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UrlPathMatchConditionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UrlPathMatchConditionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UrlPathMatchConditionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Operator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).Operator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator) content.GetValueForProperty("Operator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).Operator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator.CreateFrom); + } + if (content.Contains("NegateCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).NegateCondition = (bool?) content.GetValueForProperty("NegateCondition",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).NegateCondition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MatchValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).MatchValue = (string[]) content.GetValueForProperty("MatchValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).MatchValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Transform")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).Transform = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[]) content.GetValueForProperty("Transform",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal)this).Transform, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform.CreateFrom)); + } + AfterDeserializePSObject(content); + } + } + /// Defines the parameters for UrlPath match conditions + [System.ComponentModel.TypeConverter(typeof(UrlPathMatchConditionParametersTypeConverter))] + public partial interface IUrlPathMatchConditionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlPathMatchConditionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/UrlPathMatchConditionParameters.TypeConverter.cs new file mode 100644 index 000000000000..3d1016ce3b77 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlPathMatchConditionParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UrlPathMatchConditionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UrlPathMatchConditionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UrlPathMatchConditionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UrlPathMatchConditionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlPathMatchConditionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/UrlPathMatchConditionParameters.cs new file mode 100644 index 000000000000..796790e01260 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlPathMatchConditionParameters.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for UrlPath match conditions + public partial class UrlPathMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal + { + + /// Backing field for property. + private string[] _matchValue; + + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] MatchValue { get => this._matchValue; set => this._matchValue = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _negateCondition; + + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? NegateCondition { get => this._negateCondition; set => this._negateCondition = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator _operator; + + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator Operator { get => this._operator; set => this._operator = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] _transform; + + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get => this._transform; set => this._transform = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleUrlPathMatchConditionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public UrlPathMatchConditionParameters() + { + + } + } + /// Defines the parameters for UrlPath match conditions + public partial interface IUrlPathMatchConditionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The match value for the condition of the delivery rule + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The match value for the condition of the delivery rule", + SerializedName = @"matchValues", + PossibleTypes = new [] { typeof(string) })] + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes if this is negate condition or not", + SerializedName = @"negateCondition", + PossibleTypes = new [] { typeof(bool) })] + bool? NegateCondition { get; set; } + /// Describes operator to be matched + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Describes operator to be matched", + SerializedName = @"operator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator Operator { get; set; } + /// List of transforms + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of transforms", + SerializedName = @"transforms", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for UrlPath match conditions + internal partial interface IUrlPathMatchConditionParametersInternal + + { + /// The match value for the condition of the delivery rule + string[] MatchValue { get; set; } + /// Describes if this is negate condition or not + bool? NegateCondition { get; set; } + /// Describes operator to be matched + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator Operator { get; set; } + /// List of transforms + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] Transform { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlPathMatchConditionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/UrlPathMatchConditionParameters.json.cs new file mode 100644 index 000000000000..2405231f0e11 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlPathMatchConditionParameters.json.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for UrlPath match conditions + public partial class UrlPathMatchConditionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlPathMatchConditionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new UrlPathMatchConditionParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._operator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._operator.ToString()) : null, "operator" ,container.Add ); + AddIf( null != this._negateCondition ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._negateCondition) : null, "negateCondition" ,container.Add ); + if (null != this._matchValue) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._matchValue ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("matchValues",__w); + } + if (null != this._transform) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._transform ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("transforms",__r); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal UrlPathMatchConditionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_operator = If( json?.PropertyT("operator"), out var __jsonOperator) ? (string)__jsonOperator : (string)Operator;} + {_negateCondition = If( json?.PropertyT("negateCondition"), out var __jsonNegateCondition) ? (bool?)__jsonNegateCondition : NegateCondition;} + {_matchValue = If( json?.PropertyT("matchValues"), out var __jsonMatchValues) ? If( __jsonMatchValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : MatchValue;} + {_transform = If( json?.PropertyT("transforms"), out var __jsonTransforms) ? If( __jsonTransforms as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform) (__p is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __o ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)(__o.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform)""))) ))() : null : Transform;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlRedirectAction.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/UrlRedirectAction.PowerShell.cs new file mode 100644 index 000000000000..7b41e6c0e98e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlRedirectAction.PowerShell.cs @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the url redirect action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(UrlRedirectActionTypeConverter))] + public partial class UrlRedirectAction + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UrlRedirectAction(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UrlRedirectAction(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UrlRedirectAction(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectActionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + if (content.Contains("ParameterRedirectType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterRedirectType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType) content.GetValueForProperty("ParameterRedirectType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterRedirectType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType.CreateFrom); + } + if (content.Contains("ParameterDestinationProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterDestinationProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol?) content.GetValueForProperty("ParameterDestinationProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterDestinationProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterCustomPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterCustomPath = (string) content.GetValueForProperty("ParameterCustomPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterCustomPath, global::System.Convert.ToString); + } + if (content.Contains("ParameterCustomHostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterCustomHostname = (string) content.GetValueForProperty("ParameterCustomHostname",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterCustomHostname, global::System.Convert.ToString); + } + if (content.Contains("ParameterCustomQueryString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterCustomQueryString = (string) content.GetValueForProperty("ParameterCustomQueryString",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterCustomQueryString, global::System.Convert.ToString); + } + if (content.Contains("ParameterCustomFragment")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterCustomFragment = (string) content.GetValueForProperty("ParameterCustomFragment",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterCustomFragment, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UrlRedirectAction(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectActionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + if (content.Contains("ParameterRedirectType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterRedirectType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType) content.GetValueForProperty("ParameterRedirectType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterRedirectType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType.CreateFrom); + } + if (content.Contains("ParameterDestinationProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterDestinationProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol?) content.GetValueForProperty("ParameterDestinationProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterDestinationProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterCustomPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterCustomPath = (string) content.GetValueForProperty("ParameterCustomPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterCustomPath, global::System.Convert.ToString); + } + if (content.Contains("ParameterCustomHostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterCustomHostname = (string) content.GetValueForProperty("ParameterCustomHostname",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterCustomHostname, global::System.Convert.ToString); + } + if (content.Contains("ParameterCustomQueryString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterCustomQueryString = (string) content.GetValueForProperty("ParameterCustomQueryString",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterCustomQueryString, global::System.Convert.ToString); + } + if (content.Contains("ParameterCustomFragment")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterCustomFragment = (string) content.GetValueForProperty("ParameterCustomFragment",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal)this).ParameterCustomFragment, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// Defines the url redirect action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(UrlRedirectActionTypeConverter))] + public partial interface IUrlRedirectAction + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlRedirectAction.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/UrlRedirectAction.TypeConverter.cs new file mode 100644 index 000000000000..dd9efc283c1e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlRedirectAction.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UrlRedirectActionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectAction ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectAction).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UrlRedirectAction.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UrlRedirectAction.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UrlRedirectAction.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlRedirectAction.cs b/src/Cdn/generated/api/Models/Api20210601/UrlRedirectAction.cs new file mode 100644 index 000000000000..e65e65efef3d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlRedirectAction.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the url redirect action for the delivery rule. + public partial class UrlRedirectAction : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectAction, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectActionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)Parameter).TypeName = value; } + + /// The name of the action for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)__deliveryRuleAction1).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)__deliveryRuleAction1).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParameters _parameter; + + /// Defines the parameters for the action. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectActionParameters()); set => this._parameter = value; } + + /// + /// Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterCustomFragment { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)Parameter).CustomFragment; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)Parameter).CustomFragment = value ?? null; } + + /// Host to redirect. Leave empty to use the incoming host as the destination host. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterCustomHostname { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)Parameter).CustomHostname; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)Parameter).CustomHostname = value ?? null; } + + /// + /// The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination + /// path. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterCustomPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)Parameter).CustomPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)Parameter).CustomPath = value ?? null; } + + /// + /// The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; + /// leave empty to preserve the incoming query string. Query string must be in = format. ? and & will be added + /// automatically so do not include them. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterCustomQueryString { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)Parameter).CustomQueryString; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)Parameter).CustomQueryString = value ?? null; } + + /// Protocol to use for the redirect. The default value is MatchRequest + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol? ParameterDestinationProtocol { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)Parameter).DestinationProtocol; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)Parameter).DestinationProtocol = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol)""); } + + /// The redirect type the rule will use when redirecting traffic. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType ParameterRedirectType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)Parameter).RedirectType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)Parameter).RedirectType = value ; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public UrlRedirectAction() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleAction1), __deliveryRuleAction1); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleAction1), __deliveryRuleAction1); + } + } + /// Defines the url redirect action for the delivery rule. + public partial interface IUrlRedirectAction : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 + { + /// + /// Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #.", + SerializedName = @"customFragment", + PossibleTypes = new [] { typeof(string) })] + string ParameterCustomFragment { get; set; } + /// Host to redirect. Leave empty to use the incoming host as the destination host. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Host to redirect. Leave empty to use the incoming host as the destination host.", + SerializedName = @"customHostname", + PossibleTypes = new [] { typeof(string) })] + string ParameterCustomHostname { get; set; } + /// + /// The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination + /// path. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path.", + SerializedName = @"customPath", + PossibleTypes = new [] { typeof(string) })] + string ParameterCustomPath { get; set; } + /// + /// The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; + /// leave empty to preserve the incoming query string. Query string must be in = format. ? and & will be added + /// automatically so do not include them. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query string. Query string must be in = format. ? and & will be added automatically so do not include them.", + SerializedName = @"customQueryString", + PossibleTypes = new [] { typeof(string) })] + string ParameterCustomQueryString { get; set; } + /// Protocol to use for the redirect. The default value is MatchRequest + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protocol to use for the redirect. The default value is MatchRequest", + SerializedName = @"destinationProtocol", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol? ParameterDestinationProtocol { get; set; } + /// The redirect type the rule will use when redirecting traffic. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The redirect type the rule will use when redirecting traffic.", + SerializedName = @"redirectType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType ParameterRedirectType { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the url redirect action for the delivery rule. + internal partial interface IUrlRedirectActionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal + { + /// Defines the parameters for the action. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParameters Parameter { get; set; } + /// + /// Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #. + /// + string ParameterCustomFragment { get; set; } + /// Host to redirect. Leave empty to use the incoming host as the destination host. + string ParameterCustomHostname { get; set; } + /// + /// The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination + /// path. + /// + string ParameterCustomPath { get; set; } + /// + /// The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; + /// leave empty to preserve the incoming query string. Query string must be in = format. ? and & will be added + /// automatically so do not include them. + /// + string ParameterCustomQueryString { get; set; } + /// Protocol to use for the redirect. The default value is MatchRequest + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol? ParameterDestinationProtocol { get; set; } + /// The redirect type the rule will use when redirecting traffic. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType ParameterRedirectType { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlRedirectAction.json.cs b/src/Cdn/generated/api/Models/Api20210601/UrlRedirectAction.json.cs new file mode 100644 index 000000000000..f83dcf629203 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlRedirectAction.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the url redirect action for the delivery rule. + public partial class UrlRedirectAction + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectAction. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectAction. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new UrlRedirectAction(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleAction1?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal UrlRedirectAction(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRedirectActionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlRedirectActionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/UrlRedirectActionParameters.PowerShell.cs new file mode 100644 index 000000000000..364464c8d854 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlRedirectActionParameters.PowerShell.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for the url redirect action. + [System.ComponentModel.TypeConverter(typeof(UrlRedirectActionParametersTypeConverter))] + public partial class UrlRedirectActionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UrlRedirectActionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UrlRedirectActionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UrlRedirectActionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("RedirectType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).RedirectType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType) content.GetValueForProperty("RedirectType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).RedirectType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType.CreateFrom); + } + if (content.Contains("DestinationProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).DestinationProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol?) content.GetValueForProperty("DestinationProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).DestinationProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol.CreateFrom); + } + if (content.Contains("CustomPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).CustomPath = (string) content.GetValueForProperty("CustomPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).CustomPath, global::System.Convert.ToString); + } + if (content.Contains("CustomHostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).CustomHostname = (string) content.GetValueForProperty("CustomHostname",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).CustomHostname, global::System.Convert.ToString); + } + if (content.Contains("CustomQueryString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).CustomQueryString = (string) content.GetValueForProperty("CustomQueryString",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).CustomQueryString, global::System.Convert.ToString); + } + if (content.Contains("CustomFragment")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).CustomFragment = (string) content.GetValueForProperty("CustomFragment",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).CustomFragment, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UrlRedirectActionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("RedirectType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).RedirectType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType) content.GetValueForProperty("RedirectType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).RedirectType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType.CreateFrom); + } + if (content.Contains("DestinationProtocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).DestinationProtocol = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol?) content.GetValueForProperty("DestinationProtocol",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).DestinationProtocol, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol.CreateFrom); + } + if (content.Contains("CustomPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).CustomPath = (string) content.GetValueForProperty("CustomPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).CustomPath, global::System.Convert.ToString); + } + if (content.Contains("CustomHostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).CustomHostname = (string) content.GetValueForProperty("CustomHostname",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).CustomHostname, global::System.Convert.ToString); + } + if (content.Contains("CustomQueryString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).CustomQueryString = (string) content.GetValueForProperty("CustomQueryString",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).CustomQueryString, global::System.Convert.ToString); + } + if (content.Contains("CustomFragment")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).CustomFragment = (string) content.GetValueForProperty("CustomFragment",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal)this).CustomFragment, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// Defines the parameters for the url redirect action. + [System.ComponentModel.TypeConverter(typeof(UrlRedirectActionParametersTypeConverter))] + public partial interface IUrlRedirectActionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlRedirectActionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/UrlRedirectActionParameters.TypeConverter.cs new file mode 100644 index 000000000000..c3353ad86bec --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlRedirectActionParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UrlRedirectActionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UrlRedirectActionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UrlRedirectActionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UrlRedirectActionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlRedirectActionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/UrlRedirectActionParameters.cs new file mode 100644 index 000000000000..b9475a377f8b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlRedirectActionParameters.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for the url redirect action. + public partial class UrlRedirectActionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal + { + + /// Backing field for property. + private string _customFragment; + + /// + /// Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string CustomFragment { get => this._customFragment; set => this._customFragment = value; } + + /// Backing field for property. + private string _customHostname; + + /// Host to redirect. Leave empty to use the incoming host as the destination host. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string CustomHostname { get => this._customHostname; set => this._customHostname = value; } + + /// Backing field for property. + private string _customPath; + + /// + /// The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination + /// path. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string CustomPath { get => this._customPath; set => this._customPath = value; } + + /// Backing field for property. + private string _customQueryString; + + /// + /// The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; + /// leave empty to preserve the incoming query string. Query string must be in = format. ? and & will be added + /// automatically so do not include them. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string CustomQueryString { get => this._customQueryString; set => this._customQueryString = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol? _destinationProtocol; + + /// Protocol to use for the redirect. The default value is MatchRequest + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol? DestinationProtocol { get => this._destinationProtocol; set => this._destinationProtocol = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType _redirectType; + + /// The redirect type the rule will use when redirecting traffic. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType RedirectType { get => this._redirectType; set => this._redirectType = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleUrlRedirectActionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public UrlRedirectActionParameters() + { + + } + } + /// Defines the parameters for the url redirect action. + public partial interface IUrlRedirectActionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #.", + SerializedName = @"customFragment", + PossibleTypes = new [] { typeof(string) })] + string CustomFragment { get; set; } + /// Host to redirect. Leave empty to use the incoming host as the destination host. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Host to redirect. Leave empty to use the incoming host as the destination host.", + SerializedName = @"customHostname", + PossibleTypes = new [] { typeof(string) })] + string CustomHostname { get; set; } + /// + /// The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination + /// path. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path.", + SerializedName = @"customPath", + PossibleTypes = new [] { typeof(string) })] + string CustomPath { get; set; } + /// + /// The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; + /// leave empty to preserve the incoming query string. Query string must be in = format. ? and & will be added + /// automatically so do not include them. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query string. Query string must be in = format. ? and & will be added automatically so do not include them.", + SerializedName = @"customQueryString", + PossibleTypes = new [] { typeof(string) })] + string CustomQueryString { get; set; } + /// Protocol to use for the redirect. The default value is MatchRequest + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protocol to use for the redirect. The default value is MatchRequest", + SerializedName = @"destinationProtocol", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol? DestinationProtocol { get; set; } + /// The redirect type the rule will use when redirecting traffic. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The redirect type the rule will use when redirecting traffic.", + SerializedName = @"redirectType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType RedirectType { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for the url redirect action. + internal partial interface IUrlRedirectActionParametersInternal + + { + /// + /// Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #. + /// + string CustomFragment { get; set; } + /// Host to redirect. Leave empty to use the incoming host as the destination host. + string CustomHostname { get; set; } + /// + /// The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination + /// path. + /// + string CustomPath { get; set; } + /// + /// The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; + /// leave empty to preserve the incoming query string. Query string must be in = format. ? and & will be added + /// automatically so do not include them. + /// + string CustomQueryString { get; set; } + /// Protocol to use for the redirect. The default value is MatchRequest + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol? DestinationProtocol { get; set; } + /// The redirect type the rule will use when redirecting traffic. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType RedirectType { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlRedirectActionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/UrlRedirectActionParameters.json.cs new file mode 100644 index 000000000000..b5394a8f86c5 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlRedirectActionParameters.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for the url redirect action. + public partial class UrlRedirectActionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRedirectActionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new UrlRedirectActionParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._redirectType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._redirectType.ToString()) : null, "redirectType" ,container.Add ); + AddIf( null != (((object)this._destinationProtocol)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._destinationProtocol.ToString()) : null, "destinationProtocol" ,container.Add ); + AddIf( null != (((object)this._customPath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._customPath.ToString()) : null, "customPath" ,container.Add ); + AddIf( null != (((object)this._customHostname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._customHostname.ToString()) : null, "customHostname" ,container.Add ); + AddIf( null != (((object)this._customQueryString)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._customQueryString.ToString()) : null, "customQueryString" ,container.Add ); + AddIf( null != (((object)this._customFragment)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._customFragment.ToString()) : null, "customFragment" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal UrlRedirectActionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_redirectType = If( json?.PropertyT("redirectType"), out var __jsonRedirectType) ? (string)__jsonRedirectType : (string)RedirectType;} + {_destinationProtocol = If( json?.PropertyT("destinationProtocol"), out var __jsonDestinationProtocol) ? (string)__jsonDestinationProtocol : (string)DestinationProtocol;} + {_customPath = If( json?.PropertyT("customPath"), out var __jsonCustomPath) ? (string)__jsonCustomPath : (string)CustomPath;} + {_customHostname = If( json?.PropertyT("customHostname"), out var __jsonCustomHostname) ? (string)__jsonCustomHostname : (string)CustomHostname;} + {_customQueryString = If( json?.PropertyT("customQueryString"), out var __jsonCustomQueryString) ? (string)__jsonCustomQueryString : (string)CustomQueryString;} + {_customFragment = If( json?.PropertyT("customFragment"), out var __jsonCustomFragment) ? (string)__jsonCustomFragment : (string)CustomFragment;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlRewriteAction.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/UrlRewriteAction.PowerShell.cs new file mode 100644 index 000000000000..fdefd70103dd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlRewriteAction.PowerShell.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the url rewrite action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(UrlRewriteActionTypeConverter))] + public partial class UrlRewriteAction + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UrlRewriteAction(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UrlRewriteAction(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UrlRewriteAction(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteActionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterSourcePattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).ParameterSourcePattern = (string) content.GetValueForProperty("ParameterSourcePattern",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).ParameterSourcePattern, global::System.Convert.ToString); + } + if (content.Contains("ParameterDestination")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).ParameterDestination = (string) content.GetValueForProperty("ParameterDestination",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).ParameterDestination, global::System.Convert.ToString); + } + if (content.Contains("ParameterPreserveUnmatchedPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).ParameterPreserveUnmatchedPath = (bool?) content.GetValueForProperty("ParameterPreserveUnmatchedPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).ParameterPreserveUnmatchedPath, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UrlRewriteAction(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteActionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterSourcePattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).ParameterSourcePattern = (string) content.GetValueForProperty("ParameterSourcePattern",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).ParameterSourcePattern, global::System.Convert.ToString); + } + if (content.Contains("ParameterDestination")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).ParameterDestination = (string) content.GetValueForProperty("ParameterDestination",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).ParameterDestination, global::System.Convert.ToString); + } + if (content.Contains("ParameterPreserveUnmatchedPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).ParameterPreserveUnmatchedPath = (bool?) content.GetValueForProperty("ParameterPreserveUnmatchedPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal)this).ParameterPreserveUnmatchedPath, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + } + /// Defines the url rewrite action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(UrlRewriteActionTypeConverter))] + public partial interface IUrlRewriteAction + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlRewriteAction.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/UrlRewriteAction.TypeConverter.cs new file mode 100644 index 000000000000..c8d9debc9e78 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlRewriteAction.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UrlRewriteActionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteAction ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteAction).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UrlRewriteAction.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UrlRewriteAction.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UrlRewriteAction.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlRewriteAction.cs b/src/Cdn/generated/api/Models/Api20210601/UrlRewriteAction.cs new file mode 100644 index 000000000000..37d4ec55d10c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlRewriteAction.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the url rewrite action for the delivery rule. + public partial class UrlRewriteAction : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteAction, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteActionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)Parameter).TypeName = value; } + + /// The name of the action for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)__deliveryRuleAction1).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)__deliveryRuleAction1).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParameters _parameter; + + /// Defines the parameters for the action. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteActionParameters()); set => this._parameter = value; } + + /// Define the relative URL to which the above requests will be rewritten by. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterDestination { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)Parameter).Destination; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)Parameter).Destination = value ; } + + /// Whether to preserve unmatched path. Default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public bool? ParameterPreserveUnmatchedPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)Parameter).PreserveUnmatchedPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)Parameter).PreserveUnmatchedPath = value ?? default(bool); } + + /// + /// define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings + /// are matched. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterSourcePattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)Parameter).SourcePattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)Parameter).SourcePattern = value ; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public UrlRewriteAction() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleAction1), __deliveryRuleAction1); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleAction1), __deliveryRuleAction1); + } + } + /// Defines the url rewrite action for the delivery rule. + public partial interface IUrlRewriteAction : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 + { + /// Define the relative URL to which the above requests will be rewritten by. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Define the relative URL to which the above requests will be rewritten by.", + SerializedName = @"destination", + PossibleTypes = new [] { typeof(string) })] + string ParameterDestination { get; set; } + /// Whether to preserve unmatched path. Default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to preserve unmatched path. Default value is true.", + SerializedName = @"preserveUnmatchedPath", + PossibleTypes = new [] { typeof(bool) })] + bool? ParameterPreserveUnmatchedPath { get; set; } + /// + /// define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings + /// are matched. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched.", + SerializedName = @"sourcePattern", + PossibleTypes = new [] { typeof(string) })] + string ParameterSourcePattern { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the url rewrite action for the delivery rule. + internal partial interface IUrlRewriteActionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal + { + /// Defines the parameters for the action. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParameters Parameter { get; set; } + /// Define the relative URL to which the above requests will be rewritten by. + string ParameterDestination { get; set; } + /// Whether to preserve unmatched path. Default value is true. + bool? ParameterPreserveUnmatchedPath { get; set; } + /// + /// define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings + /// are matched. + /// + string ParameterSourcePattern { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlRewriteAction.json.cs b/src/Cdn/generated/api/Models/Api20210601/UrlRewriteAction.json.cs new file mode 100644 index 000000000000..59562863face --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlRewriteAction.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the url rewrite action for the delivery rule. + public partial class UrlRewriteAction + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteAction. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteAction. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new UrlRewriteAction(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleAction1?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal UrlRewriteAction(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlRewriteActionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlRewriteActionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/UrlRewriteActionParameters.PowerShell.cs new file mode 100644 index 000000000000..6dc1ae69ed06 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlRewriteActionParameters.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for the url rewrite action. + [System.ComponentModel.TypeConverter(typeof(UrlRewriteActionParametersTypeConverter))] + public partial class UrlRewriteActionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UrlRewriteActionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UrlRewriteActionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UrlRewriteActionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("SourcePattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)this).SourcePattern = (string) content.GetValueForProperty("SourcePattern",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)this).SourcePattern, global::System.Convert.ToString); + } + if (content.Contains("Destination")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)this).Destination = (string) content.GetValueForProperty("Destination",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)this).Destination, global::System.Convert.ToString); + } + if (content.Contains("PreserveUnmatchedPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)this).PreserveUnmatchedPath = (bool?) content.GetValueForProperty("PreserveUnmatchedPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)this).PreserveUnmatchedPath, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UrlRewriteActionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("SourcePattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)this).SourcePattern = (string) content.GetValueForProperty("SourcePattern",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)this).SourcePattern, global::System.Convert.ToString); + } + if (content.Contains("Destination")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)this).Destination = (string) content.GetValueForProperty("Destination",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)this).Destination, global::System.Convert.ToString); + } + if (content.Contains("PreserveUnmatchedPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)this).PreserveUnmatchedPath = (bool?) content.GetValueForProperty("PreserveUnmatchedPath",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal)this).PreserveUnmatchedPath, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + } + /// Defines the parameters for the url rewrite action. + [System.ComponentModel.TypeConverter(typeof(UrlRewriteActionParametersTypeConverter))] + public partial interface IUrlRewriteActionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlRewriteActionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/UrlRewriteActionParameters.TypeConverter.cs new file mode 100644 index 000000000000..0e920808a268 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlRewriteActionParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UrlRewriteActionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UrlRewriteActionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UrlRewriteActionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UrlRewriteActionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlRewriteActionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/UrlRewriteActionParameters.cs new file mode 100644 index 000000000000..a705e36a5b58 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlRewriteActionParameters.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for the url rewrite action. + public partial class UrlRewriteActionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal + { + + /// Backing field for property. + private string _destination; + + /// Define the relative URL to which the above requests will be rewritten by. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Destination { get => this._destination; set => this._destination = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private bool? _preserveUnmatchedPath; + + /// Whether to preserve unmatched path. Default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? PreserveUnmatchedPath { get => this._preserveUnmatchedPath; set => this._preserveUnmatchedPath = value; } + + /// Backing field for property. + private string _sourcePattern; + + /// + /// define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings + /// are matched. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string SourcePattern { get => this._sourcePattern; set => this._sourcePattern = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleUrlRewriteActionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public UrlRewriteActionParameters() + { + + } + } + /// Defines the parameters for the url rewrite action. + public partial interface IUrlRewriteActionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Define the relative URL to which the above requests will be rewritten by. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Define the relative URL to which the above requests will be rewritten by.", + SerializedName = @"destination", + PossibleTypes = new [] { typeof(string) })] + string Destination { get; set; } + /// Whether to preserve unmatched path. Default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to preserve unmatched path. Default value is true.", + SerializedName = @"preserveUnmatchedPath", + PossibleTypes = new [] { typeof(bool) })] + bool? PreserveUnmatchedPath { get; set; } + /// + /// define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings + /// are matched. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched.", + SerializedName = @"sourcePattern", + PossibleTypes = new [] { typeof(string) })] + string SourcePattern { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for the url rewrite action. + internal partial interface IUrlRewriteActionParametersInternal + + { + /// Define the relative URL to which the above requests will be rewritten by. + string Destination { get; set; } + /// Whether to preserve unmatched path. Default value is true. + bool? PreserveUnmatchedPath { get; set; } + /// + /// define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings + /// are matched. + /// + string SourcePattern { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlRewriteActionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/UrlRewriteActionParameters.json.cs new file mode 100644 index 000000000000..0f45c1f1a4d4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlRewriteActionParameters.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for the url rewrite action. + public partial class UrlRewriteActionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlRewriteActionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new UrlRewriteActionParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._sourcePattern)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._sourcePattern.ToString()) : null, "sourcePattern" ,container.Add ); + AddIf( null != (((object)this._destination)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._destination.ToString()) : null, "destination" ,container.Add ); + AddIf( null != this._preserveUnmatchedPath ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._preserveUnmatchedPath) : null, "preserveUnmatchedPath" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal UrlRewriteActionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_sourcePattern = If( json?.PropertyT("sourcePattern"), out var __jsonSourcePattern) ? (string)__jsonSourcePattern : (string)SourcePattern;} + {_destination = If( json?.PropertyT("destination"), out var __jsonDestination) ? (string)__jsonDestination : (string)Destination;} + {_preserveUnmatchedPath = If( json?.PropertyT("preserveUnmatchedPath"), out var __jsonPreserveUnmatchedPath) ? (bool?)__jsonPreserveUnmatchedPath : PreserveUnmatchedPath;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningAction.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningAction.PowerShell.cs new file mode 100644 index 000000000000..3aaf1c857b7e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningAction.PowerShell.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the url signing action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(UrlSigningActionTypeConverter))] + public partial class UrlSigningAction + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UrlSigningAction(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UrlSigningAction(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UrlSigningAction(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningActionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + if (content.Contains("ParameterAlgorithm")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal)this).ParameterAlgorithm = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm?) content.GetValueForProperty("ParameterAlgorithm",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal)this).ParameterAlgorithm, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterNameOverride")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal)this).ParameterNameOverride = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[]) content.GetValueForProperty("ParameterNameOverride",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal)this).ParameterNameOverride, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningParamIdentifierTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UrlSigningAction(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningActionParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction.CreateFrom); + } + if (content.Contains("ParameterAlgorithm")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal)this).ParameterAlgorithm = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm?) content.GetValueForProperty("ParameterAlgorithm",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal)this).ParameterAlgorithm, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm.CreateFrom); + } + if (content.Contains("ParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal)this).ParameterTypeName = (string) content.GetValueForProperty("ParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal)this).ParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("ParameterNameOverride")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal)this).ParameterNameOverride = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[]) content.GetValueForProperty("ParameterNameOverride",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal)this).ParameterNameOverride, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningParamIdentifierTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + } + /// Defines the url signing action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(UrlSigningActionTypeConverter))] + public partial interface IUrlSigningAction + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningAction.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningAction.TypeConverter.cs new file mode 100644 index 000000000000..d4d4108baa24 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningAction.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UrlSigningActionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningAction ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningAction).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UrlSigningAction.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UrlSigningAction.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UrlSigningAction.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningAction.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningAction.cs new file mode 100644 index 000000000000..c58c1a7371c8 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningAction.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the url signing action for the delivery rule. + public partial class UrlSigningAction : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningAction, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(); + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningActionParameters()); set { {_parameter = value;} } } + + /// Internal Acessors for ParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionInternal.ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)Parameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)Parameter).TypeName = value; } + + /// The name of the action for the delivery rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)__deliveryRuleAction1).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal)__deliveryRuleAction1).Name = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParameters _parameter; + + /// Defines the parameters for the action. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningActionParameters()); set => this._parameter = value; } + + /// Algorithm to use for URL signing + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm? ParameterAlgorithm { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)Parameter).Algorithm; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)Parameter).Algorithm = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm)""); } + + /// + /// Defines which query string parameters in the url to be considered for expires, key id etc. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[] ParameterNameOverride { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)Parameter).ParameterNameOverride; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)Parameter).ParameterNameOverride = value ?? null /* arrayOf */; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string ParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)Parameter).TypeName; } + + /// Creates an new instance. + public UrlSigningAction() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__deliveryRuleAction1), __deliveryRuleAction1); + await eventListener.AssertObjectIsValid(nameof(__deliveryRuleAction1), __deliveryRuleAction1); + } + } + /// Defines the url signing action for the delivery rule. + public partial interface IUrlSigningAction : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1 + { + /// Algorithm to use for URL signing + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Algorithm to use for URL signing", + SerializedName = @"algorithm", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm? ParameterAlgorithm { get; set; } + /// + /// Defines which query string parameters in the url to be considered for expires, key id etc. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines which query string parameters in the url to be considered for expires, key id etc. ", + SerializedName = @"parameterNameOverride", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[] ParameterNameOverride { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string ParameterTypeName { get; } + + } + /// Defines the url signing action for the delivery rule. + internal partial interface IUrlSigningActionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1Internal + { + /// Defines the parameters for the action. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParameters Parameter { get; set; } + /// Algorithm to use for URL signing + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm? ParameterAlgorithm { get; set; } + /// + /// Defines which query string parameters in the url to be considered for expires, key id etc. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[] ParameterNameOverride { get; set; } + + string ParameterTypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningAction.json.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningAction.json.cs new file mode 100644 index 000000000000..5c66b87caf40 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningAction.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the url signing action for the delivery rule. + public partial class UrlSigningAction + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningAction. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningAction. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new UrlSigningAction(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __deliveryRuleAction1?.ToJson(container, serializationMode); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal UrlSigningAction(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __deliveryRuleAction1 = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.DeliveryRuleAction1(json); + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningActionParameters.FromJson(__jsonParameters) : Parameter;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningActionParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningActionParameters.PowerShell.cs new file mode 100644 index 000000000000..73bab19b5097 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningActionParameters.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines the parameters for the Url Signing action. + [System.ComponentModel.TypeConverter(typeof(UrlSigningActionParametersTypeConverter))] + public partial class UrlSigningActionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UrlSigningActionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UrlSigningActionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UrlSigningActionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Algorithm")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)this).Algorithm = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm?) content.GetValueForProperty("Algorithm",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)this).Algorithm, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm.CreateFrom); + } + if (content.Contains("ParameterNameOverride")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)this).ParameterNameOverride = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[]) content.GetValueForProperty("ParameterNameOverride",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)this).ParameterNameOverride, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningParamIdentifierTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UrlSigningActionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)this).TypeName = (string) content.GetValueForProperty("TypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)this).TypeName, global::System.Convert.ToString); + } + if (content.Contains("Algorithm")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)this).Algorithm = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm?) content.GetValueForProperty("Algorithm",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)this).Algorithm, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm.CreateFrom); + } + if (content.Contains("ParameterNameOverride")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)this).ParameterNameOverride = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[]) content.GetValueForProperty("ParameterNameOverride",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal)this).ParameterNameOverride, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningParamIdentifierTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + } + /// Defines the parameters for the Url Signing action. + [System.ComponentModel.TypeConverter(typeof(UrlSigningActionParametersTypeConverter))] + public partial interface IUrlSigningActionParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningActionParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningActionParameters.TypeConverter.cs new file mode 100644 index 000000000000..12025c195381 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningActionParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UrlSigningActionParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UrlSigningActionParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UrlSigningActionParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UrlSigningActionParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningActionParameters.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningActionParameters.cs new file mode 100644 index 000000000000..b71d3516eb76 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningActionParameters.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for the Url Signing action. + public partial class UrlSigningActionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm? _algorithm; + + /// Algorithm to use for URL signing + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm? Algorithm { get => this._algorithm; set => this._algorithm = value; } + + /// Internal Acessors for TypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParametersInternal.TypeName { get => this._typeName; set { {_typeName = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[] _parameterNameOverride; + + /// + /// Defines which query string parameters in the url to be considered for expires, key id etc. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[] ParameterNameOverride { get => this._parameterNameOverride; set => this._parameterNameOverride = value; } + + /// Backing field for property. + private string _typeName= @"DeliveryRuleUrlSigningActionParameters"; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string TypeName { get => this._typeName; } + + /// Creates an new instance. + public UrlSigningActionParameters() + { + + } + } + /// Defines the parameters for the Url Signing action. + public partial interface IUrlSigningActionParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Algorithm to use for URL signing + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Algorithm to use for URL signing", + SerializedName = @"algorithm", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm? Algorithm { get; set; } + /// + /// Defines which query string parameters in the url to be considered for expires, key id etc. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines which query string parameters in the url to be considered for expires, key id etc. ", + SerializedName = @"parameterNameOverride", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[] ParameterNameOverride { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string TypeName { get; } + + } + /// Defines the parameters for the Url Signing action. + internal partial interface IUrlSigningActionParametersInternal + + { + /// Algorithm to use for URL signing + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm? Algorithm { get; set; } + /// + /// Defines which query string parameters in the url to be considered for expires, key id etc. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[] ParameterNameOverride { get; set; } + + string TypeName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningActionParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningActionParameters.json.cs new file mode 100644 index 000000000000..e63e1e13f832 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningActionParameters.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines the parameters for the Url Signing action. + public partial class UrlSigningActionParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningActionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new UrlSigningActionParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._typeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._typeName.ToString()) : null, "typeName" ,container.Add ); + AddIf( null != (((object)this._algorithm)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._algorithm.ToString()) : null, "algorithm" ,container.Add ); + if (null != this._parameterNameOverride) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._parameterNameOverride ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("parameterNameOverride",__w); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal UrlSigningActionParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_typeName = If( json?.PropertyT("typeName"), out var __jsonTypeName) ? (string)__jsonTypeName : (string)TypeName;} + {_algorithm = If( json?.PropertyT("algorithm"), out var __jsonAlgorithm) ? (string)__jsonAlgorithm : (string)Algorithm;} + {_parameterNameOverride = If( json?.PropertyT("parameterNameOverride"), out var __jsonParameterNameOverride) ? If( __jsonParameterNameOverride as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UrlSigningParamIdentifier.FromJson(__u) )) ))() : null : ParameterNameOverride;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningKey.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningKey.PowerShell.cs new file mode 100644 index 000000000000..e7e616df3ebe --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningKey.PowerShell.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Url signing key + [System.ComponentModel.TypeConverter(typeof(UrlSigningKeyTypeConverter))] + public partial class UrlSigningKey + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UrlSigningKey(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UrlSigningKey(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UrlSigningKey(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("KeySourceParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParameters) content.GetValueForProperty("KeySourceParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.KeyVaultSigningKeyParametersTypeConverter.ConvertFrom); + } + if (content.Contains("KeyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeyId = (string) content.GetValueForProperty("KeyId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeyId, global::System.Convert.ToString); + } + if (content.Contains("KeySourceParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterTypeName = (string) content.GetValueForProperty("KeySourceParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("KeySourceParameterSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterSubscriptionId = (string) content.GetValueForProperty("KeySourceParameterSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterSubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("KeySourceParameterResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterResourceGroupName = (string) content.GetValueForProperty("KeySourceParameterResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("KeySourceParameterVaultName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterVaultName = (string) content.GetValueForProperty("KeySourceParameterVaultName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterVaultName, global::System.Convert.ToString); + } + if (content.Contains("KeySourceParameterSecretName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterSecretName = (string) content.GetValueForProperty("KeySourceParameterSecretName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterSecretName, global::System.Convert.ToString); + } + if (content.Contains("KeySourceParameterSecretVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterSecretVersion = (string) content.GetValueForProperty("KeySourceParameterSecretVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterSecretVersion, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UrlSigningKey(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("KeySourceParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParameters) content.GetValueForProperty("KeySourceParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.KeyVaultSigningKeyParametersTypeConverter.ConvertFrom); + } + if (content.Contains("KeyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeyId = (string) content.GetValueForProperty("KeyId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeyId, global::System.Convert.ToString); + } + if (content.Contains("KeySourceParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterTypeName = (string) content.GetValueForProperty("KeySourceParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("KeySourceParameterSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterSubscriptionId = (string) content.GetValueForProperty("KeySourceParameterSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterSubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("KeySourceParameterResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterResourceGroupName = (string) content.GetValueForProperty("KeySourceParameterResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("KeySourceParameterVaultName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterVaultName = (string) content.GetValueForProperty("KeySourceParameterVaultName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterVaultName, global::System.Convert.ToString); + } + if (content.Contains("KeySourceParameterSecretName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterSecretName = (string) content.GetValueForProperty("KeySourceParameterSecretName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterSecretName, global::System.Convert.ToString); + } + if (content.Contains("KeySourceParameterSecretVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterSecretVersion = (string) content.GetValueForProperty("KeySourceParameterSecretVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal)this).KeySourceParameterSecretVersion, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// Url signing key + [System.ComponentModel.TypeConverter(typeof(UrlSigningKeyTypeConverter))] + public partial interface IUrlSigningKey + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningKey.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningKey.TypeConverter.cs new file mode 100644 index 000000000000..3a9e223d9dd9 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningKey.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UrlSigningKeyTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UrlSigningKey.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UrlSigningKey.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UrlSigningKey.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningKey.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningKey.cs new file mode 100644 index 000000000000..058abd70193b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningKey.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Url signing key + public partial class UrlSigningKey : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal + { + + /// Backing field for property. + private string _keyId; + + /// + /// Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string KeyId { get => this._keyId; set => this._keyId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParameters _keySourceParameter; + + /// Defines the parameters for using customer key vault for Url Signing Key. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParameters KeySourceParameter { get => (this._keySourceParameter = this._keySourceParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.KeyVaultSigningKeyParameters()); set => this._keySourceParameter = value; } + + /// Resource group of the user's Key Vault containing the secret + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string KeySourceParameterResourceGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)KeySourceParameter).ResourceGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)KeySourceParameter).ResourceGroupName = value ; } + + /// The name of secret in Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string KeySourceParameterSecretName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)KeySourceParameter).SecretName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)KeySourceParameter).SecretName = value ; } + + /// The version(GUID) of secret in Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string KeySourceParameterSecretVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)KeySourceParameter).SecretVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)KeySourceParameter).SecretVersion = value ; } + + /// Subscription Id of the user's Key Vault containing the secret + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string KeySourceParameterSubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)KeySourceParameter).SubscriptionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)KeySourceParameter).SubscriptionId = value ; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string KeySourceParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)KeySourceParameter).TypeName; } + + /// The name of the user's Key Vault containing the secret + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string KeySourceParameterVaultName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)KeySourceParameter).VaultName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)KeySourceParameter).VaultName = value ; } + + /// Internal Acessors for KeySourceParameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal.KeySourceParameter { get => (this._keySourceParameter = this._keySourceParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.KeyVaultSigningKeyParameters()); set { {_keySourceParameter = value;} } } + + /// Internal Acessors for KeySourceParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyInternal.KeySourceParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)KeySourceParameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParametersInternal)KeySourceParameter).TypeName = value; } + + /// Creates an new instance. + public UrlSigningKey() + { + + } + } + /// Url signing key + public partial interface IUrlSigningKey : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// + /// Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash.", + SerializedName = @"keyId", + PossibleTypes = new [] { typeof(string) })] + string KeyId { get; set; } + /// Resource group of the user's Key Vault containing the secret + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Resource group of the user's Key Vault containing the secret", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + string KeySourceParameterResourceGroupName { get; set; } + /// The name of secret in Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of secret in Key Vault.", + SerializedName = @"secretName", + PossibleTypes = new [] { typeof(string) })] + string KeySourceParameterSecretName { get; set; } + /// The version(GUID) of secret in Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The version(GUID) of secret in Key Vault.", + SerializedName = @"secretVersion", + PossibleTypes = new [] { typeof(string) })] + string KeySourceParameterSecretVersion { get; set; } + /// Subscription Id of the user's Key Vault containing the secret + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription Id of the user's Key Vault containing the secret", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + string KeySourceParameterSubscriptionId { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string KeySourceParameterTypeName { get; } + /// The name of the user's Key Vault containing the secret + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the user's Key Vault containing the secret", + SerializedName = @"vaultName", + PossibleTypes = new [] { typeof(string) })] + string KeySourceParameterVaultName { get; set; } + + } + /// Url signing key + internal partial interface IUrlSigningKeyInternal + + { + /// + /// Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + /// + string KeyId { get; set; } + /// Defines the parameters for using customer key vault for Url Signing Key. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultSigningKeyParameters KeySourceParameter { get; set; } + /// Resource group of the user's Key Vault containing the secret + string KeySourceParameterResourceGroupName { get; set; } + /// The name of secret in Key Vault. + string KeySourceParameterSecretName { get; set; } + /// The version(GUID) of secret in Key Vault. + string KeySourceParameterSecretVersion { get; set; } + /// Subscription Id of the user's Key Vault containing the secret + string KeySourceParameterSubscriptionId { get; set; } + + string KeySourceParameterTypeName { get; set; } + /// The name of the user's Key Vault containing the secret + string KeySourceParameterVaultName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningKey.json.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningKey.json.cs new file mode 100644 index 000000000000..edeabb4e9eea --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningKey.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Url signing key + public partial class UrlSigningKey + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new UrlSigningKey(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._keySourceParameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._keySourceParameter.ToJson(null,serializationMode) : null, "keySourceParameters" ,container.Add ); + AddIf( null != (((object)this._keyId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._keyId.ToString()) : null, "keyId" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal UrlSigningKey(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_keySourceParameter = If( json?.PropertyT("keySourceParameters"), out var __jsonKeySourceParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.KeyVaultSigningKeyParameters.FromJson(__jsonKeySourceParameters) : KeySourceParameter;} + {_keyId = If( json?.PropertyT("keyId"), out var __jsonKeyId) ? (string)__jsonKeyId : (string)KeyId;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningKeyParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningKeyParameters.PowerShell.cs new file mode 100644 index 000000000000..b7504a09401b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningKeyParameters.PowerShell.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Url signing key parameters + [System.ComponentModel.TypeConverter(typeof(UrlSigningKeyParametersTypeConverter))] + public partial class UrlSigningKeyParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UrlSigningKeyParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UrlSigningKeyParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UrlSigningKeyParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SecretSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParametersInternal)this).SecretSource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("SecretSource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParametersInternal)this).SecretSource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("KeyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParametersInternal)this).KeyId = (string) content.GetValueForProperty("KeyId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParametersInternal)this).KeyId, global::System.Convert.ToString); + } + if (content.Contains("SecretVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParametersInternal)this).SecretVersion = (string) content.GetValueForProperty("SecretVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParametersInternal)this).SecretVersion, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + if (content.Contains("SecretSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParametersInternal)this).SecretSourceId = (string) content.GetValueForProperty("SecretSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParametersInternal)this).SecretSourceId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UrlSigningKeyParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SecretSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParametersInternal)this).SecretSource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("SecretSource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParametersInternal)this).SecretSource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("KeyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParametersInternal)this).KeyId = (string) content.GetValueForProperty("KeyId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParametersInternal)this).KeyId, global::System.Convert.ToString); + } + if (content.Contains("SecretVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParametersInternal)this).SecretVersion = (string) content.GetValueForProperty("SecretVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParametersInternal)this).SecretVersion, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + if (content.Contains("SecretSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParametersInternal)this).SecretSourceId = (string) content.GetValueForProperty("SecretSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParametersInternal)this).SecretSourceId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// Url signing key parameters + [System.ComponentModel.TypeConverter(typeof(UrlSigningKeyParametersTypeConverter))] + public partial interface IUrlSigningKeyParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningKeyParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningKeyParameters.TypeConverter.cs new file mode 100644 index 000000000000..f8319edf5e3d --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningKeyParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UrlSigningKeyParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UrlSigningKeyParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UrlSigningKeyParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UrlSigningKeyParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningKeyParameters.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningKeyParameters.cs new file mode 100644 index 000000000000..9199ab3369ce --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningKeyParameters.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Url signing key parameters + public partial class UrlSigningKeyParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParametersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters __secretParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretParameters(); + + /// Backing field for property. + private string _keyId; + + /// + /// Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string KeyId { get => this._keyId; set => this._keyId = value; } + + /// Internal Acessors for SecretSource + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParametersInternal.SecretSource { get => (this._secretSource = this._secretSource ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set { {_secretSource = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference _secretSource; + + /// + /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference SecretSource { get => (this._secretSource = this._secretSource ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set => this._secretSource = value; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string SecretSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)SecretSource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)SecretSource).Id = value ?? null; } + + /// Backing field for property. + private string _secretVersion; + + /// Version of the secret to be used + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string SecretVersion { get => this._secretVersion; set => this._secretVersion = value; } + + /// The type of the secret resource. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)__secretParameters).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal)__secretParameters).Type = value ; } + + /// Creates an new instance. + public UrlSigningKeyParameters() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__secretParameters), __secretParameters); + await eventListener.AssertObjectIsValid(nameof(__secretParameters), __secretParameters); + } + } + /// Url signing key parameters + public partial interface IUrlSigningKeyParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters + { + /// + /// Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash.", + SerializedName = @"keyId", + PossibleTypes = new [] { typeof(string) })] + string KeyId { get; set; } + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string SecretSourceId { get; set; } + /// Version of the secret to be used + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Version of the secret to be used", + SerializedName = @"secretVersion", + PossibleTypes = new [] { typeof(string) })] + string SecretVersion { get; set; } + + } + /// Url signing key parameters + internal partial interface IUrlSigningKeyParametersInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParametersInternal + { + /// + /// Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + /// + string KeyId { get; set; } + /// + /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference SecretSource { get; set; } + /// Resource ID. + string SecretSourceId { get; set; } + /// Version of the secret to be used + string SecretVersion { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningKeyParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningKeyParameters.json.cs new file mode 100644 index 000000000000..0461077daedd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningKeyParameters.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Url signing key parameters + public partial class UrlSigningKeyParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKeyParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new UrlSigningKeyParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __secretParameters?.ToJson(container, serializationMode); + AddIf( null != this._secretSource ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._secretSource.ToJson(null,serializationMode) : null, "secretSource" ,container.Add ); + AddIf( null != (((object)this._keyId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._keyId.ToString()) : null, "keyId" ,container.Add ); + AddIf( null != (((object)this._secretVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._secretVersion.ToString()) : null, "secretVersion" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal UrlSigningKeyParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __secretParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecretParameters(json); + {_secretSource = If( json?.PropertyT("secretSource"), out var __jsonSecretSource) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonSecretSource) : SecretSource;} + {_keyId = If( json?.PropertyT("keyId"), out var __jsonKeyId) ? (string)__jsonKeyId : (string)KeyId;} + {_secretVersion = If( json?.PropertyT("secretVersion"), out var __jsonSecretVersion) ? (string)__jsonSecretVersion : (string)SecretVersion;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningParamIdentifier.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningParamIdentifier.PowerShell.cs new file mode 100644 index 000000000000..c6e9568fac52 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningParamIdentifier.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Defines how to identify a parameter for a specific purpose e.g. expires + [System.ComponentModel.TypeConverter(typeof(UrlSigningParamIdentifierTypeConverter))] + public partial class UrlSigningParamIdentifier + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UrlSigningParamIdentifier(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UrlSigningParamIdentifier(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UrlSigningParamIdentifier(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ParamIndicator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifierInternal)this).ParamIndicator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicator) content.GetValueForProperty("ParamIndicator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifierInternal)this).ParamIndicator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicator.CreateFrom); + } + if (content.Contains("ParamName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifierInternal)this).ParamName = (string) content.GetValueForProperty("ParamName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifierInternal)this).ParamName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UrlSigningParamIdentifier(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ParamIndicator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifierInternal)this).ParamIndicator = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicator) content.GetValueForProperty("ParamIndicator",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifierInternal)this).ParamIndicator, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicator.CreateFrom); + } + if (content.Contains("ParamName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifierInternal)this).ParamName = (string) content.GetValueForProperty("ParamName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifierInternal)this).ParamName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// Defines how to identify a parameter for a specific purpose e.g. expires + [System.ComponentModel.TypeConverter(typeof(UrlSigningParamIdentifierTypeConverter))] + public partial interface IUrlSigningParamIdentifier + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningParamIdentifier.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningParamIdentifier.TypeConverter.cs new file mode 100644 index 000000000000..6be28d4108bc --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningParamIdentifier.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UrlSigningParamIdentifierTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UrlSigningParamIdentifier.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UrlSigningParamIdentifier.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UrlSigningParamIdentifier.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningParamIdentifier.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningParamIdentifier.cs new file mode 100644 index 000000000000..dd7b8727e19f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningParamIdentifier.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines how to identify a parameter for a specific purpose e.g. expires + public partial class UrlSigningParamIdentifier : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifierInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicator _paramIndicator; + + /// Indicates the purpose of the parameter + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicator ParamIndicator { get => this._paramIndicator; set => this._paramIndicator = value; } + + /// Backing field for property. + private string _paramName; + + /// Parameter name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ParamName { get => this._paramName; set => this._paramName = value; } + + /// Creates an new instance. + public UrlSigningParamIdentifier() + { + + } + } + /// Defines how to identify a parameter for a specific purpose e.g. expires + public partial interface IUrlSigningParamIdentifier : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Indicates the purpose of the parameter + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Indicates the purpose of the parameter", + SerializedName = @"paramIndicator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicator) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicator ParamIndicator { get; set; } + /// Parameter name + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Parameter name", + SerializedName = @"paramName", + PossibleTypes = new [] { typeof(string) })] + string ParamName { get; set; } + + } + /// Defines how to identify a parameter for a specific purpose e.g. expires + internal partial interface IUrlSigningParamIdentifierInternal + + { + /// Indicates the purpose of the parameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicator ParamIndicator { get; set; } + /// Parameter name + string ParamName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UrlSigningParamIdentifier.json.cs b/src/Cdn/generated/api/Models/Api20210601/UrlSigningParamIdentifier.json.cs new file mode 100644 index 000000000000..ff63bcd27214 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UrlSigningParamIdentifier.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Defines how to identify a parameter for a specific purpose e.g. expires + public partial class UrlSigningParamIdentifier + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new UrlSigningParamIdentifier(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._paramIndicator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._paramIndicator.ToString()) : null, "paramIndicator" ,container.Add ); + AddIf( null != (((object)this._paramName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._paramName.ToString()) : null, "paramName" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal UrlSigningParamIdentifier(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_paramIndicator = If( json?.PropertyT("paramIndicator"), out var __jsonParamIndicator) ? (string)__jsonParamIndicator : (string)ParamIndicator;} + {_paramName = If( json?.PropertyT("paramName"), out var __jsonParamName) ? (string)__jsonParamName : (string)ParamName;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Usage.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/Usage.PowerShell.cs new file mode 100644 index 000000000000..5f5968b33efe --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Usage.PowerShell.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Describes resource usage. + [System.ComponentModel.TypeConverter(typeof(UsageTypeConverter))] + public partial class Usage + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Usage(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Usage(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Usage(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UsageNameTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Unit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).Unit, global::System.Convert.ToString); + } + if (content.Contains("CurrentValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).CurrentValue = (long) content.GetValueForProperty("CurrentValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).CurrentValue, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("Limit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).Limit = (long) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).Limit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("NameValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).NameValue, global::System.Convert.ToString); + } + if (content.Contains("NameLocalizedValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).NameLocalizedValue, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Usage(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UsageNameTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Unit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).Unit, global::System.Convert.ToString); + } + if (content.Contains("CurrentValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).CurrentValue = (long) content.GetValueForProperty("CurrentValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).CurrentValue, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("Limit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).Limit = (long) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).Limit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("NameValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).NameValue, global::System.Convert.ToString); + } + if (content.Contains("NameLocalizedValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal)this).NameLocalizedValue, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// Describes resource usage. + [System.ComponentModel.TypeConverter(typeof(UsageTypeConverter))] + public partial interface IUsage + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Usage.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/Usage.TypeConverter.cs new file mode 100644 index 000000000000..34a827f414c1 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Usage.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UsageTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Usage.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Usage.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Usage.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Usage.cs b/src/Cdn/generated/api/Models/Api20210601/Usage.cs new file mode 100644 index 000000000000..d0b9455300b2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Usage.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Describes resource usage. + public partial class Usage : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal + { + + /// Backing field for property. + private long _currentValue; + + /// The current value of the usage. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public long CurrentValue { get => this._currentValue; set => this._currentValue = value; } + + /// Backing field for property. + private string _id; + + /// Resource identifier. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Backing field for property. + private long _limit; + + /// The limit of usage. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public long Limit { get => this._limit; set => this._limit = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Name + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageName Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal.Name { get => (this._name = this._name ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UsageName()); set { {_name = value;} } } + + /// Internal Acessors for Unit + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageInternal.Unit { get => this._unit; set { {_unit = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageName _name; + + /// The name of the type of usage. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageName Name { get => (this._name = this._name ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UsageName()); set => this._name = value; } + + /// A localized string describing the resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string NameLocalizedValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageNameInternal)Name).LocalizedValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageNameInternal)Name).LocalizedValue = value ?? null; } + + /// A string describing the resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string NameValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageNameInternal)Name).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageNameInternal)Name).Value = value ?? null; } + + /// Backing field for property. + private string _unit= @"Count"; + + /// An enum describing the unit of measurement. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Unit { get => this._unit; } + + /// Creates an new instance. + public Usage() + { + + } + } + /// Describes resource usage. + public partial interface IUsage : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The current value of the usage. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The current value of the usage.", + SerializedName = @"currentValue", + PossibleTypes = new [] { typeof(long) })] + long CurrentValue { get; set; } + /// Resource identifier. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Resource identifier.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// The limit of usage. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The limit of usage.", + SerializedName = @"limit", + PossibleTypes = new [] { typeof(long) })] + long Limit { get; set; } + /// A localized string describing the resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A localized string describing the resource name.", + SerializedName = @"localizedValue", + PossibleTypes = new [] { typeof(string) })] + string NameLocalizedValue { get; set; } + /// A string describing the resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A string describing the resource name.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(string) })] + string NameValue { get; set; } + /// An enum describing the unit of measurement. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"An enum describing the unit of measurement.", + SerializedName = @"unit", + PossibleTypes = new [] { typeof(string) })] + string Unit { get; } + + } + /// Describes resource usage. + internal partial interface IUsageInternal + + { + /// The current value of the usage. + long CurrentValue { get; set; } + /// Resource identifier. + string Id { get; set; } + /// The limit of usage. + long Limit { get; set; } + /// The name of the type of usage. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageName Name { get; set; } + /// A localized string describing the resource name. + string NameLocalizedValue { get; set; } + /// A string describing the resource name. + string NameValue { get; set; } + /// An enum describing the unit of measurement. + string Unit { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/Usage.json.cs b/src/Cdn/generated/api/Models/Api20210601/Usage.json.cs new file mode 100644 index 000000000000..138ed9073192 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/Usage.json.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Describes resource usage. + public partial class Usage + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new Usage(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._name ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._name.ToJson(null,serializationMode) : null, "name" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + AddIf( null != (((object)this._unit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._unit.ToString()) : null, "unit" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber(this._currentValue), "currentValue" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNumber(this._limit), "limit" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal Usage(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UsageName.FromJson(__jsonName) : Name;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_unit = If( json?.PropertyT("unit"), out var __jsonUnit) ? (string)__jsonUnit : (string)Unit;} + {_currentValue = If( json?.PropertyT("currentValue"), out var __jsonCurrentValue) ? (long)__jsonCurrentValue : CurrentValue;} + {_limit = If( json?.PropertyT("limit"), out var __jsonLimit) ? (long)__jsonLimit : Limit;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UsageName.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/UsageName.PowerShell.cs new file mode 100644 index 000000000000..3102bf803813 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UsageName.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The usage names. + [System.ComponentModel.TypeConverter(typeof(UsageNameTypeConverter))] + public partial class UsageName + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageName DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UsageName(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageName DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UsageName(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageName FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UsageName(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageNameInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageNameInternal)this).Value, global::System.Convert.ToString); + } + if (content.Contains("LocalizedValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageNameInternal)this).LocalizedValue = (string) content.GetValueForProperty("LocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageNameInternal)this).LocalizedValue, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UsageName(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageNameInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageNameInternal)this).Value, global::System.Convert.ToString); + } + if (content.Contains("LocalizedValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageNameInternal)this).LocalizedValue = (string) content.GetValueForProperty("LocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageNameInternal)this).LocalizedValue, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// The usage names. + [System.ComponentModel.TypeConverter(typeof(UsageNameTypeConverter))] + public partial interface IUsageName + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UsageName.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/UsageName.TypeConverter.cs new file mode 100644 index 000000000000..486a2e569679 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UsageName.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UsageNameTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageName ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageName).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UsageName.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UsageName.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UsageName.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UsageName.cs b/src/Cdn/generated/api/Models/Api20210601/UsageName.cs new file mode 100644 index 000000000000..f92d170decf4 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UsageName.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The usage names. + public partial class UsageName : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageName, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageNameInternal + { + + /// Backing field for property. + private string _localizedValue; + + /// A localized string describing the resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string LocalizedValue { get => this._localizedValue; set => this._localizedValue = value; } + + /// Backing field for property. + private string _value; + + /// A string describing the resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public UsageName() + { + + } + } + /// The usage names. + public partial interface IUsageName : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// A localized string describing the resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A localized string describing the resource name.", + SerializedName = @"localizedValue", + PossibleTypes = new [] { typeof(string) })] + string LocalizedValue { get; set; } + /// A string describing the resource name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A string describing the resource name.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(string) })] + string Value { get; set; } + + } + /// The usage names. + internal partial interface IUsageNameInternal + + { + /// A localized string describing the resource name. + string LocalizedValue { get; set; } + /// A string describing the resource name. + string Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UsageName.json.cs b/src/Cdn/generated/api/Models/Api20210601/UsageName.json.cs new file mode 100644 index 000000000000..0ea88951d78a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UsageName.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The usage names. + public partial class UsageName + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageName. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageName. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsageName FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new UsageName(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._value.ToString()) : null, "value" ,container.Add ); + AddIf( null != (((object)this._localizedValue)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._localizedValue.ToString()) : null, "localizedValue" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal UsageName(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)Value;} + {_localizedValue = If( json?.PropertyT("localizedValue"), out var __jsonLocalizedValue) ? (string)__jsonLocalizedValue : (string)LocalizedValue;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UsagesListResult.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/UsagesListResult.PowerShell.cs new file mode 100644 index 000000000000..3ac86f54ac31 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UsagesListResult.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The list usages operation response. + [System.ComponentModel.TypeConverter(typeof(UsagesListResultTypeConverter))] + public partial class UsagesListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsagesListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UsagesListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsagesListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UsagesListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsagesListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UsagesListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsagesListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsagesListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UsageTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsagesListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsagesListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UsagesListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsagesListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsagesListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.UsageTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsagesListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsagesListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// The list usages operation response. + [System.ComponentModel.TypeConverter(typeof(UsagesListResultTypeConverter))] + public partial interface IUsagesListResult + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UsagesListResult.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/UsagesListResult.TypeConverter.cs new file mode 100644 index 000000000000..bea396bb6f37 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UsagesListResult.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UsagesListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsagesListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsagesListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UsagesListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UsagesListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UsagesListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UsagesListResult.cs b/src/Cdn/generated/api/Models/Api20210601/UsagesListResult.cs new file mode 100644 index 000000000000..001e1906fc16 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UsagesListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The list usages operation response. + public partial class UsagesListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsagesListResult, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsagesListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of results. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage[] _value; + + /// The list of resource usages. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public UsagesListResult() + { + + } + } + /// The list usages operation response. + public partial interface IUsagesListResult : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// URL to get the next set of results. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"URL to get the next set of results.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The list of resource usages. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of resource usages.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage[] Value { get; set; } + + } + /// The list usages operation response. + internal partial interface IUsagesListResultInternal + + { + /// URL to get the next set of results. + string NextLink { get; set; } + /// The list of resource usages. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UsagesListResult.json.cs b/src/Cdn/generated/api/Models/Api20210601/UsagesListResult.json.cs new file mode 100644 index 000000000000..237df372f3ce --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UsagesListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The list usages operation response. + public partial class UsagesListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsagesListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsagesListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsagesListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new UsagesListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal UsagesListResult(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Usage.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UserManagedHttpsParameters.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/UserManagedHttpsParameters.PowerShell.cs new file mode 100644 index 000000000000..c0bcc7c8b3be --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UserManagedHttpsParameters.PowerShell.cs @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + /// + [System.ComponentModel.TypeConverter(typeof(UserManagedHttpsParametersTypeConverter))] + public partial class UserManagedHttpsParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UserManagedHttpsParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UserManagedHttpsParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UserManagedHttpsParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CertificateSourceParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParameters) content.GetValueForProperty("CertificateSourceParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.KeyVaultCertificateSourceParametersTypeConverter.ConvertFrom); + } + if (content.Contains("CertificateSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).CertificateSource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource) content.GetValueForProperty("CertificateSource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).CertificateSource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource.CreateFrom); + } + if (content.Contains("ProtocolType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).ProtocolType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType) content.GetValueForProperty("ProtocolType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).ProtocolType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType.CreateFrom); + } + if (content.Contains("MinimumTlsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).MinimumTlsVersion = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion?) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).MinimumTlsVersion, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion.CreateFrom); + } + if (content.Contains("CertificateSourceParameterUpdateRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterUpdateRule = (string) content.GetValueForProperty("CertificateSourceParameterUpdateRule",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterUpdateRule, global::System.Convert.ToString); + } + if (content.Contains("CertificateSourceParameterDeleteRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterDeleteRule = (string) content.GetValueForProperty("CertificateSourceParameterDeleteRule",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterDeleteRule, global::System.Convert.ToString); + } + if (content.Contains("CertificateSourceParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterTypeName = (string) content.GetValueForProperty("CertificateSourceParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("CertificateSourceParameterSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterSubscriptionId = (string) content.GetValueForProperty("CertificateSourceParameterSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterSubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("CertificateSourceParameterResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterResourceGroupName = (string) content.GetValueForProperty("CertificateSourceParameterResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("CertificateSourceParameterVaultName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterVaultName = (string) content.GetValueForProperty("CertificateSourceParameterVaultName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterVaultName, global::System.Convert.ToString); + } + if (content.Contains("CertificateSourceParameterSecretName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterSecretName = (string) content.GetValueForProperty("CertificateSourceParameterSecretName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterSecretName, global::System.Convert.ToString); + } + if (content.Contains("CertificateSourceParameterSecretVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterSecretVersion = (string) content.GetValueForProperty("CertificateSourceParameterSecretVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterSecretVersion, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UserManagedHttpsParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CertificateSourceParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameter = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParameters) content.GetValueForProperty("CertificateSourceParameter",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameter, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.KeyVaultCertificateSourceParametersTypeConverter.ConvertFrom); + } + if (content.Contains("CertificateSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).CertificateSource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource) content.GetValueForProperty("CertificateSource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).CertificateSource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource.CreateFrom); + } + if (content.Contains("ProtocolType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).ProtocolType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType) content.GetValueForProperty("ProtocolType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).ProtocolType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType.CreateFrom); + } + if (content.Contains("MinimumTlsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).MinimumTlsVersion = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion?) content.GetValueForProperty("MinimumTlsVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)this).MinimumTlsVersion, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion.CreateFrom); + } + if (content.Contains("CertificateSourceParameterUpdateRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterUpdateRule = (string) content.GetValueForProperty("CertificateSourceParameterUpdateRule",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterUpdateRule, global::System.Convert.ToString); + } + if (content.Contains("CertificateSourceParameterDeleteRule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterDeleteRule = (string) content.GetValueForProperty("CertificateSourceParameterDeleteRule",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterDeleteRule, global::System.Convert.ToString); + } + if (content.Contains("CertificateSourceParameterTypeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterTypeName = (string) content.GetValueForProperty("CertificateSourceParameterTypeName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterTypeName, global::System.Convert.ToString); + } + if (content.Contains("CertificateSourceParameterSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterSubscriptionId = (string) content.GetValueForProperty("CertificateSourceParameterSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterSubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("CertificateSourceParameterResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterResourceGroupName = (string) content.GetValueForProperty("CertificateSourceParameterResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("CertificateSourceParameterVaultName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterVaultName = (string) content.GetValueForProperty("CertificateSourceParameterVaultName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterVaultName, global::System.Convert.ToString); + } + if (content.Contains("CertificateSourceParameterSecretName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterSecretName = (string) content.GetValueForProperty("CertificateSourceParameterSecretName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterSecretName, global::System.Convert.ToString); + } + if (content.Contains("CertificateSourceParameterSecretVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterSecretVersion = (string) content.GetValueForProperty("CertificateSourceParameterSecretVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal)this).CertificateSourceParameterSecretVersion, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + [System.ComponentModel.TypeConverter(typeof(UserManagedHttpsParametersTypeConverter))] + public partial interface IUserManagedHttpsParameters + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UserManagedHttpsParameters.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/UserManagedHttpsParameters.TypeConverter.cs new file mode 100644 index 000000000000..47f5a453caaa --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UserManagedHttpsParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UserManagedHttpsParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UserManagedHttpsParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UserManagedHttpsParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UserManagedHttpsParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UserManagedHttpsParameters.cs b/src/Cdn/generated/api/Models/Api20210601/UserManagedHttpsParameters.cs new file mode 100644 index 000000000000..6a54dcc5dd73 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UserManagedHttpsParameters.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + /// + public partial class UserManagedHttpsParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParameters, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters __customDomainHttpsParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainHttpsParameters(); + + /// Defines the source of the SSL certificate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource CertificateSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)__customDomainHttpsParameters).CertificateSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)__customDomainHttpsParameters).CertificateSource = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParameters _certificateSourceParameter; + + /// + /// Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParameters CertificateSourceParameter { get => (this._certificateSourceParameter = this._certificateSourceParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.KeyVaultCertificateSourceParameters()); set => this._certificateSourceParameter = value; } + + /// + /// Describes the action that shall be taken when the certificate is removed from Key Vault. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string CertificateSourceParameterDeleteRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).DeleteRule; } + + /// Resource group of the user's Key Vault containing the SSL certificate + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string CertificateSourceParameterResourceGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).ResourceGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).ResourceGroupName = value ; } + + /// + /// The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string CertificateSourceParameterSecretName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).SecretName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).SecretName = value ; } + + /// The version(GUID) of Key Vault Secret in Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string CertificateSourceParameterSecretVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).SecretVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).SecretVersion = value ?? null; } + + /// Subscription Id of the user's Key Vault containing the SSL certificate + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string CertificateSourceParameterSubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).SubscriptionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).SubscriptionId = value ; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string CertificateSourceParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).TypeName; } + + /// + /// Describes the action that shall be taken when the certificate is updated in Key Vault. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string CertificateSourceParameterUpdateRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).UpdateRule; } + + /// The name of the user's Key Vault containing the SSL certificate + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string CertificateSourceParameterVaultName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).VaultName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).VaultName = value ; } + + /// Internal Acessors for CertificateSourceParameter + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParameters Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal.CertificateSourceParameter { get => (this._certificateSourceParameter = this._certificateSourceParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.KeyVaultCertificateSourceParameters()); set { {_certificateSourceParameter = value;} } } + + /// Internal Acessors for CertificateSourceParameterDeleteRule + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal.CertificateSourceParameterDeleteRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).DeleteRule; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).DeleteRule = value; } + + /// Internal Acessors for CertificateSourceParameterTypeName + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal.CertificateSourceParameterTypeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).TypeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).TypeName = value; } + + /// Internal Acessors for CertificateSourceParameterUpdateRule + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParametersInternal.CertificateSourceParameterUpdateRule { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).UpdateRule; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParametersInternal)CertificateSourceParameter).UpdateRule = value; } + + /// TLS protocol version that will be used for Https + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion? MinimumTlsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)__customDomainHttpsParameters).MinimumTlsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)__customDomainHttpsParameters).MinimumTlsVersion = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion)""); } + + /// Defines the TLS extension protocol that is used for secure delivery. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType ProtocolType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)__customDomainHttpsParameters).ProtocolType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal)__customDomainHttpsParameters).ProtocolType = value ; } + + /// Creates an new instance. + public UserManagedHttpsParameters() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__customDomainHttpsParameters), __customDomainHttpsParameters); + await eventListener.AssertObjectIsValid(nameof(__customDomainHttpsParameters), __customDomainHttpsParameters); + } + } + /// Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + public partial interface IUserManagedHttpsParameters : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters + { + /// + /// Describes the action that shall be taken when the certificate is removed from Key Vault. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Describes the action that shall be taken when the certificate is removed from Key Vault.", + SerializedName = @"deleteRule", + PossibleTypes = new [] { typeof(string) })] + string CertificateSourceParameterDeleteRule { get; } + /// Resource group of the user's Key Vault containing the SSL certificate + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Resource group of the user's Key Vault containing the SSL certificate", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + string CertificateSourceParameterResourceGroupName { get; set; } + /// + /// The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of Key Vault Secret (representing the full certificate PFX) in Key Vault.", + SerializedName = @"secretName", + PossibleTypes = new [] { typeof(string) })] + string CertificateSourceParameterSecretName { get; set; } + /// The version(GUID) of Key Vault Secret in Key Vault. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The version(GUID) of Key Vault Secret in Key Vault.", + SerializedName = @"secretVersion", + PossibleTypes = new [] { typeof(string) })] + string CertificateSourceParameterSecretVersion { get; set; } + /// Subscription Id of the user's Key Vault containing the SSL certificate + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subscription Id of the user's Key Vault containing the SSL certificate", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + string CertificateSourceParameterSubscriptionId { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"", + SerializedName = @"typeName", + PossibleTypes = new [] { typeof(string) })] + string CertificateSourceParameterTypeName { get; } + /// + /// Describes the action that shall be taken when the certificate is updated in Key Vault. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Describes the action that shall be taken when the certificate is updated in Key Vault.", + SerializedName = @"updateRule", + PossibleTypes = new [] { typeof(string) })] + string CertificateSourceParameterUpdateRule { get; } + /// The name of the user's Key Vault containing the SSL certificate + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the user's Key Vault containing the SSL certificate", + SerializedName = @"vaultName", + PossibleTypes = new [] { typeof(string) })] + string CertificateSourceParameterVaultName { get; set; } + + } + /// Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + internal partial interface IUserManagedHttpsParametersInternal : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParametersInternal + { + /// + /// Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IKeyVaultCertificateSourceParameters CertificateSourceParameter { get; set; } + /// + /// Describes the action that shall be taken when the certificate is removed from Key Vault. + /// + string CertificateSourceParameterDeleteRule { get; set; } + /// Resource group of the user's Key Vault containing the SSL certificate + string CertificateSourceParameterResourceGroupName { get; set; } + /// + /// The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. + /// + string CertificateSourceParameterSecretName { get; set; } + /// The version(GUID) of Key Vault Secret in Key Vault. + string CertificateSourceParameterSecretVersion { get; set; } + /// Subscription Id of the user's Key Vault containing the SSL certificate + string CertificateSourceParameterSubscriptionId { get; set; } + + string CertificateSourceParameterTypeName { get; set; } + /// + /// Describes the action that shall be taken when the certificate is updated in Key Vault. + /// + string CertificateSourceParameterUpdateRule { get; set; } + /// The name of the user's Key Vault containing the SSL certificate + string CertificateSourceParameterVaultName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/UserManagedHttpsParameters.json.cs b/src/Cdn/generated/api/Models/Api20210601/UserManagedHttpsParameters.json.cs new file mode 100644 index 000000000000..ff0961427d35 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/UserManagedHttpsParameters.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// + /// Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + /// + public partial class UserManagedHttpsParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUserManagedHttpsParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new UserManagedHttpsParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __customDomainHttpsParameters?.ToJson(container, serializationMode); + AddIf( null != this._certificateSourceParameter ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._certificateSourceParameter.ToJson(null,serializationMode) : null, "certificateSourceParameters" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal UserManagedHttpsParameters(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __customDomainHttpsParameters = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainHttpsParameters(json); + {_certificateSourceParameter = If( json?.PropertyT("certificateSourceParameters"), out var __jsonCertificateSourceParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.KeyVaultCertificateSourceParameters.FromJson(__jsonCertificateSourceParameters) : CertificateSourceParameter;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainInput.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainInput.PowerShell.cs new file mode 100644 index 000000000000..0f01cf590547 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainInput.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Input of the custom domain to be validated for DNS mapping. + [System.ComponentModel.TypeConverter(typeof(ValidateCustomDomainInputTypeConverter))] + public partial class ValidateCustomDomainInput + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ValidateCustomDomainInput(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ValidateCustomDomainInput(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ValidateCustomDomainInput(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInputInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInputInternal)this).HostName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ValidateCustomDomainInput(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HostName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInputInternal)this).HostName = (string) content.GetValueForProperty("HostName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInputInternal)this).HostName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// Input of the custom domain to be validated for DNS mapping. + [System.ComponentModel.TypeConverter(typeof(ValidateCustomDomainInputTypeConverter))] + public partial interface IValidateCustomDomainInput + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainInput.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainInput.TypeConverter.cs new file mode 100644 index 000000000000..b0f3580c567a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainInput.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ValidateCustomDomainInputTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ValidateCustomDomainInput.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ValidateCustomDomainInput.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ValidateCustomDomainInput.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainInput.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainInput.cs new file mode 100644 index 000000000000..65d17739c6b9 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainInput.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Input of the custom domain to be validated for DNS mapping. + public partial class ValidateCustomDomainInput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInputInternal + { + + /// Backing field for property. + private string _hostName; + + /// The host name of the custom domain. Must be a domain name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string HostName { get => this._hostName; set => this._hostName = value; } + + /// Creates an new instance. + public ValidateCustomDomainInput() + { + + } + } + /// Input of the custom domain to be validated for DNS mapping. + public partial interface IValidateCustomDomainInput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The host name of the custom domain. Must be a domain name. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The host name of the custom domain. Must be a domain name.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + string HostName { get; set; } + + } + /// Input of the custom domain to be validated for DNS mapping. + internal partial interface IValidateCustomDomainInputInternal + + { + /// The host name of the custom domain. Must be a domain name. + string HostName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainInput.json.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainInput.json.cs new file mode 100644 index 000000000000..03367d8f3756 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainInput.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Input of the custom domain to be validated for DNS mapping. + public partial class ValidateCustomDomainInput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ValidateCustomDomainInput(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._hostName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._hostName.ToString()) : null, "hostName" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ValidateCustomDomainInput(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_hostName = If( json?.PropertyT("hostName"), out var __jsonHostName) ? (string)__jsonHostName : (string)HostName;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainOutput.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainOutput.PowerShell.cs new file mode 100644 index 000000000000..7e1163a9997a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainOutput.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Output of custom domain validation. + [System.ComponentModel.TypeConverter(typeof(ValidateCustomDomainOutputTypeConverter))] + public partial class ValidateCustomDomainOutput + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ValidateCustomDomainOutput(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ValidateCustomDomainOutput(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ValidateCustomDomainOutput(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CustomDomainValidated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutputInternal)this).CustomDomainValidated = (bool?) content.GetValueForProperty("CustomDomainValidated",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutputInternal)this).CustomDomainValidated, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Reason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutputInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutputInternal)this).Reason, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutputInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutputInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ValidateCustomDomainOutput(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CustomDomainValidated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutputInternal)this).CustomDomainValidated = (bool?) content.GetValueForProperty("CustomDomainValidated",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutputInternal)this).CustomDomainValidated, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Reason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutputInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutputInternal)this).Reason, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutputInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutputInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// Output of custom domain validation. + [System.ComponentModel.TypeConverter(typeof(ValidateCustomDomainOutputTypeConverter))] + public partial interface IValidateCustomDomainOutput + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainOutput.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainOutput.TypeConverter.cs new file mode 100644 index 000000000000..e1c6be2f6a41 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainOutput.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ValidateCustomDomainOutputTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ValidateCustomDomainOutput.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ValidateCustomDomainOutput.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ValidateCustomDomainOutput.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainOutput.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainOutput.cs new file mode 100644 index 000000000000..b313e7ba57dc --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainOutput.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Output of custom domain validation. + public partial class ValidateCustomDomainOutput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutputInternal + { + + /// Backing field for property. + private bool? _customDomainValidated; + + /// Indicates whether the custom domain is valid or not. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? CustomDomainValidated { get => this._customDomainValidated; } + + /// Backing field for property. + private string _message; + + /// Error message describing why the custom domain is not valid. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for CustomDomainValidated + bool? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutputInternal.CustomDomainValidated { get => this._customDomainValidated; set { {_customDomainValidated = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutputInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for Reason + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutputInternal.Reason { get => this._reason; set { {_reason = value;} } } + + /// Backing field for property. + private string _reason; + + /// The reason why the custom domain is not valid. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Reason { get => this._reason; } + + /// Creates an new instance. + public ValidateCustomDomainOutput() + { + + } + } + /// Output of custom domain validation. + public partial interface IValidateCustomDomainOutput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Indicates whether the custom domain is valid or not. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates whether the custom domain is valid or not.", + SerializedName = @"customDomainValidated", + PossibleTypes = new [] { typeof(bool) })] + bool? CustomDomainValidated { get; } + /// Error message describing why the custom domain is not valid. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Error message describing why the custom domain is not valid.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The reason why the custom domain is not valid. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The reason why the custom domain is not valid.", + SerializedName = @"reason", + PossibleTypes = new [] { typeof(string) })] + string Reason { get; } + + } + /// Output of custom domain validation. + internal partial interface IValidateCustomDomainOutputInternal + + { + /// Indicates whether the custom domain is valid or not. + bool? CustomDomainValidated { get; set; } + /// Error message describing why the custom domain is not valid. + string Message { get; set; } + /// The reason why the custom domain is not valid. + string Reason { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainOutput.json.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainOutput.json.cs new file mode 100644 index 000000000000..10ce512bc187 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateCustomDomainOutput.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Output of custom domain validation. + public partial class ValidateCustomDomainOutput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ValidateCustomDomainOutput(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._customDomainValidated ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._customDomainValidated) : null, "customDomainValidated" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._reason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._reason.ToString()) : null, "reason" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ValidateCustomDomainOutput(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_customDomainValidated = If( json?.PropertyT("customDomainValidated"), out var __jsonCustomDomainValidated) ? (bool?)__jsonCustomDomainValidated : CustomDomainValidated;} + {_reason = If( json?.PropertyT("reason"), out var __jsonReason) ? (string)__jsonReason : (string)Reason;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateProbeInput.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateProbeInput.PowerShell.cs new file mode 100644 index 000000000000..b8019e92f1d2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateProbeInput.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Input of the validate probe API. + [System.ComponentModel.TypeConverter(typeof(ValidateProbeInputTypeConverter))] + public partial class ValidateProbeInput + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInput DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ValidateProbeInput(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ValidateProbeInput(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ValidateProbeInput(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProbeUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInputInternal)this).ProbeUrl = (string) content.GetValueForProperty("ProbeUrl",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInputInternal)this).ProbeUrl, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ValidateProbeInput(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProbeUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInputInternal)this).ProbeUrl = (string) content.GetValueForProperty("ProbeUrl",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInputInternal)this).ProbeUrl, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// Input of the validate probe API. + [System.ComponentModel.TypeConverter(typeof(ValidateProbeInputTypeConverter))] + public partial interface IValidateProbeInput + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateProbeInput.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateProbeInput.TypeConverter.cs new file mode 100644 index 000000000000..8675dcaeaaa6 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateProbeInput.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ValidateProbeInputTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInput ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInput).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ValidateProbeInput.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ValidateProbeInput.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ValidateProbeInput.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateProbeInput.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateProbeInput.cs new file mode 100644 index 000000000000..71a2c3800747 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateProbeInput.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Input of the validate probe API. + public partial class ValidateProbeInput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInput, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInputInternal + { + + /// Backing field for property. + private string _probeUrl; + + /// The probe URL to validate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ProbeUrl { get => this._probeUrl; set => this._probeUrl = value; } + + /// Creates an new instance. + public ValidateProbeInput() + { + + } + } + /// Input of the validate probe API. + public partial interface IValidateProbeInput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// The probe URL to validate. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The probe URL to validate.", + SerializedName = @"probeURL", + PossibleTypes = new [] { typeof(string) })] + string ProbeUrl { get; set; } + + } + /// Input of the validate probe API. + internal partial interface IValidateProbeInputInternal + + { + /// The probe URL to validate. + string ProbeUrl { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateProbeInput.json.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateProbeInput.json.cs new file mode 100644 index 000000000000..b9e91c232058 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateProbeInput.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Input of the validate probe API. + public partial class ValidateProbeInput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ValidateProbeInput(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._probeUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._probeUrl.ToString()) : null, "probeURL" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ValidateProbeInput(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_probeUrl = If( json?.PropertyT("probeURL"), out var __jsonProbeUrl) ? (string)__jsonProbeUrl : (string)ProbeUrl;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateProbeOutput.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateProbeOutput.PowerShell.cs new file mode 100644 index 000000000000..8d4f596cea54 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateProbeOutput.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Output of the validate probe API. + [System.ComponentModel.TypeConverter(typeof(ValidateProbeOutputTypeConverter))] + public partial class ValidateProbeOutput + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutput DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ValidateProbeOutput(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ValidateProbeOutput(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ValidateProbeOutput(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IsValid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutputInternal)this).IsValid = (bool?) content.GetValueForProperty("IsValid",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutputInternal)this).IsValid, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutputInternal)this).ErrorCode = (string) content.GetValueForProperty("ErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutputInternal)this).ErrorCode, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutputInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutputInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ValidateProbeOutput(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IsValid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutputInternal)this).IsValid = (bool?) content.GetValueForProperty("IsValid",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutputInternal)this).IsValid, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutputInternal)this).ErrorCode = (string) content.GetValueForProperty("ErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutputInternal)this).ErrorCode, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutputInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutputInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// Output of the validate probe API. + [System.ComponentModel.TypeConverter(typeof(ValidateProbeOutputTypeConverter))] + public partial interface IValidateProbeOutput + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateProbeOutput.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateProbeOutput.TypeConverter.cs new file mode 100644 index 000000000000..125159dc2103 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateProbeOutput.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ValidateProbeOutputTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutput ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutput).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ValidateProbeOutput.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ValidateProbeOutput.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ValidateProbeOutput.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateProbeOutput.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateProbeOutput.cs new file mode 100644 index 000000000000..21dd5b7f6ce2 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateProbeOutput.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Output of the validate probe API. + public partial class ValidateProbeOutput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutput, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutputInternal + { + + /// Backing field for property. + private string _errorCode; + + /// Specifies the error code when the probe url is not accepted. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ErrorCode { get => this._errorCode; } + + /// Backing field for property. + private bool? _isValid; + + /// Indicates whether the probe URL is accepted or not. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public bool? IsValid { get => this._isValid; } + + /// Backing field for property. + private string _message; + + /// The detailed error message describing why the probe URL is not accepted. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for ErrorCode + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutputInternal.ErrorCode { get => this._errorCode; set { {_errorCode = value;} } } + + /// Internal Acessors for IsValid + bool? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutputInternal.IsValid { get => this._isValid; set { {_isValid = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutputInternal.Message { get => this._message; set { {_message = value;} } } + + /// Creates an new instance. + public ValidateProbeOutput() + { + + } + } + /// Output of the validate probe API. + public partial interface IValidateProbeOutput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Specifies the error code when the probe url is not accepted. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Specifies the error code when the probe url is not accepted.", + SerializedName = @"errorCode", + PossibleTypes = new [] { typeof(string) })] + string ErrorCode { get; } + /// Indicates whether the probe URL is accepted or not. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates whether the probe URL is accepted or not.", + SerializedName = @"isValid", + PossibleTypes = new [] { typeof(bool) })] + bool? IsValid { get; } + /// The detailed error message describing why the probe URL is not accepted. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The detailed error message describing why the probe URL is not accepted.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + + } + /// Output of the validate probe API. + internal partial interface IValidateProbeOutputInternal + + { + /// Specifies the error code when the probe url is not accepted. + string ErrorCode { get; set; } + /// Indicates whether the probe URL is accepted or not. + bool? IsValid { get; set; } + /// The detailed error message describing why the probe URL is not accepted. + string Message { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateProbeOutput.json.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateProbeOutput.json.cs new file mode 100644 index 000000000000..19061f09d570 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateProbeOutput.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Output of the validate probe API. + public partial class ValidateProbeOutput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutput FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ValidateProbeOutput(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._isValid ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonBoolean((bool)this._isValid) : null, "isValid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._errorCode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._errorCode.ToString()) : null, "errorCode" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ValidateProbeOutput(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_isValid = If( json?.PropertyT("isValid"), out var __jsonIsValid) ? (bool?)__jsonIsValid : IsValid;} + {_errorCode = If( json?.PropertyT("errorCode"), out var __jsonErrorCode) ? (string)__jsonErrorCode : (string)ErrorCode;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateSecretInput.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateSecretInput.PowerShell.cs new file mode 100644 index 000000000000..eef1b7581eee --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateSecretInput.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Input of the secret to be validated. + [System.ComponentModel.TypeConverter(typeof(ValidateSecretInputTypeConverter))] + public partial class ValidateSecretInput + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ValidateSecretInput(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ValidateSecretInput(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ValidateSecretInput(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SecretSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInputInternal)this).SecretSource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("SecretSource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInputInternal)this).SecretSource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SecretType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInputInternal)this).SecretType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType) content.GetValueForProperty("SecretType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInputInternal)this).SecretType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + if (content.Contains("SecretVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInputInternal)this).SecretVersion = (string) content.GetValueForProperty("SecretVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInputInternal)this).SecretVersion, global::System.Convert.ToString); + } + if (content.Contains("SecretSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInputInternal)this).SecretSourceId = (string) content.GetValueForProperty("SecretSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInputInternal)this).SecretSourceId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ValidateSecretInput(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SecretSource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInputInternal)this).SecretSource = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) content.GetValueForProperty("SecretSource",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInputInternal)this).SecretSource, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("SecretType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInputInternal)this).SecretType = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType) content.GetValueForProperty("SecretType",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInputInternal)this).SecretType, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType.CreateFrom); + } + if (content.Contains("SecretVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInputInternal)this).SecretVersion = (string) content.GetValueForProperty("SecretVersion",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInputInternal)this).SecretVersion, global::System.Convert.ToString); + } + if (content.Contains("SecretSourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInputInternal)this).SecretSourceId = (string) content.GetValueForProperty("SecretSourceId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInputInternal)this).SecretSourceId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// Input of the secret to be validated. + [System.ComponentModel.TypeConverter(typeof(ValidateSecretInputTypeConverter))] + public partial interface IValidateSecretInput + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateSecretInput.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateSecretInput.TypeConverter.cs new file mode 100644 index 000000000000..3abe826fa782 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateSecretInput.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ValidateSecretInputTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ValidateSecretInput.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ValidateSecretInput.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ValidateSecretInput.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateSecretInput.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateSecretInput.cs new file mode 100644 index 000000000000..333999105444 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateSecretInput.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Input of the secret to be validated. + public partial class ValidateSecretInput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInputInternal + { + + /// Internal Acessors for SecretSource + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInputInternal.SecretSource { get => (this._secretSource = this._secretSource ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set { {_secretSource = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference _secretSource; + + /// + /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference SecretSource { get => (this._secretSource = this._secretSource ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference()); set => this._secretSource = value; } + + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Inlined)] + public string SecretSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)SecretSource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReferenceInternal)SecretSource).Id = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType _secretType; + + /// The secret type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType SecretType { get => this._secretType; set => this._secretType = value; } + + /// Backing field for property. + private string _secretVersion; + + /// Secret version, if customer is using a specific version. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string SecretVersion { get => this._secretVersion; set => this._secretVersion = value; } + + /// Creates an new instance. + public ValidateSecretInput() + { + + } + } + /// Input of the secret to be validated. + public partial interface IValidateSecretInput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Resource ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string SecretSourceId { get; set; } + /// The secret type. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The secret type.", + SerializedName = @"secretType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType SecretType { get; set; } + /// Secret version, if customer is using a specific version. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Secret version, if customer is using a specific version.", + SerializedName = @"secretVersion", + PossibleTypes = new [] { typeof(string) })] + string SecretVersion { get; set; } + + } + /// Input of the secret to be validated. + internal partial interface IValidateSecretInputInternal + + { + /// + /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference SecretSource { get; set; } + /// Resource ID. + string SecretSourceId { get; set; } + /// The secret type. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType SecretType { get; set; } + /// Secret version, if customer is using a specific version. + string SecretVersion { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateSecretInput.json.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateSecretInput.json.cs new file mode 100644 index 000000000000..b808c3bdda25 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateSecretInput.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Input of the secret to be validated. + public partial class ValidateSecretInput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ValidateSecretInput(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._secretSource ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) this._secretSource.ToJson(null,serializationMode) : null, "secretSource" ,container.Add ); + AddIf( null != (((object)this._secretType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._secretType.ToString()) : null, "secretType" ,container.Add ); + AddIf( null != (((object)this._secretVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._secretVersion.ToString()) : null, "secretVersion" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ValidateSecretInput(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_secretSource = If( json?.PropertyT("secretSource"), out var __jsonSecretSource) ? Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ResourceReference.FromJson(__jsonSecretSource) : SecretSource;} + {_secretType = If( json?.PropertyT("secretType"), out var __jsonSecretType) ? (string)__jsonSecretType : (string)SecretType;} + {_secretVersion = If( json?.PropertyT("secretVersion"), out var __jsonSecretVersion) ? (string)__jsonSecretVersion : (string)SecretVersion;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateSecretOutput.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateSecretOutput.PowerShell.cs new file mode 100644 index 000000000000..66727a97bc4e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateSecretOutput.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Output of the validated secret. + [System.ComponentModel.TypeConverter(typeof(ValidateSecretOutputTypeConverter))] + public partial class ValidateSecretOutput + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ValidateSecretOutput(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ValidateSecretOutput(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ValidateSecretOutput(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutputInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutputInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status.CreateFrom); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutputInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutputInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ValidateSecretOutput(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutputInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutputInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status.CreateFrom); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutputInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutputInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// Output of the validated secret. + [System.ComponentModel.TypeConverter(typeof(ValidateSecretOutputTypeConverter))] + public partial interface IValidateSecretOutput + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateSecretOutput.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateSecretOutput.TypeConverter.cs new file mode 100644 index 000000000000..dee9f0dd3a94 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateSecretOutput.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ValidateSecretOutputTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ValidateSecretOutput.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ValidateSecretOutput.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ValidateSecretOutput.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateSecretOutput.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateSecretOutput.cs new file mode 100644 index 000000000000..160eaa031206 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateSecretOutput.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Output of the validated secret. + public partial class ValidateSecretOutput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutputInternal + { + + /// Backing field for property. + private string _message; + + /// Detailed error message + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Message { get => this._message; set => this._message = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status? _status; + + /// The validation status. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status? Status { get => this._status; set => this._status = value; } + + /// Creates an new instance. + public ValidateSecretOutput() + { + + } + } + /// Output of the validated secret. + public partial interface IValidateSecretOutput : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Detailed error message + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Detailed error message", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// The validation status. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The validation status.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status? Status { get; set; } + + } + /// Output of the validated secret. + internal partial interface IValidateSecretOutputInternal + + { + /// Detailed error message + string Message { get; set; } + /// The validation status. + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status? Status { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidateSecretOutput.json.cs b/src/Cdn/generated/api/Models/Api20210601/ValidateSecretOutput.json.cs new file mode 100644 index 000000000000..bc4d24fdf420 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidateSecretOutput.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Output of the validated secret. + public partial class ValidateSecretOutput + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ValidateSecretOutput(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ValidateSecretOutput(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidationToken.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/ValidationToken.PowerShell.cs new file mode 100644 index 000000000000..74653371799b --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidationToken.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// The validation token. + [System.ComponentModel.TypeConverter(typeof(ValidationTokenTypeConverter))] + public partial class ValidationToken + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidationToken DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ValidationToken(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidationToken DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ValidationToken(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidationToken FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ValidationToken(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Token")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidationTokenInternal)this).Token = (string) content.GetValueForProperty("Token",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidationTokenInternal)this).Token, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ValidationToken(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Token")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidationTokenInternal)this).Token = (string) content.GetValueForProperty("Token",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidationTokenInternal)this).Token, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// The validation token. + [System.ComponentModel.TypeConverter(typeof(ValidationTokenTypeConverter))] + public partial interface IValidationToken + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidationToken.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/ValidationToken.TypeConverter.cs new file mode 100644 index 000000000000..2495f4707b11 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidationToken.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ValidationTokenTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidationToken ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidationToken).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ValidationToken.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ValidationToken.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ValidationToken.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidationToken.cs b/src/Cdn/generated/api/Models/Api20210601/ValidationToken.cs new file mode 100644 index 000000000000..abd82a97f605 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidationToken.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The validation token. + public partial class ValidationToken : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidationToken, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidationTokenInternal + { + + /// Internal Acessors for Token + string Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidationTokenInternal.Token { get => this._token; set { {_token = value;} } } + + /// Backing field for property. + private string _token; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Token { get => this._token; } + + /// Creates an new instance. + public ValidationToken() + { + + } + } + /// The validation token. + public partial interface IValidationToken : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"", + SerializedName = @"token", + PossibleTypes = new [] { typeof(string) })] + string Token { get; } + + } + /// The validation token. + internal partial interface IValidationTokenInternal + + { + string Token { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/ValidationToken.json.cs b/src/Cdn/generated/api/Models/Api20210601/ValidationToken.json.cs new file mode 100644 index 000000000000..8f6a9c21ae96 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/ValidationToken.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// The validation token. + public partial class ValidationToken + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidationToken. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidationToken. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidationToken FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new ValidationToken(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._token)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._token.ToString()) : null, "token" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal ValidationToken(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_token = If( json?.PropertyT("token"), out var __jsonToken) ? (string)__jsonToken : (string)Token;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponse.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponse.PowerShell.cs new file mode 100644 index 000000000000..a1b254b5ae6a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponse.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Waf Metrics Response + [System.ComponentModel.TypeConverter(typeof(WafMetricsResponseTypeConverter))] + public partial class WafMetricsResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new WafMetricsResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new WafMetricsResponse(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal WafMetricsResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DateTimeBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseInternal)this).DateTimeBegin = (global::System.DateTime?) content.GetValueForProperty("DateTimeBegin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseInternal)this).DateTimeBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("DateTimeEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseInternal)this).DateTimeEnd = (global::System.DateTime?) content.GetValueForProperty("DateTimeEnd",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseInternal)this).DateTimeEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Granularity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseInternal)this).Granularity = (string) content.GetValueForProperty("Granularity",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseInternal)this).Granularity, global::System.Convert.ToString); + } + if (content.Contains("Series")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseInternal)this).Series = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItem[]) content.GetValueForProperty("Series",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseInternal)this).Series, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafMetricsResponseSeriesItemTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal WafMetricsResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DateTimeBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseInternal)this).DateTimeBegin = (global::System.DateTime?) content.GetValueForProperty("DateTimeBegin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseInternal)this).DateTimeBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("DateTimeEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseInternal)this).DateTimeEnd = (global::System.DateTime?) content.GetValueForProperty("DateTimeEnd",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseInternal)this).DateTimeEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Granularity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseInternal)this).Granularity = (string) content.GetValueForProperty("Granularity",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseInternal)this).Granularity, global::System.Convert.ToString); + } + if (content.Contains("Series")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseInternal)this).Series = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItem[]) content.GetValueForProperty("Series",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseInternal)this).Series, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafMetricsResponseSeriesItemTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + } + /// Waf Metrics Response + [System.ComponentModel.TypeConverter(typeof(WafMetricsResponseTypeConverter))] + public partial interface IWafMetricsResponse + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponse.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponse.TypeConverter.cs new file mode 100644 index 000000000000..cb97ab82f952 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponse.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class WafMetricsResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return WafMetricsResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return WafMetricsResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return WafMetricsResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponse.cs b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponse.cs new file mode 100644 index 000000000000..e2b42f1cd702 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponse.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Waf Metrics Response + public partial class WafMetricsResponse : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponse, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseInternal + { + + /// Backing field for property. + private global::System.DateTime? _dateTimeBegin; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public global::System.DateTime? DateTimeBegin { get => this._dateTimeBegin; set => this._dateTimeBegin = value; } + + /// Backing field for property. + private global::System.DateTime? _dateTimeEnd; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public global::System.DateTime? DateTimeEnd { get => this._dateTimeEnd; set => this._dateTimeEnd = value; } + + /// Backing field for property. + private string _granularity; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Granularity { get => this._granularity; set => this._granularity = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItem[] _series; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItem[] Series { get => this._series; set => this._series = value; } + + /// Creates an new instance. + public WafMetricsResponse() + { + + } + } + /// Waf Metrics Response + public partial interface IWafMetricsResponse : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeBegin", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DateTimeBegin { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DateTimeEnd { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"granularity", + PossibleTypes = new [] { typeof(string) })] + string Granularity { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"series", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItem[] Series { get; set; } + + } + /// Waf Metrics Response + internal partial interface IWafMetricsResponseInternal + + { + global::System.DateTime? DateTimeBegin { get; set; } + + global::System.DateTime? DateTimeEnd { get; set; } + + string Granularity { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItem[] Series { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponse.json.cs b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponse.json.cs new file mode 100644 index 000000000000..b803228725c9 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponse.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Waf Metrics Response + public partial class WafMetricsResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new WafMetricsResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._dateTimeBegin ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._dateTimeBegin?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "dateTimeBegin" ,container.Add ); + AddIf( null != this._dateTimeEnd ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._dateTimeEnd?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "dateTimeEnd" ,container.Add ); + AddIf( null != (((object)this._granularity)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._granularity.ToString()) : null, "granularity" ,container.Add ); + if (null != this._series) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._series ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("series",__w); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal WafMetricsResponse(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dateTimeBegin = If( json?.PropertyT("dateTimeBegin"), out var __jsonDateTimeBegin) ? global::System.DateTime.TryParse((string)__jsonDateTimeBegin, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonDateTimeBeginValue) ? __jsonDateTimeBeginValue : DateTimeBegin : DateTimeBegin;} + {_dateTimeEnd = If( json?.PropertyT("dateTimeEnd"), out var __jsonDateTimeEnd) ? global::System.DateTime.TryParse((string)__jsonDateTimeEnd, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonDateTimeEndValue) ? __jsonDateTimeEndValue : DateTimeEnd : DateTimeEnd;} + {_granularity = If( json?.PropertyT("granularity"), out var __jsonGranularity) ? (string)__jsonGranularity : (string)Granularity;} + {_series = If( json?.PropertyT("series"), out var __jsonSeries) ? If( __jsonSeries as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItem) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafMetricsResponseSeriesItem.FromJson(__u) )) ))() : null : Series;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesItem.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesItem.PowerShell.cs new file mode 100644 index 000000000000..5a474fa993cd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesItem.PowerShell.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(WafMetricsResponseSeriesItemTypeConverter))] + public partial class WafMetricsResponseSeriesItem + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new WafMetricsResponseSeriesItem(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new WafMetricsResponseSeriesItem(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal WafMetricsResponseSeriesItem(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Metric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItemInternal)this).Metric = (string) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItemInternal)this).Metric, global::System.Convert.ToString); + } + if (content.Contains("Unit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItemInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItemInternal)this).Unit, global::System.Convert.ToString); + } + if (content.Contains("Group")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItemInternal)this).Group = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItem[]) content.GetValueForProperty("Group",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItemInternal)this).Group, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafMetricsResponseSeriesPropertiesItemsItemTypeConverter.ConvertFrom)); + } + if (content.Contains("Data")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItemInternal)this).Data = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems[]) content.GetValueForProperty("Data",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItemInternal)this).Data, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItemsTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal WafMetricsResponseSeriesItem(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Metric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItemInternal)this).Metric = (string) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItemInternal)this).Metric, global::System.Convert.ToString); + } + if (content.Contains("Unit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItemInternal)this).Unit = (string) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItemInternal)this).Unit, global::System.Convert.ToString); + } + if (content.Contains("Group")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItemInternal)this).Group = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItem[]) content.GetValueForProperty("Group",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItemInternal)this).Group, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafMetricsResponseSeriesPropertiesItemsItemTypeConverter.ConvertFrom)); + } + if (content.Contains("Data")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItemInternal)this).Data = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems[]) content.GetValueForProperty("Data",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItemInternal)this).Data, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItemsTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + } + [System.ComponentModel.TypeConverter(typeof(WafMetricsResponseSeriesItemTypeConverter))] + public partial interface IWafMetricsResponseSeriesItem + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesItem.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesItem.TypeConverter.cs new file mode 100644 index 000000000000..1b3987a4caac --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesItem.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class WafMetricsResponseSeriesItemTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItem ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItem).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return WafMetricsResponseSeriesItem.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return WafMetricsResponseSeriesItem.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return WafMetricsResponseSeriesItem.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesItem.cs b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesItem.cs new file mode 100644 index 000000000000..85c34b73052e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesItem.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class WafMetricsResponseSeriesItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItem, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItemInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems[] _data; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems[] Data { get => this._data; set => this._data = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItem[] _group; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItem[] Group { get => this._group; set => this._group = value; } + + /// Backing field for property. + private string _metric; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Metric { get => this._metric; set => this._metric = value; } + + /// Backing field for property. + private string _unit; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Unit { get => this._unit; set => this._unit = value; } + + /// Creates an new instance. + public WafMetricsResponseSeriesItem() + { + + } + } + public partial interface IWafMetricsResponseSeriesItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"data", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems[] Data { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"groups", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItem[] Group { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"metric", + PossibleTypes = new [] { typeof(string) })] + string Metric { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"unit", + PossibleTypes = new [] { typeof(string) })] + string Unit { get; set; } + + } + internal partial interface IWafMetricsResponseSeriesItemInternal + + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems[] Data { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItem[] Group { get; set; } + + string Metric { get; set; } + + string Unit { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesItem.json.cs b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesItem.json.cs new file mode 100644 index 000000000000..29830699d37c --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesItem.json.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class WafMetricsResponseSeriesItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new WafMetricsResponseSeriesItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._metric)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._metric.ToString()) : null, "metric" ,container.Add ); + AddIf( null != (((object)this._unit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._unit.ToString()) : null, "unit" ,container.Add ); + if (null != this._group) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._group ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("groups",__w); + } + if (null != this._data) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._data ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("data",__r); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal WafMetricsResponseSeriesItem(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_metric = If( json?.PropertyT("metric"), out var __jsonMetric) ? (string)__jsonMetric : (string)Metric;} + {_unit = If( json?.PropertyT("unit"), out var __jsonUnit) ? (string)__jsonUnit : (string)Unit;} + {_group = If( json?.PropertyT("groups"), out var __jsonGroups) ? If( __jsonGroups as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItem) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafMetricsResponseSeriesPropertiesItemsItem.FromJson(__u) )) ))() : null : Group;} + {_data = If( json?.PropertyT("data"), out var __jsonData) ? If( __jsonData as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponents18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.FromJson(__p) )) ))() : null : Data;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesPropertiesItemsItem.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesPropertiesItemsItem.PowerShell.cs new file mode 100644 index 000000000000..e8c3f0461c2f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesPropertiesItemsItem.PowerShell.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(WafMetricsResponseSeriesPropertiesItemsItemTypeConverter))] + public partial class WafMetricsResponseSeriesPropertiesItemsItem + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new WafMetricsResponseSeriesPropertiesItemsItem(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new WafMetricsResponseSeriesPropertiesItemsItem(content); + } + + /// + /// Creates a new instance of , deserializing the content from a + /// json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal WafMetricsResponseSeriesPropertiesItemsItem(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItemInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItemInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItemInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItemInternal)this).Value, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal WafMetricsResponseSeriesPropertiesItemsItem(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItemInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItemInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItemInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItemInternal)this).Value, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + [System.ComponentModel.TypeConverter(typeof(WafMetricsResponseSeriesPropertiesItemsItemTypeConverter))] + public partial interface IWafMetricsResponseSeriesPropertiesItemsItem + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesPropertiesItemsItem.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesPropertiesItemsItem.TypeConverter.cs new file mode 100644 index 000000000000..5f4e893a8ee0 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesPropertiesItemsItem.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class WafMetricsResponseSeriesPropertiesItemsItemTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItem ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItem).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return WafMetricsResponseSeriesPropertiesItemsItem.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return WafMetricsResponseSeriesPropertiesItemsItem.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return WafMetricsResponseSeriesPropertiesItemsItem.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesPropertiesItemsItem.cs b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesPropertiesItemsItem.cs new file mode 100644 index 000000000000..b884db8741ba --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesPropertiesItemsItem.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class WafMetricsResponseSeriesPropertiesItemsItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItem, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItemInternal + { + + /// Backing field for property. + private string _name; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _value; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Value { get => this._value; set => this._value = value; } + + /// + /// Creates an new instance. + /// + public WafMetricsResponseSeriesPropertiesItemsItem() + { + + } + } + public partial interface IWafMetricsResponseSeriesPropertiesItemsItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"value", + PossibleTypes = new [] { typeof(string) })] + string Value { get; set; } + + } + internal partial interface IWafMetricsResponseSeriesPropertiesItemsItemInternal + + { + string Name { get; set; } + + string Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesPropertiesItemsItem.json.cs b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesPropertiesItemsItem.json.cs new file mode 100644 index 000000000000..9e6f7861767f --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafMetricsResponseSeriesPropertiesItemsItem.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class WafMetricsResponseSeriesPropertiesItemsItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponseSeriesPropertiesItemsItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new WafMetricsResponseSeriesPropertiesItemsItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._value.ToString()) : null, "value" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal WafMetricsResponseSeriesPropertiesItemsItem(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)Value;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponse.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponse.PowerShell.cs new file mode 100644 index 000000000000..338ebddc888a --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponse.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// Waf Rankings Response + [System.ComponentModel.TypeConverter(typeof(WafRankingsResponseTypeConverter))] + public partial class WafRankingsResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new WafRankingsResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new WafRankingsResponse(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal WafRankingsResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DateTimeBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseInternal)this).DateTimeBegin = (global::System.DateTime?) content.GetValueForProperty("DateTimeBegin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseInternal)this).DateTimeBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("DateTimeEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseInternal)this).DateTimeEnd = (global::System.DateTime?) content.GetValueForProperty("DateTimeEnd",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseInternal)this).DateTimeEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Group")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseInternal)this).Group = (string[]) content.GetValueForProperty("Group",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseInternal)this).Group, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Data")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseInternal)this).Data = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItem[]) content.GetValueForProperty("Data",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseInternal)this).Data, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafRankingsResponseDataItemTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal WafRankingsResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DateTimeBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseInternal)this).DateTimeBegin = (global::System.DateTime?) content.GetValueForProperty("DateTimeBegin",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseInternal)this).DateTimeBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("DateTimeEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseInternal)this).DateTimeEnd = (global::System.DateTime?) content.GetValueForProperty("DateTimeEnd",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseInternal)this).DateTimeEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Group")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseInternal)this).Group = (string[]) content.GetValueForProperty("Group",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseInternal)this).Group, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Data")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseInternal)this).Data = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItem[]) content.GetValueForProperty("Data",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseInternal)this).Data, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafRankingsResponseDataItemTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + } + /// Waf Rankings Response + [System.ComponentModel.TypeConverter(typeof(WafRankingsResponseTypeConverter))] + public partial interface IWafRankingsResponse + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponse.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponse.TypeConverter.cs new file mode 100644 index 000000000000..51236b8c8d29 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponse.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class WafRankingsResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return WafRankingsResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return WafRankingsResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return WafRankingsResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponse.cs b/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponse.cs new file mode 100644 index 000000000000..9657cc853ce3 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponse.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Waf Rankings Response + public partial class WafRankingsResponse : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponse, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItem[] _data; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItem[] Data { get => this._data; set => this._data = value; } + + /// Backing field for property. + private global::System.DateTime? _dateTimeBegin; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public global::System.DateTime? DateTimeBegin { get => this._dateTimeBegin; set => this._dateTimeBegin = value; } + + /// Backing field for property. + private global::System.DateTime? _dateTimeEnd; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public global::System.DateTime? DateTimeEnd { get => this._dateTimeEnd; set => this._dateTimeEnd = value; } + + /// Backing field for property. + private string[] _group; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] Group { get => this._group; set => this._group = value; } + + /// Creates an new instance. + public WafRankingsResponse() + { + + } + } + /// Waf Rankings Response + public partial interface IWafRankingsResponse : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"data", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItem[] Data { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeBegin", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DateTimeBegin { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DateTimeEnd { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"groups", + PossibleTypes = new [] { typeof(string) })] + string[] Group { get; set; } + + } + /// Waf Rankings Response + internal partial interface IWafRankingsResponseInternal + + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItem[] Data { get; set; } + + global::System.DateTime? DateTimeBegin { get; set; } + + global::System.DateTime? DateTimeEnd { get; set; } + + string[] Group { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponse.json.cs b/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponse.json.cs new file mode 100644 index 000000000000..dd4f981030dc --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponse.json.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + /// Waf Rankings Response + public partial class WafRankingsResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new WafRankingsResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._dateTimeBegin ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._dateTimeBegin?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "dateTimeBegin" ,container.Add ); + AddIf( null != this._dateTimeEnd ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._dateTimeEnd?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "dateTimeEnd" ,container.Add ); + if (null != this._group) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._group ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("groups",__w); + } + if (null != this._data) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._data ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("data",__r); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal WafRankingsResponse(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dateTimeBegin = If( json?.PropertyT("dateTimeBegin"), out var __jsonDateTimeBegin) ? global::System.DateTime.TryParse((string)__jsonDateTimeBegin, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonDateTimeBeginValue) ? __jsonDateTimeBeginValue : DateTimeBegin : DateTimeBegin;} + {_dateTimeEnd = If( json?.PropertyT("dateTimeEnd"), out var __jsonDateTimeEnd) ? global::System.DateTime.TryParse((string)__jsonDateTimeEnd, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonDateTimeEndValue) ? __jsonDateTimeEndValue : DateTimeEnd : DateTimeEnd;} + {_group = If( json?.PropertyT("groups"), out var __jsonGroups) ? If( __jsonGroups as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Group;} + {_data = If( json?.PropertyT("data"), out var __jsonData) ? If( __jsonData as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItem) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.WafRankingsResponseDataItem.FromJson(__p) )) ))() : null : Data;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponseDataItem.PowerShell.cs b/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponseDataItem.PowerShell.cs new file mode 100644 index 000000000000..7b9bee80fdbd --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponseDataItem.PowerShell.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(WafRankingsResponseDataItemTypeConverter))] + public partial class WafRankingsResponseDataItem + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new WafRankingsResponseDataItem(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new WafRankingsResponseDataItem(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal WafRankingsResponseDataItem(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GroupValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItemInternal)this).GroupValue = (string[]) content.GetValueForProperty("GroupValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItemInternal)this).GroupValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Metric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItemInternal)this).Metric = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems[]) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItemInternal)this).Metric, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal WafRankingsResponseDataItem(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GroupValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItemInternal)this).GroupValue = (string[]) content.GetValueForProperty("GroupValue",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItemInternal)this).GroupValue, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Metric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItemInternal)this).Metric = (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems[]) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItemInternal)this).Metric, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItemsTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + } + [System.ComponentModel.TypeConverter(typeof(WafRankingsResponseDataItemTypeConverter))] + public partial interface IWafRankingsResponseDataItem + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponseDataItem.TypeConverter.cs b/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponseDataItem.TypeConverter.cs new file mode 100644 index 000000000000..b9b6caa57f02 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponseDataItem.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class WafRankingsResponseDataItemTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItem ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItem).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return WafRankingsResponseDataItem.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return WafRankingsResponseDataItem.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return WafRankingsResponseDataItem.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponseDataItem.cs b/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponseDataItem.cs new file mode 100644 index 000000000000..84ff86c5f95e --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponseDataItem.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class WafRankingsResponseDataItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItem, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItemInternal + { + + /// Backing field for property. + private string[] _groupValue; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string[] GroupValue { get => this._groupValue; set => this._groupValue = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems[] _metric; + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems[] Metric { get => this._metric; set => this._metric = value; } + + /// Creates an new instance. + public WafRankingsResponseDataItem() + { + + } + } + public partial interface IWafRankingsResponseDataItem : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"groupValues", + PossibleTypes = new [] { typeof(string) })] + string[] GroupValue { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"metrics", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems) })] + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems[] Metric { get; set; } + + } + internal partial interface IWafRankingsResponseDataItemInternal + + { + string[] GroupValue { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems[] Metric { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponseDataItem.json.cs b/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponseDataItem.json.cs new file mode 100644 index 000000000000..8e065e602352 --- /dev/null +++ b/src/Cdn/generated/api/Models/Api20210601/WafRankingsResponseDataItem.json.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class WafRankingsResponseDataItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponseDataItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new WafRankingsResponseDataItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._groupValue) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __x in this._groupValue ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("groupValues",__w); + } + if (null != this._metric) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.XNodeArray(); + foreach( var __s in this._metric ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("metrics",__r); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal WafRankingsResponseDataItem(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_groupValue = If( json?.PropertyT("groupValues"), out var __jsonGroupValues) ? If( __jsonGroupValues as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : GroupValue;} + {_metric = If( json?.PropertyT("metrics"), out var __jsonMetrics) ? If( __jsonMetrics as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems) (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.FromJson(__p) )) ))() : null : Metric;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/CdnIdentity.PowerShell.cs b/src/Cdn/generated/api/Models/CdnIdentity.PowerShell.cs new file mode 100644 index 000000000000..e39175edc0a6 --- /dev/null +++ b/src/Cdn/generated/api/Models/CdnIdentity.PowerShell.cs @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(CdnIdentityTypeConverter))] + public partial class CdnIdentity + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CdnIdentity(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("ResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("CustomDomainName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).CustomDomainName = (string) content.GetValueForProperty("CustomDomainName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).CustomDomainName, global::System.Convert.ToString); + } + if (content.Contains("EndpointName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).EndpointName = (string) content.GetValueForProperty("EndpointName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).EndpointName, global::System.Convert.ToString); + } + if (content.Contains("OriginGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).OriginGroupName = (string) content.GetValueForProperty("OriginGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).OriginGroupName, global::System.Convert.ToString); + } + if (content.Contains("OriginName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).OriginName = (string) content.GetValueForProperty("OriginName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).OriginName, global::System.Convert.ToString); + } + if (content.Contains("RouteName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).RouteName = (string) content.GetValueForProperty("RouteName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).RouteName, global::System.Convert.ToString); + } + if (content.Contains("RuleSetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).RuleSetName = (string) content.GetValueForProperty("RuleSetName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).RuleSetName, global::System.Convert.ToString); + } + if (content.Contains("RuleName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).RuleName = (string) content.GetValueForProperty("RuleName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).RuleName, global::System.Convert.ToString); + } + if (content.Contains("SecurityPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).SecurityPolicyName = (string) content.GetValueForProperty("SecurityPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).SecurityPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SecretName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).SecretName = (string) content.GetValueForProperty("SecretName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).SecretName, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).Id, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CdnIdentity(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("ResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("ProfileName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("CustomDomainName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).CustomDomainName = (string) content.GetValueForProperty("CustomDomainName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).CustomDomainName, global::System.Convert.ToString); + } + if (content.Contains("EndpointName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).EndpointName = (string) content.GetValueForProperty("EndpointName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).EndpointName, global::System.Convert.ToString); + } + if (content.Contains("OriginGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).OriginGroupName = (string) content.GetValueForProperty("OriginGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).OriginGroupName, global::System.Convert.ToString); + } + if (content.Contains("OriginName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).OriginName = (string) content.GetValueForProperty("OriginName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).OriginName, global::System.Convert.ToString); + } + if (content.Contains("RouteName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).RouteName = (string) content.GetValueForProperty("RouteName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).RouteName, global::System.Convert.ToString); + } + if (content.Contains("RuleSetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).RuleSetName = (string) content.GetValueForProperty("RuleSetName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).RuleSetName, global::System.Convert.ToString); + } + if (content.Contains("RuleName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).RuleName = (string) content.GetValueForProperty("RuleName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).RuleName, global::System.Convert.ToString); + } + if (content.Contains("SecurityPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).SecurityPolicyName = (string) content.GetValueForProperty("SecurityPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).SecurityPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SecretName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).SecretName = (string) content.GetValueForProperty("SecretName",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).SecretName, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal)this).Id, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CdnIdentity(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CdnIdentity(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(CdnIdentityTypeConverter))] + public partial interface ICdnIdentity + + { + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/CdnIdentity.TypeConverter.cs b/src/Cdn/generated/api/Models/CdnIdentity.TypeConverter.cs new file mode 100644 index 000000000000..9b3a9be600d2 --- /dev/null +++ b/src/Cdn/generated/api/Models/CdnIdentity.TypeConverter.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CdnIdentityTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the . + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + // we allow string conversion too. + if (type == typeof(global::System.String)) + { + return true; + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + // support direct string to id type conversion. + if (type == typeof(global::System.String)) + { + return new CdnIdentity { Id = sourceValue }; + } + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CdnIdentity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CdnIdentity.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CdnIdentity.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/CdnIdentity.cs b/src/Cdn/generated/api/Models/CdnIdentity.cs new file mode 100644 index 000000000000..e42c58ba9a0b --- /dev/null +++ b/src/Cdn/generated/api/Models/CdnIdentity.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class CdnIdentity : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentityInternal + { + + /// Backing field for property. + private string _customDomainName; + + /// Name of the domain under the profile which is unique globally. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string CustomDomainName { get => this._customDomainName; set => this._customDomainName = value; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// Backing field for property. + private string _id; + + /// Resource identity path + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Backing field for property. + private string _originGroupName; + + /// Name of the origin group which is unique within the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string OriginGroupName { get => this._originGroupName; set => this._originGroupName = value; } + + /// Backing field for property. + private string _originName; + + /// Name of the origin which is unique within the profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string OriginName { get => this._originName; set => this._originName = value; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _routeName; + + /// Name of the routing rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string RouteName { get => this._routeName; set => this._routeName = value; } + + /// Backing field for property. + private string _ruleName; + + /// Name of the delivery rule which is unique within the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string RuleName { get => this._ruleName; set => this._ruleName = value; } + + /// Backing field for property. + private string _ruleSetName; + + /// Name of the rule set under the profile which is unique globally. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string RuleSetName { get => this._ruleSetName; set => this._ruleSetName = value; } + + /// Backing field for property. + private string _secretName; + + /// Name of the Secret under the profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string SecretName { get => this._secretName; set => this._secretName = value; } + + /// Backing field for property. + private string _securityPolicyName; + + /// Name of the security policy under the profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string SecurityPolicyName { get => this._securityPolicyName; set => this._securityPolicyName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Origin(Microsoft.Azure.PowerShell.Cmdlets.Cdn.PropertyOrigin.Owned)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Creates an new instance. + public CdnIdentity() + { + + } + } + public partial interface ICdnIdentity : + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable + { + /// Name of the domain under the profile which is unique globally. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the domain under the profile which is unique globally.", + SerializedName = @"customDomainName", + PossibleTypes = new [] { typeof(string) })] + string CustomDomainName { get; set; } + /// Name of the endpoint under the profile which is unique globally. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + string EndpointName { get; set; } + /// Resource identity path + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource identity path", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + /// Name of the origin group which is unique within the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the origin group which is unique within the endpoint.", + SerializedName = @"originGroupName", + PossibleTypes = new [] { typeof(string) })] + string OriginGroupName { get; set; } + /// Name of the origin which is unique within the profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the origin which is unique within the profile.", + SerializedName = @"originName", + PossibleTypes = new [] { typeof(string) })] + string OriginName { get; set; } + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + string ProfileName { get; set; } + /// Name of the Resource group within the Azure subscription. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + string ResourceGroupName { get; set; } + /// Name of the routing rule. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the routing rule.", + SerializedName = @"routeName", + PossibleTypes = new [] { typeof(string) })] + string RouteName { get; set; } + /// Name of the delivery rule which is unique within the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the delivery rule which is unique within the endpoint.", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + string RuleName { get; set; } + /// Name of the rule set under the profile which is unique globally. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the rule set under the profile which is unique globally.", + SerializedName = @"ruleSetName", + PossibleTypes = new [] { typeof(string) })] + string RuleSetName { get; set; } + /// Name of the Secret under the profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the Secret under the profile.", + SerializedName = @"secretName", + PossibleTypes = new [] { typeof(string) })] + string SecretName { get; set; } + /// Name of the security policy under the profile. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the security policy under the profile.", + SerializedName = @"securityPolicyName", + PossibleTypes = new [] { typeof(string) })] + string SecurityPolicyName { get; set; } + /// Azure Subscription ID. + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + string SubscriptionId { get; set; } + + } + internal partial interface ICdnIdentityInternal + + { + /// Name of the domain under the profile which is unique globally. + string CustomDomainName { get; set; } + /// Name of the endpoint under the profile which is unique globally. + string EndpointName { get; set; } + /// Resource identity path + string Id { get; set; } + /// Name of the origin group which is unique within the endpoint. + string OriginGroupName { get; set; } + /// Name of the origin which is unique within the profile. + string OriginName { get; set; } + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + /// + string ProfileName { get; set; } + /// Name of the Resource group within the Azure subscription. + string ResourceGroupName { get; set; } + /// Name of the routing rule. + string RouteName { get; set; } + /// Name of the delivery rule which is unique within the endpoint. + string RuleName { get; set; } + /// Name of the rule set under the profile which is unique globally. + string RuleSetName { get; set; } + /// Name of the Secret under the profile. + string SecretName { get; set; } + /// Name of the security policy under the profile. + string SecurityPolicyName { get; set; } + /// Azure Subscription ID. + string SubscriptionId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Models/CdnIdentity.json.cs b/src/Cdn/generated/api/Models/CdnIdentity.json.cs new file mode 100644 index 000000000000..b48c42d1c2cd --- /dev/null +++ b/src/Cdn/generated/api/Models/CdnIdentity.json.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public partial class CdnIdentity + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject instance to deserialize from. + internal CdnIdentity(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} + {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;} + {_profileName = If( json?.PropertyT("profileName"), out var __jsonProfileName) ? (string)__jsonProfileName : (string)ProfileName;} + {_customDomainName = If( json?.PropertyT("customDomainName"), out var __jsonCustomDomainName) ? (string)__jsonCustomDomainName : (string)CustomDomainName;} + {_endpointName = If( json?.PropertyT("endpointName"), out var __jsonEndpointName) ? (string)__jsonEndpointName : (string)EndpointName;} + {_originGroupName = If( json?.PropertyT("originGroupName"), out var __jsonOriginGroupName) ? (string)__jsonOriginGroupName : (string)OriginGroupName;} + {_originName = If( json?.PropertyT("originName"), out var __jsonOriginName) ? (string)__jsonOriginName : (string)OriginName;} + {_routeName = If( json?.PropertyT("routeName"), out var __jsonRouteName) ? (string)__jsonRouteName : (string)RouteName;} + {_ruleSetName = If( json?.PropertyT("ruleSetName"), out var __jsonRuleSetName) ? (string)__jsonRuleSetName : (string)RuleSetName;} + {_ruleName = If( json?.PropertyT("ruleName"), out var __jsonRuleName) ? (string)__jsonRuleName : (string)RuleName;} + {_securityPolicyName = If( json?.PropertyT("securityPolicyName"), out var __jsonSecurityPolicyName) ? (string)__jsonSecurityPolicyName : (string)SecurityPolicyName;} + {_secretName = If( json?.PropertyT("secretName"), out var __jsonSecretName) ? (string)__jsonSecretName : (string)SecretName;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity. + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new CdnIdentity(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add ); + AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add ); + AddIf( null != (((object)this._profileName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._profileName.ToString()) : null, "profileName" ,container.Add ); + AddIf( null != (((object)this._customDomainName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._customDomainName.ToString()) : null, "customDomainName" ,container.Add ); + AddIf( null != (((object)this._endpointName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._endpointName.ToString()) : null, "endpointName" ,container.Add ); + AddIf( null != (((object)this._originGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._originGroupName.ToString()) : null, "originGroupName" ,container.Add ); + AddIf( null != (((object)this._originName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._originName.ToString()) : null, "originName" ,container.Add ); + AddIf( null != (((object)this._routeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._routeName.ToString()) : null, "routeName" ,container.Add ); + AddIf( null != (((object)this._ruleSetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._ruleSetName.ToString()) : null, "ruleSetName" ,container.Add ); + AddIf( null != (((object)this._ruleName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._ruleName.ToString()) : null, "ruleName" ,container.Add ); + AddIf( null != (((object)this._securityPolicyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._securityPolicyName.ToString()) : null, "securityPolicyName" ,container.Add ); + AddIf( null != (((object)this._secretName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._secretName.ToString()) : null, "secretName" ,container.Add ); + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/AfdCertificateType.Completer.cs b/src/Cdn/generated/api/Support/AfdCertificateType.Completer.cs new file mode 100644 index 000000000000..7d0dceb57994 --- /dev/null +++ b/src/Cdn/generated/api/Support/AfdCertificateType.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Defines the source of the SSL certificate. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateTypeTypeConverter))] + public partial struct AfdCertificateType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "CustomerCertificate".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'CustomerCertificate'", "CustomerCertificate", global::System.Management.Automation.CompletionResultType.ParameterValue, "CustomerCertificate"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ManagedCertificate".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ManagedCertificate'", "ManagedCertificate", global::System.Management.Automation.CompletionResultType.ParameterValue, "ManagedCertificate"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "AzureFirstPartyManagedCertificate".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'AzureFirstPartyManagedCertificate'", "AzureFirstPartyManagedCertificate", global::System.Management.Automation.CompletionResultType.ParameterValue, "AzureFirstPartyManagedCertificate"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/AfdCertificateType.TypeConverter.cs b/src/Cdn/generated/api/Support/AfdCertificateType.TypeConverter.cs new file mode 100644 index 000000000000..7f84d98781a1 --- /dev/null +++ b/src/Cdn/generated/api/Support/AfdCertificateType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Defines the source of the SSL certificate. + public partial class AfdCertificateTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => AfdCertificateType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/AfdCertificateType.cs b/src/Cdn/generated/api/Support/AfdCertificateType.cs new file mode 100644 index 000000000000..360930dd2f4d --- /dev/null +++ b/src/Cdn/generated/api/Support/AfdCertificateType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Defines the source of the SSL certificate. + public partial struct AfdCertificateType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType AzureFirstPartyManagedCertificate = @"AzureFirstPartyManagedCertificate"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType CustomerCertificate = @"CustomerCertificate"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType ManagedCertificate = @"ManagedCertificate"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private AfdCertificateType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AfdCertificateType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AfdCertificateType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AfdCertificateType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AfdCertificateType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AfdCertificateType && Equals((AfdCertificateType)obj); + } + + /// Returns hashCode for enum AfdCertificateType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AfdCertificateType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AfdCertificateType + /// the value to convert to an instance of . + + public static implicit operator AfdCertificateType(string value) + { + return new AfdCertificateType(value); + } + + /// Implicit operator to convert AfdCertificateType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType e) + { + return e._value; + } + + /// Overriding != operator for enum AfdCertificateType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AfdCertificateType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/AfdEndpointProtocols.Completer.cs b/src/Cdn/generated/api/Support/AfdEndpointProtocols.Completer.cs new file mode 100644 index 000000000000..b202a000783a --- /dev/null +++ b/src/Cdn/generated/api/Support/AfdEndpointProtocols.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Supported protocols for the customer's endpoint. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocolsTypeConverter))] + public partial struct AfdEndpointProtocols : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Http".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Http'", "Http", global::System.Management.Automation.CompletionResultType.ParameterValue, "Http"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Https".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Https'", "Https", global::System.Management.Automation.CompletionResultType.ParameterValue, "Https"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/AfdEndpointProtocols.TypeConverter.cs b/src/Cdn/generated/api/Support/AfdEndpointProtocols.TypeConverter.cs new file mode 100644 index 000000000000..c220a672d6b7 --- /dev/null +++ b/src/Cdn/generated/api/Support/AfdEndpointProtocols.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Supported protocols for the customer's endpoint. + public partial class AfdEndpointProtocolsTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => AfdEndpointProtocols.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/AfdEndpointProtocols.cs b/src/Cdn/generated/api/Support/AfdEndpointProtocols.cs new file mode 100644 index 000000000000..ee79cd04acc1 --- /dev/null +++ b/src/Cdn/generated/api/Support/AfdEndpointProtocols.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Supported protocols for the customer's endpoint. + public partial struct AfdEndpointProtocols : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols Http = @"Http"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols Https = @"Https"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private AfdEndpointProtocols(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AfdEndpointProtocols + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AfdEndpointProtocols(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AfdEndpointProtocols + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AfdEndpointProtocols (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AfdEndpointProtocols && Equals((AfdEndpointProtocols)obj); + } + + /// Returns hashCode for enum AfdEndpointProtocols + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AfdEndpointProtocols + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AfdEndpointProtocols + /// the value to convert to an instance of . + + public static implicit operator AfdEndpointProtocols(string value) + { + return new AfdEndpointProtocols(value); + } + + /// Implicit operator to convert AfdEndpointProtocols to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols e) + { + return e._value; + } + + /// Overriding != operator for enum AfdEndpointProtocols + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AfdEndpointProtocols + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/AfdMinimumTlsVersion.Completer.cs b/src/Cdn/generated/api/Support/AfdMinimumTlsVersion.Completer.cs new file mode 100644 index 000000000000..c6644aef9239 --- /dev/null +++ b/src/Cdn/generated/api/Support/AfdMinimumTlsVersion.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// TLS protocol version that will be used for Https + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersionTypeConverter))] + public partial struct AfdMinimumTlsVersion : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "TLS10".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'TLS10'", "TLS10", global::System.Management.Automation.CompletionResultType.ParameterValue, "TLS10"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "TLS12".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'TLS12'", "TLS12", global::System.Management.Automation.CompletionResultType.ParameterValue, "TLS12"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/AfdMinimumTlsVersion.TypeConverter.cs b/src/Cdn/generated/api/Support/AfdMinimumTlsVersion.TypeConverter.cs new file mode 100644 index 000000000000..14ccae22e8f8 --- /dev/null +++ b/src/Cdn/generated/api/Support/AfdMinimumTlsVersion.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// TLS protocol version that will be used for Https + public partial class AfdMinimumTlsVersionTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => AfdMinimumTlsVersion.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/AfdMinimumTlsVersion.cs b/src/Cdn/generated/api/Support/AfdMinimumTlsVersion.cs new file mode 100644 index 000000000000..418c9493089c --- /dev/null +++ b/src/Cdn/generated/api/Support/AfdMinimumTlsVersion.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// TLS protocol version that will be used for Https + public partial struct AfdMinimumTlsVersion : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion Tls10 = @"TLS10"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion Tls12 = @"TLS12"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private AfdMinimumTlsVersion(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AfdMinimumTlsVersion + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AfdMinimumTlsVersion(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AfdMinimumTlsVersion + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AfdMinimumTlsVersion (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AfdMinimumTlsVersion && Equals((AfdMinimumTlsVersion)obj); + } + + /// Returns hashCode for enum AfdMinimumTlsVersion + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AfdMinimumTlsVersion + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AfdMinimumTlsVersion + /// the value to convert to an instance of . + + public static implicit operator AfdMinimumTlsVersion(string value) + { + return new AfdMinimumTlsVersion(value); + } + + /// Implicit operator to convert AfdMinimumTlsVersion to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion e) + { + return e._value; + } + + /// Overriding != operator for enum AfdMinimumTlsVersion + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AfdMinimumTlsVersion + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/AfdProvisioningState.Completer.cs b/src/Cdn/generated/api/Support/AfdProvisioningState.Completer.cs new file mode 100644 index 000000000000..1f8719bbd6ce --- /dev/null +++ b/src/Cdn/generated/api/Support/AfdProvisioningState.Completer.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Provisioning status + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningStateTypeConverter))] + public partial struct AfdProvisioningState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/AfdProvisioningState.TypeConverter.cs b/src/Cdn/generated/api/Support/AfdProvisioningState.TypeConverter.cs new file mode 100644 index 000000000000..ef5e29893ca9 --- /dev/null +++ b/src/Cdn/generated/api/Support/AfdProvisioningState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Provisioning status + public partial class AfdProvisioningStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => AfdProvisioningState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/AfdProvisioningState.cs b/src/Cdn/generated/api/Support/AfdProvisioningState.cs new file mode 100644 index 000000000000..49ea2c07ab7b --- /dev/null +++ b/src/Cdn/generated/api/Support/AfdProvisioningState.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Provisioning status + public partial struct AfdProvisioningState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState Creating = @"Creating"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState Deleting = @"Deleting"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState Failed = @"Failed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState Succeeded = @"Succeeded"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState Updating = @"Updating"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private AfdProvisioningState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AfdProvisioningState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AfdProvisioningState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AfdProvisioningState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AfdProvisioningState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AfdProvisioningState && Equals((AfdProvisioningState)obj); + } + + /// Returns hashCode for enum AfdProvisioningState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AfdProvisioningState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AfdProvisioningState + /// the value to convert to an instance of . + + public static implicit operator AfdProvisioningState(string value) + { + return new AfdProvisioningState(value); + } + + /// Implicit operator to convert AfdProvisioningState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState e) + { + return e._value; + } + + /// Overriding != operator for enum AfdProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AfdProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdProvisioningState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/AfdQueryStringCachingBehavior.Completer.cs b/src/Cdn/generated/api/Support/AfdQueryStringCachingBehavior.Completer.cs new file mode 100644 index 000000000000..a5d1c9572de7 --- /dev/null +++ b/src/Cdn/generated/api/Support/AfdQueryStringCachingBehavior.Completer.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehaviorTypeConverter))] + public partial struct AfdQueryStringCachingBehavior : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "IgnoreQueryString".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'IgnoreQueryString'", "IgnoreQueryString", global::System.Management.Automation.CompletionResultType.ParameterValue, "IgnoreQueryString"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "UseQueryString".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'UseQueryString'", "UseQueryString", global::System.Management.Automation.CompletionResultType.ParameterValue, "UseQueryString"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "IgnoreSpecifiedQueryStrings".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'IgnoreSpecifiedQueryStrings'", "IgnoreSpecifiedQueryStrings", global::System.Management.Automation.CompletionResultType.ParameterValue, "IgnoreSpecifiedQueryStrings"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "IncludeSpecifiedQueryStrings".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'IncludeSpecifiedQueryStrings'", "IncludeSpecifiedQueryStrings", global::System.Management.Automation.CompletionResultType.ParameterValue, "IncludeSpecifiedQueryStrings"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/AfdQueryStringCachingBehavior.TypeConverter.cs b/src/Cdn/generated/api/Support/AfdQueryStringCachingBehavior.TypeConverter.cs new file mode 100644 index 000000000000..84fbb6fecee9 --- /dev/null +++ b/src/Cdn/generated/api/Support/AfdQueryStringCachingBehavior.TypeConverter.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + public partial class AfdQueryStringCachingBehaviorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => AfdQueryStringCachingBehavior.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/AfdQueryStringCachingBehavior.cs b/src/Cdn/generated/api/Support/AfdQueryStringCachingBehavior.cs new file mode 100644 index 000000000000..e1a56cbb85a8 --- /dev/null +++ b/src/Cdn/generated/api/Support/AfdQueryStringCachingBehavior.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + public partial struct AfdQueryStringCachingBehavior : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior IgnoreQueryString = @"IgnoreQueryString"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior IgnoreSpecifiedQueryStrings = @"IgnoreSpecifiedQueryStrings"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior IncludeSpecifiedQueryStrings = @"IncludeSpecifiedQueryStrings"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior UseQueryString = @"UseQueryString"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private AfdQueryStringCachingBehavior(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AfdQueryStringCachingBehavior + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AfdQueryStringCachingBehavior(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AfdQueryStringCachingBehavior + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type AfdQueryStringCachingBehavior (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AfdQueryStringCachingBehavior && Equals((AfdQueryStringCachingBehavior)obj); + } + + /// Returns hashCode for enum AfdQueryStringCachingBehavior + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AfdQueryStringCachingBehavior + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AfdQueryStringCachingBehavior + /// the value to convert to an instance of . + + public static implicit operator AfdQueryStringCachingBehavior(string value) + { + return new AfdQueryStringCachingBehavior(value); + } + + /// Implicit operator to convert AfdQueryStringCachingBehavior to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior e) + { + return e._value; + } + + /// Overriding != operator for enum AfdQueryStringCachingBehavior + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AfdQueryStringCachingBehavior + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/Algorithm.Completer.cs b/src/Cdn/generated/api/Support/Algorithm.Completer.cs new file mode 100644 index 000000000000..b69933537d2e --- /dev/null +++ b/src/Cdn/generated/api/Support/Algorithm.Completer.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Algorithm to use for URL signing + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AlgorithmTypeConverter))] + public partial struct Algorithm : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "SHA256".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'SHA256'", "SHA256", global::System.Management.Automation.CompletionResultType.ParameterValue, "SHA256"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/Algorithm.TypeConverter.cs b/src/Cdn/generated/api/Support/Algorithm.TypeConverter.cs new file mode 100644 index 000000000000..3d5712ae28fc --- /dev/null +++ b/src/Cdn/generated/api/Support/Algorithm.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Algorithm to use for URL signing + public partial class AlgorithmTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => Algorithm.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/Algorithm.cs b/src/Cdn/generated/api/Support/Algorithm.cs new file mode 100644 index 000000000000..e204a8144cc2 --- /dev/null +++ b/src/Cdn/generated/api/Support/Algorithm.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Algorithm to use for URL signing + public partial struct Algorithm : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm Sha256 = @"SHA256"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private Algorithm(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to Algorithm + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new Algorithm(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type Algorithm + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type Algorithm (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is Algorithm && Equals((Algorithm)obj); + } + + /// Returns hashCode for enum Algorithm + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for Algorithm + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to Algorithm + /// the value to convert to an instance of . + + public static implicit operator Algorithm(string value) + { + return new Algorithm(value); + } + + /// Implicit operator to convert Algorithm to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm e) + { + return e._value; + } + + /// Overriding != operator for enum Algorithm + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum Algorithm + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/AutoGeneratedDomainNameLabelScope.Completer.cs b/src/Cdn/generated/api/Support/AutoGeneratedDomainNameLabelScope.Completer.cs new file mode 100644 index 000000000000..ff7e79955671 --- /dev/null +++ b/src/Cdn/generated/api/Support/AutoGeneratedDomainNameLabelScope.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScopeTypeConverter))] + public partial struct AutoGeneratedDomainNameLabelScope : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "TenantReuse".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'TenantReuse'", "TenantReuse", global::System.Management.Automation.CompletionResultType.ParameterValue, "TenantReuse"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "SubscriptionReuse".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'SubscriptionReuse'", "SubscriptionReuse", global::System.Management.Automation.CompletionResultType.ParameterValue, "SubscriptionReuse"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ResourceGroupReuse".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ResourceGroupReuse'", "ResourceGroupReuse", global::System.Management.Automation.CompletionResultType.ParameterValue, "ResourceGroupReuse"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "NoReuse".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'NoReuse'", "NoReuse", global::System.Management.Automation.CompletionResultType.ParameterValue, "NoReuse"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/AutoGeneratedDomainNameLabelScope.TypeConverter.cs b/src/Cdn/generated/api/Support/AutoGeneratedDomainNameLabelScope.TypeConverter.cs new file mode 100644 index 000000000000..412f549f6e82 --- /dev/null +++ b/src/Cdn/generated/api/Support/AutoGeneratedDomainNameLabelScope.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + public partial class AutoGeneratedDomainNameLabelScopeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => AutoGeneratedDomainNameLabelScope.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/AutoGeneratedDomainNameLabelScope.cs b/src/Cdn/generated/api/Support/AutoGeneratedDomainNameLabelScope.cs new file mode 100644 index 000000000000..e7aa622c02ec --- /dev/null +++ b/src/Cdn/generated/api/Support/AutoGeneratedDomainNameLabelScope.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + public partial struct AutoGeneratedDomainNameLabelScope : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope NoReuse = @"NoReuse"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope ResourceGroupReuse = @"ResourceGroupReuse"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope SubscriptionReuse = @"SubscriptionReuse"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope TenantReuse = @"TenantReuse"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private AutoGeneratedDomainNameLabelScope(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AutoGeneratedDomainNameLabelScope + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AutoGeneratedDomainNameLabelScope(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AutoGeneratedDomainNameLabelScope + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type AutoGeneratedDomainNameLabelScope (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AutoGeneratedDomainNameLabelScope && Equals((AutoGeneratedDomainNameLabelScope)obj); + } + + /// Returns hashCode for enum AutoGeneratedDomainNameLabelScope + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AutoGeneratedDomainNameLabelScope + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AutoGeneratedDomainNameLabelScope + /// the value to convert to an instance of . + + public static implicit operator AutoGeneratedDomainNameLabelScope(string value) + { + return new AutoGeneratedDomainNameLabelScope(value); + } + + /// Implicit operator to convert AutoGeneratedDomainNameLabelScope to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope e) + { + return e._value; + } + + /// Overriding != operator for enum AutoGeneratedDomainNameLabelScope + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AutoGeneratedDomainNameLabelScope + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CacheBehavior.Completer.cs b/src/Cdn/generated/api/Support/CacheBehavior.Completer.cs new file mode 100644 index 000000000000..867e94b57515 --- /dev/null +++ b/src/Cdn/generated/api/Support/CacheBehavior.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Caching behavior for the requests + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehaviorTypeConverter))] + public partial struct CacheBehavior : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BypassCache".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BypassCache'", "BypassCache", global::System.Management.Automation.CompletionResultType.ParameterValue, "BypassCache"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Override".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Override'", "Override", global::System.Management.Automation.CompletionResultType.ParameterValue, "Override"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "SetIfMissing".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'SetIfMissing'", "SetIfMissing", global::System.Management.Automation.CompletionResultType.ParameterValue, "SetIfMissing"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CacheBehavior.TypeConverter.cs b/src/Cdn/generated/api/Support/CacheBehavior.TypeConverter.cs new file mode 100644 index 000000000000..6755f7f59f8a --- /dev/null +++ b/src/Cdn/generated/api/Support/CacheBehavior.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Caching behavior for the requests + public partial class CacheBehaviorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CacheBehavior.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CacheBehavior.cs b/src/Cdn/generated/api/Support/CacheBehavior.cs new file mode 100644 index 000000000000..ad363ff35a84 --- /dev/null +++ b/src/Cdn/generated/api/Support/CacheBehavior.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Caching behavior for the requests + public partial struct CacheBehavior : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior BypassCache = @"BypassCache"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior Override = @"Override"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior SetIfMissing = @"SetIfMissing"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private CacheBehavior(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to CacheBehavior + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new CacheBehavior(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type CacheBehavior + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type CacheBehavior (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is CacheBehavior && Equals((CacheBehavior)obj); + } + + /// Returns hashCode for enum CacheBehavior + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for CacheBehavior + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to CacheBehavior + /// the value to convert to an instance of . + + public static implicit operator CacheBehavior(string value) + { + return new CacheBehavior(value); + } + + /// Implicit operator to convert CacheBehavior to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior e) + { + return e._value; + } + + /// Overriding != operator for enum CacheBehavior + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum CacheBehavior + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CacheBehavior e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CertificateSource.Completer.cs b/src/Cdn/generated/api/Support/CertificateSource.Completer.cs new file mode 100644 index 000000000000..8dadfa7465e0 --- /dev/null +++ b/src/Cdn/generated/api/Support/CertificateSource.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Defines the source of the SSL certificate. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSourceTypeConverter))] + public partial struct CertificateSource : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "AzureKeyVault".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'AzureKeyVault'", "AzureKeyVault", global::System.Management.Automation.CompletionResultType.ParameterValue, "AzureKeyVault"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Cdn".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Cdn'", "Cdn", global::System.Management.Automation.CompletionResultType.ParameterValue, "Cdn"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CertificateSource.TypeConverter.cs b/src/Cdn/generated/api/Support/CertificateSource.TypeConverter.cs new file mode 100644 index 000000000000..ded1b1fabba9 --- /dev/null +++ b/src/Cdn/generated/api/Support/CertificateSource.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Defines the source of the SSL certificate. + public partial class CertificateSourceTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CertificateSource.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CertificateSource.cs b/src/Cdn/generated/api/Support/CertificateSource.cs new file mode 100644 index 000000000000..9f933b541071 --- /dev/null +++ b/src/Cdn/generated/api/Support/CertificateSource.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Defines the source of the SSL certificate. + public partial struct CertificateSource : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource AzureKeyVault = @"AzureKeyVault"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource Cdn = @"Cdn"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private CertificateSource(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to CertificateSource + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new CertificateSource(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type CertificateSource + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type CertificateSource (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is CertificateSource && Equals((CertificateSource)obj); + } + + /// Returns hashCode for enum CertificateSource + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for CertificateSource + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to CertificateSource + /// the value to convert to an instance of . + + public static implicit operator CertificateSource(string value) + { + return new CertificateSource(value); + } + + /// Implicit operator to convert CertificateSource to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource e) + { + return e._value; + } + + /// Overriding != operator for enum CertificateSource + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum CertificateSource + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CertificateType.Completer.cs b/src/Cdn/generated/api/Support/CertificateType.Completer.cs new file mode 100644 index 000000000000..f24378d19399 --- /dev/null +++ b/src/Cdn/generated/api/Support/CertificateType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Type of certificate used + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateTypeTypeConverter))] + public partial struct CertificateType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Shared".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Shared'", "Shared", global::System.Management.Automation.CompletionResultType.ParameterValue, "Shared"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Dedicated".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Dedicated'", "Dedicated", global::System.Management.Automation.CompletionResultType.ParameterValue, "Dedicated"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CertificateType.TypeConverter.cs b/src/Cdn/generated/api/Support/CertificateType.TypeConverter.cs new file mode 100644 index 000000000000..fcc4239d5dab --- /dev/null +++ b/src/Cdn/generated/api/Support/CertificateType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Type of certificate used + public partial class CertificateTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CertificateType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CertificateType.cs b/src/Cdn/generated/api/Support/CertificateType.cs new file mode 100644 index 000000000000..ee48aaa83995 --- /dev/null +++ b/src/Cdn/generated/api/Support/CertificateType.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Type of certificate used + public partial struct CertificateType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType Dedicated = @"Dedicated"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType Shared = @"Shared"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private CertificateType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to CertificateType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new CertificateType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type CertificateType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type CertificateType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is CertificateType && Equals((CertificateType)obj); + } + + /// Returns hashCode for enum CertificateType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for CertificateType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to CertificateType + /// the value to convert to an instance of . + + public static implicit operator CertificateType(string value) + { + return new CertificateType(value); + } + + /// Implicit operator to convert CertificateType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType e) + { + return e._value; + } + + /// Overriding != operator for enum CertificateType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum CertificateType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ClientPortOperator.Completer.cs b/src/Cdn/generated/api/Support/ClientPortOperator.Completer.cs new file mode 100644 index 000000000000..27e0599344c9 --- /dev/null +++ b/src/Cdn/generated/api/Support/ClientPortOperator.Completer.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperatorTypeConverter))] + public partial struct ClientPortOperator : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Any".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Any'", "Any", global::System.Management.Automation.CompletionResultType.ParameterValue, "Any"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Equal".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Equal'", "Equal", global::System.Management.Automation.CompletionResultType.ParameterValue, "Equal"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Contains".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Contains'", "Contains", global::System.Management.Automation.CompletionResultType.ParameterValue, "Contains"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BeginsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BeginsWith'", "BeginsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "BeginsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EndsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EndsWith'", "EndsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "EndsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThan'", "LessThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThanOrEqual'", "LessThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThan'", "GreaterThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThanOrEqual'", "GreaterThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RegEx".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RegEx'", "RegEx", global::System.Management.Automation.CompletionResultType.ParameterValue, "RegEx"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ClientPortOperator.TypeConverter.cs b/src/Cdn/generated/api/Support/ClientPortOperator.TypeConverter.cs new file mode 100644 index 000000000000..ed09b380c5e6 --- /dev/null +++ b/src/Cdn/generated/api/Support/ClientPortOperator.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial class ClientPortOperatorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ClientPortOperator.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ClientPortOperator.cs b/src/Cdn/generated/api/Support/ClientPortOperator.cs new file mode 100644 index 000000000000..87458e8b2d8e --- /dev/null +++ b/src/Cdn/generated/api/Support/ClientPortOperator.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial struct ClientPortOperator : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator Any = @"Any"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator BeginsWith = @"BeginsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator Contains = @"Contains"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator EndsWith = @"EndsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator Equal = @"Equal"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator GreaterThan = @"GreaterThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator GreaterThanOrEqual = @"GreaterThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator LessThan = @"LessThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator LessThanOrEqual = @"LessThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator RegEx = @"RegEx"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ClientPortOperator(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to ClientPortOperator + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ClientPortOperator(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ClientPortOperator + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ClientPortOperator (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ClientPortOperator && Equals((ClientPortOperator)obj); + } + + /// Returns hashCode for enum ClientPortOperator + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ClientPortOperator + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ClientPortOperator + /// the value to convert to an instance of . + + public static implicit operator ClientPortOperator(string value) + { + return new ClientPortOperator(value); + } + + /// Implicit operator to convert ClientPortOperator to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator e) + { + return e._value; + } + + /// Overriding != operator for enum ClientPortOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ClientPortOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CookiesOperator.Completer.cs b/src/Cdn/generated/api/Support/CookiesOperator.Completer.cs new file mode 100644 index 000000000000..dd1a71c177ff --- /dev/null +++ b/src/Cdn/generated/api/Support/CookiesOperator.Completer.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperatorTypeConverter))] + public partial struct CookiesOperator : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Any".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Any'", "Any", global::System.Management.Automation.CompletionResultType.ParameterValue, "Any"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Equal".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Equal'", "Equal", global::System.Management.Automation.CompletionResultType.ParameterValue, "Equal"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Contains".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Contains'", "Contains", global::System.Management.Automation.CompletionResultType.ParameterValue, "Contains"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BeginsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BeginsWith'", "BeginsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "BeginsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EndsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EndsWith'", "EndsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "EndsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThan'", "LessThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThanOrEqual'", "LessThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThan'", "GreaterThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThanOrEqual'", "GreaterThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RegEx".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RegEx'", "RegEx", global::System.Management.Automation.CompletionResultType.ParameterValue, "RegEx"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CookiesOperator.TypeConverter.cs b/src/Cdn/generated/api/Support/CookiesOperator.TypeConverter.cs new file mode 100644 index 000000000000..de14c5f4ee8e --- /dev/null +++ b/src/Cdn/generated/api/Support/CookiesOperator.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial class CookiesOperatorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CookiesOperator.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CookiesOperator.cs b/src/Cdn/generated/api/Support/CookiesOperator.cs new file mode 100644 index 000000000000..e0fd4427f269 --- /dev/null +++ b/src/Cdn/generated/api/Support/CookiesOperator.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial struct CookiesOperator : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator Any = @"Any"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator BeginsWith = @"BeginsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator Contains = @"Contains"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator EndsWith = @"EndsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator Equal = @"Equal"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator GreaterThan = @"GreaterThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator GreaterThanOrEqual = @"GreaterThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator LessThan = @"LessThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator LessThanOrEqual = @"LessThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator RegEx = @"RegEx"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private CookiesOperator(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to CookiesOperator + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new CookiesOperator(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type CookiesOperator + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type CookiesOperator (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is CookiesOperator && Equals((CookiesOperator)obj); + } + + /// Returns hashCode for enum CookiesOperator + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for CookiesOperator + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to CookiesOperator + /// the value to convert to an instance of . + + public static implicit operator CookiesOperator(string value) + { + return new CookiesOperator(value); + } + + /// Implicit operator to convert CookiesOperator to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator e) + { + return e._value; + } + + /// Overriding != operator for enum CookiesOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum CookiesOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CustomDomainResourceState.Completer.cs b/src/Cdn/generated/api/Support/CustomDomainResourceState.Completer.cs new file mode 100644 index 000000000000..630d2dfe6220 --- /dev/null +++ b/src/Cdn/generated/api/Support/CustomDomainResourceState.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Resource status of the custom domain. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceStateTypeConverter))] + public partial struct CustomDomainResourceState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Active".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Active'", "Active", global::System.Management.Automation.CompletionResultType.ParameterValue, "Active"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CustomDomainResourceState.TypeConverter.cs b/src/Cdn/generated/api/Support/CustomDomainResourceState.TypeConverter.cs new file mode 100644 index 000000000000..39425f50e95f --- /dev/null +++ b/src/Cdn/generated/api/Support/CustomDomainResourceState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Resource status of the custom domain. + public partial class CustomDomainResourceStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CustomDomainResourceState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CustomDomainResourceState.cs b/src/Cdn/generated/api/Support/CustomDomainResourceState.cs new file mode 100644 index 000000000000..4dcbd0f7e693 --- /dev/null +++ b/src/Cdn/generated/api/Support/CustomDomainResourceState.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Resource status of the custom domain. + public partial struct CustomDomainResourceState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState Active = @"Active"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState Creating = @"Creating"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState Deleting = @"Deleting"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to CustomDomainResourceState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new CustomDomainResourceState(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private CustomDomainResourceState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type CustomDomainResourceState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type CustomDomainResourceState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is CustomDomainResourceState && Equals((CustomDomainResourceState)obj); + } + + /// Returns hashCode for enum CustomDomainResourceState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for CustomDomainResourceState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to CustomDomainResourceState + /// the value to convert to an instance of . + + public static implicit operator CustomDomainResourceState(string value) + { + return new CustomDomainResourceState(value); + } + + /// Implicit operator to convert CustomDomainResourceState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState e) + { + return e._value; + } + + /// Overriding != operator for enum CustomDomainResourceState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum CustomDomainResourceState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomDomainResourceState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CustomHttpsProvisioningState.Completer.cs b/src/Cdn/generated/api/Support/CustomHttpsProvisioningState.Completer.cs new file mode 100644 index 000000000000..545e23fc7f24 --- /dev/null +++ b/src/Cdn/generated/api/Support/CustomHttpsProvisioningState.Completer.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Provisioning status of Custom Https of the custom domain. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningStateTypeConverter))] + public partial struct CustomHttpsProvisioningState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabling".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabling'", "Enabling", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabling"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabling".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabling'", "Disabling", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabling"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CustomHttpsProvisioningState.TypeConverter.cs b/src/Cdn/generated/api/Support/CustomHttpsProvisioningState.TypeConverter.cs new file mode 100644 index 000000000000..3062762137e0 --- /dev/null +++ b/src/Cdn/generated/api/Support/CustomHttpsProvisioningState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Provisioning status of Custom Https of the custom domain. + public partial class CustomHttpsProvisioningStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CustomHttpsProvisioningState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CustomHttpsProvisioningState.cs b/src/Cdn/generated/api/Support/CustomHttpsProvisioningState.cs new file mode 100644 index 000000000000..643023e87db1 --- /dev/null +++ b/src/Cdn/generated/api/Support/CustomHttpsProvisioningState.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Provisioning status of Custom Https of the custom domain. + public partial struct CustomHttpsProvisioningState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState Disabled = @"Disabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState Disabling = @"Disabling"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState Enabled = @"Enabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState Enabling = @"Enabling"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState Failed = @"Failed"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to CustomHttpsProvisioningState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new CustomHttpsProvisioningState(global::System.Convert.ToString(value)); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private CustomHttpsProvisioningState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type CustomHttpsProvisioningState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type CustomHttpsProvisioningState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is CustomHttpsProvisioningState && Equals((CustomHttpsProvisioningState)obj); + } + + /// Returns hashCode for enum CustomHttpsProvisioningState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for CustomHttpsProvisioningState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to CustomHttpsProvisioningState + /// the value to convert to an instance of . + + public static implicit operator CustomHttpsProvisioningState(string value) + { + return new CustomHttpsProvisioningState(value); + } + + /// Implicit operator to convert CustomHttpsProvisioningState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState e) + { + return e._value; + } + + /// Overriding != operator for enum CustomHttpsProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum CustomHttpsProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CustomHttpsProvisioningSubstate.Completer.cs b/src/Cdn/generated/api/Support/CustomHttpsProvisioningSubstate.Completer.cs new file mode 100644 index 000000000000..47029f08d2a7 --- /dev/null +++ b/src/Cdn/generated/api/Support/CustomHttpsProvisioningSubstate.Completer.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstateTypeConverter))] + public partial struct CustomHttpsProvisioningSubstate : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "SubmittingDomainControlValidationRequest".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'SubmittingDomainControlValidationRequest'", "SubmittingDomainControlValidationRequest", global::System.Management.Automation.CompletionResultType.ParameterValue, "SubmittingDomainControlValidationRequest"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "PendingDomainControlValidationREquestApproval".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'PendingDomainControlValidationREquestApproval'", "PendingDomainControlValidationREquestApproval", global::System.Management.Automation.CompletionResultType.ParameterValue, "PendingDomainControlValidationREquestApproval"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "DomainControlValidationRequestApproved".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'DomainControlValidationRequestApproved'", "DomainControlValidationRequestApproved", global::System.Management.Automation.CompletionResultType.ParameterValue, "DomainControlValidationRequestApproved"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "DomainControlValidationRequestRejected".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'DomainControlValidationRequestRejected'", "DomainControlValidationRequestRejected", global::System.Management.Automation.CompletionResultType.ParameterValue, "DomainControlValidationRequestRejected"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "DomainControlValidationRequestTimedOut".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'DomainControlValidationRequestTimedOut'", "DomainControlValidationRequestTimedOut", global::System.Management.Automation.CompletionResultType.ParameterValue, "DomainControlValidationRequestTimedOut"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "IssuingCertificate".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'IssuingCertificate'", "IssuingCertificate", global::System.Management.Automation.CompletionResultType.ParameterValue, "IssuingCertificate"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "DeployingCertificate".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'DeployingCertificate'", "DeployingCertificate", global::System.Management.Automation.CompletionResultType.ParameterValue, "DeployingCertificate"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "CertificateDeployed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'CertificateDeployed'", "CertificateDeployed", global::System.Management.Automation.CompletionResultType.ParameterValue, "CertificateDeployed"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "DeletingCertificate".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'DeletingCertificate'", "DeletingCertificate", global::System.Management.Automation.CompletionResultType.ParameterValue, "DeletingCertificate"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "CertificateDeleted".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'CertificateDeleted'", "CertificateDeleted", global::System.Management.Automation.CompletionResultType.ParameterValue, "CertificateDeleted"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CustomHttpsProvisioningSubstate.TypeConverter.cs b/src/Cdn/generated/api/Support/CustomHttpsProvisioningSubstate.TypeConverter.cs new file mode 100644 index 000000000000..1b6313a4c816 --- /dev/null +++ b/src/Cdn/generated/api/Support/CustomHttpsProvisioningSubstate.TypeConverter.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// + public partial class CustomHttpsProvisioningSubstateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CustomHttpsProvisioningSubstate.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/CustomHttpsProvisioningSubstate.cs b/src/Cdn/generated/api/Support/CustomHttpsProvisioningSubstate.cs new file mode 100644 index 000000000000..c8daa20e1570 --- /dev/null +++ b/src/Cdn/generated/api/Support/CustomHttpsProvisioningSubstate.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// + public partial struct CustomHttpsProvisioningSubstate : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate CertificateDeleted = @"CertificateDeleted"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate CertificateDeployed = @"CertificateDeployed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate DeletingCertificate = @"DeletingCertificate"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate DeployingCertificate = @"DeployingCertificate"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate DomainControlValidationRequestApproved = @"DomainControlValidationRequestApproved"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate DomainControlValidationRequestRejected = @"DomainControlValidationRequestRejected"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate DomainControlValidationRequestTimedOut = @"DomainControlValidationRequestTimedOut"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate IssuingCertificate = @"IssuingCertificate"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate PendingDomainControlValidationREquestApproval = @"PendingDomainControlValidationREquestApproval"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate SubmittingDomainControlValidationRequest = @"SubmittingDomainControlValidationRequest"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to CustomHttpsProvisioningSubstate + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new CustomHttpsProvisioningSubstate(global::System.Convert.ToString(value)); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private CustomHttpsProvisioningSubstate(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type CustomHttpsProvisioningSubstate + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type CustomHttpsProvisioningSubstate (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is CustomHttpsProvisioningSubstate && Equals((CustomHttpsProvisioningSubstate)obj); + } + + /// Returns hashCode for enum CustomHttpsProvisioningSubstate + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for CustomHttpsProvisioningSubstate + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to CustomHttpsProvisioningSubstate + /// the value to convert to an instance of . + + public static implicit operator CustomHttpsProvisioningSubstate(string value) + { + return new CustomHttpsProvisioningSubstate(value); + } + + /// Implicit operator to convert CustomHttpsProvisioningSubstate to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate e) + { + return e._value; + } + + /// Overriding != operator for enum CustomHttpsProvisioningSubstate + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum CustomHttpsProvisioningSubstate + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CustomHttpsProvisioningSubstate e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/DeliveryRuleAction.Completer.cs b/src/Cdn/generated/api/Support/DeliveryRuleAction.Completer.cs new file mode 100644 index 000000000000..4b8f8c509d4d --- /dev/null +++ b/src/Cdn/generated/api/Support/DeliveryRuleAction.Completer.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The name of the action for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleActionTypeConverter))] + public partial struct DeliveryRuleAction : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "CacheExpiration".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'CacheExpiration'", "CacheExpiration", global::System.Management.Automation.CompletionResultType.ParameterValue, "CacheExpiration"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "CacheKeyQueryString".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'CacheKeyQueryString'", "CacheKeyQueryString", global::System.Management.Automation.CompletionResultType.ParameterValue, "CacheKeyQueryString"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ModifyRequestHeader".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ModifyRequestHeader'", "ModifyRequestHeader", global::System.Management.Automation.CompletionResultType.ParameterValue, "ModifyRequestHeader"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ModifyResponseHeader".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ModifyResponseHeader'", "ModifyResponseHeader", global::System.Management.Automation.CompletionResultType.ParameterValue, "ModifyResponseHeader"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "UrlRedirect".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'UrlRedirect'", "UrlRedirect", global::System.Management.Automation.CompletionResultType.ParameterValue, "UrlRedirect"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "UrlRewrite".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'UrlRewrite'", "UrlRewrite", global::System.Management.Automation.CompletionResultType.ParameterValue, "UrlRewrite"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "UrlSigning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'UrlSigning'", "UrlSigning", global::System.Management.Automation.CompletionResultType.ParameterValue, "UrlSigning"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "OriginGroupOverride".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'OriginGroupOverride'", "OriginGroupOverride", global::System.Management.Automation.CompletionResultType.ParameterValue, "OriginGroupOverride"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RouteConfigurationOverride".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RouteConfigurationOverride'", "RouteConfigurationOverride", global::System.Management.Automation.CompletionResultType.ParameterValue, "RouteConfigurationOverride"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/DeliveryRuleAction.TypeConverter.cs b/src/Cdn/generated/api/Support/DeliveryRuleAction.TypeConverter.cs new file mode 100644 index 000000000000..0e8d4c379228 --- /dev/null +++ b/src/Cdn/generated/api/Support/DeliveryRuleAction.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The name of the action for the delivery rule. + public partial class DeliveryRuleActionTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DeliveryRuleAction.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/DeliveryRuleAction.cs b/src/Cdn/generated/api/Support/DeliveryRuleAction.cs new file mode 100644 index 000000000000..3e794460f3a1 --- /dev/null +++ b/src/Cdn/generated/api/Support/DeliveryRuleAction.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The name of the action for the delivery rule. + public partial struct DeliveryRuleAction : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction CacheExpiration = @"CacheExpiration"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction CacheKeyQueryString = @"CacheKeyQueryString"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction ModifyRequestHeader = @"ModifyRequestHeader"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction ModifyResponseHeader = @"ModifyResponseHeader"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction OriginGroupOverride = @"OriginGroupOverride"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction RouteConfigurationOverride = @"RouteConfigurationOverride"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction UrlRedirect = @"UrlRedirect"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction UrlRewrite = @"UrlRewrite"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction UrlSigning = @"UrlSigning"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DeliveryRuleAction + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DeliveryRuleAction(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DeliveryRuleAction(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DeliveryRuleAction + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DeliveryRuleAction (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DeliveryRuleAction && Equals((DeliveryRuleAction)obj); + } + + /// Returns hashCode for enum DeliveryRuleAction + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DeliveryRuleAction + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DeliveryRuleAction + /// the value to convert to an instance of . + + public static implicit operator DeliveryRuleAction(string value) + { + return new DeliveryRuleAction(value); + } + + /// Implicit operator to convert DeliveryRuleAction to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction e) + { + return e._value; + } + + /// Overriding != operator for enum DeliveryRuleAction + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DeliveryRuleAction + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/DeploymentStatus.Completer.cs b/src/Cdn/generated/api/Support/DeploymentStatus.Completer.cs new file mode 100644 index 000000000000..4c5bbd8828de --- /dev/null +++ b/src/Cdn/generated/api/Support/DeploymentStatus.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Argument completer implementation for DeploymentStatus. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatusTypeConverter))] + public partial struct DeploymentStatus : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "NotStarted".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'NotStarted'", "NotStarted", global::System.Management.Automation.CompletionResultType.ParameterValue, "NotStarted"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "InProgress".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'InProgress'", "InProgress", global::System.Management.Automation.CompletionResultType.ParameterValue, "InProgress"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/DeploymentStatus.TypeConverter.cs b/src/Cdn/generated/api/Support/DeploymentStatus.TypeConverter.cs new file mode 100644 index 000000000000..15bfcb1442d1 --- /dev/null +++ b/src/Cdn/generated/api/Support/DeploymentStatus.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// TypeConverter implementation for DeploymentStatus. + public partial class DeploymentStatusTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DeploymentStatus.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/DeploymentStatus.cs b/src/Cdn/generated/api/Support/DeploymentStatus.cs new file mode 100644 index 000000000000..ac3fd0aab4e4 --- /dev/null +++ b/src/Cdn/generated/api/Support/DeploymentStatus.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + public partial struct DeploymentStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus Failed = @"Failed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus InProgress = @"InProgress"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus NotStarted = @"NotStarted"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus Succeeded = @"Succeeded"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DeploymentStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DeploymentStatus(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DeploymentStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DeploymentStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DeploymentStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DeploymentStatus && Equals((DeploymentStatus)obj); + } + + /// Returns hashCode for enum DeploymentStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DeploymentStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DeploymentStatus + /// the value to convert to an instance of . + + public static implicit operator DeploymentStatus(string value) + { + return new DeploymentStatus(value); + } + + /// Implicit operator to convert DeploymentStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus e) + { + return e._value; + } + + /// Overriding != operator for enum DeploymentStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DeploymentStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeploymentStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/DestinationProtocol.Completer.cs b/src/Cdn/generated/api/Support/DestinationProtocol.Completer.cs new file mode 100644 index 000000000000..a42a758a7aa4 --- /dev/null +++ b/src/Cdn/generated/api/Support/DestinationProtocol.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Protocol to use for the redirect. The default value is MatchRequest + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocolTypeConverter))] + public partial struct DestinationProtocol : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "MatchRequest".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'MatchRequest'", "MatchRequest", global::System.Management.Automation.CompletionResultType.ParameterValue, "MatchRequest"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Http".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Http'", "Http", global::System.Management.Automation.CompletionResultType.ParameterValue, "Http"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Https".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Https'", "Https", global::System.Management.Automation.CompletionResultType.ParameterValue, "Https"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/DestinationProtocol.TypeConverter.cs b/src/Cdn/generated/api/Support/DestinationProtocol.TypeConverter.cs new file mode 100644 index 000000000000..068773e19922 --- /dev/null +++ b/src/Cdn/generated/api/Support/DestinationProtocol.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Protocol to use for the redirect. The default value is MatchRequest + public partial class DestinationProtocolTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DestinationProtocol.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/DestinationProtocol.cs b/src/Cdn/generated/api/Support/DestinationProtocol.cs new file mode 100644 index 000000000000..1f7348e3eafc --- /dev/null +++ b/src/Cdn/generated/api/Support/DestinationProtocol.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Protocol to use for the redirect. The default value is MatchRequest + public partial struct DestinationProtocol : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol Http = @"Http"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol Https = @"Https"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol MatchRequest = @"MatchRequest"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DestinationProtocol + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DestinationProtocol(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DestinationProtocol(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DestinationProtocol + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DestinationProtocol (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DestinationProtocol && Equals((DestinationProtocol)obj); + } + + /// Returns hashCode for enum DestinationProtocol + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DestinationProtocol + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DestinationProtocol + /// the value to convert to an instance of . + + public static implicit operator DestinationProtocol(string value) + { + return new DestinationProtocol(value); + } + + /// Implicit operator to convert DestinationProtocol to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol e) + { + return e._value; + } + + /// Overriding != operator for enum DestinationProtocol + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DestinationProtocol + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/DomainValidationState.Completer.cs b/src/Cdn/generated/api/Support/DomainValidationState.Completer.cs new file mode 100644 index 000000000000..040b9d25fc73 --- /dev/null +++ b/src/Cdn/generated/api/Support/DomainValidationState.Completer.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationStateTypeConverter))] + public partial struct DomainValidationState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Unknown".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Unknown'", "Unknown", global::System.Management.Automation.CompletionResultType.ParameterValue, "Unknown"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Submitting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Submitting'", "Submitting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Submitting"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Pending".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Pending'", "Pending", global::System.Management.Automation.CompletionResultType.ParameterValue, "Pending"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Rejected".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Rejected'", "Rejected", global::System.Management.Automation.CompletionResultType.ParameterValue, "Rejected"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "TimedOut".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'TimedOut'", "TimedOut", global::System.Management.Automation.CompletionResultType.ParameterValue, "TimedOut"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "PendingRevalidation".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'PendingRevalidation'", "PendingRevalidation", global::System.Management.Automation.CompletionResultType.ParameterValue, "PendingRevalidation"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Approved".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Approved'", "Approved", global::System.Management.Automation.CompletionResultType.ParameterValue, "Approved"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RefreshingValidationToken".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RefreshingValidationToken'", "RefreshingValidationToken", global::System.Management.Automation.CompletionResultType.ParameterValue, "RefreshingValidationToken"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "InternalError".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'InternalError'", "InternalError", global::System.Management.Automation.CompletionResultType.ParameterValue, "InternalError"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/DomainValidationState.TypeConverter.cs b/src/Cdn/generated/api/Support/DomainValidationState.TypeConverter.cs new file mode 100644 index 000000000000..e737e08829cb --- /dev/null +++ b/src/Cdn/generated/api/Support/DomainValidationState.TypeConverter.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. + /// + public partial class DomainValidationStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DomainValidationState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/DomainValidationState.cs b/src/Cdn/generated/api/Support/DomainValidationState.cs new file mode 100644 index 000000000000..a85e2ce3f45a --- /dev/null +++ b/src/Cdn/generated/api/Support/DomainValidationState.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. + /// + public partial struct DomainValidationState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState Approved = @"Approved"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState InternalError = @"InternalError"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState Pending = @"Pending"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState PendingRevalidation = @"PendingRevalidation"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState RefreshingValidationToken = @"RefreshingValidationToken"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState Rejected = @"Rejected"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState Submitting = @"Submitting"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState TimedOut = @"TimedOut"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState Unknown = @"Unknown"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DomainValidationState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DomainValidationState(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DomainValidationState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DomainValidationState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DomainValidationState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DomainValidationState && Equals((DomainValidationState)obj); + } + + /// Returns hashCode for enum DomainValidationState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DomainValidationState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DomainValidationState + /// the value to convert to an instance of . + + public static implicit operator DomainValidationState(string value) + { + return new DomainValidationState(value); + } + + /// Implicit operator to convert DomainValidationState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState e) + { + return e._value; + } + + /// Overriding != operator for enum DomainValidationState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DomainValidationState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DomainValidationState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/EnabledState.Completer.cs b/src/Cdn/generated/api/Support/EnabledState.Completer.cs new file mode 100644 index 000000000000..7f9a8824d2d9 --- /dev/null +++ b/src/Cdn/generated/api/Support/EnabledState.Completer.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledStateTypeConverter))] + public partial struct EnabledState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/EnabledState.TypeConverter.cs b/src/Cdn/generated/api/Support/EnabledState.TypeConverter.cs new file mode 100644 index 000000000000..a56af3484a7b --- /dev/null +++ b/src/Cdn/generated/api/Support/EnabledState.TypeConverter.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + public partial class EnabledStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => EnabledState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/EnabledState.cs b/src/Cdn/generated/api/Support/EnabledState.cs new file mode 100644 index 000000000000..e63d7f9157c3 --- /dev/null +++ b/src/Cdn/generated/api/Support/EnabledState.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + public partial struct EnabledState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState Disabled = @"Disabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState Enabled = @"Enabled"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to EnabledState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new EnabledState(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private EnabledState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type EnabledState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type EnabledState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is EnabledState && Equals((EnabledState)obj); + } + + /// Returns hashCode for enum EnabledState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for EnabledState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to EnabledState + /// the value to convert to an instance of . + + public static implicit operator EnabledState(string value) + { + return new EnabledState(value); + } + + /// Implicit operator to convert EnabledState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState e) + { + return e._value; + } + + /// Overriding != operator for enum EnabledState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum EnabledState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/EndpointResourceState.Completer.cs b/src/Cdn/generated/api/Support/EndpointResourceState.Completer.cs new file mode 100644 index 000000000000..e5a800c448c1 --- /dev/null +++ b/src/Cdn/generated/api/Support/EndpointResourceState.Completer.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Resource status of the endpoint. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceStateTypeConverter))] + public partial struct EndpointResourceState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Running".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Running'", "Running", global::System.Management.Automation.CompletionResultType.ParameterValue, "Running"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Starting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Starting'", "Starting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Starting"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Stopped".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Stopped'", "Stopped", global::System.Management.Automation.CompletionResultType.ParameterValue, "Stopped"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Stopping".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Stopping'", "Stopping", global::System.Management.Automation.CompletionResultType.ParameterValue, "Stopping"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/EndpointResourceState.TypeConverter.cs b/src/Cdn/generated/api/Support/EndpointResourceState.TypeConverter.cs new file mode 100644 index 000000000000..9cf9c404211c --- /dev/null +++ b/src/Cdn/generated/api/Support/EndpointResourceState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Resource status of the endpoint. + public partial class EndpointResourceStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => EndpointResourceState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/EndpointResourceState.cs b/src/Cdn/generated/api/Support/EndpointResourceState.cs new file mode 100644 index 000000000000..61c0864b03c1 --- /dev/null +++ b/src/Cdn/generated/api/Support/EndpointResourceState.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Resource status of the endpoint. + public partial struct EndpointResourceState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState Creating = @"Creating"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState Deleting = @"Deleting"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState Running = @"Running"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState Starting = @"Starting"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState Stopped = @"Stopped"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState Stopping = @"Stopping"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to EndpointResourceState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new EndpointResourceState(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private EndpointResourceState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type EndpointResourceState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type EndpointResourceState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is EndpointResourceState && Equals((EndpointResourceState)obj); + } + + /// Returns hashCode for enum EndpointResourceState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for EndpointResourceState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to EndpointResourceState + /// the value to convert to an instance of . + + public static implicit operator EndpointResourceState(string value) + { + return new EndpointResourceState(value); + } + + /// Implicit operator to convert EndpointResourceState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState e) + { + return e._value; + } + + /// Overriding != operator for enum EndpointResourceState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum EndpointResourceState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EndpointResourceState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ForwardingProtocol.Completer.cs b/src/Cdn/generated/api/Support/ForwardingProtocol.Completer.cs new file mode 100644 index 000000000000..add18949c5f4 --- /dev/null +++ b/src/Cdn/generated/api/Support/ForwardingProtocol.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Protocol this rule will use when forwarding traffic to backends. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocolTypeConverter))] + public partial struct ForwardingProtocol : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "HttpOnly".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'HttpOnly'", "HttpOnly", global::System.Management.Automation.CompletionResultType.ParameterValue, "HttpOnly"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "HttpsOnly".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'HttpsOnly'", "HttpsOnly", global::System.Management.Automation.CompletionResultType.ParameterValue, "HttpsOnly"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "MatchRequest".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'MatchRequest'", "MatchRequest", global::System.Management.Automation.CompletionResultType.ParameterValue, "MatchRequest"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ForwardingProtocol.TypeConverter.cs b/src/Cdn/generated/api/Support/ForwardingProtocol.TypeConverter.cs new file mode 100644 index 000000000000..5b5ddaacef1d --- /dev/null +++ b/src/Cdn/generated/api/Support/ForwardingProtocol.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Protocol this rule will use when forwarding traffic to backends. + public partial class ForwardingProtocolTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ForwardingProtocol.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ForwardingProtocol.cs b/src/Cdn/generated/api/Support/ForwardingProtocol.cs new file mode 100644 index 000000000000..181f607b780b --- /dev/null +++ b/src/Cdn/generated/api/Support/ForwardingProtocol.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Protocol this rule will use when forwarding traffic to backends. + public partial struct ForwardingProtocol : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol HttpOnly = @"HttpOnly"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol HttpsOnly = @"HttpsOnly"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol MatchRequest = @"MatchRequest"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ForwardingProtocol + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ForwardingProtocol(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ForwardingProtocol + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ForwardingProtocol (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ForwardingProtocol && Equals((ForwardingProtocol)obj); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ForwardingProtocol(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns hashCode for enum ForwardingProtocol + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ForwardingProtocol + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ForwardingProtocol + /// the value to convert to an instance of . + + public static implicit operator ForwardingProtocol(string value) + { + return new ForwardingProtocol(value); + } + + /// Implicit operator to convert ForwardingProtocol to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol e) + { + return e._value; + } + + /// Overriding != operator for enum ForwardingProtocol + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ForwardingProtocol + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/GeoFilterActions.Completer.cs b/src/Cdn/generated/api/Support/GeoFilterActions.Completer.cs new file mode 100644 index 000000000000..4d779e5aa772 --- /dev/null +++ b/src/Cdn/generated/api/Support/GeoFilterActions.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Action of the geo filter, i.e. allow or block access. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActionsTypeConverter))] + public partial struct GeoFilterActions : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Block".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Block'", "Block", global::System.Management.Automation.CompletionResultType.ParameterValue, "Block"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Allow".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Allow'", "Allow", global::System.Management.Automation.CompletionResultType.ParameterValue, "Allow"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/GeoFilterActions.TypeConverter.cs b/src/Cdn/generated/api/Support/GeoFilterActions.TypeConverter.cs new file mode 100644 index 000000000000..50387c958947 --- /dev/null +++ b/src/Cdn/generated/api/Support/GeoFilterActions.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Action of the geo filter, i.e. allow or block access. + public partial class GeoFilterActionsTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => GeoFilterActions.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/GeoFilterActions.cs b/src/Cdn/generated/api/Support/GeoFilterActions.cs new file mode 100644 index 000000000000..1d58d850d9a6 --- /dev/null +++ b/src/Cdn/generated/api/Support/GeoFilterActions.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Action of the geo filter, i.e. allow or block access. + public partial struct GeoFilterActions : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions Allow = @"Allow"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions Block = @"Block"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to GeoFilterActions + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new GeoFilterActions(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type GeoFilterActions + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type GeoFilterActions (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is GeoFilterActions && Equals((GeoFilterActions)obj); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private GeoFilterActions(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns hashCode for enum GeoFilterActions + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for GeoFilterActions + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to GeoFilterActions + /// the value to convert to an instance of . + + public static implicit operator GeoFilterActions(string value) + { + return new GeoFilterActions(value); + } + + /// Implicit operator to convert GeoFilterActions to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions e) + { + return e._value; + } + + /// Overriding != operator for enum GeoFilterActions + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum GeoFilterActions + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/HeaderAction.Completer.cs b/src/Cdn/generated/api/Support/HeaderAction.Completer.cs new file mode 100644 index 000000000000..205553f4d3e3 --- /dev/null +++ b/src/Cdn/generated/api/Support/HeaderAction.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Action to perform + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderActionTypeConverter))] + public partial struct HeaderAction : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Append".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Append'", "Append", global::System.Management.Automation.CompletionResultType.ParameterValue, "Append"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Overwrite".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Overwrite'", "Overwrite", global::System.Management.Automation.CompletionResultType.ParameterValue, "Overwrite"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Delete".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Delete'", "Delete", global::System.Management.Automation.CompletionResultType.ParameterValue, "Delete"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/HeaderAction.TypeConverter.cs b/src/Cdn/generated/api/Support/HeaderAction.TypeConverter.cs new file mode 100644 index 000000000000..cc4e588dbae6 --- /dev/null +++ b/src/Cdn/generated/api/Support/HeaderAction.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Action to perform + public partial class HeaderActionTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => HeaderAction.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/HeaderAction.cs b/src/Cdn/generated/api/Support/HeaderAction.cs new file mode 100644 index 000000000000..18503f0a69ac --- /dev/null +++ b/src/Cdn/generated/api/Support/HeaderAction.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Action to perform + public partial struct HeaderAction : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction Append = @"Append"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction Delete = @"Delete"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction Overwrite = @"Overwrite"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to HeaderAction + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new HeaderAction(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type HeaderAction + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type HeaderAction (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is HeaderAction && Equals((HeaderAction)obj); + } + + /// Returns hashCode for enum HeaderAction + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private HeaderAction(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for HeaderAction + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to HeaderAction + /// the value to convert to an instance of . + + public static implicit operator HeaderAction(string value) + { + return new HeaderAction(value); + } + + /// Implicit operator to convert HeaderAction to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction e) + { + return e._value; + } + + /// Overriding != operator for enum HeaderAction + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum HeaderAction + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/HealthProbeRequestType.Completer.cs b/src/Cdn/generated/api/Support/HealthProbeRequestType.Completer.cs new file mode 100644 index 000000000000..33522d805b14 --- /dev/null +++ b/src/Cdn/generated/api/Support/HealthProbeRequestType.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The type of health probe request that is made. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestTypeTypeConverter))] + public partial struct HealthProbeRequestType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "NotSet".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'NotSet'", "NotSet", global::System.Management.Automation.CompletionResultType.ParameterValue, "NotSet"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GET".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GET'", "GET", global::System.Management.Automation.CompletionResultType.ParameterValue, "GET"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "HEAD".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'HEAD'", "HEAD", global::System.Management.Automation.CompletionResultType.ParameterValue, "HEAD"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/HealthProbeRequestType.TypeConverter.cs b/src/Cdn/generated/api/Support/HealthProbeRequestType.TypeConverter.cs new file mode 100644 index 000000000000..89921e8218bd --- /dev/null +++ b/src/Cdn/generated/api/Support/HealthProbeRequestType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The type of health probe request that is made. + public partial class HealthProbeRequestTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => HealthProbeRequestType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/HealthProbeRequestType.cs b/src/Cdn/generated/api/Support/HealthProbeRequestType.cs new file mode 100644 index 000000000000..c443d00bb36b --- /dev/null +++ b/src/Cdn/generated/api/Support/HealthProbeRequestType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The type of health probe request that is made. + public partial struct HealthProbeRequestType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType Get = @"GET"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType Head = @"HEAD"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType NotSet = @"NotSet"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to HealthProbeRequestType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new HealthProbeRequestType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type HealthProbeRequestType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type HealthProbeRequestType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is HealthProbeRequestType && Equals((HealthProbeRequestType)obj); + } + + /// Returns hashCode for enum HealthProbeRequestType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private HealthProbeRequestType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for HealthProbeRequestType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to HealthProbeRequestType + /// the value to convert to an instance of . + + public static implicit operator HealthProbeRequestType(string value) + { + return new HealthProbeRequestType(value); + } + + /// Implicit operator to convert HealthProbeRequestType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType e) + { + return e._value; + } + + /// Overriding != operator for enum HealthProbeRequestType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum HealthProbeRequestType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/HostNameOperator.Completer.cs b/src/Cdn/generated/api/Support/HostNameOperator.Completer.cs new file mode 100644 index 000000000000..51dbafdaeb79 --- /dev/null +++ b/src/Cdn/generated/api/Support/HostNameOperator.Completer.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperatorTypeConverter))] + public partial struct HostNameOperator : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Any".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Any'", "Any", global::System.Management.Automation.CompletionResultType.ParameterValue, "Any"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Equal".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Equal'", "Equal", global::System.Management.Automation.CompletionResultType.ParameterValue, "Equal"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Contains".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Contains'", "Contains", global::System.Management.Automation.CompletionResultType.ParameterValue, "Contains"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BeginsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BeginsWith'", "BeginsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "BeginsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EndsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EndsWith'", "EndsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "EndsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThan'", "LessThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThanOrEqual'", "LessThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThan'", "GreaterThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThanOrEqual'", "GreaterThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RegEx".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RegEx'", "RegEx", global::System.Management.Automation.CompletionResultType.ParameterValue, "RegEx"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/HostNameOperator.TypeConverter.cs b/src/Cdn/generated/api/Support/HostNameOperator.TypeConverter.cs new file mode 100644 index 000000000000..7a01ede3f674 --- /dev/null +++ b/src/Cdn/generated/api/Support/HostNameOperator.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial class HostNameOperatorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => HostNameOperator.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/HostNameOperator.cs b/src/Cdn/generated/api/Support/HostNameOperator.cs new file mode 100644 index 000000000000..8bc2b7462a9c --- /dev/null +++ b/src/Cdn/generated/api/Support/HostNameOperator.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial struct HostNameOperator : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator Any = @"Any"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator BeginsWith = @"BeginsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator Contains = @"Contains"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator EndsWith = @"EndsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator Equal = @"Equal"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator GreaterThan = @"GreaterThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator GreaterThanOrEqual = @"GreaterThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator LessThan = @"LessThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator LessThanOrEqual = @"LessThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator RegEx = @"RegEx"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to HostNameOperator + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new HostNameOperator(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type HostNameOperator + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type HostNameOperator (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is HostNameOperator && Equals((HostNameOperator)obj); + } + + /// Returns hashCode for enum HostNameOperator + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private HostNameOperator(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for HostNameOperator + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to HostNameOperator + /// the value to convert to an instance of . + + public static implicit operator HostNameOperator(string value) + { + return new HostNameOperator(value); + } + + /// Implicit operator to convert HostNameOperator to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator e) + { + return e._value; + } + + /// Overriding != operator for enum HostNameOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum HostNameOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/HttpsRedirect.Completer.cs b/src/Cdn/generated/api/Support/HttpsRedirect.Completer.cs new file mode 100644 index 000000000000..f960a77f8f13 --- /dev/null +++ b/src/Cdn/generated/api/Support/HttpsRedirect.Completer.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and + /// it will be the first rule that gets executed. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirectTypeConverter))] + public partial struct HttpsRedirect : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/HttpsRedirect.TypeConverter.cs b/src/Cdn/generated/api/Support/HttpsRedirect.TypeConverter.cs new file mode 100644 index 000000000000..21a8e6151985 --- /dev/null +++ b/src/Cdn/generated/api/Support/HttpsRedirect.TypeConverter.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and + /// it will be the first rule that gets executed. + /// + public partial class HttpsRedirectTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => HttpsRedirect.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/HttpsRedirect.cs b/src/Cdn/generated/api/Support/HttpsRedirect.cs new file mode 100644 index 000000000000..569986a5d4ed --- /dev/null +++ b/src/Cdn/generated/api/Support/HttpsRedirect.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and + /// it will be the first rule that gets executed. + /// + public partial struct HttpsRedirect : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect Disabled = @"Disabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect Enabled = @"Enabled"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to HttpsRedirect + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new HttpsRedirect(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type HttpsRedirect + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type HttpsRedirect (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is HttpsRedirect && Equals((HttpsRedirect)obj); + } + + /// Returns hashCode for enum HttpsRedirect + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private HttpsRedirect(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for HttpsRedirect + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to HttpsRedirect + /// the value to convert to an instance of . + + public static implicit operator HttpsRedirect(string value) + { + return new HttpsRedirect(value); + } + + /// Implicit operator to convert HttpsRedirect to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect e) + { + return e._value; + } + + /// Overriding != operator for enum HttpsRedirect + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum HttpsRedirect + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/IdentityType.Completer.cs b/src/Cdn/generated/api/Support/IdentityType.Completer.cs new file mode 100644 index 000000000000..3f134d8a114f --- /dev/null +++ b/src/Cdn/generated/api/Support/IdentityType.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The type of identity that creates/modifies resources + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityTypeTypeConverter))] + public partial struct IdentityType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "user".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'user'", "user", global::System.Management.Automation.CompletionResultType.ParameterValue, "user"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "application".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'application'", "application", global::System.Management.Automation.CompletionResultType.ParameterValue, "application"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "managedIdentity".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'managedIdentity'", "managedIdentity", global::System.Management.Automation.CompletionResultType.ParameterValue, "managedIdentity"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "key".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'key'", "key", global::System.Management.Automation.CompletionResultType.ParameterValue, "key"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/IdentityType.TypeConverter.cs b/src/Cdn/generated/api/Support/IdentityType.TypeConverter.cs new file mode 100644 index 000000000000..ea276cab93b5 --- /dev/null +++ b/src/Cdn/generated/api/Support/IdentityType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The type of identity that creates/modifies resources + public partial class IdentityTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => IdentityType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/IdentityType.cs b/src/Cdn/generated/api/Support/IdentityType.cs new file mode 100644 index 000000000000..1dc38795be96 --- /dev/null +++ b/src/Cdn/generated/api/Support/IdentityType.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The type of identity that creates/modifies resources + public partial struct IdentityType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType Application = @"application"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType Key = @"key"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType ManagedIdentity = @"managedIdentity"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType User = @"user"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to IdentityType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new IdentityType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type IdentityType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type IdentityType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is IdentityType && Equals((IdentityType)obj); + } + + /// Returns hashCode for enum IdentityType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private IdentityType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for IdentityType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to IdentityType + /// the value to convert to an instance of . + + public static implicit operator IdentityType(string value) + { + return new IdentityType(value); + } + + /// Implicit operator to convert IdentityType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType e) + { + return e._value; + } + + /// Overriding != operator for enum IdentityType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum IdentityType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.IdentityType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/LinkToDefaultDomain.Completer.cs b/src/Cdn/generated/api/Support/LinkToDefaultDomain.Completer.cs new file mode 100644 index 000000000000..3f20e46ccab1 --- /dev/null +++ b/src/Cdn/generated/api/Support/LinkToDefaultDomain.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// whether this route will be linked to the default endpoint domain. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomainTypeConverter))] + public partial struct LinkToDefaultDomain : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/LinkToDefaultDomain.TypeConverter.cs b/src/Cdn/generated/api/Support/LinkToDefaultDomain.TypeConverter.cs new file mode 100644 index 000000000000..b153884ff166 --- /dev/null +++ b/src/Cdn/generated/api/Support/LinkToDefaultDomain.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// whether this route will be linked to the default endpoint domain. + public partial class LinkToDefaultDomainTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => LinkToDefaultDomain.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/LinkToDefaultDomain.cs b/src/Cdn/generated/api/Support/LinkToDefaultDomain.cs new file mode 100644 index 000000000000..0b3801400fcd --- /dev/null +++ b/src/Cdn/generated/api/Support/LinkToDefaultDomain.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// whether this route will be linked to the default endpoint domain. + public partial struct LinkToDefaultDomain : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain Disabled = @"Disabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain Enabled = @"Enabled"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to LinkToDefaultDomain + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new LinkToDefaultDomain(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type LinkToDefaultDomain + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type LinkToDefaultDomain (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is LinkToDefaultDomain && Equals((LinkToDefaultDomain)obj); + } + + /// Returns hashCode for enum LinkToDefaultDomain + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private LinkToDefaultDomain(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for LinkToDefaultDomain + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to LinkToDefaultDomain + /// the value to convert to an instance of . + + public static implicit operator LinkToDefaultDomain(string value) + { + return new LinkToDefaultDomain(value); + } + + /// Implicit operator to convert LinkToDefaultDomain to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain e) + { + return e._value; + } + + /// Overriding != operator for enum LinkToDefaultDomain + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum LinkToDefaultDomain + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/LogMetric.Completer.cs b/src/Cdn/generated/api/Support/LogMetric.Completer.cs new file mode 100644 index 000000000000..393cbd6ac660 --- /dev/null +++ b/src/Cdn/generated/api/Support/LogMetric.Completer.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Argument completer implementation for LogMetric. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricTypeConverter))] + public partial struct LogMetric : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "clientRequestCount".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'clientRequestCount'", "clientRequestCount", global::System.Management.Automation.CompletionResultType.ParameterValue, "clientRequestCount"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "clientRequestTraffic".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'clientRequestTraffic'", "clientRequestTraffic", global::System.Management.Automation.CompletionResultType.ParameterValue, "clientRequestTraffic"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "clientRequestBandwidth".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'clientRequestBandwidth'", "clientRequestBandwidth", global::System.Management.Automation.CompletionResultType.ParameterValue, "clientRequestBandwidth"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "originRequestTraffic".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'originRequestTraffic'", "originRequestTraffic", global::System.Management.Automation.CompletionResultType.ParameterValue, "originRequestTraffic"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "originRequestBandwidth".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'originRequestBandwidth'", "originRequestBandwidth", global::System.Management.Automation.CompletionResultType.ParameterValue, "originRequestBandwidth"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "totalLatency".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'totalLatency'", "totalLatency", global::System.Management.Automation.CompletionResultType.ParameterValue, "totalLatency"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/LogMetric.TypeConverter.cs b/src/Cdn/generated/api/Support/LogMetric.TypeConverter.cs new file mode 100644 index 000000000000..a88a173410ba --- /dev/null +++ b/src/Cdn/generated/api/Support/LogMetric.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// TypeConverter implementation for LogMetric. + public partial class LogMetricTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => LogMetric.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/LogMetric.cs b/src/Cdn/generated/api/Support/LogMetric.cs new file mode 100644 index 000000000000..2877038dba80 --- /dev/null +++ b/src/Cdn/generated/api/Support/LogMetric.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + public partial struct LogMetric : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric ClientRequestBandwidth = @"clientRequestBandwidth"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric ClientRequestCount = @"clientRequestCount"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric ClientRequestTraffic = @"clientRequestTraffic"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric OriginRequestBandwidth = @"originRequestBandwidth"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric OriginRequestTraffic = @"originRequestTraffic"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric TotalLatency = @"totalLatency"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to LogMetric + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new LogMetric(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type LogMetric + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type LogMetric (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is LogMetric && Equals((LogMetric)obj); + } + + /// Returns hashCode for enum LogMetric + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private LogMetric(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for LogMetric + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to LogMetric + /// the value to convert to an instance of . + + public static implicit operator LogMetric(string value) + { + return new LogMetric(value); + } + + /// Implicit operator to convert LogMetric to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric e) + { + return e._value; + } + + /// Overriding != operator for enum LogMetric + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum LogMetric + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/LogMetricsGranularity.Completer.cs b/src/Cdn/generated/api/Support/LogMetricsGranularity.Completer.cs new file mode 100644 index 000000000000..84b799b3ab2c --- /dev/null +++ b/src/Cdn/generated/api/Support/LogMetricsGranularity.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Argument completer implementation for LogMetricsGranularity. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularityTypeConverter))] + public partial struct LogMetricsGranularity : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "PT5M".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'PT5M'", "PT5M", global::System.Management.Automation.CompletionResultType.ParameterValue, "PT5M"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "PT1H".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'PT1H'", "PT1H", global::System.Management.Automation.CompletionResultType.ParameterValue, "PT1H"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "P1D".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'P1D'", "P1D", global::System.Management.Automation.CompletionResultType.ParameterValue, "P1D"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/LogMetricsGranularity.TypeConverter.cs b/src/Cdn/generated/api/Support/LogMetricsGranularity.TypeConverter.cs new file mode 100644 index 000000000000..83e2f88e23b3 --- /dev/null +++ b/src/Cdn/generated/api/Support/LogMetricsGranularity.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// TypeConverter implementation for LogMetricsGranularity. + public partial class LogMetricsGranularityTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => LogMetricsGranularity.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/LogMetricsGranularity.cs b/src/Cdn/generated/api/Support/LogMetricsGranularity.cs new file mode 100644 index 000000000000..aab9402fd8dd --- /dev/null +++ b/src/Cdn/generated/api/Support/LogMetricsGranularity.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + public partial struct LogMetricsGranularity : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity P1D = @"P1D"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity Pt1H = @"PT1H"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity Pt5M = @"PT5M"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to LogMetricsGranularity + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new LogMetricsGranularity(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type LogMetricsGranularity + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type LogMetricsGranularity (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is LogMetricsGranularity && Equals((LogMetricsGranularity)obj); + } + + /// Returns hashCode for enum LogMetricsGranularity + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private LogMetricsGranularity(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for LogMetricsGranularity + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to LogMetricsGranularity + /// the value to convert to an instance of . + + public static implicit operator LogMetricsGranularity(string value) + { + return new LogMetricsGranularity(value); + } + + /// Implicit operator to convert LogMetricsGranularity to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity e) + { + return e._value; + } + + /// Overriding != operator for enum LogMetricsGranularity + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum LogMetricsGranularity + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/LogMetricsGroupBy.Completer.cs b/src/Cdn/generated/api/Support/LogMetricsGroupBy.Completer.cs new file mode 100644 index 000000000000..63a97d2e3cc1 --- /dev/null +++ b/src/Cdn/generated/api/Support/LogMetricsGroupBy.Completer.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Argument completer implementation for LogMetricsGroupBy. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupByTypeConverter))] + public partial struct LogMetricsGroupBy : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "httpStatusCode".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'httpStatusCode'", "httpStatusCode", global::System.Management.Automation.CompletionResultType.ParameterValue, "httpStatusCode"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "protocol".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'protocol'", "protocol", global::System.Management.Automation.CompletionResultType.ParameterValue, "protocol"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "cacheStatus".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'cacheStatus'", "cacheStatus", global::System.Management.Automation.CompletionResultType.ParameterValue, "cacheStatus"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "countryOrRegion".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'countryOrRegion'", "countryOrRegion", global::System.Management.Automation.CompletionResultType.ParameterValue, "countryOrRegion"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "customDomain".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'customDomain'", "customDomain", global::System.Management.Automation.CompletionResultType.ParameterValue, "customDomain"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/LogMetricsGroupBy.TypeConverter.cs b/src/Cdn/generated/api/Support/LogMetricsGroupBy.TypeConverter.cs new file mode 100644 index 000000000000..25caf2356ba0 --- /dev/null +++ b/src/Cdn/generated/api/Support/LogMetricsGroupBy.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// TypeConverter implementation for LogMetricsGroupBy. + public partial class LogMetricsGroupByTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => LogMetricsGroupBy.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/LogMetricsGroupBy.cs b/src/Cdn/generated/api/Support/LogMetricsGroupBy.cs new file mode 100644 index 000000000000..bbbb91ffe2b0 --- /dev/null +++ b/src/Cdn/generated/api/Support/LogMetricsGroupBy.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + public partial struct LogMetricsGroupBy : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy CacheStatus = @"cacheStatus"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy CountryOrRegion = @"countryOrRegion"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy CustomDomain = @"customDomain"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy HttpStatusCode = @"httpStatusCode"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy Protocol = @"protocol"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to LogMetricsGroupBy + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new LogMetricsGroupBy(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type LogMetricsGroupBy + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type LogMetricsGroupBy (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is LogMetricsGroupBy && Equals((LogMetricsGroupBy)obj); + } + + /// Returns hashCode for enum LogMetricsGroupBy + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private LogMetricsGroupBy(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for LogMetricsGroupBy + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to LogMetricsGroupBy + /// the value to convert to an instance of . + + public static implicit operator LogMetricsGroupBy(string value) + { + return new LogMetricsGroupBy(value); + } + + /// Implicit operator to convert LogMetricsGroupBy to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy e) + { + return e._value; + } + + /// Overriding != operator for enum LogMetricsGroupBy + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum LogMetricsGroupBy + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/LogRanking.Completer.cs b/src/Cdn/generated/api/Support/LogRanking.Completer.cs new file mode 100644 index 000000000000..413d4877484e --- /dev/null +++ b/src/Cdn/generated/api/Support/LogRanking.Completer.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Argument completer implementation for LogRanking. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingTypeConverter))] + public partial struct LogRanking : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "url".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'url'", "url", global::System.Management.Automation.CompletionResultType.ParameterValue, "url"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "referrer".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'referrer'", "referrer", global::System.Management.Automation.CompletionResultType.ParameterValue, "referrer"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "browser".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'browser'", "browser", global::System.Management.Automation.CompletionResultType.ParameterValue, "browser"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "userAgent".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'userAgent'", "userAgent", global::System.Management.Automation.CompletionResultType.ParameterValue, "userAgent"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "countryOrRegion".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'countryOrRegion'", "countryOrRegion", global::System.Management.Automation.CompletionResultType.ParameterValue, "countryOrRegion"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/LogRanking.TypeConverter.cs b/src/Cdn/generated/api/Support/LogRanking.TypeConverter.cs new file mode 100644 index 000000000000..ff91bb17dde5 --- /dev/null +++ b/src/Cdn/generated/api/Support/LogRanking.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// TypeConverter implementation for LogRanking. + public partial class LogRankingTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => LogRanking.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/LogRanking.cs b/src/Cdn/generated/api/Support/LogRanking.cs new file mode 100644 index 000000000000..ad60d1733c73 --- /dev/null +++ b/src/Cdn/generated/api/Support/LogRanking.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + public partial struct LogRanking : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking Browser = @"browser"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking CountryOrRegion = @"countryOrRegion"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking Referrer = @"referrer"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking Url = @"url"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking UserAgent = @"userAgent"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to LogRanking + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new LogRanking(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type LogRanking + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type LogRanking (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is LogRanking && Equals((LogRanking)obj); + } + + /// Returns hashCode for enum LogRanking + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private LogRanking(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for LogRanking + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to LogRanking + /// the value to convert to an instance of . + + public static implicit operator LogRanking(string value) + { + return new LogRanking(value); + } + + /// Implicit operator to convert LogRanking to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking e) + { + return e._value; + } + + /// Overriding != operator for enum LogRanking + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum LogRanking + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/LogRankingMetric.Completer.cs b/src/Cdn/generated/api/Support/LogRankingMetric.Completer.cs new file mode 100644 index 000000000000..019f5cab6f94 --- /dev/null +++ b/src/Cdn/generated/api/Support/LogRankingMetric.Completer.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Argument completer implementation for LogRankingMetric. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetricTypeConverter))] + public partial struct LogRankingMetric : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "clientRequestCount".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'clientRequestCount'", "clientRequestCount", global::System.Management.Automation.CompletionResultType.ParameterValue, "clientRequestCount"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "clientRequestTraffic".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'clientRequestTraffic'", "clientRequestTraffic", global::System.Management.Automation.CompletionResultType.ParameterValue, "clientRequestTraffic"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "hitCount".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'hitCount'", "hitCount", global::System.Management.Automation.CompletionResultType.ParameterValue, "hitCount"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "missCount".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'missCount'", "missCount", global::System.Management.Automation.CompletionResultType.ParameterValue, "missCount"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "userErrorCount".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'userErrorCount'", "userErrorCount", global::System.Management.Automation.CompletionResultType.ParameterValue, "userErrorCount"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "errorCount".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'errorCount'", "errorCount", global::System.Management.Automation.CompletionResultType.ParameterValue, "errorCount"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/LogRankingMetric.TypeConverter.cs b/src/Cdn/generated/api/Support/LogRankingMetric.TypeConverter.cs new file mode 100644 index 000000000000..4426914d4a4d --- /dev/null +++ b/src/Cdn/generated/api/Support/LogRankingMetric.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// TypeConverter implementation for LogRankingMetric. + public partial class LogRankingMetricTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => LogRankingMetric.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/LogRankingMetric.cs b/src/Cdn/generated/api/Support/LogRankingMetric.cs new file mode 100644 index 000000000000..1352556e9bb5 --- /dev/null +++ b/src/Cdn/generated/api/Support/LogRankingMetric.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + public partial struct LogRankingMetric : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric ClientRequestCount = @"clientRequestCount"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric ClientRequestTraffic = @"clientRequestTraffic"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric ErrorCount = @"errorCount"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric HitCount = @"hitCount"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric MissCount = @"missCount"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric UserErrorCount = @"userErrorCount"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to LogRankingMetric + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new LogRankingMetric(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type LogRankingMetric + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type LogRankingMetric (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is LogRankingMetric && Equals((LogRankingMetric)obj); + } + + /// Returns hashCode for enum LogRankingMetric + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private LogRankingMetric(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for LogRankingMetric + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to LogRankingMetric + /// the value to convert to an instance of . + + public static implicit operator LogRankingMetric(string value) + { + return new LogRankingMetric(value); + } + + /// Implicit operator to convert LogRankingMetric to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric e) + { + return e._value; + } + + /// Overriding != operator for enum LogRankingMetric + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum LogRankingMetric + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/MatchProcessingBehavior.Completer.cs b/src/Cdn/generated/api/Support/MatchProcessingBehavior.Completer.cs new file mode 100644 index 000000000000..86b42e511e82 --- /dev/null +++ b/src/Cdn/generated/api/Support/MatchProcessingBehavior.Completer.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults + /// to Continue. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehaviorTypeConverter))] + public partial struct MatchProcessingBehavior : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Continue".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Continue'", "Continue", global::System.Management.Automation.CompletionResultType.ParameterValue, "Continue"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Stop".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Stop'", "Stop", global::System.Management.Automation.CompletionResultType.ParameterValue, "Stop"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/MatchProcessingBehavior.TypeConverter.cs b/src/Cdn/generated/api/Support/MatchProcessingBehavior.TypeConverter.cs new file mode 100644 index 000000000000..39f753fa8fbf --- /dev/null +++ b/src/Cdn/generated/api/Support/MatchProcessingBehavior.TypeConverter.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults + /// to Continue. + /// + public partial class MatchProcessingBehaviorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => MatchProcessingBehavior.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/MatchProcessingBehavior.cs b/src/Cdn/generated/api/Support/MatchProcessingBehavior.cs new file mode 100644 index 000000000000..e3ebcf6fd3bb --- /dev/null +++ b/src/Cdn/generated/api/Support/MatchProcessingBehavior.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults + /// to Continue. + /// + public partial struct MatchProcessingBehavior : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior Continue = @"Continue"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior Stop = @"Stop"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to MatchProcessingBehavior + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new MatchProcessingBehavior(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type MatchProcessingBehavior + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type MatchProcessingBehavior (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is MatchProcessingBehavior && Equals((MatchProcessingBehavior)obj); + } + + /// Returns hashCode for enum MatchProcessingBehavior + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private MatchProcessingBehavior(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for MatchProcessingBehavior + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to MatchProcessingBehavior + /// the value to convert to an instance of . + + public static implicit operator MatchProcessingBehavior(string value) + { + return new MatchProcessingBehavior(value); + } + + /// Implicit operator to convert MatchProcessingBehavior to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior e) + { + return e._value; + } + + /// Overriding != operator for enum MatchProcessingBehavior + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum MatchProcessingBehavior + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/MatchVariable.Completer.cs b/src/Cdn/generated/api/Support/MatchVariable.Completer.cs new file mode 100644 index 000000000000..e7ebf6ba89cd --- /dev/null +++ b/src/Cdn/generated/api/Support/MatchVariable.Completer.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The name of the condition for the delivery rule. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariableTypeConverter))] + public partial struct MatchVariable : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RemoteAddress".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RemoteAddress'", "RemoteAddress", global::System.Management.Automation.CompletionResultType.ParameterValue, "RemoteAddress"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RequestMethod".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RequestMethod'", "RequestMethod", global::System.Management.Automation.CompletionResultType.ParameterValue, "RequestMethod"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "QueryString".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'QueryString'", "QueryString", global::System.Management.Automation.CompletionResultType.ParameterValue, "QueryString"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "PostArgs".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'PostArgs'", "PostArgs", global::System.Management.Automation.CompletionResultType.ParameterValue, "PostArgs"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RequestUri".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RequestUri'", "RequestUri", global::System.Management.Automation.CompletionResultType.ParameterValue, "RequestUri"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RequestHeader".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RequestHeader'", "RequestHeader", global::System.Management.Automation.CompletionResultType.ParameterValue, "RequestHeader"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RequestBody".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RequestBody'", "RequestBody", global::System.Management.Automation.CompletionResultType.ParameterValue, "RequestBody"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RequestScheme".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RequestScheme'", "RequestScheme", global::System.Management.Automation.CompletionResultType.ParameterValue, "RequestScheme"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "UrlPath".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'UrlPath'", "UrlPath", global::System.Management.Automation.CompletionResultType.ParameterValue, "UrlPath"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "UrlFileExtension".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'UrlFileExtension'", "UrlFileExtension", global::System.Management.Automation.CompletionResultType.ParameterValue, "UrlFileExtension"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "UrlFileName".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'UrlFileName'", "UrlFileName", global::System.Management.Automation.CompletionResultType.ParameterValue, "UrlFileName"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "HttpVersion".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'HttpVersion'", "HttpVersion", global::System.Management.Automation.CompletionResultType.ParameterValue, "HttpVersion"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Cookies".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Cookies'", "Cookies", global::System.Management.Automation.CompletionResultType.ParameterValue, "Cookies"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "IsDevice".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'IsDevice'", "IsDevice", global::System.Management.Automation.CompletionResultType.ParameterValue, "IsDevice"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "SocketAddr".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'SocketAddr'", "SocketAddr", global::System.Management.Automation.CompletionResultType.ParameterValue, "SocketAddr"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ClientPort".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ClientPort'", "ClientPort", global::System.Management.Automation.CompletionResultType.ParameterValue, "ClientPort"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ServerPort".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ServerPort'", "ServerPort", global::System.Management.Automation.CompletionResultType.ParameterValue, "ServerPort"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "HostName".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'HostName'", "HostName", global::System.Management.Automation.CompletionResultType.ParameterValue, "HostName"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "SslProtocol".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'SslProtocol'", "SslProtocol", global::System.Management.Automation.CompletionResultType.ParameterValue, "SslProtocol"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/MatchVariable.TypeConverter.cs b/src/Cdn/generated/api/Support/MatchVariable.TypeConverter.cs new file mode 100644 index 000000000000..2994590f789a --- /dev/null +++ b/src/Cdn/generated/api/Support/MatchVariable.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The name of the condition for the delivery rule. + public partial class MatchVariableTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => MatchVariable.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/MatchVariable.cs b/src/Cdn/generated/api/Support/MatchVariable.cs new file mode 100644 index 000000000000..9c9bb84ba5d7 --- /dev/null +++ b/src/Cdn/generated/api/Support/MatchVariable.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The name of the condition for the delivery rule. + public partial struct MatchVariable : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable ClientPort = @"ClientPort"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable Cookies = @"Cookies"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable HostName = @"HostName"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable HttpVersion = @"HttpVersion"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable IsDevice = @"IsDevice"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable PostArgs = @"PostArgs"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable QueryString = @"QueryString"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable RemoteAddress = @"RemoteAddress"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable RequestBody = @"RequestBody"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable RequestHeader = @"RequestHeader"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable RequestMethod = @"RequestMethod"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable RequestScheme = @"RequestScheme"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable RequestUri = @"RequestUri"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable ServerPort = @"ServerPort"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable SocketAddr = @"SocketAddr"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable SslProtocol = @"SslProtocol"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable UrlFileExtension = @"UrlFileExtension"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable UrlFileName = @"UrlFileName"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable UrlPath = @"UrlPath"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to MatchVariable + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new MatchVariable(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type MatchVariable + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type MatchVariable (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is MatchVariable && Equals((MatchVariable)obj); + } + + /// Returns hashCode for enum MatchVariable + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private MatchVariable(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for MatchVariable + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to MatchVariable + /// the value to convert to an instance of . + + public static implicit operator MatchVariable(string value) + { + return new MatchVariable(value); + } + + /// Implicit operator to convert MatchVariable to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable e) + { + return e._value; + } + + /// Overriding != operator for enum MatchVariable + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum MatchVariable + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/MinimumTlsVersion.Completer.cs b/src/Cdn/generated/api/Support/MinimumTlsVersion.Completer.cs new file mode 100644 index 000000000000..a43ca37bed93 --- /dev/null +++ b/src/Cdn/generated/api/Support/MinimumTlsVersion.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// TLS protocol version that will be used for Https + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersionTypeConverter))] + public partial struct MinimumTlsVersion : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "None".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'None'", "None", global::System.Management.Automation.CompletionResultType.ParameterValue, "None"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "TLS10".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'TLS10'", "TLS10", global::System.Management.Automation.CompletionResultType.ParameterValue, "TLS10"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "TLS12".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'TLS12'", "TLS12", global::System.Management.Automation.CompletionResultType.ParameterValue, "TLS12"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/MinimumTlsVersion.TypeConverter.cs b/src/Cdn/generated/api/Support/MinimumTlsVersion.TypeConverter.cs new file mode 100644 index 000000000000..1b59caedf835 --- /dev/null +++ b/src/Cdn/generated/api/Support/MinimumTlsVersion.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// TLS protocol version that will be used for Https + public partial class MinimumTlsVersionTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => MinimumTlsVersion.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/MinimumTlsVersion.cs b/src/Cdn/generated/api/Support/MinimumTlsVersion.cs new file mode 100644 index 000000000000..38884397cbf8 --- /dev/null +++ b/src/Cdn/generated/api/Support/MinimumTlsVersion.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// TLS protocol version that will be used for Https + public partial struct MinimumTlsVersion : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion None = @"None"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion Tls10 = @"TLS10"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion Tls12 = @"TLS12"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to MinimumTlsVersion + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new MinimumTlsVersion(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type MinimumTlsVersion + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type MinimumTlsVersion (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is MinimumTlsVersion && Equals((MinimumTlsVersion)obj); + } + + /// Returns hashCode for enum MinimumTlsVersion + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private MinimumTlsVersion(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for MinimumTlsVersion + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to MinimumTlsVersion + /// the value to convert to an instance of . + + public static implicit operator MinimumTlsVersion(string value) + { + return new MinimumTlsVersion(value); + } + + /// Implicit operator to convert MinimumTlsVersion to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion e) + { + return e._value; + } + + /// Overriding != operator for enum MinimumTlsVersion + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum MinimumTlsVersion + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/OptimizationType.Completer.cs b/src/Cdn/generated/api/Support/OptimizationType.Completer.cs new file mode 100644 index 000000000000..25374ebdfcf4 --- /dev/null +++ b/src/Cdn/generated/api/Support/OptimizationType.Completer.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize, e.g. Download, Media services. With this information + /// we can apply scenario driven optimization. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationTypeTypeConverter))] + public partial struct OptimizationType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GeneralWebDelivery".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GeneralWebDelivery'", "GeneralWebDelivery", global::System.Management.Automation.CompletionResultType.ParameterValue, "GeneralWebDelivery"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GeneralMediaStreaming".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GeneralMediaStreaming'", "GeneralMediaStreaming", global::System.Management.Automation.CompletionResultType.ParameterValue, "GeneralMediaStreaming"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "VideoOnDemandMediaStreaming".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'VideoOnDemandMediaStreaming'", "VideoOnDemandMediaStreaming", global::System.Management.Automation.CompletionResultType.ParameterValue, "VideoOnDemandMediaStreaming"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LargeFileDownload".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LargeFileDownload'", "LargeFileDownload", global::System.Management.Automation.CompletionResultType.ParameterValue, "LargeFileDownload"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "DynamicSiteAcceleration".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'DynamicSiteAcceleration'", "DynamicSiteAcceleration", global::System.Management.Automation.CompletionResultType.ParameterValue, "DynamicSiteAcceleration"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/OptimizationType.TypeConverter.cs b/src/Cdn/generated/api/Support/OptimizationType.TypeConverter.cs new file mode 100644 index 000000000000..3bb9eff01fce --- /dev/null +++ b/src/Cdn/generated/api/Support/OptimizationType.TypeConverter.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize, e.g. Download, Media services. With this information + /// we can apply scenario driven optimization. + /// + public partial class OptimizationTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => OptimizationType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/OptimizationType.cs b/src/Cdn/generated/api/Support/OptimizationType.cs new file mode 100644 index 000000000000..be5ba91daffe --- /dev/null +++ b/src/Cdn/generated/api/Support/OptimizationType.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize, e.g. Download, Media services. With this information + /// we can apply scenario driven optimization. + /// + public partial struct OptimizationType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType DynamicSiteAcceleration = @"DynamicSiteAcceleration"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType GeneralMediaStreaming = @"GeneralMediaStreaming"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType GeneralWebDelivery = @"GeneralWebDelivery"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType LargeFileDownload = @"LargeFileDownload"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType VideoOnDemandMediaStreaming = @"VideoOnDemandMediaStreaming"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to OptimizationType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new OptimizationType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type OptimizationType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type OptimizationType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is OptimizationType && Equals((OptimizationType)obj); + } + + /// Returns hashCode for enum OptimizationType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private OptimizationType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for OptimizationType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to OptimizationType + /// the value to convert to an instance of . + + public static implicit operator OptimizationType(string value) + { + return new OptimizationType(value); + } + + /// Implicit operator to convert OptimizationType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType e) + { + return e._value; + } + + /// Overriding != operator for enum OptimizationType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum OptimizationType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/OriginGroupResourceState.Completer.cs b/src/Cdn/generated/api/Support/OriginGroupResourceState.Completer.cs new file mode 100644 index 000000000000..1bbee8e5b1b6 --- /dev/null +++ b/src/Cdn/generated/api/Support/OriginGroupResourceState.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Resource status of the origin group. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceStateTypeConverter))] + public partial struct OriginGroupResourceState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Active".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Active'", "Active", global::System.Management.Automation.CompletionResultType.ParameterValue, "Active"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/OriginGroupResourceState.TypeConverter.cs b/src/Cdn/generated/api/Support/OriginGroupResourceState.TypeConverter.cs new file mode 100644 index 000000000000..3727cca67195 --- /dev/null +++ b/src/Cdn/generated/api/Support/OriginGroupResourceState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Resource status of the origin group. + public partial class OriginGroupResourceStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => OriginGroupResourceState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/OriginGroupResourceState.cs b/src/Cdn/generated/api/Support/OriginGroupResourceState.cs new file mode 100644 index 000000000000..1cb2979fe672 --- /dev/null +++ b/src/Cdn/generated/api/Support/OriginGroupResourceState.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Resource status of the origin group. + public partial struct OriginGroupResourceState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState Active = @"Active"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState Creating = @"Creating"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState Deleting = @"Deleting"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to OriginGroupResourceState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new OriginGroupResourceState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type OriginGroupResourceState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type OriginGroupResourceState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is OriginGroupResourceState && Equals((OriginGroupResourceState)obj); + } + + /// Returns hashCode for enum OriginGroupResourceState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private OriginGroupResourceState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for OriginGroupResourceState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to OriginGroupResourceState + /// the value to convert to an instance of . + + public static implicit operator OriginGroupResourceState(string value) + { + return new OriginGroupResourceState(value); + } + + /// Implicit operator to convert OriginGroupResourceState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState e) + { + return e._value; + } + + /// Overriding != operator for enum OriginGroupResourceState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum OriginGroupResourceState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginGroupResourceState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/OriginResourceState.Completer.cs b/src/Cdn/generated/api/Support/OriginResourceState.Completer.cs new file mode 100644 index 000000000000..3df8fdae925b --- /dev/null +++ b/src/Cdn/generated/api/Support/OriginResourceState.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Resource status of the origin. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceStateTypeConverter))] + public partial struct OriginResourceState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Active".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Active'", "Active", global::System.Management.Automation.CompletionResultType.ParameterValue, "Active"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/OriginResourceState.TypeConverter.cs b/src/Cdn/generated/api/Support/OriginResourceState.TypeConverter.cs new file mode 100644 index 000000000000..ea86be5482ff --- /dev/null +++ b/src/Cdn/generated/api/Support/OriginResourceState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Resource status of the origin. + public partial class OriginResourceStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => OriginResourceState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/OriginResourceState.cs b/src/Cdn/generated/api/Support/OriginResourceState.cs new file mode 100644 index 000000000000..9d0426c67533 --- /dev/null +++ b/src/Cdn/generated/api/Support/OriginResourceState.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Resource status of the origin. + public partial struct OriginResourceState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState Active = @"Active"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState Creating = @"Creating"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState Deleting = @"Deleting"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to OriginResourceState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new OriginResourceState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type OriginResourceState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type OriginResourceState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is OriginResourceState && Equals((OriginResourceState)obj); + } + + /// Returns hashCode for enum OriginResourceState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private OriginResourceState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for OriginResourceState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to OriginResourceState + /// the value to convert to an instance of . + + public static implicit operator OriginResourceState(string value) + { + return new OriginResourceState(value); + } + + /// Implicit operator to convert OriginResourceState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState e) + { + return e._value; + } + + /// Overriding != operator for enum OriginResourceState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum OriginResourceState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OriginResourceState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ParamIndicator.Completer.cs b/src/Cdn/generated/api/Support/ParamIndicator.Completer.cs new file mode 100644 index 000000000000..d76b2fc26639 --- /dev/null +++ b/src/Cdn/generated/api/Support/ParamIndicator.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Indicates the purpose of the parameter + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicatorTypeConverter))] + public partial struct ParamIndicator : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Expires".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Expires'", "Expires", global::System.Management.Automation.CompletionResultType.ParameterValue, "Expires"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "KeyId".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'KeyId'", "KeyId", global::System.Management.Automation.CompletionResultType.ParameterValue, "KeyId"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Signature".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Signature'", "Signature", global::System.Management.Automation.CompletionResultType.ParameterValue, "Signature"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ParamIndicator.TypeConverter.cs b/src/Cdn/generated/api/Support/ParamIndicator.TypeConverter.cs new file mode 100644 index 000000000000..841d9f7cf4fa --- /dev/null +++ b/src/Cdn/generated/api/Support/ParamIndicator.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Indicates the purpose of the parameter + public partial class ParamIndicatorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ParamIndicator.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ParamIndicator.cs b/src/Cdn/generated/api/Support/ParamIndicator.cs new file mode 100644 index 000000000000..c0307a06508b --- /dev/null +++ b/src/Cdn/generated/api/Support/ParamIndicator.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Indicates the purpose of the parameter + public partial struct ParamIndicator : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicator Expires = @"Expires"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicator KeyId = @"KeyId"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicator Signature = @"Signature"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ParamIndicator + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ParamIndicator(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ParamIndicator + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicator e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ParamIndicator (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ParamIndicator && Equals((ParamIndicator)obj); + } + + /// Returns hashCode for enum ParamIndicator + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ParamIndicator(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ParamIndicator + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ParamIndicator + /// the value to convert to an instance of . + + public static implicit operator ParamIndicator(string value) + { + return new ParamIndicator(value); + } + + /// Implicit operator to convert ParamIndicator to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicator e) + { + return e._value; + } + + /// Overriding != operator for enum ParamIndicator + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicator e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ParamIndicator + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ParamIndicator e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/PostArgsOperator.Completer.cs b/src/Cdn/generated/api/Support/PostArgsOperator.Completer.cs new file mode 100644 index 000000000000..005d1da49941 --- /dev/null +++ b/src/Cdn/generated/api/Support/PostArgsOperator.Completer.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperatorTypeConverter))] + public partial struct PostArgsOperator : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Any".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Any'", "Any", global::System.Management.Automation.CompletionResultType.ParameterValue, "Any"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Equal".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Equal'", "Equal", global::System.Management.Automation.CompletionResultType.ParameterValue, "Equal"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Contains".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Contains'", "Contains", global::System.Management.Automation.CompletionResultType.ParameterValue, "Contains"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BeginsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BeginsWith'", "BeginsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "BeginsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EndsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EndsWith'", "EndsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "EndsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThan'", "LessThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThanOrEqual'", "LessThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThan'", "GreaterThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThanOrEqual'", "GreaterThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RegEx".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RegEx'", "RegEx", global::System.Management.Automation.CompletionResultType.ParameterValue, "RegEx"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/PostArgsOperator.TypeConverter.cs b/src/Cdn/generated/api/Support/PostArgsOperator.TypeConverter.cs new file mode 100644 index 000000000000..2b9250947fc0 --- /dev/null +++ b/src/Cdn/generated/api/Support/PostArgsOperator.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial class PostArgsOperatorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => PostArgsOperator.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/PostArgsOperator.cs b/src/Cdn/generated/api/Support/PostArgsOperator.cs new file mode 100644 index 000000000000..dc2b40a2689a --- /dev/null +++ b/src/Cdn/generated/api/Support/PostArgsOperator.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial struct PostArgsOperator : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator Any = @"Any"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator BeginsWith = @"BeginsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator Contains = @"Contains"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator EndsWith = @"EndsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator Equal = @"Equal"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator GreaterThan = @"GreaterThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator GreaterThanOrEqual = @"GreaterThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator LessThan = @"LessThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator LessThanOrEqual = @"LessThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator RegEx = @"RegEx"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to PostArgsOperator + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new PostArgsOperator(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type PostArgsOperator + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type PostArgsOperator (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is PostArgsOperator && Equals((PostArgsOperator)obj); + } + + /// Returns hashCode for enum PostArgsOperator + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private PostArgsOperator(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for PostArgsOperator + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to PostArgsOperator + /// the value to convert to an instance of . + + public static implicit operator PostArgsOperator(string value) + { + return new PostArgsOperator(value); + } + + /// Implicit operator to convert PostArgsOperator to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator e) + { + return e._value; + } + + /// Overriding != operator for enum PostArgsOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum PostArgsOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/PrivateEndpointStatus.Completer.cs b/src/Cdn/generated/api/Support/PrivateEndpointStatus.Completer.cs new file mode 100644 index 000000000000..75acaea7227c --- /dev/null +++ b/src/Cdn/generated/api/Support/PrivateEndpointStatus.Completer.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The approval status for the connection to the Private Link + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatusTypeConverter))] + public partial struct PrivateEndpointStatus : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Pending".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Pending'", "Pending", global::System.Management.Automation.CompletionResultType.ParameterValue, "Pending"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Approved".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Approved'", "Approved", global::System.Management.Automation.CompletionResultType.ParameterValue, "Approved"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Rejected".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Rejected'", "Rejected", global::System.Management.Automation.CompletionResultType.ParameterValue, "Rejected"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disconnected".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disconnected'", "Disconnected", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disconnected"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Timeout".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Timeout'", "Timeout", global::System.Management.Automation.CompletionResultType.ParameterValue, "Timeout"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/PrivateEndpointStatus.TypeConverter.cs b/src/Cdn/generated/api/Support/PrivateEndpointStatus.TypeConverter.cs new file mode 100644 index 000000000000..34697e5eca0b --- /dev/null +++ b/src/Cdn/generated/api/Support/PrivateEndpointStatus.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The approval status for the connection to the Private Link + public partial class PrivateEndpointStatusTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => PrivateEndpointStatus.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/PrivateEndpointStatus.cs b/src/Cdn/generated/api/Support/PrivateEndpointStatus.cs new file mode 100644 index 000000000000..692e70038e64 --- /dev/null +++ b/src/Cdn/generated/api/Support/PrivateEndpointStatus.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The approval status for the connection to the Private Link + public partial struct PrivateEndpointStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus Approved = @"Approved"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus Disconnected = @"Disconnected"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus Pending = @"Pending"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus Rejected = @"Rejected"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus Timeout = @"Timeout"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to PrivateEndpointStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new PrivateEndpointStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type PrivateEndpointStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type PrivateEndpointStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is PrivateEndpointStatus && Equals((PrivateEndpointStatus)obj); + } + + /// Returns hashCode for enum PrivateEndpointStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private PrivateEndpointStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for PrivateEndpointStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to PrivateEndpointStatus + /// the value to convert to an instance of . + + public static implicit operator PrivateEndpointStatus(string value) + { + return new PrivateEndpointStatus(value); + } + + /// Implicit operator to convert PrivateEndpointStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus e) + { + return e._value; + } + + /// Overriding != operator for enum PrivateEndpointStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum PrivateEndpointStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PrivateEndpointStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ProbeProtocol.Completer.cs b/src/Cdn/generated/api/Support/ProbeProtocol.Completer.cs new file mode 100644 index 000000000000..d8cef49a45b8 --- /dev/null +++ b/src/Cdn/generated/api/Support/ProbeProtocol.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Protocol to use for health probe. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocolTypeConverter))] + public partial struct ProbeProtocol : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "NotSet".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'NotSet'", "NotSet", global::System.Management.Automation.CompletionResultType.ParameterValue, "NotSet"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Http".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Http'", "Http", global::System.Management.Automation.CompletionResultType.ParameterValue, "Http"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Https".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Https'", "Https", global::System.Management.Automation.CompletionResultType.ParameterValue, "Https"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ProbeProtocol.TypeConverter.cs b/src/Cdn/generated/api/Support/ProbeProtocol.TypeConverter.cs new file mode 100644 index 000000000000..3d90a615f03e --- /dev/null +++ b/src/Cdn/generated/api/Support/ProbeProtocol.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Protocol to use for health probe. + public partial class ProbeProtocolTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ProbeProtocol.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ProbeProtocol.cs b/src/Cdn/generated/api/Support/ProbeProtocol.cs new file mode 100644 index 000000000000..b7043c0ee3a3 --- /dev/null +++ b/src/Cdn/generated/api/Support/ProbeProtocol.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Protocol to use for health probe. + public partial struct ProbeProtocol : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol Http = @"Http"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol Https = @"Https"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol NotSet = @"NotSet"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ProbeProtocol + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ProbeProtocol(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ProbeProtocol + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ProbeProtocol (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ProbeProtocol && Equals((ProbeProtocol)obj); + } + + /// Returns hashCode for enum ProbeProtocol + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ProbeProtocol(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ProbeProtocol + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ProbeProtocol + /// the value to convert to an instance of . + + public static implicit operator ProbeProtocol(string value) + { + return new ProbeProtocol(value); + } + + /// Implicit operator to convert ProbeProtocol to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol e) + { + return e._value; + } + + /// Overriding != operator for enum ProbeProtocol + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ProbeProtocol + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ProfileResourceState.Completer.cs b/src/Cdn/generated/api/Support/ProfileResourceState.Completer.cs new file mode 100644 index 000000000000..4493788a50b9 --- /dev/null +++ b/src/Cdn/generated/api/Support/ProfileResourceState.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Resource status of the profile. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceStateTypeConverter))] + public partial struct ProfileResourceState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Active".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Active'", "Active", global::System.Management.Automation.CompletionResultType.ParameterValue, "Active"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ProfileResourceState.TypeConverter.cs b/src/Cdn/generated/api/Support/ProfileResourceState.TypeConverter.cs new file mode 100644 index 000000000000..510190f7a5ec --- /dev/null +++ b/src/Cdn/generated/api/Support/ProfileResourceState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Resource status of the profile. + public partial class ProfileResourceStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ProfileResourceState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ProfileResourceState.cs b/src/Cdn/generated/api/Support/ProfileResourceState.cs new file mode 100644 index 000000000000..892465d84a08 --- /dev/null +++ b/src/Cdn/generated/api/Support/ProfileResourceState.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Resource status of the profile. + public partial struct ProfileResourceState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState Active = @"Active"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState Creating = @"Creating"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState Deleting = @"Deleting"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState Disabled = @"Disabled"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ProfileResourceState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ProfileResourceState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ProfileResourceState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ProfileResourceState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ProfileResourceState && Equals((ProfileResourceState)obj); + } + + /// Returns hashCode for enum ProfileResourceState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ProfileResourceState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ProfileResourceState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ProfileResourceState + /// the value to convert to an instance of . + + public static implicit operator ProfileResourceState(string value) + { + return new ProfileResourceState(value); + } + + /// Implicit operator to convert ProfileResourceState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState e) + { + return e._value; + } + + /// Overriding != operator for enum ProfileResourceState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ProfileResourceState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProfileResourceState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ProtocolType.Completer.cs b/src/Cdn/generated/api/Support/ProtocolType.Completer.cs new file mode 100644 index 000000000000..749c9c3f7799 --- /dev/null +++ b/src/Cdn/generated/api/Support/ProtocolType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Defines the TLS extension protocol that is used for secure delivery. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolTypeTypeConverter))] + public partial struct ProtocolType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ServerNameIndication".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ServerNameIndication'", "ServerNameIndication", global::System.Management.Automation.CompletionResultType.ParameterValue, "ServerNameIndication"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "IPBased".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'IPBased'", "IPBased", global::System.Management.Automation.CompletionResultType.ParameterValue, "IPBased"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ProtocolType.TypeConverter.cs b/src/Cdn/generated/api/Support/ProtocolType.TypeConverter.cs new file mode 100644 index 000000000000..5bc1129d7e6b --- /dev/null +++ b/src/Cdn/generated/api/Support/ProtocolType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Defines the TLS extension protocol that is used for secure delivery. + public partial class ProtocolTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ProtocolType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ProtocolType.cs b/src/Cdn/generated/api/Support/ProtocolType.cs new file mode 100644 index 000000000000..9e192794e39b --- /dev/null +++ b/src/Cdn/generated/api/Support/ProtocolType.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Defines the TLS extension protocol that is used for secure delivery. + public partial struct ProtocolType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType IPBased = @"IPBased"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType ServerNameIndication = @"ServerNameIndication"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ProtocolType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ProtocolType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ProtocolType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ProtocolType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ProtocolType && Equals((ProtocolType)obj); + } + + /// Returns hashCode for enum ProtocolType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ProtocolType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ProtocolType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ProtocolType + /// the value to convert to an instance of . + + public static implicit operator ProtocolType(string value) + { + return new ProtocolType(value); + } + + /// Implicit operator to convert ProtocolType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType e) + { + return e._value; + } + + /// Overriding != operator for enum ProtocolType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ProtocolType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/QueryStringBehavior.Completer.cs b/src/Cdn/generated/api/Support/QueryStringBehavior.Completer.cs new file mode 100644 index 000000000000..34772c052150 --- /dev/null +++ b/src/Cdn/generated/api/Support/QueryStringBehavior.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Caching behavior for the requests + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehaviorTypeConverter))] + public partial struct QueryStringBehavior : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Include".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Include'", "Include", global::System.Management.Automation.CompletionResultType.ParameterValue, "Include"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "IncludeAll".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'IncludeAll'", "IncludeAll", global::System.Management.Automation.CompletionResultType.ParameterValue, "IncludeAll"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Exclude".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Exclude'", "Exclude", global::System.Management.Automation.CompletionResultType.ParameterValue, "Exclude"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ExcludeAll".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ExcludeAll'", "ExcludeAll", global::System.Management.Automation.CompletionResultType.ParameterValue, "ExcludeAll"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/QueryStringBehavior.TypeConverter.cs b/src/Cdn/generated/api/Support/QueryStringBehavior.TypeConverter.cs new file mode 100644 index 000000000000..ad6305c3c85f --- /dev/null +++ b/src/Cdn/generated/api/Support/QueryStringBehavior.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Caching behavior for the requests + public partial class QueryStringBehaviorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => QueryStringBehavior.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/QueryStringBehavior.cs b/src/Cdn/generated/api/Support/QueryStringBehavior.cs new file mode 100644 index 000000000000..6714a47751f7 --- /dev/null +++ b/src/Cdn/generated/api/Support/QueryStringBehavior.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Caching behavior for the requests + public partial struct QueryStringBehavior : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior Exclude = @"Exclude"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior ExcludeAll = @"ExcludeAll"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior Include = @"Include"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior IncludeAll = @"IncludeAll"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to QueryStringBehavior + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new QueryStringBehavior(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type QueryStringBehavior + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type QueryStringBehavior (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is QueryStringBehavior && Equals((QueryStringBehavior)obj); + } + + /// Returns hashCode for enum QueryStringBehavior + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private QueryStringBehavior(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for QueryStringBehavior + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to QueryStringBehavior + /// the value to convert to an instance of . + + public static implicit operator QueryStringBehavior(string value) + { + return new QueryStringBehavior(value); + } + + /// Implicit operator to convert QueryStringBehavior to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior e) + { + return e._value; + } + + /// Overriding != operator for enum QueryStringBehavior + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum QueryStringBehavior + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringBehavior e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/QueryStringCachingBehavior.Completer.cs b/src/Cdn/generated/api/Support/QueryStringCachingBehavior.Completer.cs new file mode 100644 index 000000000000..77625d8d6cd1 --- /dev/null +++ b/src/Cdn/generated/api/Support/QueryStringCachingBehavior.Completer.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching + /// to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehaviorTypeConverter))] + public partial struct QueryStringCachingBehavior : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "IgnoreQueryString".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'IgnoreQueryString'", "IgnoreQueryString", global::System.Management.Automation.CompletionResultType.ParameterValue, "IgnoreQueryString"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BypassCaching".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BypassCaching'", "BypassCaching", global::System.Management.Automation.CompletionResultType.ParameterValue, "BypassCaching"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "UseQueryString".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'UseQueryString'", "UseQueryString", global::System.Management.Automation.CompletionResultType.ParameterValue, "UseQueryString"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "NotSet".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'NotSet'", "NotSet", global::System.Management.Automation.CompletionResultType.ParameterValue, "NotSet"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/QueryStringCachingBehavior.TypeConverter.cs b/src/Cdn/generated/api/Support/QueryStringCachingBehavior.TypeConverter.cs new file mode 100644 index 000000000000..75604d00a8dd --- /dev/null +++ b/src/Cdn/generated/api/Support/QueryStringCachingBehavior.TypeConverter.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching + /// to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + public partial class QueryStringCachingBehaviorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => QueryStringCachingBehavior.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/QueryStringCachingBehavior.cs b/src/Cdn/generated/api/Support/QueryStringCachingBehavior.cs new file mode 100644 index 000000000000..68dde08b8133 --- /dev/null +++ b/src/Cdn/generated/api/Support/QueryStringCachingBehavior.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching + /// to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + public partial struct QueryStringCachingBehavior : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior BypassCaching = @"BypassCaching"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior IgnoreQueryString = @"IgnoreQueryString"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior NotSet = @"NotSet"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior UseQueryString = @"UseQueryString"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to QueryStringCachingBehavior + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new QueryStringCachingBehavior(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type QueryStringCachingBehavior + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type QueryStringCachingBehavior (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is QueryStringCachingBehavior && Equals((QueryStringCachingBehavior)obj); + } + + /// Returns hashCode for enum QueryStringCachingBehavior + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private QueryStringCachingBehavior(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for QueryStringCachingBehavior + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to QueryStringCachingBehavior + /// the value to convert to an instance of . + + public static implicit operator QueryStringCachingBehavior(string value) + { + return new QueryStringCachingBehavior(value); + } + + /// Implicit operator to convert QueryStringCachingBehavior to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior e) + { + return e._value; + } + + /// Overriding != operator for enum QueryStringCachingBehavior + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum QueryStringCachingBehavior + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/QueryStringOperator.Completer.cs b/src/Cdn/generated/api/Support/QueryStringOperator.Completer.cs new file mode 100644 index 000000000000..358445f0a316 --- /dev/null +++ b/src/Cdn/generated/api/Support/QueryStringOperator.Completer.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperatorTypeConverter))] + public partial struct QueryStringOperator : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Any".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Any'", "Any", global::System.Management.Automation.CompletionResultType.ParameterValue, "Any"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Equal".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Equal'", "Equal", global::System.Management.Automation.CompletionResultType.ParameterValue, "Equal"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Contains".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Contains'", "Contains", global::System.Management.Automation.CompletionResultType.ParameterValue, "Contains"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BeginsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BeginsWith'", "BeginsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "BeginsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EndsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EndsWith'", "EndsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "EndsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThan'", "LessThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThanOrEqual'", "LessThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThan'", "GreaterThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThanOrEqual'", "GreaterThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RegEx".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RegEx'", "RegEx", global::System.Management.Automation.CompletionResultType.ParameterValue, "RegEx"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/QueryStringOperator.TypeConverter.cs b/src/Cdn/generated/api/Support/QueryStringOperator.TypeConverter.cs new file mode 100644 index 000000000000..2a626747285b --- /dev/null +++ b/src/Cdn/generated/api/Support/QueryStringOperator.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial class QueryStringOperatorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => QueryStringOperator.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/QueryStringOperator.cs b/src/Cdn/generated/api/Support/QueryStringOperator.cs new file mode 100644 index 000000000000..6b0f82e65d04 --- /dev/null +++ b/src/Cdn/generated/api/Support/QueryStringOperator.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial struct QueryStringOperator : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator Any = @"Any"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator BeginsWith = @"BeginsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator Contains = @"Contains"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator EndsWith = @"EndsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator Equal = @"Equal"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator GreaterThan = @"GreaterThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator GreaterThanOrEqual = @"GreaterThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator LessThan = @"LessThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator LessThanOrEqual = @"LessThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator RegEx = @"RegEx"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to QueryStringOperator + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new QueryStringOperator(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type QueryStringOperator + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type QueryStringOperator (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is QueryStringOperator && Equals((QueryStringOperator)obj); + } + + /// Returns hashCode for enum QueryStringOperator + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private QueryStringOperator(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for QueryStringOperator + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to QueryStringOperator + /// the value to convert to an instance of . + + public static implicit operator QueryStringOperator(string value) + { + return new QueryStringOperator(value); + } + + /// Implicit operator to convert QueryStringOperator to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator e) + { + return e._value; + } + + /// Overriding != operator for enum QueryStringOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum QueryStringOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RedirectType.Completer.cs b/src/Cdn/generated/api/Support/RedirectType.Completer.cs new file mode 100644 index 000000000000..3b875e8c70a3 --- /dev/null +++ b/src/Cdn/generated/api/Support/RedirectType.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The redirect type the rule will use when redirecting traffic. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectTypeTypeConverter))] + public partial struct RedirectType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Moved".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Moved'", "Moved", global::System.Management.Automation.CompletionResultType.ParameterValue, "Moved"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Found".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Found'", "Found", global::System.Management.Automation.CompletionResultType.ParameterValue, "Found"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "TemporaryRedirect".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'TemporaryRedirect'", "TemporaryRedirect", global::System.Management.Automation.CompletionResultType.ParameterValue, "TemporaryRedirect"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "PermanentRedirect".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'PermanentRedirect'", "PermanentRedirect", global::System.Management.Automation.CompletionResultType.ParameterValue, "PermanentRedirect"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RedirectType.TypeConverter.cs b/src/Cdn/generated/api/Support/RedirectType.TypeConverter.cs new file mode 100644 index 000000000000..9c004e97a348 --- /dev/null +++ b/src/Cdn/generated/api/Support/RedirectType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The redirect type the rule will use when redirecting traffic. + public partial class RedirectTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => RedirectType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RedirectType.cs b/src/Cdn/generated/api/Support/RedirectType.cs new file mode 100644 index 000000000000..4d88236d0ff9 --- /dev/null +++ b/src/Cdn/generated/api/Support/RedirectType.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The redirect type the rule will use when redirecting traffic. + public partial struct RedirectType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType Found = @"Found"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType Moved = @"Moved"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType PermanentRedirect = @"PermanentRedirect"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType TemporaryRedirect = @"TemporaryRedirect"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RedirectType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RedirectType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RedirectType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RedirectType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RedirectType && Equals((RedirectType)obj); + } + + /// Returns hashCode for enum RedirectType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RedirectType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RedirectType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RedirectType + /// the value to convert to an instance of . + + public static implicit operator RedirectType(string value) + { + return new RedirectType(value); + } + + /// Implicit operator to convert RedirectType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType e) + { + return e._value; + } + + /// Overriding != operator for enum RedirectType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RedirectType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RemoteAddressOperator.Completer.cs b/src/Cdn/generated/api/Support/RemoteAddressOperator.Completer.cs new file mode 100644 index 000000000000..3499779bfe88 --- /dev/null +++ b/src/Cdn/generated/api/Support/RemoteAddressOperator.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperatorTypeConverter))] + public partial struct RemoteAddressOperator : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Any".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Any'", "Any", global::System.Management.Automation.CompletionResultType.ParameterValue, "Any"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "IPMatch".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'IPMatch'", "IPMatch", global::System.Management.Automation.CompletionResultType.ParameterValue, "IPMatch"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GeoMatch".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GeoMatch'", "GeoMatch", global::System.Management.Automation.CompletionResultType.ParameterValue, "GeoMatch"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RemoteAddressOperator.TypeConverter.cs b/src/Cdn/generated/api/Support/RemoteAddressOperator.TypeConverter.cs new file mode 100644 index 000000000000..550ee3acaa60 --- /dev/null +++ b/src/Cdn/generated/api/Support/RemoteAddressOperator.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial class RemoteAddressOperatorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => RemoteAddressOperator.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RemoteAddressOperator.cs b/src/Cdn/generated/api/Support/RemoteAddressOperator.cs new file mode 100644 index 000000000000..49702532b716 --- /dev/null +++ b/src/Cdn/generated/api/Support/RemoteAddressOperator.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial struct RemoteAddressOperator : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator Any = @"Any"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator GeoMatch = @"GeoMatch"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator IPMatch = @"IPMatch"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RemoteAddressOperator + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RemoteAddressOperator(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RemoteAddressOperator + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RemoteAddressOperator (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RemoteAddressOperator && Equals((RemoteAddressOperator)obj); + } + + /// Returns hashCode for enum RemoteAddressOperator + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RemoteAddressOperator(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RemoteAddressOperator + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RemoteAddressOperator + /// the value to convert to an instance of . + + public static implicit operator RemoteAddressOperator(string value) + { + return new RemoteAddressOperator(value); + } + + /// Implicit operator to convert RemoteAddressOperator to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator e) + { + return e._value; + } + + /// Overriding != operator for enum RemoteAddressOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RemoteAddressOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RequestBodyOperator.Completer.cs b/src/Cdn/generated/api/Support/RequestBodyOperator.Completer.cs new file mode 100644 index 000000000000..6112153b78ae --- /dev/null +++ b/src/Cdn/generated/api/Support/RequestBodyOperator.Completer.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperatorTypeConverter))] + public partial struct RequestBodyOperator : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Any".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Any'", "Any", global::System.Management.Automation.CompletionResultType.ParameterValue, "Any"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Equal".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Equal'", "Equal", global::System.Management.Automation.CompletionResultType.ParameterValue, "Equal"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Contains".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Contains'", "Contains", global::System.Management.Automation.CompletionResultType.ParameterValue, "Contains"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BeginsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BeginsWith'", "BeginsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "BeginsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EndsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EndsWith'", "EndsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "EndsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThan'", "LessThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThanOrEqual'", "LessThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThan'", "GreaterThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThanOrEqual'", "GreaterThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RegEx".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RegEx'", "RegEx", global::System.Management.Automation.CompletionResultType.ParameterValue, "RegEx"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RequestBodyOperator.TypeConverter.cs b/src/Cdn/generated/api/Support/RequestBodyOperator.TypeConverter.cs new file mode 100644 index 000000000000..4d5b64d8d3f5 --- /dev/null +++ b/src/Cdn/generated/api/Support/RequestBodyOperator.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial class RequestBodyOperatorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => RequestBodyOperator.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RequestBodyOperator.cs b/src/Cdn/generated/api/Support/RequestBodyOperator.cs new file mode 100644 index 000000000000..c7aa691d370c --- /dev/null +++ b/src/Cdn/generated/api/Support/RequestBodyOperator.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial struct RequestBodyOperator : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator Any = @"Any"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator BeginsWith = @"BeginsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator Contains = @"Contains"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator EndsWith = @"EndsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator Equal = @"Equal"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator GreaterThan = @"GreaterThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator GreaterThanOrEqual = @"GreaterThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator LessThan = @"LessThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator LessThanOrEqual = @"LessThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator RegEx = @"RegEx"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RequestBodyOperator + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RequestBodyOperator(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RequestBodyOperator + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RequestBodyOperator (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RequestBodyOperator && Equals((RequestBodyOperator)obj); + } + + /// Returns hashCode for enum RequestBodyOperator + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RequestBodyOperator(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RequestBodyOperator + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RequestBodyOperator + /// the value to convert to an instance of . + + public static implicit operator RequestBodyOperator(string value) + { + return new RequestBodyOperator(value); + } + + /// Implicit operator to convert RequestBodyOperator to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator e) + { + return e._value; + } + + /// Overriding != operator for enum RequestBodyOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RequestBodyOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RequestHeaderOperator.Completer.cs b/src/Cdn/generated/api/Support/RequestHeaderOperator.Completer.cs new file mode 100644 index 000000000000..2f61558c9655 --- /dev/null +++ b/src/Cdn/generated/api/Support/RequestHeaderOperator.Completer.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperatorTypeConverter))] + public partial struct RequestHeaderOperator : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Any".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Any'", "Any", global::System.Management.Automation.CompletionResultType.ParameterValue, "Any"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Equal".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Equal'", "Equal", global::System.Management.Automation.CompletionResultType.ParameterValue, "Equal"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Contains".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Contains'", "Contains", global::System.Management.Automation.CompletionResultType.ParameterValue, "Contains"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BeginsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BeginsWith'", "BeginsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "BeginsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EndsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EndsWith'", "EndsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "EndsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThan'", "LessThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThanOrEqual'", "LessThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThan'", "GreaterThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThanOrEqual'", "GreaterThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RegEx".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RegEx'", "RegEx", global::System.Management.Automation.CompletionResultType.ParameterValue, "RegEx"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RequestHeaderOperator.TypeConverter.cs b/src/Cdn/generated/api/Support/RequestHeaderOperator.TypeConverter.cs new file mode 100644 index 000000000000..c6744919d398 --- /dev/null +++ b/src/Cdn/generated/api/Support/RequestHeaderOperator.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial class RequestHeaderOperatorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => RequestHeaderOperator.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RequestHeaderOperator.cs b/src/Cdn/generated/api/Support/RequestHeaderOperator.cs new file mode 100644 index 000000000000..e1f8f8758b8e --- /dev/null +++ b/src/Cdn/generated/api/Support/RequestHeaderOperator.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial struct RequestHeaderOperator : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator Any = @"Any"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator BeginsWith = @"BeginsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator Contains = @"Contains"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator EndsWith = @"EndsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator Equal = @"Equal"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator GreaterThan = @"GreaterThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator GreaterThanOrEqual = @"GreaterThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator LessThan = @"LessThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator LessThanOrEqual = @"LessThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator RegEx = @"RegEx"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RequestHeaderOperator + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RequestHeaderOperator(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RequestHeaderOperator + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RequestHeaderOperator (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RequestHeaderOperator && Equals((RequestHeaderOperator)obj); + } + + /// Returns hashCode for enum RequestHeaderOperator + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RequestHeaderOperator(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RequestHeaderOperator + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RequestHeaderOperator + /// the value to convert to an instance of . + + public static implicit operator RequestHeaderOperator(string value) + { + return new RequestHeaderOperator(value); + } + + /// Implicit operator to convert RequestHeaderOperator to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator e) + { + return e._value; + } + + /// Overriding != operator for enum RequestHeaderOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RequestHeaderOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RequestUriOperator.Completer.cs b/src/Cdn/generated/api/Support/RequestUriOperator.Completer.cs new file mode 100644 index 000000000000..a25e0d9ca3fb --- /dev/null +++ b/src/Cdn/generated/api/Support/RequestUriOperator.Completer.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperatorTypeConverter))] + public partial struct RequestUriOperator : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Any".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Any'", "Any", global::System.Management.Automation.CompletionResultType.ParameterValue, "Any"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Equal".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Equal'", "Equal", global::System.Management.Automation.CompletionResultType.ParameterValue, "Equal"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Contains".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Contains'", "Contains", global::System.Management.Automation.CompletionResultType.ParameterValue, "Contains"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BeginsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BeginsWith'", "BeginsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "BeginsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EndsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EndsWith'", "EndsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "EndsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThan'", "LessThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThanOrEqual'", "LessThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThan'", "GreaterThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThanOrEqual'", "GreaterThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RegEx".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RegEx'", "RegEx", global::System.Management.Automation.CompletionResultType.ParameterValue, "RegEx"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RequestUriOperator.TypeConverter.cs b/src/Cdn/generated/api/Support/RequestUriOperator.TypeConverter.cs new file mode 100644 index 000000000000..8ec6c54885be --- /dev/null +++ b/src/Cdn/generated/api/Support/RequestUriOperator.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial class RequestUriOperatorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => RequestUriOperator.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RequestUriOperator.cs b/src/Cdn/generated/api/Support/RequestUriOperator.cs new file mode 100644 index 000000000000..669a4f118aaa --- /dev/null +++ b/src/Cdn/generated/api/Support/RequestUriOperator.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial struct RequestUriOperator : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator Any = @"Any"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator BeginsWith = @"BeginsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator Contains = @"Contains"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator EndsWith = @"EndsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator Equal = @"Equal"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator GreaterThan = @"GreaterThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator GreaterThanOrEqual = @"GreaterThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator LessThan = @"LessThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator LessThanOrEqual = @"LessThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator RegEx = @"RegEx"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RequestUriOperator + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RequestUriOperator(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RequestUriOperator + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RequestUriOperator (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RequestUriOperator && Equals((RequestUriOperator)obj); + } + + /// Returns hashCode for enum RequestUriOperator + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RequestUriOperator(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RequestUriOperator + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RequestUriOperator + /// the value to convert to an instance of . + + public static implicit operator RequestUriOperator(string value) + { + return new RequestUriOperator(value); + } + + /// Implicit operator to convert RequestUriOperator to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator e) + { + return e._value; + } + + /// Overriding != operator for enum RequestUriOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RequestUriOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ResourceType.Completer.cs b/src/Cdn/generated/api/Support/ResourceType.Completer.cs new file mode 100644 index 000000000000..54b68680fb90 --- /dev/null +++ b/src/Cdn/generated/api/Support/ResourceType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Type of CDN resource used in CheckNameAvailability. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceTypeTypeConverter))] + public partial struct ResourceType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Microsoft.Cdn/Profiles/Endpoints".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Microsoft.Cdn/Profiles/Endpoints'", "Microsoft.Cdn/Profiles/Endpoints", global::System.Management.Automation.CompletionResultType.ParameterValue, "Microsoft.Cdn/Profiles/Endpoints"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Microsoft.Cdn/Profiles/AfdEndpoints".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Microsoft.Cdn/Profiles/AfdEndpoints'", "Microsoft.Cdn/Profiles/AfdEndpoints", global::System.Management.Automation.CompletionResultType.ParameterValue, "Microsoft.Cdn/Profiles/AfdEndpoints"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ResourceType.TypeConverter.cs b/src/Cdn/generated/api/Support/ResourceType.TypeConverter.cs new file mode 100644 index 000000000000..900953856418 --- /dev/null +++ b/src/Cdn/generated/api/Support/ResourceType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Type of CDN resource used in CheckNameAvailability. + public partial class ResourceTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ResourceType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ResourceType.cs b/src/Cdn/generated/api/Support/ResourceType.cs new file mode 100644 index 000000000000..edfe76afcabf --- /dev/null +++ b/src/Cdn/generated/api/Support/ResourceType.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Type of CDN resource used in CheckNameAvailability. + public partial struct ResourceType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType MicrosoftCdnProfilesAfdEndpoints = @"Microsoft.Cdn/Profiles/AfdEndpoints"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType MicrosoftCdnProfilesEndpoints = @"Microsoft.Cdn/Profiles/Endpoints"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ResourceType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ResourceType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ResourceType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ResourceType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ResourceType && Equals((ResourceType)obj); + } + + /// Returns hashCode for enum ResourceType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ResourceType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ResourceType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ResourceType + /// the value to convert to an instance of . + + public static implicit operator ResourceType(string value) + { + return new ResourceType(value); + } + + /// Implicit operator to convert ResourceType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType e) + { + return e._value; + } + + /// Overriding != operator for enum ResourceType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ResourceType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ResponseBasedDetectedErrorTypes.Completer.cs b/src/Cdn/generated/api/Support/ResponseBasedDetectedErrorTypes.Completer.cs new file mode 100644 index 000000000000..8579e7d32522 --- /dev/null +++ b/src/Cdn/generated/api/Support/ResponseBasedDetectedErrorTypes.Completer.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Type of response errors for real user requests for which origin will be deemed unhealthy + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypesTypeConverter))] + public partial struct ResponseBasedDetectedErrorTypes : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "None".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'None'", "None", global::System.Management.Automation.CompletionResultType.ParameterValue, "None"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "TcpErrorsOnly".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'TcpErrorsOnly'", "TcpErrorsOnly", global::System.Management.Automation.CompletionResultType.ParameterValue, "TcpErrorsOnly"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "TcpAndHttpErrors".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'TcpAndHttpErrors'", "TcpAndHttpErrors", global::System.Management.Automation.CompletionResultType.ParameterValue, "TcpAndHttpErrors"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ResponseBasedDetectedErrorTypes.TypeConverter.cs b/src/Cdn/generated/api/Support/ResponseBasedDetectedErrorTypes.TypeConverter.cs new file mode 100644 index 000000000000..eecd4b7ccd44 --- /dev/null +++ b/src/Cdn/generated/api/Support/ResponseBasedDetectedErrorTypes.TypeConverter.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Type of response errors for real user requests for which origin will be deemed unhealthy + /// + public partial class ResponseBasedDetectedErrorTypesTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ResponseBasedDetectedErrorTypes.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ResponseBasedDetectedErrorTypes.cs b/src/Cdn/generated/api/Support/ResponseBasedDetectedErrorTypes.cs new file mode 100644 index 000000000000..8fc6f7b49715 --- /dev/null +++ b/src/Cdn/generated/api/Support/ResponseBasedDetectedErrorTypes.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Type of response errors for real user requests for which origin will be deemed unhealthy + /// + public partial struct ResponseBasedDetectedErrorTypes : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes None = @"None"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes TcpAndHttpErrors = @"TcpAndHttpErrors"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes TcpErrorsOnly = @"TcpErrorsOnly"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to ResponseBasedDetectedErrorTypes + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ResponseBasedDetectedErrorTypes(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ResponseBasedDetectedErrorTypes + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type ResponseBasedDetectedErrorTypes (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ResponseBasedDetectedErrorTypes && Equals((ResponseBasedDetectedErrorTypes)obj); + } + + /// Returns hashCode for enum ResponseBasedDetectedErrorTypes + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private ResponseBasedDetectedErrorTypes(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ResponseBasedDetectedErrorTypes + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ResponseBasedDetectedErrorTypes + /// the value to convert to an instance of . + + public static implicit operator ResponseBasedDetectedErrorTypes(string value) + { + return new ResponseBasedDetectedErrorTypes(value); + } + + /// Implicit operator to convert ResponseBasedDetectedErrorTypes to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes e) + { + return e._value; + } + + /// Overriding != operator for enum ResponseBasedDetectedErrorTypes + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ResponseBasedDetectedErrorTypes + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RuleCacheBehavior.Completer.cs b/src/Cdn/generated/api/Support/RuleCacheBehavior.Completer.cs new file mode 100644 index 000000000000..47941d91e86e --- /dev/null +++ b/src/Cdn/generated/api/Support/RuleCacheBehavior.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Caching behavior for the requests + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehaviorTypeConverter))] + public partial struct RuleCacheBehavior : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "HonorOrigin".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'HonorOrigin'", "HonorOrigin", global::System.Management.Automation.CompletionResultType.ParameterValue, "HonorOrigin"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "OverrideAlways".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'OverrideAlways'", "OverrideAlways", global::System.Management.Automation.CompletionResultType.ParameterValue, "OverrideAlways"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "OverrideIfOriginMissing".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'OverrideIfOriginMissing'", "OverrideIfOriginMissing", global::System.Management.Automation.CompletionResultType.ParameterValue, "OverrideIfOriginMissing"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RuleCacheBehavior.TypeConverter.cs b/src/Cdn/generated/api/Support/RuleCacheBehavior.TypeConverter.cs new file mode 100644 index 000000000000..1aa2b862f856 --- /dev/null +++ b/src/Cdn/generated/api/Support/RuleCacheBehavior.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Caching behavior for the requests + public partial class RuleCacheBehaviorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => RuleCacheBehavior.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RuleCacheBehavior.cs b/src/Cdn/generated/api/Support/RuleCacheBehavior.cs new file mode 100644 index 000000000000..a16c772a1d98 --- /dev/null +++ b/src/Cdn/generated/api/Support/RuleCacheBehavior.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Caching behavior for the requests + public partial struct RuleCacheBehavior : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior HonorOrigin = @"HonorOrigin"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior OverrideAlways = @"OverrideAlways"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior OverrideIfOriginMissing = @"OverrideIfOriginMissing"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RuleCacheBehavior + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RuleCacheBehavior(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RuleCacheBehavior + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RuleCacheBehavior (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RuleCacheBehavior && Equals((RuleCacheBehavior)obj); + } + + /// Returns hashCode for enum RuleCacheBehavior + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RuleCacheBehavior(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RuleCacheBehavior + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RuleCacheBehavior + /// the value to convert to an instance of . + + public static implicit operator RuleCacheBehavior(string value) + { + return new RuleCacheBehavior(value); + } + + /// Implicit operator to convert RuleCacheBehavior to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior e) + { + return e._value; + } + + /// Overriding != operator for enum RuleCacheBehavior + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RuleCacheBehavior + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RuleIsCompressionEnabled.Completer.cs b/src/Cdn/generated/api/Support/RuleIsCompressionEnabled.Completer.cs new file mode 100644 index 000000000000..cca77a22ee25 --- /dev/null +++ b/src/Cdn/generated/api/Support/RuleIsCompressionEnabled.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user + /// requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than + /// 1 byte or larger than 1 MB. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabledTypeConverter))] + public partial struct RuleIsCompressionEnabled : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RuleIsCompressionEnabled.TypeConverter.cs b/src/Cdn/generated/api/Support/RuleIsCompressionEnabled.TypeConverter.cs new file mode 100644 index 000000000000..b223ebf67432 --- /dev/null +++ b/src/Cdn/generated/api/Support/RuleIsCompressionEnabled.TypeConverter.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user + /// requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than + /// 1 byte or larger than 1 MB. + /// + public partial class RuleIsCompressionEnabledTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => RuleIsCompressionEnabled.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RuleIsCompressionEnabled.cs b/src/Cdn/generated/api/Support/RuleIsCompressionEnabled.cs new file mode 100644 index 000000000000..5f1ff1964ecb --- /dev/null +++ b/src/Cdn/generated/api/Support/RuleIsCompressionEnabled.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user + /// requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than + /// 1 byte or larger than 1 MB. + /// + public partial struct RuleIsCompressionEnabled : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled Disabled = @"Disabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled Enabled = @"Enabled"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RuleIsCompressionEnabled + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RuleIsCompressionEnabled(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RuleIsCompressionEnabled + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RuleIsCompressionEnabled (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RuleIsCompressionEnabled && Equals((RuleIsCompressionEnabled)obj); + } + + /// Returns hashCode for enum RuleIsCompressionEnabled + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RuleIsCompressionEnabled(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RuleIsCompressionEnabled + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RuleIsCompressionEnabled + /// the value to convert to an instance of . + + public static implicit operator RuleIsCompressionEnabled(string value) + { + return new RuleIsCompressionEnabled(value); + } + + /// Implicit operator to convert RuleIsCompressionEnabled to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled e) + { + return e._value; + } + + /// Overriding != operator for enum RuleIsCompressionEnabled + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RuleIsCompressionEnabled + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RuleQueryStringCachingBehavior.Completer.cs b/src/Cdn/generated/api/Support/RuleQueryStringCachingBehavior.Completer.cs new file mode 100644 index 000000000000..7dacc14f92e6 --- /dev/null +++ b/src/Cdn/generated/api/Support/RuleQueryStringCachingBehavior.Completer.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehaviorTypeConverter))] + public partial struct RuleQueryStringCachingBehavior : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "IgnoreQueryString".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'IgnoreQueryString'", "IgnoreQueryString", global::System.Management.Automation.CompletionResultType.ParameterValue, "IgnoreQueryString"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "UseQueryString".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'UseQueryString'", "UseQueryString", global::System.Management.Automation.CompletionResultType.ParameterValue, "UseQueryString"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "IgnoreSpecifiedQueryStrings".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'IgnoreSpecifiedQueryStrings'", "IgnoreSpecifiedQueryStrings", global::System.Management.Automation.CompletionResultType.ParameterValue, "IgnoreSpecifiedQueryStrings"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "IncludeSpecifiedQueryStrings".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'IncludeSpecifiedQueryStrings'", "IncludeSpecifiedQueryStrings", global::System.Management.Automation.CompletionResultType.ParameterValue, "IncludeSpecifiedQueryStrings"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RuleQueryStringCachingBehavior.TypeConverter.cs b/src/Cdn/generated/api/Support/RuleQueryStringCachingBehavior.TypeConverter.cs new file mode 100644 index 000000000000..6c3bc4128c80 --- /dev/null +++ b/src/Cdn/generated/api/Support/RuleQueryStringCachingBehavior.TypeConverter.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + public partial class RuleQueryStringCachingBehaviorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => RuleQueryStringCachingBehavior.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/RuleQueryStringCachingBehavior.cs b/src/Cdn/generated/api/Support/RuleQueryStringCachingBehavior.cs new file mode 100644 index 000000000000..dcd6b0212b17 --- /dev/null +++ b/src/Cdn/generated/api/Support/RuleQueryStringCachingBehavior.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + public partial struct RuleQueryStringCachingBehavior : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior IgnoreQueryString = @"IgnoreQueryString"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior IgnoreSpecifiedQueryStrings = @"IgnoreSpecifiedQueryStrings"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior IncludeSpecifiedQueryStrings = @"IncludeSpecifiedQueryStrings"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior UseQueryString = @"UseQueryString"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to RuleQueryStringCachingBehavior + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RuleQueryStringCachingBehavior(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RuleQueryStringCachingBehavior + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type RuleQueryStringCachingBehavior (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RuleQueryStringCachingBehavior && Equals((RuleQueryStringCachingBehavior)obj); + } + + /// Returns hashCode for enum RuleQueryStringCachingBehavior + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private RuleQueryStringCachingBehavior(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RuleQueryStringCachingBehavior + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RuleQueryStringCachingBehavior + /// the value to convert to an instance of . + + public static implicit operator RuleQueryStringCachingBehavior(string value) + { + return new RuleQueryStringCachingBehavior(value); + } + + /// Implicit operator to convert RuleQueryStringCachingBehavior to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior e) + { + return e._value; + } + + /// Overriding != operator for enum RuleQueryStringCachingBehavior + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RuleQueryStringCachingBehavior + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/SecretType.Completer.cs b/src/Cdn/generated/api/Support/SecretType.Completer.cs new file mode 100644 index 000000000000..c93b4b5555c2 --- /dev/null +++ b/src/Cdn/generated/api/Support/SecretType.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The type of the secret resource. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretTypeTypeConverter))] + public partial struct SecretType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "UrlSigningKey".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'UrlSigningKey'", "UrlSigningKey", global::System.Management.Automation.CompletionResultType.ParameterValue, "UrlSigningKey"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "CustomerCertificate".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'CustomerCertificate'", "CustomerCertificate", global::System.Management.Automation.CompletionResultType.ParameterValue, "CustomerCertificate"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ManagedCertificate".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ManagedCertificate'", "ManagedCertificate", global::System.Management.Automation.CompletionResultType.ParameterValue, "ManagedCertificate"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "AzureFirstPartyManagedCertificate".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'AzureFirstPartyManagedCertificate'", "AzureFirstPartyManagedCertificate", global::System.Management.Automation.CompletionResultType.ParameterValue, "AzureFirstPartyManagedCertificate"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/SecretType.TypeConverter.cs b/src/Cdn/generated/api/Support/SecretType.TypeConverter.cs new file mode 100644 index 000000000000..baeac0b215bb --- /dev/null +++ b/src/Cdn/generated/api/Support/SecretType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The type of the secret resource. + public partial class SecretTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => SecretType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/SecretType.cs b/src/Cdn/generated/api/Support/SecretType.cs new file mode 100644 index 000000000000..0c7d5af614a6 --- /dev/null +++ b/src/Cdn/generated/api/Support/SecretType.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The type of the secret resource. + public partial struct SecretType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType AzureFirstPartyManagedCertificate = @"AzureFirstPartyManagedCertificate"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType CustomerCertificate = @"CustomerCertificate"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType ManagedCertificate = @"ManagedCertificate"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType UrlSigningKey = @"UrlSigningKey"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to SecretType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new SecretType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type SecretType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type SecretType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is SecretType && Equals((SecretType)obj); + } + + /// Returns hashCode for enum SecretType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private SecretType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for SecretType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to SecretType + /// the value to convert to an instance of . + + public static implicit operator SecretType(string value) + { + return new SecretType(value); + } + + /// Implicit operator to convert SecretType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType e) + { + return e._value; + } + + /// Overriding != operator for enum SecretType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum SecretType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ServerPortOperator.Completer.cs b/src/Cdn/generated/api/Support/ServerPortOperator.Completer.cs new file mode 100644 index 000000000000..c05cf84d1d98 --- /dev/null +++ b/src/Cdn/generated/api/Support/ServerPortOperator.Completer.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperatorTypeConverter))] + public partial struct ServerPortOperator : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Any".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Any'", "Any", global::System.Management.Automation.CompletionResultType.ParameterValue, "Any"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Equal".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Equal'", "Equal", global::System.Management.Automation.CompletionResultType.ParameterValue, "Equal"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Contains".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Contains'", "Contains", global::System.Management.Automation.CompletionResultType.ParameterValue, "Contains"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BeginsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BeginsWith'", "BeginsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "BeginsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EndsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EndsWith'", "EndsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "EndsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThan'", "LessThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThanOrEqual'", "LessThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThan'", "GreaterThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThanOrEqual'", "GreaterThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RegEx".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RegEx'", "RegEx", global::System.Management.Automation.CompletionResultType.ParameterValue, "RegEx"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ServerPortOperator.TypeConverter.cs b/src/Cdn/generated/api/Support/ServerPortOperator.TypeConverter.cs new file mode 100644 index 000000000000..408fe661ca22 --- /dev/null +++ b/src/Cdn/generated/api/Support/ServerPortOperator.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial class ServerPortOperatorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ServerPortOperator.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/ServerPortOperator.cs b/src/Cdn/generated/api/Support/ServerPortOperator.cs new file mode 100644 index 000000000000..15f6feebd660 --- /dev/null +++ b/src/Cdn/generated/api/Support/ServerPortOperator.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial struct ServerPortOperator : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator Any = @"Any"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator BeginsWith = @"BeginsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator Contains = @"Contains"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator EndsWith = @"EndsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator Equal = @"Equal"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator GreaterThan = @"GreaterThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator GreaterThanOrEqual = @"GreaterThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator LessThan = @"LessThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator LessThanOrEqual = @"LessThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator RegEx = @"RegEx"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ServerPortOperator + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ServerPortOperator(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ServerPortOperator + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ServerPortOperator (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ServerPortOperator && Equals((ServerPortOperator)obj); + } + + /// Returns hashCode for enum ServerPortOperator + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ServerPortOperator(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ServerPortOperator + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ServerPortOperator + /// the value to convert to an instance of . + + public static implicit operator ServerPortOperator(string value) + { + return new ServerPortOperator(value); + } + + /// Implicit operator to convert ServerPortOperator to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator e) + { + return e._value; + } + + /// Overriding != operator for enum ServerPortOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ServerPortOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/SharedPrivateLinkResourceStatus.Completer.cs b/src/Cdn/generated/api/Support/SharedPrivateLinkResourceStatus.Completer.cs new file mode 100644 index 000000000000..561e71620089 --- /dev/null +++ b/src/Cdn/generated/api/Support/SharedPrivateLinkResourceStatus.Completer.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatusTypeConverter))] + public partial struct SharedPrivateLinkResourceStatus : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Pending".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Pending'", "Pending", global::System.Management.Automation.CompletionResultType.ParameterValue, "Pending"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Approved".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Approved'", "Approved", global::System.Management.Automation.CompletionResultType.ParameterValue, "Approved"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Rejected".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Rejected'", "Rejected", global::System.Management.Automation.CompletionResultType.ParameterValue, "Rejected"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disconnected".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disconnected'", "Disconnected", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disconnected"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Timeout".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Timeout'", "Timeout", global::System.Management.Automation.CompletionResultType.ParameterValue, "Timeout"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/SharedPrivateLinkResourceStatus.TypeConverter.cs b/src/Cdn/generated/api/Support/SharedPrivateLinkResourceStatus.TypeConverter.cs new file mode 100644 index 000000000000..405641442296 --- /dev/null +++ b/src/Cdn/generated/api/Support/SharedPrivateLinkResourceStatus.TypeConverter.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + public partial class SharedPrivateLinkResourceStatusTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => SharedPrivateLinkResourceStatus.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/SharedPrivateLinkResourceStatus.cs b/src/Cdn/generated/api/Support/SharedPrivateLinkResourceStatus.cs new file mode 100644 index 000000000000..ba54d8b7ddb6 --- /dev/null +++ b/src/Cdn/generated/api/Support/SharedPrivateLinkResourceStatus.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + public partial struct SharedPrivateLinkResourceStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus Approved = @"Approved"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus Disconnected = @"Disconnected"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus Pending = @"Pending"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus Rejected = @"Rejected"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus Timeout = @"Timeout"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to SharedPrivateLinkResourceStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new SharedPrivateLinkResourceStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type SharedPrivateLinkResourceStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type SharedPrivateLinkResourceStatus (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is SharedPrivateLinkResourceStatus && Equals((SharedPrivateLinkResourceStatus)obj); + } + + /// Returns hashCode for enum SharedPrivateLinkResourceStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private SharedPrivateLinkResourceStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for SharedPrivateLinkResourceStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to SharedPrivateLinkResourceStatus + /// the value to convert to an instance of . + + public static implicit operator SharedPrivateLinkResourceStatus(string value) + { + return new SharedPrivateLinkResourceStatus(value); + } + + /// Implicit operator to convert SharedPrivateLinkResourceStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus e) + { + return e._value; + } + + /// Overriding != operator for enum SharedPrivateLinkResourceStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum SharedPrivateLinkResourceStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/SkuName.Completer.cs b/src/Cdn/generated/api/Support/SkuName.Completer.cs new file mode 100644 index 000000000000..5f8916afb0b1 --- /dev/null +++ b/src/Cdn/generated/api/Support/SkuName.Completer.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Name of the pricing tier. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuNameTypeConverter))] + public partial struct SkuName : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_Verizon".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Standard_Verizon'", "Standard_Verizon", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_Verizon"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Premium_Verizon".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Premium_Verizon'", "Premium_Verizon", global::System.Management.Automation.CompletionResultType.ParameterValue, "Premium_Verizon"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Custom_Verizon".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Custom_Verizon'", "Custom_Verizon", global::System.Management.Automation.CompletionResultType.ParameterValue, "Custom_Verizon"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_Akamai".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Standard_Akamai'", "Standard_Akamai", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_Akamai"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_ChinaCdn".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Standard_ChinaCdn'", "Standard_ChinaCdn", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_ChinaCdn"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_Microsoft".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Standard_Microsoft'", "Standard_Microsoft", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_Microsoft"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_AzureFrontDoor".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Standard_AzureFrontDoor'", "Standard_AzureFrontDoor", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_AzureFrontDoor"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Premium_AzureFrontDoor".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Premium_AzureFrontDoor'", "Premium_AzureFrontDoor", global::System.Management.Automation.CompletionResultType.ParameterValue, "Premium_AzureFrontDoor"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_955BandWidth_ChinaCdn".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Standard_955BandWidth_ChinaCdn'", "Standard_955BandWidth_ChinaCdn", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_955BandWidth_ChinaCdn"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_AvgBandWidth_ChinaCdn".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Standard_AvgBandWidth_ChinaCdn'", "Standard_AvgBandWidth_ChinaCdn", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_AvgBandWidth_ChinaCdn"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "StandardPlus_ChinaCdn".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'StandardPlus_ChinaCdn'", "StandardPlus_ChinaCdn", global::System.Management.Automation.CompletionResultType.ParameterValue, "StandardPlus_ChinaCdn"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "StandardPlus_955BandWidth_ChinaCdn".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'StandardPlus_955BandWidth_ChinaCdn'", "StandardPlus_955BandWidth_ChinaCdn", global::System.Management.Automation.CompletionResultType.ParameterValue, "StandardPlus_955BandWidth_ChinaCdn"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "StandardPlus_AvgBandWidth_ChinaCdn".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'StandardPlus_AvgBandWidth_ChinaCdn'", "StandardPlus_AvgBandWidth_ChinaCdn", global::System.Management.Automation.CompletionResultType.ParameterValue, "StandardPlus_AvgBandWidth_ChinaCdn"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/SkuName.TypeConverter.cs b/src/Cdn/generated/api/Support/SkuName.TypeConverter.cs new file mode 100644 index 000000000000..f74441119961 --- /dev/null +++ b/src/Cdn/generated/api/Support/SkuName.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Name of the pricing tier. + public partial class SkuNameTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => SkuName.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/SkuName.cs b/src/Cdn/generated/api/Support/SkuName.cs new file mode 100644 index 000000000000..85c306d12615 --- /dev/null +++ b/src/Cdn/generated/api/Support/SkuName.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Name of the pricing tier. + public partial struct SkuName : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName CustomVerizon = @"Custom_Verizon"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName PremiumAzureFrontDoor = @"Premium_AzureFrontDoor"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName PremiumVerizon = @"Premium_Verizon"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName Standard955BandWidthChinaCdn = @"Standard_955BandWidth_ChinaCdn"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName StandardAkamai = @"Standard_Akamai"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName StandardAvgBandWidthChinaCdn = @"Standard_AvgBandWidth_ChinaCdn"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName StandardAzureFrontDoor = @"Standard_AzureFrontDoor"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName StandardChinaCdn = @"Standard_ChinaCdn"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName StandardMicrosoft = @"Standard_Microsoft"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName StandardPlus955BandWidthChinaCdn = @"StandardPlus_955BandWidth_ChinaCdn"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName StandardPlusAvgBandWidthChinaCdn = @"StandardPlus_AvgBandWidth_ChinaCdn"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName StandardPlusChinaCdn = @"StandardPlus_ChinaCdn"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName StandardVerizon = @"Standard_Verizon"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to SkuName + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new SkuName(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type SkuName + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type SkuName (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is SkuName && Equals((SkuName)obj); + } + + /// Returns hashCode for enum SkuName + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private SkuName(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for SkuName + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to SkuName + /// the value to convert to an instance of . + + public static implicit operator SkuName(string value) + { + return new SkuName(value); + } + + /// Implicit operator to convert SkuName to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName e) + { + return e._value; + } + + /// Overriding != operator for enum SkuName + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum SkuName + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/SocketAddrOperator.Completer.cs b/src/Cdn/generated/api/Support/SocketAddrOperator.Completer.cs new file mode 100644 index 000000000000..d1945a80c237 --- /dev/null +++ b/src/Cdn/generated/api/Support/SocketAddrOperator.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperatorTypeConverter))] + public partial struct SocketAddrOperator : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Any".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Any'", "Any", global::System.Management.Automation.CompletionResultType.ParameterValue, "Any"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "IPMatch".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'IPMatch'", "IPMatch", global::System.Management.Automation.CompletionResultType.ParameterValue, "IPMatch"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/SocketAddrOperator.TypeConverter.cs b/src/Cdn/generated/api/Support/SocketAddrOperator.TypeConverter.cs new file mode 100644 index 000000000000..6ce2dc5391f5 --- /dev/null +++ b/src/Cdn/generated/api/Support/SocketAddrOperator.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial class SocketAddrOperatorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => SocketAddrOperator.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/SocketAddrOperator.cs b/src/Cdn/generated/api/Support/SocketAddrOperator.cs new file mode 100644 index 000000000000..8dd4dac2cb64 --- /dev/null +++ b/src/Cdn/generated/api/Support/SocketAddrOperator.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial struct SocketAddrOperator : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator Any = @"Any"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator IPMatch = @"IPMatch"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to SocketAddrOperator + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new SocketAddrOperator(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type SocketAddrOperator + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type SocketAddrOperator (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is SocketAddrOperator && Equals((SocketAddrOperator)obj); + } + + /// Returns hashCode for enum SocketAddrOperator + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private SocketAddrOperator(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for SocketAddrOperator + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to SocketAddrOperator + /// the value to convert to an instance of . + + public static implicit operator SocketAddrOperator(string value) + { + return new SocketAddrOperator(value); + } + + /// Implicit operator to convert SocketAddrOperator to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator e) + { + return e._value; + } + + /// Overriding != operator for enum SocketAddrOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum SocketAddrOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/SslProtocol.Completer.cs b/src/Cdn/generated/api/Support/SslProtocol.Completer.cs new file mode 100644 index 000000000000..ce29294b5841 --- /dev/null +++ b/src/Cdn/generated/api/Support/SslProtocol.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The protocol of an established TLS connection. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocolTypeConverter))] + public partial struct SslProtocol : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "TLSv1".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'TLSv1'", "TLSv1", global::System.Management.Automation.CompletionResultType.ParameterValue, "TLSv1"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "TLSv1.1".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'TLSv1.1'", "TLSv1.1", global::System.Management.Automation.CompletionResultType.ParameterValue, "TLSv1.1"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "TLSv1.2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'TLSv1.2'", "TLSv1.2", global::System.Management.Automation.CompletionResultType.ParameterValue, "TLSv1.2"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/SslProtocol.TypeConverter.cs b/src/Cdn/generated/api/Support/SslProtocol.TypeConverter.cs new file mode 100644 index 000000000000..c252543bf05d --- /dev/null +++ b/src/Cdn/generated/api/Support/SslProtocol.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The protocol of an established TLS connection. + public partial class SslProtocolTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => SslProtocol.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/SslProtocol.cs b/src/Cdn/generated/api/Support/SslProtocol.cs new file mode 100644 index 000000000000..72692a5cd089 --- /dev/null +++ b/src/Cdn/generated/api/Support/SslProtocol.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The protocol of an established TLS connection. + public partial struct SslProtocol : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol TlSv1 = @"TLSv1"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol TlSv11 = @"TLSv1.1"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol TlSv12 = @"TLSv1.2"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to SslProtocol + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new SslProtocol(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type SslProtocol + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type SslProtocol (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is SslProtocol && Equals((SslProtocol)obj); + } + + /// Returns hashCode for enum SslProtocol + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private SslProtocol(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for SslProtocol + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to SslProtocol + /// the value to convert to an instance of . + + public static implicit operator SslProtocol(string value) + { + return new SslProtocol(value); + } + + /// Implicit operator to convert SslProtocol to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol e) + { + return e._value; + } + + /// Overriding != operator for enum SslProtocol + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum SslProtocol + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/Status.Completer.cs b/src/Cdn/generated/api/Support/Status.Completer.cs new file mode 100644 index 000000000000..3668d051106d --- /dev/null +++ b/src/Cdn/generated/api/Support/Status.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The validation status. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.StatusTypeConverter))] + public partial struct Status : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Valid".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Valid'", "Valid", global::System.Management.Automation.CompletionResultType.ParameterValue, "Valid"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Invalid".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Invalid'", "Invalid", global::System.Management.Automation.CompletionResultType.ParameterValue, "Invalid"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "AccessDenied".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'AccessDenied'", "AccessDenied", global::System.Management.Automation.CompletionResultType.ParameterValue, "AccessDenied"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "CertificateExpired".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'CertificateExpired'", "CertificateExpired", global::System.Management.Automation.CompletionResultType.ParameterValue, "CertificateExpired"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/Status.TypeConverter.cs b/src/Cdn/generated/api/Support/Status.TypeConverter.cs new file mode 100644 index 000000000000..724db68c846c --- /dev/null +++ b/src/Cdn/generated/api/Support/Status.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The validation status. + public partial class StatusTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => Status.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/Status.cs b/src/Cdn/generated/api/Support/Status.cs new file mode 100644 index 000000000000..9a8fffbe7c63 --- /dev/null +++ b/src/Cdn/generated/api/Support/Status.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// The validation status. + public partial struct Status : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status AccessDenied = @"AccessDenied"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status CertificateExpired = @"CertificateExpired"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status Invalid = @"Invalid"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status Valid = @"Valid"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to Status + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new Status(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type Status + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type Status (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is Status && Equals((Status)obj); + } + + /// Returns hashCode for enum Status + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private Status(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for Status + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to Status + /// the value to convert to an instance of . + + public static implicit operator Status(string value) + { + return new Status(value); + } + + /// Implicit operator to convert Status to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status e) + { + return e._value; + } + + /// Overriding != operator for enum Status + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum Status + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Status e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/Transform.Completer.cs b/src/Cdn/generated/api/Support/Transform.Completer.cs new file mode 100644 index 000000000000..6646ff02169f --- /dev/null +++ b/src/Cdn/generated/api/Support/Transform.Completer.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes what transforms are applied before matching + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.TransformTypeConverter))] + public partial struct Transform : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Lowercase".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Lowercase'", "Lowercase", global::System.Management.Automation.CompletionResultType.ParameterValue, "Lowercase"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Uppercase".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Uppercase'", "Uppercase", global::System.Management.Automation.CompletionResultType.ParameterValue, "Uppercase"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Trim".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Trim'", "Trim", global::System.Management.Automation.CompletionResultType.ParameterValue, "Trim"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "UrlDecode".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'UrlDecode'", "UrlDecode", global::System.Management.Automation.CompletionResultType.ParameterValue, "UrlDecode"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "UrlEncode".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'UrlEncode'", "UrlEncode", global::System.Management.Automation.CompletionResultType.ParameterValue, "UrlEncode"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RemoveNulls".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RemoveNulls'", "RemoveNulls", global::System.Management.Automation.CompletionResultType.ParameterValue, "RemoveNulls"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/Transform.TypeConverter.cs b/src/Cdn/generated/api/Support/Transform.TypeConverter.cs new file mode 100644 index 000000000000..98d8e57f4ecd --- /dev/null +++ b/src/Cdn/generated/api/Support/Transform.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes what transforms are applied before matching + public partial class TransformTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => Transform.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/Transform.cs b/src/Cdn/generated/api/Support/Transform.cs new file mode 100644 index 000000000000..f69955a86af2 --- /dev/null +++ b/src/Cdn/generated/api/Support/Transform.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes what transforms are applied before matching + public partial struct Transform : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform Lowercase = @"Lowercase"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform RemoveNulls = @"RemoveNulls"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform Trim = @"Trim"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform Uppercase = @"Uppercase"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform UrlDecode = @"UrlDecode"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform UrlEncode = @"UrlEncode"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to Transform + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new Transform(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type Transform + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type Transform (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is Transform && Equals((Transform)obj); + } + + /// Returns hashCode for enum Transform + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for Transform + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private Transform(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to Transform + /// the value to convert to an instance of . + + public static implicit operator Transform(string value) + { + return new Transform(value); + } + + /// Implicit operator to convert Transform to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform e) + { + return e._value; + } + + /// Overriding != operator for enum Transform + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum Transform + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/UrlFileExtensionOperator.Completer.cs b/src/Cdn/generated/api/Support/UrlFileExtensionOperator.Completer.cs new file mode 100644 index 000000000000..4fb031c6877d --- /dev/null +++ b/src/Cdn/generated/api/Support/UrlFileExtensionOperator.Completer.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperatorTypeConverter))] + public partial struct UrlFileExtensionOperator : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Any".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Any'", "Any", global::System.Management.Automation.CompletionResultType.ParameterValue, "Any"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Equal".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Equal'", "Equal", global::System.Management.Automation.CompletionResultType.ParameterValue, "Equal"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Contains".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Contains'", "Contains", global::System.Management.Automation.CompletionResultType.ParameterValue, "Contains"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BeginsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BeginsWith'", "BeginsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "BeginsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EndsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EndsWith'", "EndsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "EndsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThan'", "LessThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThanOrEqual'", "LessThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThan'", "GreaterThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThanOrEqual'", "GreaterThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RegEx".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RegEx'", "RegEx", global::System.Management.Automation.CompletionResultType.ParameterValue, "RegEx"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/UrlFileExtensionOperator.TypeConverter.cs b/src/Cdn/generated/api/Support/UrlFileExtensionOperator.TypeConverter.cs new file mode 100644 index 000000000000..fb0b0a881fc6 --- /dev/null +++ b/src/Cdn/generated/api/Support/UrlFileExtensionOperator.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial class UrlFileExtensionOperatorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => UrlFileExtensionOperator.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/UrlFileExtensionOperator.cs b/src/Cdn/generated/api/Support/UrlFileExtensionOperator.cs new file mode 100644 index 000000000000..67f0d2570b0b --- /dev/null +++ b/src/Cdn/generated/api/Support/UrlFileExtensionOperator.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial struct UrlFileExtensionOperator : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator Any = @"Any"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator BeginsWith = @"BeginsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator Contains = @"Contains"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator EndsWith = @"EndsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator Equal = @"Equal"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator GreaterThan = @"GreaterThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator GreaterThanOrEqual = @"GreaterThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator LessThan = @"LessThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator LessThanOrEqual = @"LessThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator RegEx = @"RegEx"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to UrlFileExtensionOperator + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new UrlFileExtensionOperator(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type UrlFileExtensionOperator + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type UrlFileExtensionOperator (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is UrlFileExtensionOperator && Equals((UrlFileExtensionOperator)obj); + } + + /// Returns hashCode for enum UrlFileExtensionOperator + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for UrlFileExtensionOperator + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private UrlFileExtensionOperator(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to UrlFileExtensionOperator + /// the value to convert to an instance of . + + public static implicit operator UrlFileExtensionOperator(string value) + { + return new UrlFileExtensionOperator(value); + } + + /// Implicit operator to convert UrlFileExtensionOperator to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator e) + { + return e._value; + } + + /// Overriding != operator for enum UrlFileExtensionOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum UrlFileExtensionOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/UrlFileNameOperator.Completer.cs b/src/Cdn/generated/api/Support/UrlFileNameOperator.Completer.cs new file mode 100644 index 000000000000..8ff73bf736da --- /dev/null +++ b/src/Cdn/generated/api/Support/UrlFileNameOperator.Completer.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperatorTypeConverter))] + public partial struct UrlFileNameOperator : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Any".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Any'", "Any", global::System.Management.Automation.CompletionResultType.ParameterValue, "Any"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Equal".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Equal'", "Equal", global::System.Management.Automation.CompletionResultType.ParameterValue, "Equal"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Contains".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Contains'", "Contains", global::System.Management.Automation.CompletionResultType.ParameterValue, "Contains"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BeginsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BeginsWith'", "BeginsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "BeginsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EndsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EndsWith'", "EndsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "EndsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThan'", "LessThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThanOrEqual'", "LessThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThan'", "GreaterThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThanOrEqual'", "GreaterThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RegEx".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RegEx'", "RegEx", global::System.Management.Automation.CompletionResultType.ParameterValue, "RegEx"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/UrlFileNameOperator.TypeConverter.cs b/src/Cdn/generated/api/Support/UrlFileNameOperator.TypeConverter.cs new file mode 100644 index 000000000000..5d0bc0997923 --- /dev/null +++ b/src/Cdn/generated/api/Support/UrlFileNameOperator.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial class UrlFileNameOperatorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => UrlFileNameOperator.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/UrlFileNameOperator.cs b/src/Cdn/generated/api/Support/UrlFileNameOperator.cs new file mode 100644 index 000000000000..b88c46840273 --- /dev/null +++ b/src/Cdn/generated/api/Support/UrlFileNameOperator.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial struct UrlFileNameOperator : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator Any = @"Any"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator BeginsWith = @"BeginsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator Contains = @"Contains"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator EndsWith = @"EndsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator Equal = @"Equal"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator GreaterThan = @"GreaterThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator GreaterThanOrEqual = @"GreaterThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator LessThan = @"LessThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator LessThanOrEqual = @"LessThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator RegEx = @"RegEx"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to UrlFileNameOperator + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new UrlFileNameOperator(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type UrlFileNameOperator + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type UrlFileNameOperator (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is UrlFileNameOperator && Equals((UrlFileNameOperator)obj); + } + + /// Returns hashCode for enum UrlFileNameOperator + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for UrlFileNameOperator + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private UrlFileNameOperator(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to UrlFileNameOperator + /// the value to convert to an instance of . + + public static implicit operator UrlFileNameOperator(string value) + { + return new UrlFileNameOperator(value); + } + + /// Implicit operator to convert UrlFileNameOperator to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator e) + { + return e._value; + } + + /// Overriding != operator for enum UrlFileNameOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum UrlFileNameOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/UrlPathOperator.Completer.cs b/src/Cdn/generated/api/Support/UrlPathOperator.Completer.cs new file mode 100644 index 000000000000..6ce24cec6583 --- /dev/null +++ b/src/Cdn/generated/api/Support/UrlPathOperator.Completer.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperatorTypeConverter))] + public partial struct UrlPathOperator : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Any".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Any'", "Any", global::System.Management.Automation.CompletionResultType.ParameterValue, "Any"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Equal".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Equal'", "Equal", global::System.Management.Automation.CompletionResultType.ParameterValue, "Equal"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Contains".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Contains'", "Contains", global::System.Management.Automation.CompletionResultType.ParameterValue, "Contains"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BeginsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BeginsWith'", "BeginsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "BeginsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EndsWith".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EndsWith'", "EndsWith", global::System.Management.Automation.CompletionResultType.ParameterValue, "EndsWith"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThan'", "LessThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LessThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LessThanOrEqual'", "LessThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "LessThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThan".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThan'", "GreaterThan", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThan"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "GreaterThanOrEqual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'GreaterThanOrEqual'", "GreaterThanOrEqual", global::System.Management.Automation.CompletionResultType.ParameterValue, "GreaterThanOrEqual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Wildcard".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Wildcard'", "Wildcard", global::System.Management.Automation.CompletionResultType.ParameterValue, "Wildcard"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RegEx".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RegEx'", "RegEx", global::System.Management.Automation.CompletionResultType.ParameterValue, "RegEx"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/UrlPathOperator.TypeConverter.cs b/src/Cdn/generated/api/Support/UrlPathOperator.TypeConverter.cs new file mode 100644 index 000000000000..2ed0981367f0 --- /dev/null +++ b/src/Cdn/generated/api/Support/UrlPathOperator.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial class UrlPathOperatorTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => UrlPathOperator.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/UrlPathOperator.cs b/src/Cdn/generated/api/Support/UrlPathOperator.cs new file mode 100644 index 000000000000..8ba2ea5a5e6e --- /dev/null +++ b/src/Cdn/generated/api/Support/UrlPathOperator.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Describes operator to be matched + public partial struct UrlPathOperator : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator Any = @"Any"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator BeginsWith = @"BeginsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator Contains = @"Contains"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator EndsWith = @"EndsWith"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator Equal = @"Equal"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator GreaterThan = @"GreaterThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator GreaterThanOrEqual = @"GreaterThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator LessThan = @"LessThan"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator LessThanOrEqual = @"LessThanOrEqual"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator RegEx = @"RegEx"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator Wildcard = @"Wildcard"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to UrlPathOperator + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new UrlPathOperator(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type UrlPathOperator + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type UrlPathOperator (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is UrlPathOperator && Equals((UrlPathOperator)obj); + } + + /// Returns hashCode for enum UrlPathOperator + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for UrlPathOperator + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private UrlPathOperator(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to UrlPathOperator + /// the value to convert to an instance of . + + public static implicit operator UrlPathOperator(string value) + { + return new UrlPathOperator(value); + } + + /// Implicit operator to convert UrlPathOperator to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator e) + { + return e._value; + } + + /// Overriding != operator for enum UrlPathOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum UrlPathOperator + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/WafAction.Completer.cs b/src/Cdn/generated/api/Support/WafAction.Completer.cs new file mode 100644 index 000000000000..13162f5be754 --- /dev/null +++ b/src/Cdn/generated/api/Support/WafAction.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Argument completer implementation for WafAction. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafActionTypeConverter))] + public partial struct WafAction : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "allow".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'allow'", "allow", global::System.Management.Automation.CompletionResultType.ParameterValue, "allow"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "block".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'block'", "block", global::System.Management.Automation.CompletionResultType.ParameterValue, "block"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "log".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'log'", "log", global::System.Management.Automation.CompletionResultType.ParameterValue, "log"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "redirect".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'redirect'", "redirect", global::System.Management.Automation.CompletionResultType.ParameterValue, "redirect"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/WafAction.TypeConverter.cs b/src/Cdn/generated/api/Support/WafAction.TypeConverter.cs new file mode 100644 index 000000000000..0a98e44c1e95 --- /dev/null +++ b/src/Cdn/generated/api/Support/WafAction.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// TypeConverter implementation for WafAction. + public partial class WafActionTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => WafAction.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/WafAction.cs b/src/Cdn/generated/api/Support/WafAction.cs new file mode 100644 index 000000000000..114873e8b394 --- /dev/null +++ b/src/Cdn/generated/api/Support/WafAction.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + public partial struct WafAction : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction Allow = @"allow"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction Block = @"block"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction Log = @"log"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction Redirect = @"redirect"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to WafAction + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new WafAction(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type WafAction + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type WafAction (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is WafAction && Equals((WafAction)obj); + } + + /// Returns hashCode for enum WafAction + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for WafAction + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private WafAction(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to WafAction + /// the value to convert to an instance of . + + public static implicit operator WafAction(string value) + { + return new WafAction(value); + } + + /// Implicit operator to convert WafAction to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction e) + { + return e._value; + } + + /// Overriding != operator for enum WafAction + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum WafAction + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/WafGranularity.Completer.cs b/src/Cdn/generated/api/Support/WafGranularity.Completer.cs new file mode 100644 index 000000000000..9302da10663a --- /dev/null +++ b/src/Cdn/generated/api/Support/WafGranularity.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Argument completer implementation for WafGranularity. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularityTypeConverter))] + public partial struct WafGranularity : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "PT5M".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'PT5M'", "PT5M", global::System.Management.Automation.CompletionResultType.ParameterValue, "PT5M"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "PT1H".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'PT1H'", "PT1H", global::System.Management.Automation.CompletionResultType.ParameterValue, "PT1H"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "P1D".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'P1D'", "P1D", global::System.Management.Automation.CompletionResultType.ParameterValue, "P1D"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/WafGranularity.TypeConverter.cs b/src/Cdn/generated/api/Support/WafGranularity.TypeConverter.cs new file mode 100644 index 000000000000..aea73331dfbc --- /dev/null +++ b/src/Cdn/generated/api/Support/WafGranularity.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// TypeConverter implementation for WafGranularity. + public partial class WafGranularityTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => WafGranularity.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/WafGranularity.cs b/src/Cdn/generated/api/Support/WafGranularity.cs new file mode 100644 index 000000000000..138733071866 --- /dev/null +++ b/src/Cdn/generated/api/Support/WafGranularity.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + public partial struct WafGranularity : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity P1D = @"P1D"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity Pt1H = @"PT1H"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity Pt5M = @"PT5M"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to WafGranularity + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new WafGranularity(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type WafGranularity + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type WafGranularity (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is WafGranularity && Equals((WafGranularity)obj); + } + + /// Returns hashCode for enum WafGranularity + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for WafGranularity + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private WafGranularity(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to WafGranularity + /// the value to convert to an instance of . + + public static implicit operator WafGranularity(string value) + { + return new WafGranularity(value); + } + + /// Implicit operator to convert WafGranularity to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity e) + { + return e._value; + } + + /// Overriding != operator for enum WafGranularity + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum WafGranularity + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/WafMetric.Completer.cs b/src/Cdn/generated/api/Support/WafMetric.Completer.cs new file mode 100644 index 000000000000..43736abc7e6b --- /dev/null +++ b/src/Cdn/generated/api/Support/WafMetric.Completer.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Argument completer implementation for WafMetric. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetricTypeConverter))] + public partial struct WafMetric : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "clientRequestCount".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'clientRequestCount'", "clientRequestCount", global::System.Management.Automation.CompletionResultType.ParameterValue, "clientRequestCount"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/WafMetric.TypeConverter.cs b/src/Cdn/generated/api/Support/WafMetric.TypeConverter.cs new file mode 100644 index 000000000000..37983631a24a --- /dev/null +++ b/src/Cdn/generated/api/Support/WafMetric.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// TypeConverter implementation for WafMetric. + public partial class WafMetricTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => WafMetric.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/WafMetric.cs b/src/Cdn/generated/api/Support/WafMetric.cs new file mode 100644 index 000000000000..fdda738fbde7 --- /dev/null +++ b/src/Cdn/generated/api/Support/WafMetric.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + public partial struct WafMetric : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric ClientRequestCount = @"clientRequestCount"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to WafMetric + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new WafMetric(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type WafMetric + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type WafMetric (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is WafMetric && Equals((WafMetric)obj); + } + + /// Returns hashCode for enum WafMetric + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for WafMetric + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private WafMetric(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to WafMetric + /// the value to convert to an instance of . + + public static implicit operator WafMetric(string value) + { + return new WafMetric(value); + } + + /// Implicit operator to convert WafMetric to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric e) + { + return e._value; + } + + /// Overriding != operator for enum WafMetric + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum WafMetric + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/WafRankingGroupBy.Completer.cs b/src/Cdn/generated/api/Support/WafRankingGroupBy.Completer.cs new file mode 100644 index 000000000000..c0f2d26b245f --- /dev/null +++ b/src/Cdn/generated/api/Support/WafRankingGroupBy.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Argument completer implementation for WafRankingGroupBy. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupByTypeConverter))] + public partial struct WafRankingGroupBy : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "httpStatusCode".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'httpStatusCode'", "httpStatusCode", global::System.Management.Automation.CompletionResultType.ParameterValue, "httpStatusCode"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "customDomain".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'customDomain'", "customDomain", global::System.Management.Automation.CompletionResultType.ParameterValue, "customDomain"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/WafRankingGroupBy.TypeConverter.cs b/src/Cdn/generated/api/Support/WafRankingGroupBy.TypeConverter.cs new file mode 100644 index 000000000000..c359d37c3248 --- /dev/null +++ b/src/Cdn/generated/api/Support/WafRankingGroupBy.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// TypeConverter implementation for WafRankingGroupBy. + public partial class WafRankingGroupByTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => WafRankingGroupBy.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/WafRankingGroupBy.cs b/src/Cdn/generated/api/Support/WafRankingGroupBy.cs new file mode 100644 index 000000000000..83e1501a8a24 --- /dev/null +++ b/src/Cdn/generated/api/Support/WafRankingGroupBy.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + public partial struct WafRankingGroupBy : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy CustomDomain = @"customDomain"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy HttpStatusCode = @"httpStatusCode"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to WafRankingGroupBy + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new WafRankingGroupBy(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type WafRankingGroupBy + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type WafRankingGroupBy (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is WafRankingGroupBy && Equals((WafRankingGroupBy)obj); + } + + /// Returns hashCode for enum WafRankingGroupBy + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for WafRankingGroupBy + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private WafRankingGroupBy(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to WafRankingGroupBy + /// the value to convert to an instance of . + + public static implicit operator WafRankingGroupBy(string value) + { + return new WafRankingGroupBy(value); + } + + /// Implicit operator to convert WafRankingGroupBy to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy e) + { + return e._value; + } + + /// Overriding != operator for enum WafRankingGroupBy + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum WafRankingGroupBy + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/WafRankingType.Completer.cs b/src/Cdn/generated/api/Support/WafRankingType.Completer.cs new file mode 100644 index 000000000000..40f3a5f022b9 --- /dev/null +++ b/src/Cdn/generated/api/Support/WafRankingType.Completer.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Argument completer implementation for WafRankingType. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingTypeTypeConverter))] + public partial struct WafRankingType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "action".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'action'", "action", global::System.Management.Automation.CompletionResultType.ParameterValue, "action"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ruleGroup".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ruleGroup'", "ruleGroup", global::System.Management.Automation.CompletionResultType.ParameterValue, "ruleGroup"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ruleId".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ruleId'", "ruleId", global::System.Management.Automation.CompletionResultType.ParameterValue, "ruleId"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "userAgent".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'userAgent'", "userAgent", global::System.Management.Automation.CompletionResultType.ParameterValue, "userAgent"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "clientIp".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'clientIp'", "clientIp", global::System.Management.Automation.CompletionResultType.ParameterValue, "clientIp"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "url".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'url'", "url", global::System.Management.Automation.CompletionResultType.ParameterValue, "url"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "countryOrRegion".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'countryOrRegion'", "countryOrRegion", global::System.Management.Automation.CompletionResultType.ParameterValue, "countryOrRegion"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ruleType".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ruleType'", "ruleType", global::System.Management.Automation.CompletionResultType.ParameterValue, "ruleType"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/WafRankingType.TypeConverter.cs b/src/Cdn/generated/api/Support/WafRankingType.TypeConverter.cs new file mode 100644 index 000000000000..5dc796fa09ff --- /dev/null +++ b/src/Cdn/generated/api/Support/WafRankingType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// TypeConverter implementation for WafRankingType. + public partial class WafRankingTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => WafRankingType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/WafRankingType.cs b/src/Cdn/generated/api/Support/WafRankingType.cs new file mode 100644 index 000000000000..fe9782aa5218 --- /dev/null +++ b/src/Cdn/generated/api/Support/WafRankingType.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + public partial struct WafRankingType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType Action = @"action"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType ClientIP = @"clientIp"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType CountryOrRegion = @"countryOrRegion"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType RuleGroup = @"ruleGroup"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType RuleId = @"ruleId"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType RuleType = @"ruleType"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType Url = @"url"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType UserAgent = @"userAgent"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to WafRankingType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new WafRankingType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type WafRankingType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type WafRankingType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is WafRankingType && Equals((WafRankingType)obj); + } + + /// Returns hashCode for enum WafRankingType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for WafRankingType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private WafRankingType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to WafRankingType + /// the value to convert to an instance of . + + public static implicit operator WafRankingType(string value) + { + return new WafRankingType(value); + } + + /// Implicit operator to convert WafRankingType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType e) + { + return e._value; + } + + /// Overriding != operator for enum WafRankingType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum WafRankingType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/WafRuleType.Completer.cs b/src/Cdn/generated/api/Support/WafRuleType.Completer.cs new file mode 100644 index 000000000000..48f18d14106e --- /dev/null +++ b/src/Cdn/generated/api/Support/WafRuleType.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// Argument completer implementation for WafRuleType. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleTypeTypeConverter))] + public partial struct WafRuleType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "managed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'managed'", "managed", global::System.Management.Automation.CompletionResultType.ParameterValue, "managed"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "custom".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'custom'", "custom", global::System.Management.Automation.CompletionResultType.ParameterValue, "custom"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "bot".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'bot'", "bot", global::System.Management.Automation.CompletionResultType.ParameterValue, "bot"); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/WafRuleType.TypeConverter.cs b/src/Cdn/generated/api/Support/WafRuleType.TypeConverter.cs new file mode 100644 index 000000000000..8529ac6a9139 --- /dev/null +++ b/src/Cdn/generated/api/Support/WafRuleType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + /// TypeConverter implementation for WafRuleType. + public partial class WafRuleTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => WafRuleType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/api/Support/WafRuleType.cs b/src/Cdn/generated/api/Support/WafRuleType.cs new file mode 100644 index 000000000000..ceda6fb8c980 --- /dev/null +++ b/src/Cdn/generated/api/Support/WafRuleType.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support +{ + + public partial struct WafRuleType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType Bot = @"bot"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType Custom = @"custom"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType Managed = @"managed"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to WafRuleType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new WafRuleType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type WafRuleType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type WafRuleType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is WafRuleType && Equals((WafRuleType)obj); + } + + /// Returns hashCode for enum WafRuleType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for WafRuleType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private WafRuleType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to WafRuleType + /// the value to convert to an instance of . + + public static implicit operator WafRuleType(string value) + { + return new WafRuleType(value); + } + + /// Implicit operator to convert WafRuleType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType e) + { + return e._value; + } + + /// Overriding != operator for enum WafRuleType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum WafRuleType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType e1, Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/ClearAzCdnEndpointContent_Purge1.cs b/src/Cdn/generated/cmdlets/ClearAzCdnEndpointContent_Purge1.cs new file mode 100644 index 000000000000..250ba42a5c8c --- /dev/null +++ b/src/Cdn/generated/cmdlets/ClearAzCdnEndpointContent_Purge1.cs @@ -0,0 +1,503 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Removes a content from CDN. + /// + /// [OpenAPI] PurgeContent=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Clear, @"AzCdnEndpointContent_Purge1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Removes a content from CDN.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class ClearAzCdnEndpointContent_Purge1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters _contentFilePath; + + /// Parameters required for content purge. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameters required for content purge.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Parameters required for content purge.", + SerializedName = @"contentFilePaths", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters ContentFilePath { get => this._contentFilePath; set => this._contentFilePath = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public ClearAzCdnEndpointContent_Purge1() + { + + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of ClearAzCdnEndpointContent_Purge1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ClearAzCdnEndpointContent_Purge1 Clone() + { + var clone = new ClearAzCdnEndpointContent_Purge1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.SubscriptionId = this.SubscriptionId; + clone.ContentFilePath = this.ContentFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsPurgeContent' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsPurgeContent(ResourceGroupName, ProfileName, EndpointName, SubscriptionId, ContentFilePath, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,SubscriptionId=SubscriptionId,body=ContentFilePath}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=ContentFilePath }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=ContentFilePath }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/ClearAzCdnEndpointContent_PurgeExpanded1.cs b/src/Cdn/generated/cmdlets/ClearAzCdnEndpointContent_PurgeExpanded1.cs new file mode 100644 index 000000000000..900ed2fb7d06 --- /dev/null +++ b/src/Cdn/generated/cmdlets/ClearAzCdnEndpointContent_PurgeExpanded1.cs @@ -0,0 +1,507 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Removes a content from CDN. + /// + /// [OpenAPI] PurgeContent=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Clear, @"AzCdnEndpointContent_PurgeExpanded1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Removes a content from CDN.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class ClearAzCdnEndpointContent_PurgeExpanded1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Parameters required for content purge. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters _contentFilePathsBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.PurgeParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The path to the content to be purged. Can describe a file path or a wild card directory.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The path to the content to be purged. Can describe a file path or a wild card directory.", + SerializedName = @"contentPaths", + PossibleTypes = new [] { typeof(string) })] + public string[] ContentPath { get => _contentFilePathsBody.ContentPath ?? null /* arrayOf */; set => _contentFilePathsBody.ContentPath = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public ClearAzCdnEndpointContent_PurgeExpanded1() + { + + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of ClearAzCdnEndpointContent_PurgeExpanded1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ClearAzCdnEndpointContent_PurgeExpanded1 Clone() + { + var clone = new ClearAzCdnEndpointContent_PurgeExpanded1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._contentFilePathsBody = this._contentFilePathsBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsPurgeContent' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsPurgeContent(ResourceGroupName, ProfileName, EndpointName, SubscriptionId, _contentFilePathsBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,SubscriptionId=SubscriptionId,body=_contentFilePathsBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=_contentFilePathsBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=_contentFilePathsBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/ClearAzCdnEndpointContent_PurgeViaIdentity1.cs b/src/Cdn/generated/cmdlets/ClearAzCdnEndpointContent_PurgeViaIdentity1.cs new file mode 100644 index 000000000000..d069f05044e0 --- /dev/null +++ b/src/Cdn/generated/cmdlets/ClearAzCdnEndpointContent_PurgeViaIdentity1.cs @@ -0,0 +1,471 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Removes a content from CDN. + /// + /// [OpenAPI] PurgeContent=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Clear, @"AzCdnEndpointContent_PurgeViaIdentity1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Removes a content from CDN.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class ClearAzCdnEndpointContent_PurgeViaIdentity1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters _contentFilePath; + + /// Parameters required for content purge. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameters required for content purge.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Parameters required for content purge.", + SerializedName = @"contentFilePaths", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters ContentFilePath { get => this._contentFilePath; set => this._contentFilePath = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public ClearAzCdnEndpointContent_PurgeViaIdentity1() + { + + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of ClearAzCdnEndpointContent_PurgeViaIdentity1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ClearAzCdnEndpointContent_PurgeViaIdentity1 Clone() + { + var clone = new ClearAzCdnEndpointContent_PurgeViaIdentity1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ContentFilePath = this.ContentFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsPurgeContent' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.EndpointsPurgeContentViaIdentity(InputObject.Id, ContentFilePath, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.EndpointsPurgeContent(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.SubscriptionId ?? null, ContentFilePath, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=ContentFilePath}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=ContentFilePath }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=ContentFilePath }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/ClearAzCdnEndpointContent_PurgeViaIdentityExpanded1.cs b/src/Cdn/generated/cmdlets/ClearAzCdnEndpointContent_PurgeViaIdentityExpanded1.cs new file mode 100644 index 000000000000..9200a35adaa2 --- /dev/null +++ b/src/Cdn/generated/cmdlets/ClearAzCdnEndpointContent_PurgeViaIdentityExpanded1.cs @@ -0,0 +1,475 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Removes a content from CDN. + /// + /// [OpenAPI] PurgeContent=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Clear, @"AzCdnEndpointContent_PurgeViaIdentityExpanded1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Removes a content from CDN.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class ClearAzCdnEndpointContent_PurgeViaIdentityExpanded1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Parameters required for content purge. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters _contentFilePathsBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.PurgeParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The path to the content to be purged. Can describe a file path or a wild card directory.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The path to the content to be purged. Can describe a file path or a wild card directory.", + SerializedName = @"contentPaths", + PossibleTypes = new [] { typeof(string) })] + public string[] ContentPath { get => _contentFilePathsBody.ContentPath ?? null /* arrayOf */; set => _contentFilePathsBody.ContentPath = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public ClearAzCdnEndpointContent_PurgeViaIdentityExpanded1() + { + + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of ClearAzCdnEndpointContent_PurgeViaIdentityExpanded1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ClearAzCdnEndpointContent_PurgeViaIdentityExpanded1 Clone() + { + var clone = new ClearAzCdnEndpointContent_PurgeViaIdentityExpanded1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._contentFilePathsBody = this._contentFilePathsBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsPurgeContent' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.EndpointsPurgeContentViaIdentity(InputObject.Id, _contentFilePathsBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.EndpointsPurgeContent(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.SubscriptionId ?? null, _contentFilePathsBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_contentFilePathsBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_contentFilePathsBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_contentFilePathsBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_Purge.cs b/src/Cdn/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_Purge.cs new file mode 100644 index 000000000000..1c08797bc287 --- /dev/null +++ b/src/Cdn/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_Purge.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Removes a content from AzureFrontDoor. + /// + /// [OpenAPI] PurgeContent=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/purge" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Clear, @"AzFrontDoorCdnEndpointContent_Purge", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Removes a content from AzureFrontDoor.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class ClearAzFrontDoorCdnEndpointContent_Purge : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters _content; + + /// Parameters required for content purge. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameters required for content purge.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Parameters required for content purge.", + SerializedName = @"contents", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters Content { get => this._content; set => this._content = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public ClearAzFrontDoorCdnEndpointContent_Purge() + { + + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of ClearAzFrontDoorCdnEndpointContent_Purge + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ClearAzFrontDoorCdnEndpointContent_Purge Clone() + { + var clone = new ClearAzFrontDoorCdnEndpointContent_Purge(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.SubscriptionId = this.SubscriptionId; + clone.Content = this.Content; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdEndpointsPurgeContent' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdEndpointsPurgeContent(ResourceGroupName, ProfileName, EndpointName, SubscriptionId, Content, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,SubscriptionId=SubscriptionId,body=Content}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=Content }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=Content }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeExpanded.cs b/src/Cdn/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeExpanded.cs new file mode 100644 index 000000000000..08c2ddf02457 --- /dev/null +++ b/src/Cdn/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeExpanded.cs @@ -0,0 +1,521 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Removes a content from AzureFrontDoor. + /// + /// [OpenAPI] PurgeContent=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/purge" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Clear, @"AzFrontDoorCdnEndpointContent_PurgeExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Removes a content from AzureFrontDoor.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class ClearAzFrontDoorCdnEndpointContent_PurgeExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Parameters required for content purge. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters _contentsBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdPurgeParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The path to the content to be purged. Can describe a file path or a wild card directory.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The path to the content to be purged. Can describe a file path or a wild card directory.", + SerializedName = @"contentPaths", + PossibleTypes = new [] { typeof(string) })] + public string[] ContentPath { get => _contentsBody.ContentPath ?? null /* arrayOf */; set => _contentsBody.ContentPath = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// List of domains. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of domains.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of domains.", + SerializedName = @"domains", + PossibleTypes = new [] { typeof(string) })] + public string[] Domain { get => _contentsBody.Domain ?? null /* arrayOf */; set => _contentsBody.Domain = value; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public ClearAzFrontDoorCdnEndpointContent_PurgeExpanded() + { + + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of ClearAzFrontDoorCdnEndpointContent_PurgeExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ClearAzFrontDoorCdnEndpointContent_PurgeExpanded Clone() + { + var clone = new ClearAzFrontDoorCdnEndpointContent_PurgeExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._contentsBody = this._contentsBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdEndpointsPurgeContent' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdEndpointsPurgeContent(ResourceGroupName, ProfileName, EndpointName, SubscriptionId, _contentsBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,SubscriptionId=SubscriptionId,body=_contentsBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=_contentsBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=_contentsBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentity.cs b/src/Cdn/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentity.cs new file mode 100644 index 000000000000..67a14850a945 --- /dev/null +++ b/src/Cdn/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentity.cs @@ -0,0 +1,471 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Removes a content from AzureFrontDoor. + /// + /// [OpenAPI] PurgeContent=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/purge" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Clear, @"AzFrontDoorCdnEndpointContent_PurgeViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Removes a content from AzureFrontDoor.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters _content; + + /// Parameters required for content purge. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameters required for content purge.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Parameters required for content purge.", + SerializedName = @"contents", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters Content { get => this._content; set => this._content = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentity() + { + + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentity Clone() + { + var clone = new ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Content = this.Content; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdEndpointsPurgeContent' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AfdEndpointsPurgeContentViaIdentity(InputObject.Id, Content, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AfdEndpointsPurgeContent(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.SubscriptionId ?? null, Content, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Content}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Content }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Content }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentityExpanded.cs b/src/Cdn/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentityExpanded.cs new file mode 100644 index 000000000000..066f6b72100f --- /dev/null +++ b/src/Cdn/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentityExpanded.cs @@ -0,0 +1,489 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Removes a content from AzureFrontDoor. + /// + /// [OpenAPI] PurgeContent=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/purge" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Clear, @"AzFrontDoorCdnEndpointContent_PurgeViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Removes a content from AzureFrontDoor.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Parameters required for content purge. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters _contentsBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdPurgeParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The path to the content to be purged. Can describe a file path or a wild card directory.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The path to the content to be purged. Can describe a file path or a wild card directory.", + SerializedName = @"contentPaths", + PossibleTypes = new [] { typeof(string) })] + public string[] ContentPath { get => _contentsBody.ContentPath ?? null /* arrayOf */; set => _contentsBody.ContentPath = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// List of domains. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of domains.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of domains.", + SerializedName = @"domains", + PossibleTypes = new [] { typeof(string) })] + public string[] Domain { get => _contentsBody.Domain ?? null /* arrayOf */; set => _contentsBody.Domain = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentityExpanded() + { + + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentityExpanded Clone() + { + var clone = new ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._contentsBody = this._contentsBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdEndpointsPurgeContent' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AfdEndpointsPurgeContentViaIdentity(InputObject.Id, _contentsBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AfdEndpointsPurgeContent(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.SubscriptionId ?? null, _contentsBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_contentsBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_contentsBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_contentsBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/DisableAzCdnCustomDomainCustomHttps_Disable.cs b/src/Cdn/generated/cmdlets/DisableAzCdnCustomDomainCustomHttps_Disable.cs new file mode 100644 index 000000000000..e78340789792 --- /dev/null +++ b/src/Cdn/generated/cmdlets/DisableAzCdnCustomDomainCustomHttps_Disable.cs @@ -0,0 +1,472 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Disable https delivery of the custom domain. + /// + /// [OpenAPI] DisableCustomHttps=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Disable, @"AzCdnCustomDomainCustomHttps_Disable", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Disable https delivery of the custom domain.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class DisableAzCdnCustomDomainCustomHttps_Disable : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _customDomainName; + + /// Name of the custom domain within an endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the custom domain within an endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the custom domain within an endpoint.", + SerializedName = @"customDomainName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string CustomDomainName { get => this._customDomainName; set => this._customDomainName = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnAccepted will be called before the regular onAccepted has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onAccepted method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public DisableAzCdnCustomDomainCustomHttps_Disable() + { + + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CustomDomainsDisableCustomHttps' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CustomDomainsDisableCustomHttps(ResourceGroupName, ProfileName, EndpointName, CustomDomainName, SubscriptionId, onOk, onAccepted, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,CustomDomainName=CustomDomainName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// a delegate that is called when the remote service returns 202 (Accepted). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnAccepted(responseMessage, response, ref _returnNow); + // if overrideOnAccepted has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onAccepted - response for 202 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain + WriteObject((await response)); + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, CustomDomainName=CustomDomainName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, CustomDomainName=CustomDomainName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/DisableAzCdnCustomDomainCustomHttps_DisableViaIdentity.cs b/src/Cdn/generated/cmdlets/DisableAzCdnCustomDomainCustomHttps_DisableViaIdentity.cs new file mode 100644 index 000000000000..a8b8c1327826 --- /dev/null +++ b/src/Cdn/generated/cmdlets/DisableAzCdnCustomDomainCustomHttps_DisableViaIdentity.cs @@ -0,0 +1,434 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Disable https delivery of the custom domain. + /// + /// [OpenAPI] DisableCustomHttps=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Disable, @"AzCdnCustomDomainCustomHttps_DisableViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Disable https delivery of the custom domain.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class DisableAzCdnCustomDomainCustomHttps_DisableViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnAccepted will be called before the regular onAccepted has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onAccepted method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public DisableAzCdnCustomDomainCustomHttps_DisableViaIdentity() + { + + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CustomDomainsDisableCustomHttps' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CustomDomainsDisableCustomHttpsViaIdentity(InputObject.Id, onOk, onAccepted, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CustomDomainName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CustomDomainName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CustomDomainsDisableCustomHttps(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.CustomDomainName ?? null, InputObject.SubscriptionId ?? null, onOk, onAccepted, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// a delegate that is called when the remote service returns 202 (Accepted). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnAccepted(responseMessage, response, ref _returnNow); + // if overrideOnAccepted has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onAccepted - response for 202 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain + WriteObject((await response)); + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/EnableAzCdnCustomDomainCustomHttps_Enable.cs b/src/Cdn/generated/cmdlets/EnableAzCdnCustomDomainCustomHttps_Enable.cs new file mode 100644 index 000000000000..3baf4d827f3d --- /dev/null +++ b/src/Cdn/generated/cmdlets/EnableAzCdnCustomDomainCustomHttps_Enable.cs @@ -0,0 +1,485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Enable https delivery of the custom domain. + /// + /// [OpenAPI] EnableCustomHttps=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Enable, @"AzCdnCustomDomainCustomHttps_Enable", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Enable https delivery of the custom domain.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class EnableAzCdnCustomDomainCustomHttps_Enable : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters _customDomainHttpsParameter; + + /// The JSON object that contains the properties to secure a custom domain. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The JSON object that contains the properties to secure a custom domain.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The JSON object that contains the properties to secure a custom domain.", + SerializedName = @"customDomainHttpsParameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters CustomDomainHttpsParameter { get => this._customDomainHttpsParameter; set => this._customDomainHttpsParameter = value; } + + /// Backing field for property. + private string _customDomainName; + + /// Name of the custom domain within an endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the custom domain within an endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the custom domain within an endpoint.", + SerializedName = @"customDomainName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string CustomDomainName { get => this._customDomainName; set => this._customDomainName = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnAccepted will be called before the regular onAccepted has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onAccepted method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public EnableAzCdnCustomDomainCustomHttps_Enable() + { + + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CustomDomainsEnableCustomHttps' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CustomDomainsEnableCustomHttps(ResourceGroupName, ProfileName, EndpointName, CustomDomainName, SubscriptionId, CustomDomainHttpsParameter, onOk, onAccepted, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,CustomDomainName=CustomDomainName,SubscriptionId=SubscriptionId,body=CustomDomainHttpsParameter}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// a delegate that is called when the remote service returns 202 (Accepted). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnAccepted(responseMessage, response, ref _returnNow); + // if overrideOnAccepted has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onAccepted - response for 202 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain + WriteObject((await response)); + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, CustomDomainName=CustomDomainName, SubscriptionId=SubscriptionId, body=CustomDomainHttpsParameter }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, CustomDomainName=CustomDomainName, SubscriptionId=SubscriptionId, body=CustomDomainHttpsParameter }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/EnableAzCdnCustomDomainCustomHttps_EnableViaIdentity.cs b/src/Cdn/generated/cmdlets/EnableAzCdnCustomDomainCustomHttps_EnableViaIdentity.cs new file mode 100644 index 000000000000..3489b386df37 --- /dev/null +++ b/src/Cdn/generated/cmdlets/EnableAzCdnCustomDomainCustomHttps_EnableViaIdentity.cs @@ -0,0 +1,447 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Enable https delivery of the custom domain. + /// + /// [OpenAPI] EnableCustomHttps=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Enable, @"AzCdnCustomDomainCustomHttps_EnableViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Enable https delivery of the custom domain.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class EnableAzCdnCustomDomainCustomHttps_EnableViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters _customDomainHttpsParameter; + + /// The JSON object that contains the properties to secure a custom domain. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The JSON object that contains the properties to secure a custom domain.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The JSON object that contains the properties to secure a custom domain.", + SerializedName = @"customDomainHttpsParameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters CustomDomainHttpsParameter { get => this._customDomainHttpsParameter; set => this._customDomainHttpsParameter = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnAccepted will be called before the regular onAccepted has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onAccepted method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public EnableAzCdnCustomDomainCustomHttps_EnableViaIdentity() + { + + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CustomDomainsEnableCustomHttps' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CustomDomainsEnableCustomHttpsViaIdentity(InputObject.Id, CustomDomainHttpsParameter, onOk, onAccepted, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CustomDomainName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CustomDomainName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CustomDomainsEnableCustomHttps(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.CustomDomainName ?? null, InputObject.SubscriptionId ?? null, CustomDomainHttpsParameter, onOk, onAccepted, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=CustomDomainHttpsParameter}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// a delegate that is called when the remote service returns 202 (Accepted). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnAccepted(responseMessage, response, ref _returnNow); + // if overrideOnAccepted has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onAccepted - response for 202 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain + WriteObject((await response)); + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=CustomDomainHttpsParameter }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=CustomDomainHttpsParameter }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnCustomDomain_Get1.cs b/src/Cdn/generated/cmdlets/GetAzCdnCustomDomain_Get1.cs new file mode 100644 index 000000000000..2330d3d34258 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnCustomDomain_Get1.cs @@ -0,0 +1,432 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Gets an existing custom domain within an endpoint. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnCustomDomain_Get1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing custom domain within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnCustomDomain_Get1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the custom domain within an endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the custom domain within an endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the custom domain within an endpoint.", + SerializedName = @"customDomainName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("CustomDomainName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnCustomDomain_Get1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CustomDomainsGet(ResourceGroupName, ProfileName, EndpointName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnCustomDomain_GetViaIdentity1.cs b/src/Cdn/generated/cmdlets/GetAzCdnCustomDomain_GetViaIdentity1.cs new file mode 100644 index 000000000000..bc510052c76e --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnCustomDomain_GetViaIdentity1.cs @@ -0,0 +1,390 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Gets an existing custom domain within an endpoint. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnCustomDomain_GetViaIdentity1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing custom domain within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnCustomDomain_GetViaIdentity1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnCustomDomain_GetViaIdentity1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CustomDomainsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CustomDomainName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CustomDomainName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CustomDomainsGet(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.CustomDomainName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnCustomDomain_List1.cs b/src/Cdn/generated/cmdlets/GetAzCdnCustomDomain_List1.cs new file mode 100644 index 000000000000..53128349900b --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnCustomDomain_List1.cs @@ -0,0 +1,439 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Lists all of the existing custom domains within an endpoint. + /// + /// [OpenAPI] ListByEndpoint=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnCustomDomain_List1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Lists all of the existing custom domains within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnCustomDomain_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnCustomDomain_List1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CustomDomainsListByEndpoint(ResourceGroupName, ProfileName, EndpointName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CustomDomainsListByEndpoint_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnEdgeNode_List.cs b/src/Cdn/generated/cmdlets/GetAzCdnEdgeNode_List.cs new file mode 100644 index 000000000000..188ee98d3a3f --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnEdgeNode_List.cs @@ -0,0 +1,378 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users. + /// + /// + /// [OpenAPI] List=>GET:"/providers/Microsoft.Cdn/edgenodes" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnEdgeNode_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEdgeNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnEdgeNode_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnEdgeNode_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EdgeNodesList(onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EdgeNodesList_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnEndpointResourceUsage_List1.cs b/src/Cdn/generated/cmdlets/GetAzCdnEndpointResourceUsage_List1.cs new file mode 100644 index 000000000000..e0fa83691de8 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnEndpointResourceUsage_List1.cs @@ -0,0 +1,444 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Checks the quota and usage of geo filters and custom domains under the given endpoint. + /// + /// + /// [OpenAPI] ListResourceUsage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/checkResourceUsage" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnEndpointResourceUsage_List1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Checks the quota and usage of geo filters and custom domains under the given endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnEndpointResourceUsage_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnEndpointResourceUsage_List1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsListResourceUsage' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsListResourceUsage(ResourceGroupName, ProfileName, EndpointName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsListResourceUsage_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnEndpoint_Get1.cs b/src/Cdn/generated/cmdlets/GetAzCdnEndpoint_Get1.cs new file mode 100644 index 000000000000..15503cf68e65 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnEndpoint_Get1.cs @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnEndpoint_Get1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnEndpoint_Get1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("EndpointName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnEndpoint_Get1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsGet(ResourceGroupName, ProfileName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnEndpoint_GetViaIdentity1.cs b/src/Cdn/generated/cmdlets/GetAzCdnEndpoint_GetViaIdentity1.cs new file mode 100644 index 000000000000..d161e20da758 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnEndpoint_GetViaIdentity1.cs @@ -0,0 +1,388 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnEndpoint_GetViaIdentity1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnEndpoint_GetViaIdentity1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnEndpoint_GetViaIdentity1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.EndpointsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.EndpointsGet(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnEndpoint_List1.cs b/src/Cdn/generated/cmdlets/GetAzCdnEndpoint_List1.cs new file mode 100644 index 000000000000..43b2ddb72887 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnEndpoint_List1.cs @@ -0,0 +1,425 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Lists existing CDN endpoints. + /// + /// [OpenAPI] ListByProfile=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnEndpoint_List1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Lists existing CDN endpoints.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnEndpoint_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnEndpoint_List1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsListByProfile(ResourceGroupName, ProfileName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsListByProfile_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticLocation_Get.cs b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticLocation_Get.cs new file mode 100644 index 000000000000..1404f52af6aa --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticLocation_Get.cs @@ -0,0 +1,407 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Get all available location names for AFD log analytics report. + /// + /// [OpenAPI] GetLogAnalyticsLocations=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsLocations" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnLogAnalyticLocation_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Get all available location names for AFD log analytics report.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnLogAnalyticLocation_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which + /// is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnLogAnalyticLocation_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.LogAnalyticsGetLogAnalyticsLocations(SubscriptionId, ResourceGroupName, ProfileName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ProfileName=ProfileName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProfileName=ProfileName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProfileName=ProfileName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponse + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticLocation_GetViaIdentity.cs b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticLocation_GetViaIdentity.cs new file mode 100644 index 000000000000..9664c2cc0c52 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticLocation_GetViaIdentity.cs @@ -0,0 +1,383 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Get all available location names for AFD log analytics report. + /// + /// [OpenAPI] GetLogAnalyticsLocations=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsLocations" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnLogAnalyticLocation_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Get all available location names for AFD log analytics report.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnLogAnalyticLocation_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnLogAnalyticLocation_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.LogAnalyticsGetLogAnalyticsLocationsViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.LogAnalyticsGetLogAnalyticsLocations(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponse + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticMetric_Get.cs b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticMetric_Get.cs new file mode 100644 index 000000000000..25a1168e3e9b --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticMetric_Get.cs @@ -0,0 +1,533 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Get log report for AFD profile + /// + /// [OpenAPI] GetLogAnalyticsMetrics=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsMetrics" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnLogAnalyticMetric_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Get log report for AFD profile")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnLogAnalyticMetric_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private string[] _continent; + + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"continents", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public string[] Continent { get => this._continent; set => this._continent = value; } + + /// Backing field for property. + private string[] _countryOrRegion; + + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"countryOrRegions", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public string[] CountryOrRegion { get => this._countryOrRegion; set => this._countryOrRegion = value; } + + /// Backing field for property. + private string[] _customDomain; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"customDomains", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public string[] CustomDomain { get => this._customDomain; set => this._customDomain = value; } + + /// Backing field for property. + private global::System.DateTime _dateTimeBegin; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeBegin", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public global::System.DateTime DateTimeBegin { get => this._dateTimeBegin; set => this._dateTimeBegin = value; } + + /// Backing field for property. + private global::System.DateTime _dateTimeEnd; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public global::System.DateTime DateTimeEnd { get => this._dateTimeEnd; set => this._dateTimeEnd = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity _granularity; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"granularity", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity Granularity { get => this._granularity; set => this._granularity = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy[] _groupBy; + + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"groupBy", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy[] GroupBy { get => this._groupBy; set => this._groupBy = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric[] _metric; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"metrics", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric[] Metric { get => this._metric; set => this._metric = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which + /// is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// Backing field for property. + private string[] _protocol; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"protocols", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public string[] Protocol { get => this._protocol; set => this._protocol = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnLogAnalyticMetric_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.LogAnalyticsGetLogAnalyticsMetrics(SubscriptionId, ResourceGroupName, ProfileName, Metric, DateTimeBegin, DateTimeEnd, Granularity, this.InvocationInformation.BoundParameters.ContainsKey("GroupBy") ? GroupBy : null /* arrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("Continent") ? Continent : null /* arrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("CountryOrRegion") ? CountryOrRegion : null /* arrayOf */, CustomDomain, Protocol, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Metric=Metric,DateTimeBegin=DateTimeBegin,DateTimeEnd=DateTimeEnd,Granularity=Granularity,GroupBy=this.InvocationInformation.BoundParameters.ContainsKey("GroupBy") ? GroupBy : null /* arrayOf */,Continent=this.InvocationInformation.BoundParameters.ContainsKey("Continent") ? Continent : null /* arrayOf */,CountryOrRegion=this.InvocationInformation.BoundParameters.ContainsKey("CountryOrRegion") ? CountryOrRegion : null /* arrayOf */,CustomDomain=CustomDomain,Protocol=Protocol}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Metric=Metric, DateTimeBegin=DateTimeBegin, DateTimeEnd=DateTimeEnd, Granularity=Granularity, GroupBy=this.InvocationInformation.BoundParameters.ContainsKey("GroupBy") ? GroupBy : null /* arrayOf */, Continent=this.InvocationInformation.BoundParameters.ContainsKey("Continent") ? Continent : null /* arrayOf */, CountryOrRegion=this.InvocationInformation.BoundParameters.ContainsKey("CountryOrRegion") ? CountryOrRegion : null /* arrayOf */, CustomDomain=CustomDomain, Protocol=Protocol }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Metric=Metric, DateTimeBegin=DateTimeBegin, DateTimeEnd=DateTimeEnd, Granularity=Granularity, GroupBy=this.InvocationInformation.BoundParameters.ContainsKey("GroupBy") ? GroupBy : null /* arrayOf */, Continent=this.InvocationInformation.BoundParameters.ContainsKey("Continent") ? Continent : null /* arrayOf */, CountryOrRegion=this.InvocationInformation.BoundParameters.ContainsKey("CountryOrRegion") ? CountryOrRegion : null /* arrayOf */, CustomDomain=CustomDomain, Protocol=Protocol }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponse + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticMetric_GetViaIdentity.cs b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticMetric_GetViaIdentity.cs new file mode 100644 index 000000000000..7508c205c441 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticMetric_GetViaIdentity.cs @@ -0,0 +1,509 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Get log report for AFD profile + /// + /// [OpenAPI] GetLogAnalyticsMetrics=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsMetrics" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnLogAnalyticMetric_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Get log report for AFD profile")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnLogAnalyticMetric_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private string[] _continent; + + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"continents", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public string[] Continent { get => this._continent; set => this._continent = value; } + + /// Backing field for property. + private string[] _countryOrRegion; + + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"countryOrRegions", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public string[] CountryOrRegion { get => this._countryOrRegion; set => this._countryOrRegion = value; } + + /// Backing field for property. + private string[] _customDomain; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"customDomains", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public string[] CustomDomain { get => this._customDomain; set => this._customDomain = value; } + + /// Backing field for property. + private global::System.DateTime _dateTimeBegin; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeBegin", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public global::System.DateTime DateTimeBegin { get => this._dateTimeBegin; set => this._dateTimeBegin = value; } + + /// Backing field for property. + private global::System.DateTime _dateTimeEnd; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public global::System.DateTime DateTimeEnd { get => this._dateTimeEnd; set => this._dateTimeEnd = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity _granularity; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"granularity", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity Granularity { get => this._granularity; set => this._granularity = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy[] _groupBy; + + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"groupBy", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy[] GroupBy { get => this._groupBy; set => this._groupBy = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric[] _metric; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"metrics", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric[] Metric { get => this._metric; set => this._metric = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string[] _protocol; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"protocols", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public string[] Protocol { get => this._protocol; set => this._protocol = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnLogAnalyticMetric_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.LogAnalyticsGetLogAnalyticsMetricsViaIdentity(InputObject.Id, Metric, DateTimeBegin, DateTimeEnd, Granularity, this.InvocationInformation.BoundParameters.ContainsKey("GroupBy") ? GroupBy : null /* arrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("Continent") ? Continent : null /* arrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("CountryOrRegion") ? CountryOrRegion : null /* arrayOf */, CustomDomain, Protocol, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.LogAnalyticsGetLogAnalyticsMetrics(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, Metric, DateTimeBegin, DateTimeEnd, Granularity, this.InvocationInformation.BoundParameters.ContainsKey("GroupBy") ? GroupBy : null /* arrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("Continent") ? Continent : null /* arrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("CountryOrRegion") ? CountryOrRegion : null /* arrayOf */, CustomDomain, Protocol, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Metric=Metric,DateTimeBegin=DateTimeBegin,DateTimeEnd=DateTimeEnd,Granularity=Granularity,GroupBy=this.InvocationInformation.BoundParameters.ContainsKey("GroupBy") ? GroupBy : null /* arrayOf */,Continent=this.InvocationInformation.BoundParameters.ContainsKey("Continent") ? Continent : null /* arrayOf */,CountryOrRegion=this.InvocationInformation.BoundParameters.ContainsKey("CountryOrRegion") ? CountryOrRegion : null /* arrayOf */,CustomDomain=CustomDomain,Protocol=Protocol}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Metric=Metric, DateTimeBegin=DateTimeBegin, DateTimeEnd=DateTimeEnd, Granularity=Granularity, GroupBy=this.InvocationInformation.BoundParameters.ContainsKey("GroupBy") ? GroupBy : null /* arrayOf */, Continent=this.InvocationInformation.BoundParameters.ContainsKey("Continent") ? Continent : null /* arrayOf */, CountryOrRegion=this.InvocationInformation.BoundParameters.ContainsKey("CountryOrRegion") ? CountryOrRegion : null /* arrayOf */, CustomDomain=CustomDomain, Protocol=Protocol }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Metric=Metric, DateTimeBegin=DateTimeBegin, DateTimeEnd=DateTimeEnd, Granularity=Granularity, GroupBy=this.InvocationInformation.BoundParameters.ContainsKey("GroupBy") ? GroupBy : null /* arrayOf */, Continent=this.InvocationInformation.BoundParameters.ContainsKey("Continent") ? Continent : null /* arrayOf */, CountryOrRegion=this.InvocationInformation.BoundParameters.ContainsKey("CountryOrRegion") ? CountryOrRegion : null /* arrayOf */, CustomDomain=CustomDomain, Protocol=Protocol }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponse + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticRanking_Get.cs b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticRanking_Get.cs new file mode 100644 index 000000000000..2d8b009b6752 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticRanking_Get.cs @@ -0,0 +1,490 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Get log analytics ranking report for AFD profile + /// + /// [OpenAPI] GetLogAnalyticsRankings=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsRankings" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnLogAnalyticRanking_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Get log analytics ranking report for AFD profile")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnLogAnalyticRanking_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private string[] _customDomain; + + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"customDomains", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public string[] CustomDomain { get => this._customDomain; set => this._customDomain = value; } + + /// Backing field for property. + private global::System.DateTime _dateTimeBegin; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeBegin", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public global::System.DateTime DateTimeBegin { get => this._dateTimeBegin; set => this._dateTimeBegin = value; } + + /// Backing field for property. + private global::System.DateTime _dateTimeEnd; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public global::System.DateTime DateTimeEnd { get => this._dateTimeEnd; set => this._dateTimeEnd = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private int _maxRanking; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"maxRanking", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public int MaxRanking { get => this._maxRanking; set => this._maxRanking = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric[] _metric; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"metrics", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric[] Metric { get => this._metric; set => this._metric = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which + /// is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking[] _ranking; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"rankings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking[] Ranking { get => this._ranking; set => this._ranking = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnLogAnalyticRanking_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.LogAnalyticsGetLogAnalyticsRankings(SubscriptionId, ResourceGroupName, ProfileName, Ranking, Metric, MaxRanking, DateTimeBegin, DateTimeEnd, this.InvocationInformation.BoundParameters.ContainsKey("CustomDomain") ? CustomDomain : null /* arrayOf */, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Ranking=Ranking,Metric=Metric,MaxRanking=MaxRanking,DateTimeBegin=DateTimeBegin,DateTimeEnd=DateTimeEnd,CustomDomain=this.InvocationInformation.BoundParameters.ContainsKey("CustomDomain") ? CustomDomain : null /* arrayOf */}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Ranking=Ranking, Metric=Metric, MaxRanking=MaxRanking, DateTimeBegin=DateTimeBegin, DateTimeEnd=DateTimeEnd, CustomDomain=this.InvocationInformation.BoundParameters.ContainsKey("CustomDomain") ? CustomDomain : null /* arrayOf */ }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Ranking=Ranking, Metric=Metric, MaxRanking=MaxRanking, DateTimeBegin=DateTimeBegin, DateTimeEnd=DateTimeEnd, CustomDomain=this.InvocationInformation.BoundParameters.ContainsKey("CustomDomain") ? CustomDomain : null /* arrayOf */ }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponse + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticRanking_GetViaIdentity.cs b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticRanking_GetViaIdentity.cs new file mode 100644 index 000000000000..aa23a9c95ac1 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticRanking_GetViaIdentity.cs @@ -0,0 +1,466 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Get log analytics ranking report for AFD profile + /// + /// [OpenAPI] GetLogAnalyticsRankings=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsRankings" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnLogAnalyticRanking_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Get log analytics ranking report for AFD profile")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnLogAnalyticRanking_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private string[] _customDomain; + + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"customDomains", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public string[] CustomDomain { get => this._customDomain; set => this._customDomain = value; } + + /// Backing field for property. + private global::System.DateTime _dateTimeBegin; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeBegin", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public global::System.DateTime DateTimeBegin { get => this._dateTimeBegin; set => this._dateTimeBegin = value; } + + /// Backing field for property. + private global::System.DateTime _dateTimeEnd; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public global::System.DateTime DateTimeEnd { get => this._dateTimeEnd; set => this._dateTimeEnd = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private int _maxRanking; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"maxRanking", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public int MaxRanking { get => this._maxRanking; set => this._maxRanking = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric[] _metric; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"metrics", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric[] Metric { get => this._metric; set => this._metric = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking[] _ranking; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"rankings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking[] Ranking { get => this._ranking; set => this._ranking = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnLogAnalyticRanking_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.LogAnalyticsGetLogAnalyticsRankingsViaIdentity(InputObject.Id, Ranking, Metric, MaxRanking, DateTimeBegin, DateTimeEnd, this.InvocationInformation.BoundParameters.ContainsKey("CustomDomain") ? CustomDomain : null /* arrayOf */, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.LogAnalyticsGetLogAnalyticsRankings(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, Ranking, Metric, MaxRanking, DateTimeBegin, DateTimeEnd, this.InvocationInformation.BoundParameters.ContainsKey("CustomDomain") ? CustomDomain : null /* arrayOf */, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Ranking=Ranking,Metric=Metric,MaxRanking=MaxRanking,DateTimeBegin=DateTimeBegin,DateTimeEnd=DateTimeEnd,CustomDomain=this.InvocationInformation.BoundParameters.ContainsKey("CustomDomain") ? CustomDomain : null /* arrayOf */}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Ranking=Ranking, Metric=Metric, MaxRanking=MaxRanking, DateTimeBegin=DateTimeBegin, DateTimeEnd=DateTimeEnd, CustomDomain=this.InvocationInformation.BoundParameters.ContainsKey("CustomDomain") ? CustomDomain : null /* arrayOf */ }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Ranking=Ranking, Metric=Metric, MaxRanking=MaxRanking, DateTimeBegin=DateTimeBegin, DateTimeEnd=DateTimeEnd, CustomDomain=this.InvocationInformation.BoundParameters.ContainsKey("CustomDomain") ? CustomDomain : null /* arrayOf */ }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponse + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticResource_Get.cs b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticResource_Get.cs new file mode 100644 index 000000000000..f1a905639edd --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticResource_Get.cs @@ -0,0 +1,407 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Get all endpoints and custom domains available for AFD log report + /// + /// [OpenAPI] GetLogAnalyticsResources=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsResources" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnLogAnalyticResource_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Get all endpoints and custom domains available for AFD log report")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnLogAnalyticResource_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which + /// is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnLogAnalyticResource_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.LogAnalyticsGetLogAnalyticsResources(SubscriptionId, ResourceGroupName, ProfileName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ProfileName=ProfileName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProfileName=ProfileName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProfileName=ProfileName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponse + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticResource_GetViaIdentity.cs b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticResource_GetViaIdentity.cs new file mode 100644 index 000000000000..3e0951f29ab8 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticResource_GetViaIdentity.cs @@ -0,0 +1,383 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Get all endpoints and custom domains available for AFD log report + /// + /// [OpenAPI] GetLogAnalyticsResources=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getLogAnalyticsResources" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnLogAnalyticResource_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Get all endpoints and custom domains available for AFD log report")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnLogAnalyticResource_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnLogAnalyticResource_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.LogAnalyticsGetLogAnalyticsResourcesViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.LogAnalyticsGetLogAnalyticsResources(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponse + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticMetric_Get.cs b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticMetric_Get.cs new file mode 100644 index 000000000000..d01e2dbf9161 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticMetric_Get.cs @@ -0,0 +1,507 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Get Waf related log analytics report for AFD profile. + /// + /// [OpenAPI] GetWafLogAnalyticsMetrics=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getWafLogAnalyticsMetrics" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnLogAnalyticWafLogAnalyticMetric_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Get Waf related log analytics report for AFD profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnLogAnalyticWafLogAnalyticMetric_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction[] _action; + + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"actions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction[] Action { get => this._action; set => this._action = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private global::System.DateTime _dateTimeBegin; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeBegin", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public global::System.DateTime DateTimeBegin { get => this._dateTimeBegin; set => this._dateTimeBegin = value; } + + /// Backing field for property. + private global::System.DateTime _dateTimeEnd; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public global::System.DateTime DateTimeEnd { get => this._dateTimeEnd; set => this._dateTimeEnd = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity _granularity; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"granularity", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity Granularity { get => this._granularity; set => this._granularity = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy[] _groupBy; + + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"groupBy", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy[] GroupBy { get => this._groupBy; set => this._groupBy = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric[] _metric; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"metrics", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric[] Metric { get => this._metric; set => this._metric = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which + /// is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType[] _ruleType; + + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"ruleTypes", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType[] RuleType { get => this._ruleType; set => this._ruleType = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnLogAnalyticWafLogAnalyticMetric_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.LogAnalyticsGetWafLogAnalyticsMetrics(SubscriptionId, ResourceGroupName, ProfileName, Metric, DateTimeBegin, DateTimeEnd, Granularity, this.InvocationInformation.BoundParameters.ContainsKey("Action") ? Action : null /* arrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("GroupBy") ? GroupBy : null /* arrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("RuleType") ? RuleType : null /* arrayOf */, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Metric=Metric,DateTimeBegin=DateTimeBegin,DateTimeEnd=DateTimeEnd,Granularity=Granularity,Action=this.InvocationInformation.BoundParameters.ContainsKey("Action") ? Action : null /* arrayOf */,GroupBy=this.InvocationInformation.BoundParameters.ContainsKey("GroupBy") ? GroupBy : null /* arrayOf */,RuleType=this.InvocationInformation.BoundParameters.ContainsKey("RuleType") ? RuleType : null /* arrayOf */}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Metric=Metric, DateTimeBegin=DateTimeBegin, DateTimeEnd=DateTimeEnd, Granularity=Granularity, Action=this.InvocationInformation.BoundParameters.ContainsKey("Action") ? Action : null /* arrayOf */, GroupBy=this.InvocationInformation.BoundParameters.ContainsKey("GroupBy") ? GroupBy : null /* arrayOf */, RuleType=this.InvocationInformation.BoundParameters.ContainsKey("RuleType") ? RuleType : null /* arrayOf */ }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Metric=Metric, DateTimeBegin=DateTimeBegin, DateTimeEnd=DateTimeEnd, Granularity=Granularity, Action=this.InvocationInformation.BoundParameters.ContainsKey("Action") ? Action : null /* arrayOf */, GroupBy=this.InvocationInformation.BoundParameters.ContainsKey("GroupBy") ? GroupBy : null /* arrayOf */, RuleType=this.InvocationInformation.BoundParameters.ContainsKey("RuleType") ? RuleType : null /* arrayOf */ }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponse + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticMetric_GetViaIdentity.cs b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticMetric_GetViaIdentity.cs new file mode 100644 index 000000000000..8236d869f2f6 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticMetric_GetViaIdentity.cs @@ -0,0 +1,483 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Get Waf related log analytics report for AFD profile. + /// + /// [OpenAPI] GetWafLogAnalyticsMetrics=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getWafLogAnalyticsMetrics" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnLogAnalyticWafLogAnalyticMetric_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Get Waf related log analytics report for AFD profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnLogAnalyticWafLogAnalyticMetric_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction[] _action; + + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"actions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction[] Action { get => this._action; set => this._action = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private global::System.DateTime _dateTimeBegin; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeBegin", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public global::System.DateTime DateTimeBegin { get => this._dateTimeBegin; set => this._dateTimeBegin = value; } + + /// Backing field for property. + private global::System.DateTime _dateTimeEnd; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public global::System.DateTime DateTimeEnd { get => this._dateTimeEnd; set => this._dateTimeEnd = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity _granularity; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"granularity", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity Granularity { get => this._granularity; set => this._granularity = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy[] _groupBy; + + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"groupBy", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy[] GroupBy { get => this._groupBy; set => this._groupBy = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric[] _metric; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"metrics", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric[] Metric { get => this._metric; set => this._metric = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType[] _ruleType; + + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"ruleTypes", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType[] RuleType { get => this._ruleType; set => this._ruleType = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnLogAnalyticWafLogAnalyticMetric_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.LogAnalyticsGetWafLogAnalyticsMetricsViaIdentity(InputObject.Id, Metric, DateTimeBegin, DateTimeEnd, Granularity, this.InvocationInformation.BoundParameters.ContainsKey("Action") ? Action : null /* arrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("GroupBy") ? GroupBy : null /* arrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("RuleType") ? RuleType : null /* arrayOf */, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.LogAnalyticsGetWafLogAnalyticsMetrics(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, Metric, DateTimeBegin, DateTimeEnd, Granularity, this.InvocationInformation.BoundParameters.ContainsKey("Action") ? Action : null /* arrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("GroupBy") ? GroupBy : null /* arrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("RuleType") ? RuleType : null /* arrayOf */, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Metric=Metric,DateTimeBegin=DateTimeBegin,DateTimeEnd=DateTimeEnd,Granularity=Granularity,Action=this.InvocationInformation.BoundParameters.ContainsKey("Action") ? Action : null /* arrayOf */,GroupBy=this.InvocationInformation.BoundParameters.ContainsKey("GroupBy") ? GroupBy : null /* arrayOf */,RuleType=this.InvocationInformation.BoundParameters.ContainsKey("RuleType") ? RuleType : null /* arrayOf */}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Metric=Metric, DateTimeBegin=DateTimeBegin, DateTimeEnd=DateTimeEnd, Granularity=Granularity, Action=this.InvocationInformation.BoundParameters.ContainsKey("Action") ? Action : null /* arrayOf */, GroupBy=this.InvocationInformation.BoundParameters.ContainsKey("GroupBy") ? GroupBy : null /* arrayOf */, RuleType=this.InvocationInformation.BoundParameters.ContainsKey("RuleType") ? RuleType : null /* arrayOf */ }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Metric=Metric, DateTimeBegin=DateTimeBegin, DateTimeEnd=DateTimeEnd, Granularity=Granularity, Action=this.InvocationInformation.BoundParameters.ContainsKey("Action") ? Action : null /* arrayOf */, GroupBy=this.InvocationInformation.BoundParameters.ContainsKey("GroupBy") ? GroupBy : null /* arrayOf */, RuleType=this.InvocationInformation.BoundParameters.ContainsKey("RuleType") ? RuleType : null /* arrayOf */ }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponse + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticRanking_Get.cs b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticRanking_Get.cs new file mode 100644 index 000000000000..a4e27fe33cc3 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticRanking_Get.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Get WAF log analytics charts for AFD profile + /// + /// [OpenAPI] GetWafLogAnalyticsRankings=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getWafLogAnalyticsRankings" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnLogAnalyticWafLogAnalyticRanking_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Get WAF log analytics charts for AFD profile")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnLogAnalyticWafLogAnalyticRanking_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction[] _action; + + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"actions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction[] Action { get => this._action; set => this._action = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private global::System.DateTime _dateTimeBegin; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeBegin", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public global::System.DateTime DateTimeBegin { get => this._dateTimeBegin; set => this._dateTimeBegin = value; } + + /// Backing field for property. + private global::System.DateTime _dateTimeEnd; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public global::System.DateTime DateTimeEnd { get => this._dateTimeEnd; set => this._dateTimeEnd = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private int _maxRanking; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"maxRanking", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public int MaxRanking { get => this._maxRanking; set => this._maxRanking = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric[] _metric; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"metrics", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric[] Metric { get => this._metric; set => this._metric = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which + /// is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType[] _ranking; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"rankings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType[] Ranking { get => this._ranking; set => this._ranking = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType[] _ruleType; + + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"ruleTypes", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType[] RuleType { get => this._ruleType; set => this._ruleType = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnLogAnalyticWafLogAnalyticRanking_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.LogAnalyticsGetWafLogAnalyticsRankings(SubscriptionId, ResourceGroupName, ProfileName, Metric, DateTimeBegin, DateTimeEnd, MaxRanking, Ranking, this.InvocationInformation.BoundParameters.ContainsKey("Action") ? Action : null /* arrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("RuleType") ? RuleType : null /* arrayOf */, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Metric=Metric,DateTimeBegin=DateTimeBegin,DateTimeEnd=DateTimeEnd,MaxRanking=MaxRanking,Ranking=Ranking,Action=this.InvocationInformation.BoundParameters.ContainsKey("Action") ? Action : null /* arrayOf */,RuleType=this.InvocationInformation.BoundParameters.ContainsKey("RuleType") ? RuleType : null /* arrayOf */}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Metric=Metric, DateTimeBegin=DateTimeBegin, DateTimeEnd=DateTimeEnd, MaxRanking=MaxRanking, Ranking=Ranking, Action=this.InvocationInformation.BoundParameters.ContainsKey("Action") ? Action : null /* arrayOf */, RuleType=this.InvocationInformation.BoundParameters.ContainsKey("RuleType") ? RuleType : null /* arrayOf */ }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Metric=Metric, DateTimeBegin=DateTimeBegin, DateTimeEnd=DateTimeEnd, MaxRanking=MaxRanking, Ranking=Ranking, Action=this.InvocationInformation.BoundParameters.ContainsKey("Action") ? Action : null /* arrayOf */, RuleType=this.InvocationInformation.BoundParameters.ContainsKey("RuleType") ? RuleType : null /* arrayOf */ }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponse + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticRanking_GetViaIdentity.cs b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticRanking_GetViaIdentity.cs new file mode 100644 index 000000000000..5477fec0a5f1 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticRanking_GetViaIdentity.cs @@ -0,0 +1,482 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Get WAF log analytics charts for AFD profile + /// + /// [OpenAPI] GetWafLogAnalyticsRankings=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getWafLogAnalyticsRankings" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnLogAnalyticWafLogAnalyticRanking_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponse))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Get WAF log analytics charts for AFD profile")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnLogAnalyticWafLogAnalyticRanking_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction[] _action; + + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"actions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction[] Action { get => this._action; set => this._action = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private global::System.DateTime _dateTimeBegin; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeBegin", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public global::System.DateTime DateTimeBegin { get => this._dateTimeBegin; set => this._dateTimeBegin = value; } + + /// Backing field for property. + private global::System.DateTime _dateTimeEnd; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"dateTimeEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public global::System.DateTime DateTimeEnd { get => this._dateTimeEnd; set => this._dateTimeEnd = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private int _maxRanking; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"maxRanking", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + public int MaxRanking { get => this._maxRanking; set => this._maxRanking = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric[] _metric; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"metrics", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric[] Metric { get => this._metric; set => this._metric = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType[] _ranking; + + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"rankings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType[] Ranking { get => this._ranking; set => this._ranking = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType[] _ruleType; + + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"ruleTypes", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType[] RuleType { get => this._ruleType; set => this._ruleType = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnLogAnalyticWafLogAnalyticRanking_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.LogAnalyticsGetWafLogAnalyticsRankingsViaIdentity(InputObject.Id, Metric, DateTimeBegin, DateTimeEnd, MaxRanking, Ranking, this.InvocationInformation.BoundParameters.ContainsKey("Action") ? Action : null /* arrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("RuleType") ? RuleType : null /* arrayOf */, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.LogAnalyticsGetWafLogAnalyticsRankings(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, Metric, DateTimeBegin, DateTimeEnd, MaxRanking, Ranking, this.InvocationInformation.BoundParameters.ContainsKey("Action") ? Action : null /* arrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("RuleType") ? RuleType : null /* arrayOf */, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Metric=Metric,DateTimeBegin=DateTimeBegin,DateTimeEnd=DateTimeEnd,MaxRanking=MaxRanking,Ranking=Ranking,Action=this.InvocationInformation.BoundParameters.ContainsKey("Action") ? Action : null /* arrayOf */,RuleType=this.InvocationInformation.BoundParameters.ContainsKey("RuleType") ? RuleType : null /* arrayOf */}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Metric=Metric, DateTimeBegin=DateTimeBegin, DateTimeEnd=DateTimeEnd, MaxRanking=MaxRanking, Ranking=Ranking, Action=this.InvocationInformation.BoundParameters.ContainsKey("Action") ? Action : null /* arrayOf */, RuleType=this.InvocationInformation.BoundParameters.ContainsKey("RuleType") ? RuleType : null /* arrayOf */ }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Metric=Metric, DateTimeBegin=DateTimeBegin, DateTimeEnd=DateTimeEnd, MaxRanking=MaxRanking, Ranking=Ranking, Action=this.InvocationInformation.BoundParameters.ContainsKey("Action") ? Action : null /* arrayOf */, RuleType=this.InvocationInformation.BoundParameters.ContainsKey("RuleType") ? RuleType : null /* arrayOf */ }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponse + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnOperation_List.cs b/src/Cdn/generated/cmdlets/GetAzCdnOperation_List.cs new file mode 100644 index 000000000000..e4996fcc06b1 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnOperation_List.cs @@ -0,0 +1,377 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Lists all of the available CDN REST API operations. + /// + /// [OpenAPI] List=>GET:"/providers/Microsoft.Cdn/operations" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnOperation_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Lists all of the available CDN REST API operations.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnOperation_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnOperation_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OperationsList(onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OperationsList_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnOriginGroup_Get1.cs b/src/Cdn/generated/cmdlets/GetAzCdnOriginGroup_Get1.cs new file mode 100644 index 000000000000..9e0108fdfb23 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnOriginGroup_Get1.cs @@ -0,0 +1,432 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Gets an existing origin group within an endpoint. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnOriginGroup_Get1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing origin group within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnOriginGroup_Get1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the origin group which is unique within the endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin group which is unique within the endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin group which is unique within the endpoint.", + SerializedName = @"originGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OriginGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnOriginGroup_Get1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OriginGroupsGet(ResourceGroupName, ProfileName, EndpointName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnOriginGroup_GetViaIdentity1.cs b/src/Cdn/generated/cmdlets/GetAzCdnOriginGroup_GetViaIdentity1.cs new file mode 100644 index 000000000000..31d34d5c5b82 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnOriginGroup_GetViaIdentity1.cs @@ -0,0 +1,390 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Gets an existing origin group within an endpoint. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnOriginGroup_GetViaIdentity1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing origin group within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnOriginGroup_GetViaIdentity1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnOriginGroup_GetViaIdentity1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.OriginGroupsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.OriginGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OriginGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.OriginGroupsGet(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.OriginGroupName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnOriginGroup_List1.cs b/src/Cdn/generated/cmdlets/GetAzCdnOriginGroup_List1.cs new file mode 100644 index 000000000000..e2406df05635 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnOriginGroup_List1.cs @@ -0,0 +1,439 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Lists all of the existing origin groups within an endpoint. + /// + /// [OpenAPI] ListByEndpoint=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnOriginGroup_List1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Lists all of the existing origin groups within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnOriginGroup_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnOriginGroup_List1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OriginGroupsListByEndpoint(ResourceGroupName, ProfileName, EndpointName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OriginGroupsListByEndpoint_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnOrigin_Get1.cs b/src/Cdn/generated/cmdlets/GetAzCdnOrigin_Get1.cs new file mode 100644 index 000000000000..0b395bbc2447 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnOrigin_Get1.cs @@ -0,0 +1,432 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Gets an existing origin within an endpoint. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnOrigin_Get1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing origin within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnOrigin_Get1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the origin which is unique within the endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin which is unique within the endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin which is unique within the endpoint.", + SerializedName = @"originName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OriginName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnOrigin_Get1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OriginsGet(ResourceGroupName, ProfileName, EndpointName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnOrigin_GetViaIdentity1.cs b/src/Cdn/generated/cmdlets/GetAzCdnOrigin_GetViaIdentity1.cs new file mode 100644 index 000000000000..15a6f4792ce5 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnOrigin_GetViaIdentity1.cs @@ -0,0 +1,390 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Gets an existing origin within an endpoint. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnOrigin_GetViaIdentity1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing origin within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnOrigin_GetViaIdentity1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnOrigin_GetViaIdentity1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.OriginsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.OriginName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OriginName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.OriginsGet(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.OriginName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnOrigin_List1.cs b/src/Cdn/generated/cmdlets/GetAzCdnOrigin_List1.cs new file mode 100644 index 000000000000..fe1291eeef00 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnOrigin_List1.cs @@ -0,0 +1,439 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Lists all of the existing origins within an endpoint. + /// + /// [OpenAPI] ListByEndpoint=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnOrigin_List1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Lists all of the existing origins within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnOrigin_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnOrigin_List1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OriginsListByEndpoint(ResourceGroupName, ProfileName, EndpointName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OriginsListByEndpoint_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnProfileResourceUsage_List1.cs b/src/Cdn/generated/cmdlets/GetAzCdnProfileResourceUsage_List1.cs new file mode 100644 index 000000000000..781837c9144a --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnProfileResourceUsage_List1.cs @@ -0,0 +1,433 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door Premium or + /// CDN profile. + /// + /// + /// [OpenAPI] ListResourceUsage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkResourceUsage" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnProfileResourceUsage_List1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door Premium or CDN profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnProfileResourceUsage_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnProfileResourceUsage_List1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProfilesListResourceUsage' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProfilesListResourceUsage(ResourceGroupName, ProfileName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProfilesListResourceUsage_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnProfileSupportedOptimizationType_List.cs b/src/Cdn/generated/cmdlets/GetAzCdnProfileSupportedOptimizationType_List.cs new file mode 100644 index 000000000000..b505bc92382b --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnProfileSupportedOptimizationType_List.cs @@ -0,0 +1,412 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization type + /// from the listed values. + /// + /// + /// [OpenAPI] ListSupportedOptimizationTypes=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getSupportedOptimizationTypes" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnProfileSupportedOptimizationType_List", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization type from the listed values.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnProfileSupportedOptimizationType_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnProfileSupportedOptimizationType_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProfilesListSupportedOptimizationTypes' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProfilesListSupportedOptimizationTypes(ResourceGroupName, ProfileName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // nested-array / supportedOptimizationTypes / + WriteObject((await response).SupportedOptimizationType, true); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnProfile_Get.cs b/src/Cdn/generated/cmdlets/GetAzCdnProfile_Get.cs new file mode 100644 index 000000000000..2602573320f8 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnProfile_Get.cs @@ -0,0 +1,410 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the + /// specified subscription and resource group. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnProfile_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnProfile_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProfileName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnProfile_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProfilesGet(ResourceGroupName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnProfile_GetViaIdentity.cs b/src/Cdn/generated/cmdlets/GetAzCdnProfile_GetViaIdentity.cs new file mode 100644 index 000000000000..2c8f34345e78 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnProfile_GetViaIdentity.cs @@ -0,0 +1,386 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the + /// specified subscription and resource group. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnProfile_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnProfile_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnProfile_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProfilesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProfilesGet(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnProfile_List.cs b/src/Cdn/generated/cmdlets/GetAzCdnProfile_List.cs new file mode 100644 index 000000000000..11081ed5bf27 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnProfile_List.cs @@ -0,0 +1,400 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure subscription. + /// + /// + /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/profiles" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnProfile_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure subscription.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnProfile_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnProfile_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProfilesList(SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProfilesList_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnProfile_List1.cs b/src/Cdn/generated/cmdlets/GetAzCdnProfile_List1.cs new file mode 100644 index 000000000000..2fb0f65d47d5 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnProfile_List1.cs @@ -0,0 +1,414 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group. + /// + /// + /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnProfile_List1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnProfile_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnProfile_List1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProfilesListByResourceGroup(ResourceGroupName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProfilesListByResourceGroup_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzCdnSubscriptionResourceUsage_List.cs b/src/Cdn/generated/cmdlets/GetAzCdnSubscriptionResourceUsage_List.cs new file mode 100644 index 000000000000..d020bcbc3b85 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzCdnSubscriptionResourceUsage_List.cs @@ -0,0 +1,402 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Check the quota and actual usage of the CDN profiles under the given subscription. + /// + /// + /// [OpenAPI] List=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkResourceUsage" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzCdnSubscriptionResourceUsage_List", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Check the quota and actual usage of the CDN profiles under the given subscription.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzCdnSubscriptionResourceUsage_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzCdnSubscriptionResourceUsage_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ResourceUsageList' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ResourceUsageList(SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ResourceUsageList_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_Get.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_Get.cs new file mode 100644 index 000000000000..00e6029296a4 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_Get.cs @@ -0,0 +1,422 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group + /// and profile. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnCustomDomain_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnCustomDomain_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _customDomainName; + + /// Name of the domain under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the domain under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the domain under the profile which is unique globally.", + SerializedName = @"customDomainName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string CustomDomainName { get => this._customDomainName; set => this._customDomainName = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnCustomDomain_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdCustomDomainsGet(ResourceGroupName, ProfileName, CustomDomainName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,CustomDomainName=CustomDomainName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, CustomDomainName=CustomDomainName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, CustomDomainName=CustomDomainName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_GetViaIdentity.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_GetViaIdentity.cs new file mode 100644 index 000000000000..a217d5988f0a --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_GetViaIdentity.cs @@ -0,0 +1,389 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group + /// and profile. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnCustomDomain_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnCustomDomain_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnCustomDomain_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AfdCustomDomainsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CustomDomainName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CustomDomainName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AfdCustomDomainsGet(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.CustomDomainName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_List.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_List.cs new file mode 100644 index 000000000000..cf09f66ab643 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_List.cs @@ -0,0 +1,428 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Lists existing AzureFrontDoor domains. + /// + /// [OpenAPI] ListByProfile=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnCustomDomain_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Lists existing AzureFrontDoor domains.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnCustomDomain_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile or CDN profile which is unique within the resource + /// group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile or CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile or CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnCustomDomain_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdCustomDomainsListByProfile(ResourceGroupName, ProfileName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdCustomDomainsListByProfile_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnEndpointResourceUsage_List.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnEndpointResourceUsage_List.cs new file mode 100644 index 000000000000..b7e815f0d35f --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnEndpointResourceUsage_List.cs @@ -0,0 +1,446 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. + /// + /// + /// [OpenAPI] ListResourceUsage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/usages" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnEndpointResourceUsage_List", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnEndpointResourceUsage_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnEndpointResourceUsage_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdEndpointsListResourceUsage' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdEndpointsListResourceUsage(ResourceGroupName, ProfileName, EndpointName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdEndpointsListResourceUsage_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnEndpoint_Get.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnEndpoint_Get.cs new file mode 100644 index 000000000000..ffffe7282072 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnEndpoint_Get.cs @@ -0,0 +1,422 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group + /// and profile. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnEndpoint_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnEndpoint_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnEndpoint_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdEndpointsGet(ResourceGroupName, ProfileName, EndpointName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnEndpoint_GetViaIdentity.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnEndpoint_GetViaIdentity.cs new file mode 100644 index 000000000000..2aa29a3e59f9 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnEndpoint_GetViaIdentity.cs @@ -0,0 +1,389 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group + /// and profile. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnEndpoint_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnEndpoint_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnEndpoint_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AfdEndpointsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AfdEndpointsGet(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnEndpoint_List.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnEndpoint_List.cs new file mode 100644 index 000000000000..2972d6882290 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnEndpoint_List.cs @@ -0,0 +1,427 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Lists existing AzureFrontDoor endpoints. + /// + /// [OpenAPI] ListByProfile=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnEndpoint_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Lists existing AzureFrontDoor endpoints.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnEndpoint_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnEndpoint_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdEndpointsListByProfile(ResourceGroupName, ProfileName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdEndpointsListByProfile_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOriginGroupResourceUsage_List.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOriginGroupResourceUsage_List.cs new file mode 100644 index 000000000000..f1244c1a5d3e --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOriginGroupResourceUsage_List.cs @@ -0,0 +1,446 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN profile. + /// + /// + /// [OpenAPI] ListResourceUsage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/usages" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnOriginGroupResourceUsage_List", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnOriginGroupResourceUsage_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _originGroupName; + + /// Name of the origin group which is unique within the endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin group which is unique within the endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin group which is unique within the endpoint.", + SerializedName = @"originGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string OriginGroupName { get => this._originGroupName; set => this._originGroupName = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnOriginGroupResourceUsage_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdOriginGroupsListResourceUsage' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdOriginGroupsListResourceUsage(ResourceGroupName, ProfileName, OriginGroupName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,OriginGroupName=OriginGroupName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdOriginGroupsListResourceUsage_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_Get.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_Get.cs new file mode 100644 index 000000000000..8a6a0e6915a5 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_Get.cs @@ -0,0 +1,419 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Gets an existing origin group within a profile. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnOriginGroup_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing origin group within a profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnOriginGroup_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _originGroupName; + + /// Name of the origin group which is unique within the endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin group which is unique within the endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin group which is unique within the endpoint.", + SerializedName = @"originGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string OriginGroupName { get => this._originGroupName; set => this._originGroupName = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnOriginGroup_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdOriginGroupsGet(ResourceGroupName, ProfileName, OriginGroupName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,OriginGroupName=OriginGroupName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_GetViaIdentity.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_GetViaIdentity.cs new file mode 100644 index 000000000000..f992d6ee64da --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_GetViaIdentity.cs @@ -0,0 +1,386 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Gets an existing origin group within a profile. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnOriginGroup_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing origin group within a profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnOriginGroup_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnOriginGroup_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AfdOriginGroupsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.OriginGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OriginGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AfdOriginGroupsGet(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.OriginGroupName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_List.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_List.cs new file mode 100644 index 000000000000..a970a7d3aab3 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_List.cs @@ -0,0 +1,427 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Lists all of the existing origin groups within a profile. + /// + /// [OpenAPI] ListByProfile=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnOriginGroup_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Lists all of the existing origin groups within a profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnOriginGroup_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnOriginGroup_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdOriginGroupsListByProfile(ResourceGroupName, ProfileName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdOriginGroupsListByProfile_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOrigin_Get.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOrigin_Get.cs new file mode 100644 index 000000000000..3942b6aebdc5 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOrigin_Get.cs @@ -0,0 +1,433 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Gets an existing origin within an origin group. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnOrigin_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing origin within an origin group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnOrigin_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _originGroupName; + + /// Name of the origin group which is unique within the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin group which is unique within the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin group which is unique within the profile.", + SerializedName = @"originGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string OriginGroupName { get => this._originGroupName; set => this._originGroupName = value; } + + /// Backing field for property. + private string _originName; + + /// Name of the origin which is unique within the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin which is unique within the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin which is unique within the profile.", + SerializedName = @"originName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string OriginName { get => this._originName; set => this._originName = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnOrigin_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdOriginsGet(ResourceGroupName, ProfileName, OriginGroupName, OriginName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,OriginGroupName=OriginGroupName,OriginName=OriginName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, OriginName=OriginName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, OriginName=OriginName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOrigin_GetViaIdentity.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOrigin_GetViaIdentity.cs new file mode 100644 index 000000000000..e12dc3f6703c --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOrigin_GetViaIdentity.cs @@ -0,0 +1,390 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Gets an existing origin within an origin group. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnOrigin_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing origin within an origin group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnOrigin_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnOrigin_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AfdOriginsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.OriginGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OriginGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.OriginName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OriginName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AfdOriginsGet(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.OriginGroupName ?? null, InputObject.OriginName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOrigin_List.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOrigin_List.cs new file mode 100644 index 000000000000..01765b366da7 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnOrigin_List.cs @@ -0,0 +1,441 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Lists all of the existing origins within an origin group. + /// + /// [OpenAPI] ListByOriginGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnOrigin_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Lists all of the existing origins within an origin group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnOrigin_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _originGroupName; + + /// Name of the origin group which is unique within the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin group which is unique within the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin group which is unique within the profile.", + SerializedName = @"originGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string OriginGroupName { get => this._originGroupName; set => this._originGroupName = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnOrigin_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdOriginsListByOriginGroup(ResourceGroupName, ProfileName, OriginGroupName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,OriginGroupName=OriginGroupName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdOriginsListByOriginGroup_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnProfileResourceUsage_List.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnProfileResourceUsage_List.cs new file mode 100644 index 000000000000..a3d73476e1f1 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnProfileResourceUsage_List.cs @@ -0,0 +1,432 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. + /// + /// + /// [OpenAPI] ListResourceUsage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/usages" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnProfileResourceUsage_List", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnProfileResourceUsage_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnProfileResourceUsage_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdProfilesListResourceUsage' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdProfilesListResourceUsage(ResourceGroupName, ProfileName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdProfilesListResourceUsage_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRoute_Get.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRoute_Get.cs new file mode 100644 index 000000000000..804983c4c4e2 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRoute_Get.cs @@ -0,0 +1,437 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor + /// endpoint. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnRoute_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnRoute_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the routing rule. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the routing rule.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the routing rule.", + SerializedName = @"routeName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RouteName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnRoute_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RoutesGet(ResourceGroupName, ProfileName, EndpointName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRoute_GetViaIdentity.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRoute_GetViaIdentity.cs new file mode 100644 index 000000000000..4b5aa2238441 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRoute_GetViaIdentity.cs @@ -0,0 +1,393 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor + /// endpoint. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnRoute_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnRoute_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnRoute_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.RoutesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.RouteName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.RouteName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.RoutesGet(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.RouteName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRoute_List.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRoute_List.cs new file mode 100644 index 000000000000..3aa0d41bfdb5 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRoute_List.cs @@ -0,0 +1,441 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Lists all of the existing origins within a profile. + /// + /// [OpenAPI] ListByEndpoint=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnRoute_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Lists all of the existing origins within a profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnRoute_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnRoute_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RoutesListByEndpoint(ResourceGroupName, ProfileName, EndpointName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RoutesListByEndpoint_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRuleSetResourceUsage_List.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRuleSetResourceUsage_List.cs new file mode 100644 index 000000000000..2e7e7914b911 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRuleSetResourceUsage_List.cs @@ -0,0 +1,446 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. + /// + /// + /// [OpenAPI] ListResourceUsage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/usages" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnRuleSetResourceUsage_List", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnRuleSetResourceUsage_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _ruleSetName; + + /// Name of the rule set under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the rule set under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the rule set under the profile which is unique globally.", + SerializedName = @"ruleSetName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string RuleSetName { get => this._ruleSetName; set => this._ruleSetName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnRuleSetResourceUsage_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RuleSetsListResourceUsage' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RuleSetsListResourceUsage(ResourceGroupName, ProfileName, RuleSetName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,RuleSetName=RuleSetName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, RuleSetName=RuleSetName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, RuleSetName=RuleSetName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RuleSetsListResourceUsage_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRuleSet_Get.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRuleSet_Get.cs new file mode 100644 index 000000000000..1e48baca50c7 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRuleSet_Get.cs @@ -0,0 +1,423 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group + /// and profile. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnRuleSet_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnRuleSet_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the rule set under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the rule set under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the rule set under the profile which is unique globally.", + SerializedName = @"ruleSetName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleSetName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnRuleSet_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RuleSetsGet(ResourceGroupName, ProfileName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRuleSet_GetViaIdentity.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRuleSet_GetViaIdentity.cs new file mode 100644 index 000000000000..1d15b3959f20 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRuleSet_GetViaIdentity.cs @@ -0,0 +1,389 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group + /// and profile. + /// + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnRuleSet_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnRuleSet_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnRuleSet_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.RuleSetsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.RuleSetName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.RuleSetName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.RuleSetsGet(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.RuleSetName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRuleSet_List.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRuleSet_List.cs new file mode 100644 index 000000000000..e17528701c09 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRuleSet_List.cs @@ -0,0 +1,427 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Lists existing AzureFrontDoor rule sets within a profile. + /// + /// [OpenAPI] ListByProfile=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnRuleSet_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Lists existing AzureFrontDoor rule sets within a profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnRuleSet_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnRuleSet_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RuleSetsListByProfile(ResourceGroupName, ProfileName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RuleSetsListByProfile_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRule_Get.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRule_Get.cs new file mode 100644 index 000000000000..7e6a2c785589 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRule_Get.cs @@ -0,0 +1,435 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Gets an existing delivery rule within a rule set. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnRule_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing delivery rule within a rule set.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnRule_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the delivery rule which is unique within the endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the delivery rule which is unique within the endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the delivery rule which is unique within the endpoint.", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _setName; + + /// Name of the rule set under the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the rule set under the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the rule set under the profile.", + SerializedName = @"ruleSetName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleSetName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SetName { get => this._setName; set => this._setName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnRule_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RulesGet(ResourceGroupName, ProfileName, SetName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,SetName=SetName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SetName=SetName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SetName=SetName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRule_GetViaIdentity.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRule_GetViaIdentity.cs new file mode 100644 index 000000000000..5034f4e1c2b7 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRule_GetViaIdentity.cs @@ -0,0 +1,390 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Gets an existing delivery rule within a rule set. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnRule_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing delivery rule within a rule set.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnRule_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnRule_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.RulesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.RuleSetName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.RuleSetName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.RuleName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.RuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.RulesGet(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.RuleSetName ?? null, InputObject.RuleName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRule_List.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRule_List.cs new file mode 100644 index 000000000000..dc7821a167df --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnRule_List.cs @@ -0,0 +1,442 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Lists all of the existing delivery rules within a rule set. + /// + /// [OpenAPI] ListByRuleSet=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnRule_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Lists all of the existing delivery rules within a rule set.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnRule_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _setName; + + /// Name of the rule set under the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the rule set under the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the rule set under the profile.", + SerializedName = @"ruleSetName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleSetName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SetName { get => this._setName; set => this._setName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnRule_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RulesListByRuleSet(ResourceGroupName, ProfileName, SetName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,SetName=SetName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SetName=SetName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SetName=SetName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RulesListByRuleSet_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecret_Get.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecret_Get.cs new file mode 100644 index 000000000000..8f26333c1507 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecret_Get.cs @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Gets an existing Secret within a profile. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnSecret_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing Secret within a profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnSecret_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Secret under the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Secret under the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Secret under the profile.", + SerializedName = @"secretName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SecretName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnSecret_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SecretsGet(ResourceGroupName, ProfileName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecret_GetViaIdentity.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecret_GetViaIdentity.cs new file mode 100644 index 000000000000..9336d33c7d31 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecret_GetViaIdentity.cs @@ -0,0 +1,386 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Gets an existing Secret within a profile. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnSecret_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing Secret within a profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnSecret_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnSecret_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.SecretsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SecretName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SecretName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.SecretsGet(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.SecretName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecret_List.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecret_List.cs new file mode 100644 index 000000000000..8fc60662ff60 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecret_List.cs @@ -0,0 +1,427 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Lists existing AzureFrontDoor secrets. + /// + /// [OpenAPI] ListByProfile=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnSecret_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Lists existing AzureFrontDoor secrets.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnSecret_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnSecret_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SecretsListByProfile(ResourceGroupName, ProfileName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SecretsListByProfile_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_Get.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_Get.cs new file mode 100644 index 000000000000..6486fe1f7a3c --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_Get.cs @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Gets an existing security policy within a profile. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnSecurityPolicy_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing security policy within a profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnSecurityPolicy_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the security policy under the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the security policy under the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the security policy under the profile.", + SerializedName = @"securityPolicyName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SecurityPolicyName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnSecurityPolicy_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SecurityPoliciesGet(ResourceGroupName, ProfileName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_GetViaIdentity.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_GetViaIdentity.cs new file mode 100644 index 000000000000..f6afd03b4ebe --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_GetViaIdentity.cs @@ -0,0 +1,386 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Gets an existing security policy within a profile. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnSecurityPolicy_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Gets an existing security policy within a profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnSecurityPolicy_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnSecurityPolicy_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.SecurityPoliciesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SecurityPolicyName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SecurityPolicyName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.SecurityPoliciesGet(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.SecurityPolicyName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_List.cs b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_List.cs new file mode 100644 index 000000000000..cd817eacf292 --- /dev/null +++ b/src/Cdn/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_List.cs @@ -0,0 +1,427 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Lists security policies associated with the profile + /// + /// [OpenAPI] ListByProfile=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzFrontDoorCdnSecurityPolicy_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Lists security policies associated with the profile")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class GetAzFrontDoorCdnSecurityPolicy_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzFrontDoorCdnSecurityPolicy_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SecurityPoliciesListByProfile(ResourceGroupName, ProfileName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SecurityPoliciesListByProfile_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/ImportAzCdnEndpointContent_Load.cs b/src/Cdn/generated/cmdlets/ImportAzCdnEndpointContent_Load.cs new file mode 100644 index 000000000000..a215f1b9a446 --- /dev/null +++ b/src/Cdn/generated/cmdlets/ImportAzCdnEndpointContent_Load.cs @@ -0,0 +1,503 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Pre-loads a content to CDN. Available for Verizon Profiles. + /// + /// [OpenAPI] LoadContent=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Import, @"AzCdnEndpointContent_Load", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Pre-loads a content to CDN. Available for Verizon Profiles.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class ImportAzCdnEndpointContent_Load : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters _contentFilePath; + + /// Parameters required for content load. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameters required for content load.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Parameters required for content load.", + SerializedName = @"contentFilePaths", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters ContentFilePath { get => this._contentFilePath; set => this._contentFilePath = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of ImportAzCdnEndpointContent_Load + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ImportAzCdnEndpointContent_Load Clone() + { + var clone = new ImportAzCdnEndpointContent_Load(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.SubscriptionId = this.SubscriptionId; + clone.ContentFilePath = this.ContentFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public ImportAzCdnEndpointContent_Load() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsLoadContent' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsLoadContent(ResourceGroupName, ProfileName, EndpointName, SubscriptionId, ContentFilePath, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,SubscriptionId=SubscriptionId,body=ContentFilePath}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=ContentFilePath }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=ContentFilePath }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/ImportAzCdnEndpointContent_LoadExpanded.cs b/src/Cdn/generated/cmdlets/ImportAzCdnEndpointContent_LoadExpanded.cs new file mode 100644 index 000000000000..c36c14d6d28e --- /dev/null +++ b/src/Cdn/generated/cmdlets/ImportAzCdnEndpointContent_LoadExpanded.cs @@ -0,0 +1,507 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Pre-loads a content to CDN. Available for Verizon Profiles. + /// + /// [OpenAPI] LoadContent=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Import, @"AzCdnEndpointContent_LoadExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Pre-loads a content to CDN. Available for Verizon Profiles.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class ImportAzCdnEndpointContent_LoadExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Parameters required for content load. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters _contentFilePathsBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The path to the content to be loaded. Path should be a relative file URL of the origin. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The path to the content to be loaded. Path should be a relative file URL of the origin.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The path to the content to be loaded. Path should be a relative file URL of the origin.", + SerializedName = @"contentPaths", + PossibleTypes = new [] { typeof(string) })] + public string[] ContentPath { get => _contentFilePathsBody.ContentPath ?? null /* arrayOf */; set => _contentFilePathsBody.ContentPath = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of ImportAzCdnEndpointContent_LoadExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ImportAzCdnEndpointContent_LoadExpanded Clone() + { + var clone = new ImportAzCdnEndpointContent_LoadExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._contentFilePathsBody = this._contentFilePathsBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public ImportAzCdnEndpointContent_LoadExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsLoadContent' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsLoadContent(ResourceGroupName, ProfileName, EndpointName, SubscriptionId, _contentFilePathsBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,SubscriptionId=SubscriptionId,body=_contentFilePathsBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=_contentFilePathsBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=_contentFilePathsBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/ImportAzCdnEndpointContent_LoadViaIdentity.cs b/src/Cdn/generated/cmdlets/ImportAzCdnEndpointContent_LoadViaIdentity.cs new file mode 100644 index 000000000000..8c143881a88e --- /dev/null +++ b/src/Cdn/generated/cmdlets/ImportAzCdnEndpointContent_LoadViaIdentity.cs @@ -0,0 +1,471 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Pre-loads a content to CDN. Available for Verizon Profiles. + /// + /// [OpenAPI] LoadContent=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Import, @"AzCdnEndpointContent_LoadViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Pre-loads a content to CDN. Available for Verizon Profiles.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class ImportAzCdnEndpointContent_LoadViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters _contentFilePath; + + /// Parameters required for content load. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameters required for content load.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Parameters required for content load.", + SerializedName = @"contentFilePaths", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters ContentFilePath { get => this._contentFilePath; set => this._contentFilePath = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of ImportAzCdnEndpointContent_LoadViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ImportAzCdnEndpointContent_LoadViaIdentity Clone() + { + var clone = new ImportAzCdnEndpointContent_LoadViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ContentFilePath = this.ContentFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public ImportAzCdnEndpointContent_LoadViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsLoadContent' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.EndpointsLoadContentViaIdentity(InputObject.Id, ContentFilePath, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.EndpointsLoadContent(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.SubscriptionId ?? null, ContentFilePath, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=ContentFilePath}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=ContentFilePath }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=ContentFilePath }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/ImportAzCdnEndpointContent_LoadViaIdentityExpanded.cs b/src/Cdn/generated/cmdlets/ImportAzCdnEndpointContent_LoadViaIdentityExpanded.cs new file mode 100644 index 000000000000..130b879639f0 --- /dev/null +++ b/src/Cdn/generated/cmdlets/ImportAzCdnEndpointContent_LoadViaIdentityExpanded.cs @@ -0,0 +1,475 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Pre-loads a content to CDN. Available for Verizon Profiles. + /// + /// [OpenAPI] LoadContent=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Import, @"AzCdnEndpointContent_LoadViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Pre-loads a content to CDN. Available for Verizon Profiles.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class ImportAzCdnEndpointContent_LoadViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Parameters required for content load. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters _contentFilePathsBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.LoadParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The path to the content to be loaded. Path should be a relative file URL of the origin. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The path to the content to be loaded. Path should be a relative file URL of the origin.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The path to the content to be loaded. Path should be a relative file URL of the origin.", + SerializedName = @"contentPaths", + PossibleTypes = new [] { typeof(string) })] + public string[] ContentPath { get => _contentFilePathsBody.ContentPath ?? null /* arrayOf */; set => _contentFilePathsBody.ContentPath = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of ImportAzCdnEndpointContent_LoadViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ImportAzCdnEndpointContent_LoadViaIdentityExpanded Clone() + { + var clone = new ImportAzCdnEndpointContent_LoadViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._contentFilePathsBody = this._contentFilePathsBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public ImportAzCdnEndpointContent_LoadViaIdentityExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsLoadContent' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.EndpointsLoadContentViaIdentity(InputObject.Id, _contentFilePathsBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.EndpointsLoadContent(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.SubscriptionId ?? null, _contentFilePathsBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_contentFilePathsBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_contentFilePathsBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_contentFilePathsBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/InvokeAzCdnSecretValidate_Secret.cs b/src/Cdn/generated/cmdlets/InvokeAzCdnSecretValidate_Secret.cs new file mode 100644 index 000000000000..cc51d0d7f8b4 --- /dev/null +++ b/src/Cdn/generated/cmdlets/InvokeAzCdnSecretValidate_Secret.cs @@ -0,0 +1,389 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Validate a Secret in the profile. + /// + /// [OpenAPI] Secret=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateSecret" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzCdnSecretValidate_Secret", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Validate a Secret in the profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class InvokeAzCdnSecretValidate_Secret : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput _validateSecretInput; + + /// Input of the secret to be validated. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Input of the secret to be validated.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Input of the secret to be validated.", + SerializedName = @"validateSecretInput", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput ValidateSecretInput { get => this._validateSecretInput; set => this._validateSecretInput = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzCdnSecretValidate_Secret() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ValidateSecret' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ValidateSecret(SubscriptionId, ValidateSecretInput, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,body=ValidateSecretInput}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=ValidateSecretInput }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=ValidateSecretInput }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/InvokeAzCdnSecretValidate_SecretExpanded.cs b/src/Cdn/generated/cmdlets/InvokeAzCdnSecretValidate_SecretExpanded.cs new file mode 100644 index 000000000000..19bfd03c8f11 --- /dev/null +++ b/src/Cdn/generated/cmdlets/InvokeAzCdnSecretValidate_SecretExpanded.cs @@ -0,0 +1,413 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Validate a Secret in the profile. + /// + /// [OpenAPI] Secret=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateSecret" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzCdnSecretValidate_SecretExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Validate a Secret in the profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class InvokeAzCdnSecretValidate_SecretExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Input of the secret to be validated. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput _validateSecretInputBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateSecretInput(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string SecretSourceId { get => _validateSecretInputBody.SecretSourceId ?? null; set => _validateSecretInputBody.SecretSourceId = value; } + + /// The secret type. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The secret type.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The secret type.", + SerializedName = @"secretType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType SecretType { get => _validateSecretInputBody.SecretType; set => _validateSecretInputBody.SecretType = value; } + + /// Secret version, if customer is using a specific version. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Secret version, if customer is using a specific version.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Secret version, if customer is using a specific version.", + SerializedName = @"secretVersion", + PossibleTypes = new [] { typeof(string) })] + public string SecretVersion { get => _validateSecretInputBody.SecretVersion ?? null; set => _validateSecretInputBody.SecretVersion = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzCdnSecretValidate_SecretExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ValidateSecret' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ValidateSecret(SubscriptionId, _validateSecretInputBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,body=_validateSecretInputBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_validateSecretInputBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_validateSecretInputBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/InvokeAzCdnSecretValidate_SecretViaIdentity.cs b/src/Cdn/generated/cmdlets/InvokeAzCdnSecretValidate_SecretViaIdentity.cs new file mode 100644 index 000000000000..df782c0d3c12 --- /dev/null +++ b/src/Cdn/generated/cmdlets/InvokeAzCdnSecretValidate_SecretViaIdentity.cs @@ -0,0 +1,391 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Validate a Secret in the profile. + /// + /// [OpenAPI] Secret=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateSecret" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzCdnSecretValidate_SecretViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Validate a Secret in the profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class InvokeAzCdnSecretValidate_SecretViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput _validateSecretInput; + + /// Input of the secret to be validated. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Input of the secret to be validated.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Input of the secret to be validated.", + SerializedName = @"validateSecretInput", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput ValidateSecretInput { get => this._validateSecretInput; set => this._validateSecretInput = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzCdnSecretValidate_SecretViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ValidateSecret' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ValidateSecretViaIdentity(InputObject.Id, ValidateSecretInput, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ValidateSecret(InputObject.SubscriptionId ?? null, ValidateSecretInput, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=ValidateSecretInput}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=ValidateSecretInput }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=ValidateSecretInput }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/InvokeAzCdnSecretValidate_SecretViaIdentityExpanded.cs b/src/Cdn/generated/cmdlets/InvokeAzCdnSecretValidate_SecretViaIdentityExpanded.cs new file mode 100644 index 000000000000..eb5a599286fc --- /dev/null +++ b/src/Cdn/generated/cmdlets/InvokeAzCdnSecretValidate_SecretViaIdentityExpanded.cs @@ -0,0 +1,415 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Validate a Secret in the profile. + /// + /// [OpenAPI] Secret=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateSecret" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzCdnSecretValidate_SecretViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Validate a Secret in the profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class InvokeAzCdnSecretValidate_SecretViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Input of the secret to be validated. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput _validateSecretInputBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateSecretInput(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string SecretSourceId { get => _validateSecretInputBody.SecretSourceId ?? null; set => _validateSecretInputBody.SecretSourceId = value; } + + /// The secret type. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The secret type.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The secret type.", + SerializedName = @"secretType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType SecretType { get => _validateSecretInputBody.SecretType; set => _validateSecretInputBody.SecretType = value; } + + /// Secret version, if customer is using a specific version. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Secret version, if customer is using a specific version.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Secret version, if customer is using a specific version.", + SerializedName = @"secretVersion", + PossibleTypes = new [] { typeof(string) })] + public string SecretVersion { get => _validateSecretInputBody.SecretVersion ?? null; set => _validateSecretInputBody.SecretVersion = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzCdnSecretValidate_SecretViaIdentityExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ValidateSecret' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ValidateSecretViaIdentity(InputObject.Id, _validateSecretInputBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ValidateSecret(InputObject.SubscriptionId ?? null, _validateSecretInputBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_validateSecretInputBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_validateSecretInputBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_validateSecretInputBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/NewAzCdnCustomDomain_CreateExpanded1.cs b/src/Cdn/generated/cmdlets/NewAzCdnCustomDomain_CreateExpanded1.cs new file mode 100644 index 000000000000..fd0080304608 --- /dev/null +++ b/src/Cdn/generated/cmdlets/NewAzCdnCustomDomain_CreateExpanded1.cs @@ -0,0 +1,515 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Creates a new custom domain within an endpoint. + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzCdnCustomDomain_CreateExpanded1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Creates a new custom domain within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class NewAzCdnCustomDomain_CreateExpanded1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The customDomain JSON object required for custom domain creation or update. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainParameters _customDomainPropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CustomDomainParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// The host name of the custom domain. Must be a domain name. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The host name of the custom domain. Must be a domain name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host name of the custom domain. Must be a domain name.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + public string HostName { get => _customDomainPropertiesBody.HostName ?? null; set => _customDomainPropertiesBody.HostName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the custom domain within an endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the custom domain within an endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the custom domain within an endpoint.", + SerializedName = @"customDomainName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("CustomDomainName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzCdnCustomDomain_CreateExpanded1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzCdnCustomDomain_CreateExpanded1 Clone() + { + var clone = new NewAzCdnCustomDomain_CreateExpanded1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._customDomainPropertiesBody = this._customDomainPropertiesBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzCdnCustomDomain_CreateExpanded1() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CustomDomainsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CustomDomainsCreate(ResourceGroupName, ProfileName, EndpointName, Name, SubscriptionId, _customDomainPropertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,Name=Name,SubscriptionId=SubscriptionId,body=_customDomainPropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId, body=_customDomainPropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId, body=_customDomainPropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/NewAzCdnEndpoint_CreateExpanded1.cs b/src/Cdn/generated/cmdlets/NewAzCdnEndpoint_CreateExpanded1.cs new file mode 100644 index 000000000000..9fafe03f41e6 --- /dev/null +++ b/src/Cdn/generated/cmdlets/NewAzCdnEndpoint_CreateExpanded1.cs @@ -0,0 +1,745 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. + /// + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzCdnEndpoint_CreateExpanded1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class NewAzCdnEndpoint_CreateExpanded1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// + /// CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + /// caching and delivery behavior. The CDN endpoint uses the URL format .azureedge.net. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint _endpointBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Endpoint(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of content types on which compression applies. The value should be a valid MIME type.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of content types on which compression applies. The value should be a valid MIME type.", + SerializedName = @"contentTypesToCompress", + PossibleTypes = new [] { typeof(string) })] + public string[] ContentTypesToCompress { get => _endpointBody.ContentTypesToCompress ?? null /* arrayOf */; set => _endpointBody.ContentTypesToCompress = value; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string DefaultOriginGroupId { get => _endpointBody.DefaultOriginGroupId ?? null; set => _endpointBody.DefaultOriginGroupId = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// User-friendly description of the policy. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "User-friendly description of the policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"User-friendly description of the policy.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string DeliveryPolicyDescription { get => _endpointBody.DeliveryPolicyDescription ?? null; set => _endpointBody.DeliveryPolicyDescription = value; } + + /// A list of the delivery rules. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of the delivery rules.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of the delivery rules.", + SerializedName = @"rules", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] DeliveryPolicyRule { get => _endpointBody.DeliveryPolicyRule ?? null /* arrayOf */; set => _endpointBody.DeliveryPolicyRule = value; } + + /// + /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified + /// path or content, e.g. block APAC for path /pictures/ + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/", + SerializedName = @"geoFilters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[] GeoFilter { get => _endpointBody.GeoFilter ?? null /* arrayOf */; set => _endpointBody.GeoFilter = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will + /// be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content + /// is smaller than 1 byte or larger than 1 MB. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB.", + SerializedName = @"isCompressionEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsCompressionEnabled { get => _endpointBody.IsCompressionEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _endpointBody.IsCompressionEnabled = value; } + + /// + /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.", + SerializedName = @"isHttpAllowed", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsHttpAllowed { get => _endpointBody.IsHttpAllowed ?? default(global::System.Management.Automation.SwitchParameter); set => _endpointBody.IsHttpAllowed = value; } + + /// + /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.", + SerializedName = @"isHttpsAllowed", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsHttpsAllowed { get => _endpointBody.IsHttpsAllowed ?? default(global::System.Management.Automation.SwitchParameter); set => _endpointBody.IsHttpsAllowed = value; } + + /// Resource location. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Resource location.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Resource location.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + public string Location { get => _endpointBody.Location ?? null; set => _endpointBody.Location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("EndpointName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this + /// information, CDN can apply scenario driven optimization. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization.", + SerializedName = @"optimizationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType OptimizationType { get => _endpointBody.OptimizationType ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType)""); set => _endpointBody.OptimizationType = value; } + + /// The source of the content being delivered via CDN. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The source of the content being delivered via CDN.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The source of the content being delivered via CDN.", + SerializedName = @"origins", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin[] Origin { get => _endpointBody.Origin ?? null /* arrayOf */; set => _endpointBody.Origin = value; } + + /// + /// The origin groups comprising of origins that are used for load balancing the traffic based on availability. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The origin groups comprising of origins that are used for load balancing the traffic based on availability.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The origin groups comprising of origins that are used for load balancing the traffic based on availability.", + SerializedName = @"originGroups", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup[] OriginGroup { get => _endpointBody.OriginGroup ?? null /* arrayOf */; set => _endpointBody.OriginGroup = value; } + + /// + /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses + /// single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname + /// determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header + /// value to match the origin hostname by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default.", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + public string OriginHostHeader { get => _endpointBody.OriginHostHeader ?? null; set => _endpointBody.OriginHostHeader = value; } + + /// + /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.", + SerializedName = @"originPath", + PossibleTypes = new [] { typeof(string) })] + public string OriginPath { get => _endpointBody.OriginPath ?? null; set => _endpointBody.OriginPath = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// + /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal + /// routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin.", + SerializedName = @"probePath", + PossibleTypes = new [] { typeof(string) })] + public string ProbePath { get => _endpointBody.ProbePath ?? null; set => _endpointBody.ProbePath = value; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching + /// to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL.", + SerializedName = @"queryStringCachingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior QueryStringCachingBehavior { get => _endpointBody.QueryStringCachingBehavior ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior)""); set => _endpointBody.QueryStringCachingBehavior = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags Tag { get => _endpointBody.Tag ?? null /* object */; set => _endpointBody.Tag = value; } + + /// List of keys used to validate the signed URL hashes. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of keys used to validate the signed URL hashes.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of keys used to validate the signed URL hashes.", + SerializedName = @"urlSigningKeys", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[] UrlSigningKey { get => _endpointBody.UrlSigningKey ?? null /* arrayOf */; set => _endpointBody.UrlSigningKey = value; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string WebApplicationFirewallPolicyLinkId { get => _endpointBody.WebApplicationFirewallPolicyLinkId ?? null; set => _endpointBody.WebApplicationFirewallPolicyLinkId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzCdnEndpoint_CreateExpanded1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzCdnEndpoint_CreateExpanded1 Clone() + { + var clone = new NewAzCdnEndpoint_CreateExpanded1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._endpointBody = this._endpointBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzCdnEndpoint_CreateExpanded1() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsCreate(ResourceGroupName, ProfileName, Name, SubscriptionId, _endpointBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Name=Name,SubscriptionId=SubscriptionId,body=_endpointBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId, body=_endpointBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId, body=_endpointBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/NewAzCdnOriginGroup_CreateExpanded1.cs b/src/Cdn/generated/cmdlets/NewAzCdnOriginGroup_CreateExpanded1.cs new file mode 100644 index 000000000000..61e7da53b5c0 --- /dev/null +++ b/src/Cdn/generated/cmdlets/NewAzCdnOriginGroup_CreateExpanded1.cs @@ -0,0 +1,559 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Creates a new origin group within the specified endpoint. + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzCdnOriginGroup_CreateExpanded1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Creates a new origin group within the specified endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class NewAzCdnOriginGroup_CreateExpanded1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// + /// Origin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup _originGroupBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroup(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Health probe settings to the origin that is used to determine the health of the origin.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health probe settings to the origin that is used to determine the health of the origin.", + SerializedName = @"healthProbeSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get => _originGroupBody.HealthProbeSetting ?? null /* object */; set => _originGroupBody.HealthProbeSetting = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the origin group which is unique within the endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin group which is unique within the endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin group which is unique within the endpoint.", + SerializedName = @"originGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OriginGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// The source of the content being delivered via CDN within given origin group. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The source of the content being delivered via CDN within given origin group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The source of the content being delivered via CDN within given origin group.", + SerializedName = @"origins", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get => _originGroupBody.Origin ?? null /* arrayOf */; set => _originGroupBody.Origin = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is + /// currently not supported. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported.", + SerializedName = @"responseBasedOriginErrorDetectionSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get => _originGroupBody.ResponseBasedOriginErrorDetectionSetting ?? null /* object */; set => _originGroupBody.ResponseBasedOriginErrorDetectionSetting = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.", + SerializedName = @"trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + PossibleTypes = new [] { typeof(int) })] + public int TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get => _originGroupBody.TrafficRestorationTimeToHealedOrNewEndpointsInMinute ?? default(int); set => _originGroupBody.TrafficRestorationTimeToHealedOrNewEndpointsInMinute = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzCdnOriginGroup_CreateExpanded1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzCdnOriginGroup_CreateExpanded1 Clone() + { + var clone = new NewAzCdnOriginGroup_CreateExpanded1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._originGroupBody = this._originGroupBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzCdnOriginGroup_CreateExpanded1() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OriginGroupsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OriginGroupsCreate(ResourceGroupName, ProfileName, EndpointName, Name, SubscriptionId, _originGroupBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,Name=Name,SubscriptionId=SubscriptionId,body=_originGroupBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId, body=_originGroupBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId, body=_originGroupBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/NewAzCdnOrigin_CreateExpanded1.cs b/src/Cdn/generated/cmdlets/NewAzCdnOrigin_CreateExpanded1.cs new file mode 100644 index 000000000000..9096dddc5bbf --- /dev/null +++ b/src/Cdn/generated/cmdlets/NewAzCdnOrigin_CreateExpanded1.cs @@ -0,0 +1,648 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Creates a new origin within the specified endpoint. + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzCdnOrigin_CreateExpanded1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Creates a new origin within the specified endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class NewAzCdnOrigin_CreateExpanded1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// + /// CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not + /// have the requested content cached, they attempt to fetch it from one or more of the configured origins. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin _originBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Origin(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Origin is enabled for load balancing or not + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Origin is enabled for load balancing or not")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Origin is enabled for load balancing or not", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter Enabled { get => _originBody.Enabled ?? default(global::System.Management.Automation.SwitchParameter); set => _originBody.Enabled = value; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + public string HostName { get => _originBody.HostName ?? null; set => _originBody.HostName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// The value of the HTTP port. Must be between 1 and 65535. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The value of the HTTP port. Must be between 1 and 65535.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTP port. Must be between 1 and 65535.", + SerializedName = @"httpPort", + PossibleTypes = new [] { typeof(int) })] + public int HttpPort { get => _originBody.HttpPort ?? default(int); set => _originBody.HttpPort = value; } + + /// The value of the HTTPS port. Must be between 1 and 65535. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The value of the HTTPS port. Must be between 1 and 65535.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTPS port. Must be between 1 and 65535.", + SerializedName = @"httpsPort", + PossibleTypes = new [] { typeof(int) })] + public int HttpsPort { get => _originBody.HttpsPort ?? default(int); set => _originBody.HttpsPort = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the origin that is unique within the endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin that is unique within the endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin that is unique within the endpoint.", + SerializedName = @"originName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OriginName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + public string OriginHostHeader { get => _originBody.HostHeader ?? null; set => _originBody.HostHeader = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5", + SerializedName = @"priority", + PossibleTypes = new [] { typeof(int) })] + public int Priority { get => _originBody.Priority ?? default(int); set => _originBody.Priority = value; } + + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'", + SerializedName = @"privateLinkAlias", + PossibleTypes = new [] { typeof(string) })] + public string PrivateLinkAlias { get => _originBody.PrivateLinkAlias ?? null; set => _originBody.PrivateLinkAlias = value; } + + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A custom message to be included in the approval request to connect to the Private Link.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A custom message to be included in the approval request to connect to the Private Link.", + SerializedName = @"privateLinkApprovalMessage", + PossibleTypes = new [] { typeof(string) })] + public string PrivateLinkApprovalMessage { get => _originBody.PrivateLinkApprovalMessage ?? null; set => _originBody.PrivateLinkApprovalMessage = value; } + + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated", + SerializedName = @"privateLinkLocation", + PossibleTypes = new [] { typeof(string) })] + public string PrivateLinkLocation { get => _originBody.PrivateLinkLocation ?? null; set => _originBody.PrivateLinkLocation = value; } + + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'", + SerializedName = @"privateLinkResourceId", + PossibleTypes = new [] { typeof(string) })] + public string PrivateLinkResourceId { get => _originBody.PrivateLinkResourceId ?? null; set => _originBody.PrivateLinkResourceId = value; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Weight of the origin in given origin group for load balancing. Must be between 1 and 1000")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Weight of the origin in given origin group for load balancing. Must be between 1 and 1000", + SerializedName = @"weight", + PossibleTypes = new [] { typeof(int) })] + public int Weight { get => _originBody.Weight ?? default(int); set => _originBody.Weight = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzCdnOrigin_CreateExpanded1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzCdnOrigin_CreateExpanded1 Clone() + { + var clone = new NewAzCdnOrigin_CreateExpanded1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._originBody = this._originBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzCdnOrigin_CreateExpanded1() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OriginsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OriginsCreate(ResourceGroupName, ProfileName, EndpointName, Name, SubscriptionId, _originBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,Name=Name,SubscriptionId=SubscriptionId,body=_originBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId, body=_originBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId, body=_originBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/NewAzCdnProfileSsoUri_Generate.cs b/src/Cdn/generated/cmdlets/NewAzCdnProfileSsoUri_Generate.cs new file mode 100644 index 000000000000..b9a7425ce336 --- /dev/null +++ b/src/Cdn/generated/cmdlets/NewAzCdnProfileSsoUri_Generate.cs @@ -0,0 +1,409 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// 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. + /// + /// + /// [OpenAPI] GenerateSsoUri=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzCdnProfileSsoUri_Generate", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(string))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.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.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class NewAzCdnProfileSsoUri_Generate : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzCdnProfileSsoUri_Generate() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProfilesGenerateSsoUri' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProfilesGenerateSsoUri(ResourceGroupName, ProfileName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISsoUri + WriteObject((await response).Value); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/NewAzCdnProfileSsoUri_GenerateViaIdentity.cs b/src/Cdn/generated/cmdlets/NewAzCdnProfileSsoUri_GenerateViaIdentity.cs new file mode 100644 index 000000000000..a15512789a75 --- /dev/null +++ b/src/Cdn/generated/cmdlets/NewAzCdnProfileSsoUri_GenerateViaIdentity.cs @@ -0,0 +1,391 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// 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. + /// + /// + /// [OpenAPI] GenerateSsoUri=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzCdnProfileSsoUri_GenerateViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(string))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.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.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class NewAzCdnProfileSsoUri_GenerateViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzCdnProfileSsoUri_GenerateViaIdentity() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProfilesGenerateSsoUri' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProfilesGenerateSsoUriViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProfilesGenerateSsoUri(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISsoUri + WriteObject((await response).Value); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/NewAzCdnProfile_CreateExpanded.cs b/src/Cdn/generated/cmdlets/NewAzCdnProfile_CreateExpanded.cs new file mode 100644 index 000000000000..b5f648db5953 --- /dev/null +++ b/src/Cdn/generated/cmdlets/NewAzCdnProfile_CreateExpanded.cs @@ -0,0 +1,528 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// 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. + /// + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzCdnProfile_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"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.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class NewAzCdnProfile_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A profile is a logical grouping of endpoints that share the same settings. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile _profileBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Profile(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Resource location. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Resource location.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Resource location.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + public string Location { get => _profileBody.Location ?? null; set => _profileBody.Location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProfileName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns.", + SerializedName = @"originResponseTimeoutSeconds", + PossibleTypes = new [] { typeof(int) })] + public int OriginResponseTimeoutSecond { get => _profileBody.OriginResponseTimeoutSecond ?? default(int); set => _profileBody.OriginResponseTimeoutSecond = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Name of the pricing tier. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of the pricing tier.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the pricing tier.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName SkuName { get => _profileBody.SkuName ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName)""); set => _profileBody.SkuName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags Tag { get => _profileBody.Tag ?? null /* object */; set => _profileBody.Tag = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzCdnProfile_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzCdnProfile_CreateExpanded Clone() + { + var clone = new NewAzCdnProfile_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._profileBody = this._profileBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzCdnProfile_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProfilesCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProfilesCreate(ResourceGroupName, Name, SubscriptionId, _profileBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,Name=Name,SubscriptionId=SubscriptionId,body=_profileBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId, body=_profileBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId, body=_profileBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnCustomDomain_CreateExpanded.cs b/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnCustomDomain_CreateExpanded.cs new file mode 100644 index 000000000000..4f94c8a92311 --- /dev/null +++ b/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnCustomDomain_CreateExpanded.cs @@ -0,0 +1,539 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Creates a new domain within the specified profile. + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzFrontDoorCdnCustomDomain_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Creates a new domain within the specified profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class NewAzFrontDoorCdnCustomDomain_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// + /// Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain _customDomainBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomain(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string AzureDnsZoneId { get => _customDomainBody.AzureDnsZoneId ?? null; set => _customDomainBody.AzureDnsZoneId = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _customDomainName; + + /// Name of the domain under the profile which is unique globally + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the domain under the profile which is unique globally")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the domain under the profile which is unique globally", + SerializedName = @"customDomainName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string CustomDomainName { get => this._customDomainName; set => this._customDomainName = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The host name of the domain. Must be a domain name. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The host name of the domain. Must be a domain name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host name of the domain. Must be a domain name.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + public string HostName { get => _customDomainBody.HostName ?? null; set => _customDomainBody.HostName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string PropertiesPreValidatedCustomDomainResourceId { get => _customDomainBody.PropertiesPreValidatedCustomDomainResourceIdId ?? null; set => _customDomainBody.PropertiesPreValidatedCustomDomainResourceIdId = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own + /// certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default.", + SerializedName = @"tlsSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters TlsSetting { get => _customDomainBody.TlsSetting ?? null /* object */; set => _customDomainBody.TlsSetting = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzFrontDoorCdnCustomDomain_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzFrontDoorCdnCustomDomain_CreateExpanded Clone() + { + var clone = new NewAzFrontDoorCdnCustomDomain_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._customDomainBody = this._customDomainBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.CustomDomainName = this.CustomDomainName; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzFrontDoorCdnCustomDomain_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdCustomDomainsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdCustomDomainsCreate(ResourceGroupName, ProfileName, CustomDomainName, SubscriptionId, _customDomainBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,CustomDomainName=CustomDomainName,SubscriptionId=SubscriptionId,body=_customDomainBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, CustomDomainName=CustomDomainName, SubscriptionId=SubscriptionId, body=_customDomainBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, CustomDomainName=CustomDomainName, SubscriptionId=SubscriptionId, body=_customDomainBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnEndpoint_CreateExpanded.cs b/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnEndpoint_CreateExpanded.cs new file mode 100644 index 000000000000..d5a27da7a76b --- /dev/null +++ b/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnEndpoint_CreateExpanded.cs @@ -0,0 +1,545 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group + /// and profile. + /// + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzFrontDoorCdnEndpoint_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class NewAzFrontDoorCdnEndpoint_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// + /// CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content + /// caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format .azureedge.net. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint _endpointBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpoint(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the endpoint name reuse scope. The default value is TenantReuse.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the endpoint name reuse scope. The default value is TenantReuse.", + SerializedName = @"autoGeneratedDomainNameLabelScope", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope AutoGeneratedDomainNameLabelScope { get => _endpointBody.AutoGeneratedDomainNameLabelScope ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope)""); set => _endpointBody.AutoGeneratedDomainNameLabelScope = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'", + SerializedName = @"enabledState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState EnabledState { get => _endpointBody.EnabledState ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); set => _endpointBody.EnabledState = value; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Resource location. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Resource location.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Resource location.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + public string Location { get => _endpointBody.Location ?? null; set => _endpointBody.Location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags Tag { get => _endpointBody.Tag ?? null /* object */; set => _endpointBody.Tag = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzFrontDoorCdnEndpoint_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzFrontDoorCdnEndpoint_CreateExpanded Clone() + { + var clone = new NewAzFrontDoorCdnEndpoint_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._endpointBody = this._endpointBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzFrontDoorCdnEndpoint_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdEndpointsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdEndpointsCreate(ResourceGroupName, ProfileName, EndpointName, SubscriptionId, _endpointBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,SubscriptionId=SubscriptionId,body=_endpointBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=_endpointBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=_endpointBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnOriginGroup_CreateExpanded.cs b/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnOriginGroup_CreateExpanded.cs new file mode 100644 index 000000000000..c23aedc2581c --- /dev/null +++ b/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnOriginGroup_CreateExpanded.cs @@ -0,0 +1,544 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Creates a new origin group within the specified profile. + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzFrontDoorCdnOriginGroup_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Creates a new origin group within the specified profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class NewAzFrontDoorCdnOriginGroup_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// + /// AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup _originGroupBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroup(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Health probe settings to the origin that is used to determine the health of the origin.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health probe settings to the origin that is used to determine the health of the origin.", + SerializedName = @"healthProbeSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get => _originGroupBody.HealthProbeSetting ?? null /* object */; set => _originGroupBody.HealthProbeSetting = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Load balancing settings for a backend pool + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Load balancing settings for a backend pool")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Load balancing settings for a backend pool", + SerializedName = @"loadBalancingSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters LoadBalancingSetting { get => _originGroupBody.LoadBalancingSetting ?? null /* object */; set => _originGroupBody.LoadBalancingSetting = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Backing field for property. + private string _originGroupName; + + /// Name of the origin group which is unique within the endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin group which is unique within the endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin group which is unique within the endpoint.", + SerializedName = @"originGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string OriginGroupName { get => this._originGroupName; set => this._originGroupName = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'", + SerializedName = @"sessionAffinityState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState SessionAffinityState { get => _originGroupBody.SessionAffinityState ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); set => _originGroupBody.SessionAffinityState = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.", + SerializedName = @"trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + PossibleTypes = new [] { typeof(int) })] + public int TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get => _originGroupBody.TrafficRestorationTimeToHealedOrNewEndpointsInMinute ?? default(int); set => _originGroupBody.TrafficRestorationTimeToHealedOrNewEndpointsInMinute = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzFrontDoorCdnOriginGroup_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzFrontDoorCdnOriginGroup_CreateExpanded Clone() + { + var clone = new NewAzFrontDoorCdnOriginGroup_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._originGroupBody = this._originGroupBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.OriginGroupName = this.OriginGroupName; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzFrontDoorCdnOriginGroup_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdOriginGroupsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdOriginGroupsCreate(ResourceGroupName, ProfileName, OriginGroupName, SubscriptionId, _originGroupBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,OriginGroupName=OriginGroupName,SubscriptionId=SubscriptionId,body=_originGroupBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, SubscriptionId=SubscriptionId, body=_originGroupBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, SubscriptionId=SubscriptionId, body=_originGroupBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnOrigin_CreateExpanded.cs b/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnOrigin_CreateExpanded.cs new file mode 100644 index 000000000000..4b101aedd320 --- /dev/null +++ b/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnOrigin_CreateExpanded.cs @@ -0,0 +1,685 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Creates a new origin within the specified origin group. + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzFrontDoorCdnOrigin_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Creates a new origin within the specified origin group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class NewAzFrontDoorCdnOrigin_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// + /// CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not + /// have the requested content cached, they attempt to fetch it from one or more of the configured origins. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin _originBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOrigin(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string AzureOriginId { get => _originBody.AzureOriginId ?? null; set => _originBody.AzureOriginId = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled + /// if there is a single enabled backend in single enabled backend pool. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool.", + SerializedName = @"enabledState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState EnabledState { get => _originBody.EnabledState ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); set => _originBody.EnabledState = value; } + + /// Whether to enable certificate name check at origin level + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to enable certificate name check at origin level")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable certificate name check at origin level", + SerializedName = @"enforceCertificateNameCheck", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter EnforceCertificateNameCheck { get => _originBody.EnforceCertificateNameCheck ?? default(global::System.Management.Automation.SwitchParameter); set => _originBody.EnforceCertificateNameCheck = value; } + + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + public string HostName { get => _originBody.HostName ?? null; set => _originBody.HostName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// The value of the HTTP port. Must be between 1 and 65535. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The value of the HTTP port. Must be between 1 and 65535.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTP port. Must be between 1 and 65535.", + SerializedName = @"httpPort", + PossibleTypes = new [] { typeof(int) })] + public int HttpPort { get => _originBody.HttpPort ?? default(int); set => _originBody.HttpPort = value; } + + /// The value of the HTTPS port. Must be between 1 and 65535. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The value of the HTTPS port. Must be between 1 and 65535.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTPS port. Must be between 1 and 65535.", + SerializedName = @"httpsPort", + PossibleTypes = new [] { typeof(int) })] + public int HttpsPort { get => _originBody.HttpsPort ?? default(int); set => _originBody.HttpsPort = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Backing field for property. + private string _originGroupName; + + /// Name of the origin group which is unique within the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin group which is unique within the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin group which is unique within the profile.", + SerializedName = @"originGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string OriginGroupName { get => this._originGroupName; set => this._originGroupName = value; } + + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + public string OriginHostHeader { get => _originBody.OriginHostHeader ?? null; set => _originBody.OriginHostHeader = value; } + + /// Backing field for property. + private string _originName; + + /// Name of the origin that is unique within the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin that is unique within the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin that is unique within the profile.", + SerializedName = @"originName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string OriginName { get => this._originName; set => this._originName = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5", + SerializedName = @"priority", + PossibleTypes = new [] { typeof(int) })] + public int Priority { get => _originBody.Priority ?? default(int); set => _originBody.Priority = value; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string PrivateLinkId { get => _originBody.PrivateLinkId ?? null; set => _originBody.PrivateLinkId = value; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// + /// The group id from the provider of resource the shared private link resource is for. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The group id from the provider of resource the shared private link resource is for.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The group id from the provider of resource the shared private link resource is for.", + SerializedName = @"groupId", + PossibleTypes = new [] { typeof(string) })] + public string SharedPrivateLinkResourceGroupId { get => _originBody.SharedPrivateLinkResourceGroupId ?? null; set => _originBody.SharedPrivateLinkResourceGroupId = value; } + + /// The location of the shared private link resource + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The location of the shared private link resource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location of the shared private link resource", + SerializedName = @"privateLinkLocation", + PossibleTypes = new [] { typeof(string) })] + public string SharedPrivateLinkResourcePrivateLinkLocation { get => _originBody.SharedPrivateLinkResourcePrivateLinkLocation ?? null; set => _originBody.SharedPrivateLinkResourcePrivateLinkLocation = value; } + + /// + /// The request message for requesting approval of the shared private link resource. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The request message for requesting approval of the shared private link resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The request message for requesting approval of the shared private link resource.", + SerializedName = @"requestMessage", + PossibleTypes = new [] { typeof(string) })] + public string SharedPrivateLinkResourceRequestMessage { get => _originBody.SharedPrivateLinkResourceRequestMessage ?? null; set => _originBody.SharedPrivateLinkResourceRequestMessage = value; } + + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus SharedPrivateLinkResourceStatus { get => _originBody.SharedPrivateLinkResourceStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus)""); set => _originBody.SharedPrivateLinkResourceStatus = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Weight of the origin in given origin group for load balancing. Must be between 1 and 1000")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Weight of the origin in given origin group for load balancing. Must be between 1 and 1000", + SerializedName = @"weight", + PossibleTypes = new [] { typeof(int) })] + public int Weight { get => _originBody.Weight ?? default(int); set => _originBody.Weight = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzFrontDoorCdnOrigin_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzFrontDoorCdnOrigin_CreateExpanded Clone() + { + var clone = new NewAzFrontDoorCdnOrigin_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._originBody = this._originBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.OriginGroupName = this.OriginGroupName; + clone.OriginName = this.OriginName; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzFrontDoorCdnOrigin_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdOriginsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdOriginsCreate(ResourceGroupName, ProfileName, OriginGroupName, OriginName, SubscriptionId, _originBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,OriginGroupName=OriginGroupName,OriginName=OriginName,SubscriptionId=SubscriptionId,body=_originBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, OriginName=OriginName, SubscriptionId=SubscriptionId, body=_originBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, OriginName=OriginName, SubscriptionId=SubscriptionId, body=_originBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnRoute_CreateExpanded.cs b/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnRoute_CreateExpanded.cs new file mode 100644 index 000000000000..d55f18da723c --- /dev/null +++ b/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnRoute_CreateExpanded.cs @@ -0,0 +1,690 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor + /// endpoint. + /// + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzFrontDoorCdnRoute_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class NewAzFrontDoorCdnRoute_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Friendly Routes name mapping to the any Routes or secret related information. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute _routeBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Route(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// query parameters to include or exclude (comma separated). + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "query parameters to include or exclude (comma separated).")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"query parameters to include or exclude (comma separated).", + SerializedName = @"queryParameters", + PossibleTypes = new [] { typeof(string) })] + public string CacheConfigurationQueryParameter { get => _routeBody.CacheConfigurationQueryParameter ?? null; set => _routeBody.CacheConfigurationQueryParameter = value; } + + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.", + SerializedName = @"queryStringCachingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior CacheConfigurationQueryStringCachingBehavior { get => _routeBody.CacheConfigurationQueryStringCachingBehavior ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior)""); set => _routeBody.CacheConfigurationQueryStringCachingBehavior = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of content types on which compression applies. The value should be a valid MIME type.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of content types on which compression applies. The value should be a valid MIME type.", + SerializedName = @"contentTypesToCompress", + PossibleTypes = new [] { typeof(string) })] + public string[] CompressionSettingContentTypesToCompress { get => _routeBody.CompressionSettingContentTypesToCompress ?? null /* arrayOf */; set => _routeBody.CompressionSettingContentTypesToCompress = value; } + + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.", + SerializedName = @"isCompressionEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter CompressionSettingIsCompressionEnabled { get => _routeBody.CompressionSettingIsCompressionEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _routeBody.CompressionSettingIsCompressionEnabled = value; } + + /// Domains referenced by this endpoint. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Domains referenced by this endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Domains referenced by this endpoint.", + SerializedName = @"customDomains", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] CustomDomain { get => _routeBody.CustomDomain ?? null /* arrayOf */; set => _routeBody.CustomDomain = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'", + SerializedName = @"enabledState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState EnabledState { get => _routeBody.EnabledState ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); set => _routeBody.EnabledState = value; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// Protocol this rule will use when forwarding traffic to backends. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Protocol this rule will use when forwarding traffic to backends.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protocol this rule will use when forwarding traffic to backends.", + SerializedName = @"forwardingProtocol", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol ForwardingProtocol { get => _routeBody.ForwardingProtocol ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol)""); set => _routeBody.ForwardingProtocol = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and + /// it will be the first rule that gets executed. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed.", + SerializedName = @"httpsRedirect", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect HttpsRedirect { get => _routeBody.HttpsRedirect ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect)""); set => _routeBody.HttpsRedirect = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// whether this route will be linked to the default endpoint domain. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "whether this route will be linked to the default endpoint domain.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"whether this route will be linked to the default endpoint domain.", + SerializedName = @"linkToDefaultDomain", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain LinkToDefaultDomain { get => _routeBody.LinkToDefaultDomain ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain)""); set => _routeBody.LinkToDefaultDomain = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the routing rule. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the routing rule.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the routing rule.", + SerializedName = @"routeName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RouteName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string OriginGroupId { get => _routeBody.OriginGroupId ?? null; set => _routeBody.OriginGroupId = value; } + + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.", + SerializedName = @"originPath", + PossibleTypes = new [] { typeof(string) })] + public string OriginPath { get => _routeBody.OriginPath ?? null; set => _routeBody.OriginPath = value; } + + /// The route patterns of the rule. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The route patterns of the rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The route patterns of the rule.", + SerializedName = @"patternsToMatch", + PossibleTypes = new [] { typeof(string) })] + public string[] PatternsToMatch { get => _routeBody.PatternsToMatch ?? null /* arrayOf */; set => _routeBody.PatternsToMatch = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// rule sets referenced by this endpoint. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "rule sets referenced by this endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"rule sets referenced by this endpoint.", + SerializedName = @"ruleSets", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] RuleSet { get => _routeBody.RuleSet ?? null /* arrayOf */; set => _routeBody.RuleSet = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// List of supported protocols for this route. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of supported protocols for this route.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of supported protocols for this route.", + SerializedName = @"supportedProtocols", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[] SupportedProtocol { get => _routeBody.SupportedProtocol ?? null /* arrayOf */; set => _routeBody.SupportedProtocol = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzFrontDoorCdnRoute_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzFrontDoorCdnRoute_CreateExpanded Clone() + { + var clone = new NewAzFrontDoorCdnRoute_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._routeBody = this._routeBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzFrontDoorCdnRoute_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RoutesCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RoutesCreate(ResourceGroupName, ProfileName, EndpointName, Name, SubscriptionId, _routeBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,Name=Name,SubscriptionId=SubscriptionId,body=_routeBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId, body=_routeBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId, body=_routeBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnRuleSet_Create.cs b/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnRuleSet_Create.cs new file mode 100644 index 000000000000..d0f5b5cf5ded --- /dev/null +++ b/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnRuleSet_Create.cs @@ -0,0 +1,456 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Creates a new rule set within the specified profile. + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzFrontDoorCdnRuleSet_Create", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Creates a new rule set within the specified profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class NewAzFrontDoorCdnRuleSet_Create : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the rule set under the profile which is unique globally + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the rule set under the profile which is unique globally")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the rule set under the profile which is unique globally", + SerializedName = @"ruleSetName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleSetName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzFrontDoorCdnRuleSet_Create() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RuleSetsCreate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RuleSetsCreate(ResourceGroupName, ProfileName, Name, SubscriptionId, onOk, onCreated, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet + WriteObject((await response)); + } + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnRule_CreateExpanded.cs b/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnRule_CreateExpanded.cs new file mode 100644 index 000000000000..b20ea552722f --- /dev/null +++ b/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnRule_CreateExpanded.cs @@ -0,0 +1,563 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Creates a new delivery rule within the specified rule set. + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzFrontDoorCdnRule_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Creates a new delivery rule within the specified rule set.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class NewAzFrontDoorCdnRule_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Friendly Rules name mapping to the any Rules or secret related information. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule _ruleBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Rule(); + + /// + /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of actions that are executed when all the conditions of a rule are satisfied.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of actions that are executed when all the conditions of a rule are satisfied.", + SerializedName = @"actions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] Action { get => _ruleBody.Action ?? null /* arrayOf */; set => _ruleBody.Action = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// A list of conditions that must be matched for the actions to be executed + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of conditions that must be matched for the actions to be executed")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of conditions that must be matched for the actions to be executed", + SerializedName = @"conditions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] Condition { get => _ruleBody.Condition ?? null /* arrayOf */; set => _ruleBody.Condition = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults + /// to Continue. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.", + SerializedName = @"matchProcessingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior MatchProcessingBehavior { get => _ruleBody.MatchProcessingBehavior ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior)""); set => _ruleBody.MatchProcessingBehavior = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the delivery rule which is unique within the endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the delivery rule which is unique within the endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the delivery rule which is unique within the endpoint.", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + /// be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition + /// and actions listed in it will always be applied. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.", + SerializedName = @"order", + PossibleTypes = new [] { typeof(int) })] + public int Order { get => _ruleBody.Order ?? default(int); set => _ruleBody.Order = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _setName; + + /// Name of the rule set under the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the rule set under the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the rule set under the profile.", + SerializedName = @"ruleSetName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleSetName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SetName { get => this._setName; set => this._setName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzFrontDoorCdnRule_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzFrontDoorCdnRule_CreateExpanded Clone() + { + var clone = new NewAzFrontDoorCdnRule_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._ruleBody = this._ruleBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.SetName = this.SetName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzFrontDoorCdnRule_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RulesCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RulesCreate(ResourceGroupName, ProfileName, SetName, Name, SubscriptionId, _ruleBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,SetName=SetName,Name=Name,SubscriptionId=SubscriptionId,body=_ruleBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SetName=SetName, Name=Name, SubscriptionId=SubscriptionId, body=_ruleBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SetName=SetName, Name=Name, SubscriptionId=SubscriptionId, body=_ruleBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnSecret_CreateExpanded.cs b/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnSecret_CreateExpanded.cs new file mode 100644 index 000000000000..21e5e4e2470d --- /dev/null +++ b/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnSecret_CreateExpanded.cs @@ -0,0 +1,502 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Creates a new Secret within the specified profile. + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzFrontDoorCdnSecret_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Creates a new Secret within the specified profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class NewAzFrontDoorCdnSecret_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Friendly Secret name mapping to the any Secret or secret related information. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret _secretBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.Secret(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Secret under the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Secret under the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Secret under the profile.", + SerializedName = @"secretName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SecretName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// object which contains secret parameters + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "object which contains secret parameters")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"object which contains secret parameters", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters Parameter { get => _secretBody.Parameter ?? null /* object */; set => _secretBody.Parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzFrontDoorCdnSecret_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzFrontDoorCdnSecret_CreateExpanded Clone() + { + var clone = new NewAzFrontDoorCdnSecret_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._secretBody = this._secretBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzFrontDoorCdnSecret_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SecretsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SecretsCreate(ResourceGroupName, ProfileName, Name, SubscriptionId, _secretBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Name=Name,SubscriptionId=SubscriptionId,body=_secretBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId, body=_secretBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId, body=_secretBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnSecurityPolicy_CreateExpanded.cs b/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnSecurityPolicy_CreateExpanded.cs new file mode 100644 index 000000000000..d027a6ec11e9 --- /dev/null +++ b/src/Cdn/generated/cmdlets/NewAzFrontDoorCdnSecurityPolicy_CreateExpanded.cs @@ -0,0 +1,502 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Creates a new security policy within the specified profile. + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzFrontDoorCdnSecurityPolicy_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Creates a new security policy within the specified profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class NewAzFrontDoorCdnSecurityPolicy_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// SecurityPolicy association for AzureFrontDoor profile + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy _securityPolicyBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicy(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the security policy under the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the security policy under the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the security policy under the profile.", + SerializedName = @"securityPolicyName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SecurityPolicyName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// object which contains security policy parameters + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "object which contains security policy parameters")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"object which contains security policy parameters", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters Parameter { get => _securityPolicyBody.Parameter ?? null /* object */; set => _securityPolicyBody.Parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzFrontDoorCdnSecurityPolicy_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzFrontDoorCdnSecurityPolicy_CreateExpanded Clone() + { + var clone = new NewAzFrontDoorCdnSecurityPolicy_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._securityPolicyBody = this._securityPolicyBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzFrontDoorCdnSecurityPolicy_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SecurityPoliciesCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SecurityPoliciesCreate(ResourceGroupName, ProfileName, Name, SubscriptionId, _securityPolicyBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Name=Name,SubscriptionId=SubscriptionId,body=_securityPolicyBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId, body=_securityPolicyBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId, body=_securityPolicyBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzCdnCustomDomain_Delete1.cs b/src/Cdn/generated/cmdlets/RemoveAzCdnCustomDomain_Delete1.cs new file mode 100644 index 000000000000..ffe5e24dcc5e --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzCdnCustomDomain_Delete1.cs @@ -0,0 +1,539 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Deletes an existing custom domain within an endpoint. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzCdnCustomDomain_Delete1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing custom domain within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzCdnCustomDomain_Delete1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the custom domain within an endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the custom domain within an endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the custom domain within an endpoint.", + SerializedName = @"customDomainName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("CustomDomainName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzCdnCustomDomain_Delete1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnCustomDomain_Delete1 Clone() + { + var clone = new RemoveAzCdnCustomDomain_Delete1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CustomDomainsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CustomDomainsDelete(ResourceGroupName, ProfileName, EndpointName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzCdnCustomDomain_Delete1() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzCdnCustomDomain_DeleteViaIdentity1.cs b/src/Cdn/generated/cmdlets/RemoveAzCdnCustomDomain_DeleteViaIdentity1.cs new file mode 100644 index 000000000000..341cee77decf --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzCdnCustomDomain_DeleteViaIdentity1.cs @@ -0,0 +1,495 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Deletes an existing custom domain within an endpoint. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzCdnCustomDomain_DeleteViaIdentity1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing custom domain within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzCdnCustomDomain_DeleteViaIdentity1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzCdnCustomDomain_DeleteViaIdentity1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnCustomDomain_DeleteViaIdentity1 Clone() + { + var clone = new RemoveAzCdnCustomDomain_DeleteViaIdentity1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CustomDomainsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CustomDomainsDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CustomDomainName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CustomDomainName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CustomDomainsDelete(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.CustomDomainName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzCdnCustomDomain_DeleteViaIdentity1() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzCdnEndpoint_Delete1.cs b/src/Cdn/generated/cmdlets/RemoveAzCdnEndpoint_Delete1.cs new file mode 100644 index 000000000000..3a51d7d729a4 --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzCdnEndpoint_Delete1.cs @@ -0,0 +1,527 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and + /// profile. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzCdnEndpoint_Delete1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzCdnEndpoint_Delete1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("EndpointName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzCdnEndpoint_Delete1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnEndpoint_Delete1 Clone() + { + var clone = new RemoveAzCdnEndpoint_Delete1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsDelete(ResourceGroupName, ProfileName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzCdnEndpoint_Delete1() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzCdnEndpoint_DeleteViaIdentity1.cs b/src/Cdn/generated/cmdlets/RemoveAzCdnEndpoint_DeleteViaIdentity1.cs new file mode 100644 index 000000000000..05f3699482c5 --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzCdnEndpoint_DeleteViaIdentity1.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and + /// profile. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzCdnEndpoint_DeleteViaIdentity1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzCdnEndpoint_DeleteViaIdentity1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzCdnEndpoint_DeleteViaIdentity1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnEndpoint_DeleteViaIdentity1 Clone() + { + var clone = new RemoveAzCdnEndpoint_DeleteViaIdentity1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.EndpointsDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.EndpointsDelete(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzCdnEndpoint_DeleteViaIdentity1() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzCdnOriginGroup_Delete1.cs b/src/Cdn/generated/cmdlets/RemoveAzCdnOriginGroup_Delete1.cs new file mode 100644 index 000000000000..237f69daede9 --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzCdnOriginGroup_Delete1.cs @@ -0,0 +1,539 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Deletes an existing origin group within an endpoint. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzCdnOriginGroup_Delete1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing origin group within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzCdnOriginGroup_Delete1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the origin group which is unique within the endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin group which is unique within the endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin group which is unique within the endpoint.", + SerializedName = @"originGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OriginGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzCdnOriginGroup_Delete1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnOriginGroup_Delete1 Clone() + { + var clone = new RemoveAzCdnOriginGroup_Delete1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OriginGroupsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OriginGroupsDelete(ResourceGroupName, ProfileName, EndpointName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzCdnOriginGroup_Delete1() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzCdnOriginGroup_DeleteViaIdentity1.cs b/src/Cdn/generated/cmdlets/RemoveAzCdnOriginGroup_DeleteViaIdentity1.cs new file mode 100644 index 000000000000..ee474f6535d0 --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzCdnOriginGroup_DeleteViaIdentity1.cs @@ -0,0 +1,495 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Deletes an existing origin group within an endpoint. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzCdnOriginGroup_DeleteViaIdentity1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing origin group within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzCdnOriginGroup_DeleteViaIdentity1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzCdnOriginGroup_DeleteViaIdentity1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnOriginGroup_DeleteViaIdentity1 Clone() + { + var clone = new RemoveAzCdnOriginGroup_DeleteViaIdentity1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OriginGroupsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.OriginGroupsDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.OriginGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OriginGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.OriginGroupsDelete(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.OriginGroupName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzCdnOriginGroup_DeleteViaIdentity1() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzCdnOrigin_Delete1.cs b/src/Cdn/generated/cmdlets/RemoveAzCdnOrigin_Delete1.cs new file mode 100644 index 000000000000..7b0a3427013d --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzCdnOrigin_Delete1.cs @@ -0,0 +1,539 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Deletes an existing origin within an endpoint. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzCdnOrigin_Delete1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing origin within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzCdnOrigin_Delete1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the origin which is unique within the endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin which is unique within the endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin which is unique within the endpoint.", + SerializedName = @"originName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OriginName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzCdnOrigin_Delete1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnOrigin_Delete1 Clone() + { + var clone = new RemoveAzCdnOrigin_Delete1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OriginsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OriginsDelete(ResourceGroupName, ProfileName, EndpointName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzCdnOrigin_Delete1() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzCdnOrigin_DeleteViaIdentity1.cs b/src/Cdn/generated/cmdlets/RemoveAzCdnOrigin_DeleteViaIdentity1.cs new file mode 100644 index 000000000000..1aa23e71b87b --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzCdnOrigin_DeleteViaIdentity1.cs @@ -0,0 +1,495 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Deletes an existing origin within an endpoint. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzCdnOrigin_DeleteViaIdentity1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing origin within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzCdnOrigin_DeleteViaIdentity1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzCdnOrigin_DeleteViaIdentity1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnOrigin_DeleteViaIdentity1 Clone() + { + var clone = new RemoveAzCdnOrigin_DeleteViaIdentity1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OriginsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.OriginsDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.OriginName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OriginName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.OriginsDelete(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.OriginName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzCdnOrigin_DeleteViaIdentity1() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzCdnProfile_Delete.cs b/src/Cdn/generated/cmdlets/RemoveAzCdnProfile_Delete.cs new file mode 100644 index 000000000000..9420cfec44ad --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzCdnProfile_Delete.cs @@ -0,0 +1,515 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// 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. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzCdnProfile_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"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.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzCdnProfile_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProfileName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzCdnProfile_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnProfile_Delete Clone() + { + var clone = new RemoveAzCdnProfile_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProfilesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProfilesDelete(ResourceGroupName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzCdnProfile_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzCdnProfile_DeleteViaIdentity.cs b/src/Cdn/generated/cmdlets/RemoveAzCdnProfile_DeleteViaIdentity.cs new file mode 100644 index 000000000000..88c43681bdfd --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzCdnProfile_DeleteViaIdentity.cs @@ -0,0 +1,491 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// 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. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzCdnProfile_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"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.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzCdnProfile_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzCdnProfile_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnProfile_DeleteViaIdentity Clone() + { + var clone = new RemoveAzCdnProfile_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProfilesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProfilesDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProfilesDelete(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzCdnProfile_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnCustomDomain_Delete.cs b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnCustomDomain_Delete.cs new file mode 100644 index 000000000000..f78b0e553cb8 --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnCustomDomain_Delete.cs @@ -0,0 +1,528 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group + /// and profile. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFrontDoorCdnCustomDomain_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzFrontDoorCdnCustomDomain_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _customDomainName; + + /// Name of the domain under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the domain under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the domain under the profile which is unique globally.", + SerializedName = @"customDomainName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string CustomDomainName { get => this._customDomainName; set => this._customDomainName = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFrontDoorCdnCustomDomain_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnCustomDomain_Delete Clone() + { + var clone = new RemoveAzFrontDoorCdnCustomDomain_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.CustomDomainName = this.CustomDomainName; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdCustomDomainsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdCustomDomainsDelete(ResourceGroupName, ProfileName, CustomDomainName, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,CustomDomainName=CustomDomainName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzFrontDoorCdnCustomDomain_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, CustomDomainName=CustomDomainName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, CustomDomainName=CustomDomainName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnCustomDomain_DeleteViaIdentity.cs b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnCustomDomain_DeleteViaIdentity.cs new file mode 100644 index 000000000000..8ff3ab6a1c63 --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnCustomDomain_DeleteViaIdentity.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group + /// and profile. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFrontDoorCdnCustomDomain_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzFrontDoorCdnCustomDomain_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFrontDoorCdnCustomDomain_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnCustomDomain_DeleteViaIdentity Clone() + { + var clone = new RemoveAzFrontDoorCdnCustomDomain_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdCustomDomainsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AfdCustomDomainsDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CustomDomainName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CustomDomainName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AfdCustomDomainsDelete(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.CustomDomainName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzFrontDoorCdnCustomDomain_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnEndpoint_Delete.cs b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnEndpoint_Delete.cs new file mode 100644 index 000000000000..017b071ae8c2 --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnEndpoint_Delete.cs @@ -0,0 +1,528 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource + /// group and profile. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFrontDoorCdnEndpoint_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzFrontDoorCdnEndpoint_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFrontDoorCdnEndpoint_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnEndpoint_Delete Clone() + { + var clone = new RemoveAzFrontDoorCdnEndpoint_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdEndpointsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdEndpointsDelete(ResourceGroupName, ProfileName, EndpointName, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzFrontDoorCdnEndpoint_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnEndpoint_DeleteViaIdentity.cs b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnEndpoint_DeleteViaIdentity.cs new file mode 100644 index 000000000000..95b5284f2d80 --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnEndpoint_DeleteViaIdentity.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource + /// group and profile. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFrontDoorCdnEndpoint_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzFrontDoorCdnEndpoint_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFrontDoorCdnEndpoint_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnEndpoint_DeleteViaIdentity Clone() + { + var clone = new RemoveAzFrontDoorCdnEndpoint_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdEndpointsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AfdEndpointsDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AfdEndpointsDelete(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzFrontDoorCdnEndpoint_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnOriginGroup_Delete.cs b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnOriginGroup_Delete.cs new file mode 100644 index 000000000000..ae2e711b8db2 --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnOriginGroup_Delete.cs @@ -0,0 +1,525 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Deletes an existing origin group within a profile. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFrontDoorCdnOriginGroup_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing origin group within a profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzFrontDoorCdnOriginGroup_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Backing field for property. + private string _originGroupName; + + /// Name of the origin group which is unique within the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin group which is unique within the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin group which is unique within the profile.", + SerializedName = @"originGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string OriginGroupName { get => this._originGroupName; set => this._originGroupName = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFrontDoorCdnOriginGroup_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnOriginGroup_Delete Clone() + { + var clone = new RemoveAzFrontDoorCdnOriginGroup_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.OriginGroupName = this.OriginGroupName; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdOriginGroupsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdOriginGroupsDelete(ResourceGroupName, ProfileName, OriginGroupName, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,OriginGroupName=OriginGroupName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzFrontDoorCdnOriginGroup_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnOriginGroup_DeleteViaIdentity.cs b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnOriginGroup_DeleteViaIdentity.cs new file mode 100644 index 000000000000..41e39a1c468b --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnOriginGroup_DeleteViaIdentity.cs @@ -0,0 +1,491 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Deletes an existing origin group within a profile. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFrontDoorCdnOriginGroup_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing origin group within a profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzFrontDoorCdnOriginGroup_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFrontDoorCdnOriginGroup_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnOriginGroup_DeleteViaIdentity Clone() + { + var clone = new RemoveAzFrontDoorCdnOriginGroup_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdOriginGroupsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AfdOriginGroupsDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.OriginGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OriginGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AfdOriginGroupsDelete(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.OriginGroupName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzFrontDoorCdnOriginGroup_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnOrigin_Delete.cs b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnOrigin_Delete.cs new file mode 100644 index 000000000000..6a55ad8ab156 --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnOrigin_Delete.cs @@ -0,0 +1,540 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Deletes an existing origin within an origin group. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFrontDoorCdnOrigin_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing origin within an origin group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzFrontDoorCdnOrigin_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Backing field for property. + private string _originGroupName; + + /// Name of the origin group which is unique within the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin group which is unique within the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin group which is unique within the profile.", + SerializedName = @"originGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string OriginGroupName { get => this._originGroupName; set => this._originGroupName = value; } + + /// Backing field for property. + private string _originName; + + /// Name of the origin which is unique within the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin which is unique within the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin which is unique within the profile.", + SerializedName = @"originName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string OriginName { get => this._originName; set => this._originName = value; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFrontDoorCdnOrigin_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnOrigin_Delete Clone() + { + var clone = new RemoveAzFrontDoorCdnOrigin_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.OriginGroupName = this.OriginGroupName; + clone.OriginName = this.OriginName; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdOriginsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdOriginsDelete(ResourceGroupName, ProfileName, OriginGroupName, OriginName, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,OriginGroupName=OriginGroupName,OriginName=OriginName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzFrontDoorCdnOrigin_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, OriginName=OriginName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, OriginName=OriginName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnOrigin_DeleteViaIdentity.cs b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnOrigin_DeleteViaIdentity.cs new file mode 100644 index 000000000000..65893b76f1ee --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnOrigin_DeleteViaIdentity.cs @@ -0,0 +1,495 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Deletes an existing origin within an origin group. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFrontDoorCdnOrigin_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing origin within an origin group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzFrontDoorCdnOrigin_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFrontDoorCdnOrigin_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnOrigin_DeleteViaIdentity Clone() + { + var clone = new RemoveAzFrontDoorCdnOrigin_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdOriginsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AfdOriginsDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.OriginGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OriginGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.OriginName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OriginName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AfdOriginsDelete(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.OriginGroupName ?? null, InputObject.OriginName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzFrontDoorCdnOrigin_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRoute_Delete.cs b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRoute_Delete.cs new file mode 100644 index 000000000000..aa9da90732e7 --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRoute_Delete.cs @@ -0,0 +1,544 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and + /// AzureFrontDoor endpoint. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFrontDoorCdnRoute_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzFrontDoorCdnRoute_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the routing rule. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the routing rule.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the routing rule.", + SerializedName = @"routeName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RouteName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFrontDoorCdnRoute_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnRoute_Delete Clone() + { + var clone = new RemoveAzFrontDoorCdnRoute_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RoutesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RoutesDelete(ResourceGroupName, ProfileName, EndpointName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzFrontDoorCdnRoute_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRoute_DeleteViaIdentity.cs b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRoute_DeleteViaIdentity.cs new file mode 100644 index 000000000000..fe38dc130195 --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRoute_DeleteViaIdentity.cs @@ -0,0 +1,498 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and + /// AzureFrontDoor endpoint. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFrontDoorCdnRoute_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzFrontDoorCdnRoute_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFrontDoorCdnRoute_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnRoute_DeleteViaIdentity Clone() + { + var clone = new RemoveAzFrontDoorCdnRoute_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RoutesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.RoutesDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.RouteName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.RouteName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.RoutesDelete(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.RouteName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzFrontDoorCdnRoute_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRuleSet_Delete.cs b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRuleSet_Delete.cs new file mode 100644 index 000000000000..bc7365698900 --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRuleSet_Delete.cs @@ -0,0 +1,529 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource + /// group and profile. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFrontDoorCdnRuleSet_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzFrontDoorCdnRuleSet_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the rule set under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the rule set under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the rule set under the profile which is unique globally.", + SerializedName = @"ruleSetName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleSetName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFrontDoorCdnRuleSet_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnRuleSet_Delete Clone() + { + var clone = new RemoveAzFrontDoorCdnRuleSet_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RuleSetsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RuleSetsDelete(ResourceGroupName, ProfileName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzFrontDoorCdnRuleSet_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRuleSet_DeleteViaIdentity.cs b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRuleSet_DeleteViaIdentity.cs new file mode 100644 index 000000000000..884f6b3116f1 --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRuleSet_DeleteViaIdentity.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource + /// group and profile. + /// + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFrontDoorCdnRuleSet_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzFrontDoorCdnRuleSet_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFrontDoorCdnRuleSet_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnRuleSet_DeleteViaIdentity Clone() + { + var clone = new RemoveAzFrontDoorCdnRuleSet_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RuleSetsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.RuleSetsDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.RuleSetName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.RuleSetName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.RuleSetsDelete(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.RuleSetName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzFrontDoorCdnRuleSet_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRule_Delete.cs b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRule_Delete.cs new file mode 100644 index 000000000000..4714deef1763 --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRule_Delete.cs @@ -0,0 +1,542 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Deletes an existing delivery rule within a rule set. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFrontDoorCdnRule_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing delivery rule within a rule set.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzFrontDoorCdnRule_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the delivery rule which is unique within the endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the delivery rule which is unique within the endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the delivery rule which is unique within the endpoint.", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _setName; + + /// Name of the rule set under the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the rule set under the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the rule set under the profile.", + SerializedName = @"ruleSetName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleSetName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SetName { get => this._setName; set => this._setName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFrontDoorCdnRule_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnRule_Delete Clone() + { + var clone = new RemoveAzFrontDoorCdnRule_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.SetName = this.SetName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RulesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RulesDelete(ResourceGroupName, ProfileName, SetName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,SetName=SetName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzFrontDoorCdnRule_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SetName=SetName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SetName=SetName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRule_DeleteViaIdentity.cs b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRule_DeleteViaIdentity.cs new file mode 100644 index 000000000000..dea6b5f7b436 --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnRule_DeleteViaIdentity.cs @@ -0,0 +1,495 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Deletes an existing delivery rule within a rule set. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFrontDoorCdnRule_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing delivery rule within a rule set.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzFrontDoorCdnRule_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFrontDoorCdnRule_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnRule_DeleteViaIdentity Clone() + { + var clone = new RemoveAzFrontDoorCdnRule_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RulesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.RulesDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.RuleSetName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.RuleSetName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.RuleName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.RuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.RulesDelete(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.RuleSetName ?? null, InputObject.RuleName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzFrontDoorCdnRule_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnSecret_Delete.cs b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnSecret_Delete.cs new file mode 100644 index 000000000000..a5ae067f8e0e --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnSecret_Delete.cs @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Deletes an existing Secret within profile. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFrontDoorCdnSecret_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing Secret within profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzFrontDoorCdnSecret_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the Secret under the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Secret under the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Secret under the profile.", + SerializedName = @"secretName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SecretName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFrontDoorCdnSecret_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnSecret_Delete Clone() + { + var clone = new RemoveAzFrontDoorCdnSecret_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SecretsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SecretsDelete(ResourceGroupName, ProfileName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzFrontDoorCdnSecret_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnSecret_DeleteViaIdentity.cs b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnSecret_DeleteViaIdentity.cs new file mode 100644 index 000000000000..7d7a3fc495d5 --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnSecret_DeleteViaIdentity.cs @@ -0,0 +1,491 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Deletes an existing Secret within profile. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/secrets/{secretName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFrontDoorCdnSecret_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing Secret within profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzFrontDoorCdnSecret_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFrontDoorCdnSecret_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnSecret_DeleteViaIdentity Clone() + { + var clone = new RemoveAzFrontDoorCdnSecret_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SecretsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.SecretsDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SecretName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SecretName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.SecretsDelete(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.SecretName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzFrontDoorCdnSecret_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnSecurityPolicy_Delete.cs b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnSecurityPolicy_Delete.cs new file mode 100644 index 000000000000..ccf645bfd24b --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnSecurityPolicy_Delete.cs @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Deletes an existing security policy within profile. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFrontDoorCdnSecurityPolicy_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing security policy within profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzFrontDoorCdnSecurityPolicy_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the security policy under the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the security policy under the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the security policy under the profile.", + SerializedName = @"securityPolicyName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SecurityPolicyName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFrontDoorCdnSecurityPolicy_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnSecurityPolicy_Delete Clone() + { + var clone = new RemoveAzFrontDoorCdnSecurityPolicy_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SecurityPoliciesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SecurityPoliciesDelete(ResourceGroupName, ProfileName, Name, SubscriptionId, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzFrontDoorCdnSecurityPolicy_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnSecurityPolicy_DeleteViaIdentity.cs b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnSecurityPolicy_DeleteViaIdentity.cs new file mode 100644 index 000000000000..3055fbbfcde8 --- /dev/null +++ b/src/Cdn/generated/cmdlets/RemoveAzFrontDoorCdnSecurityPolicy_DeleteViaIdentity.cs @@ -0,0 +1,491 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Deletes an existing security policy within profile. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzFrontDoorCdnSecurityPolicy_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Deletes an existing security policy within profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class RemoveAzFrontDoorCdnSecurityPolicy_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzFrontDoorCdnSecurityPolicy_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnSecurityPolicy_DeleteViaIdentity Clone() + { + var clone = new RemoveAzFrontDoorCdnSecurityPolicy_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SecurityPoliciesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.SecurityPoliciesDeleteViaIdentity(InputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SecurityPolicyName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SecurityPolicyName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.SecurityPoliciesDelete(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.SecurityPolicyName ?? null, InputObject.SubscriptionId ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzFrontDoorCdnSecurityPolicy_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/StartAzCdnEndpoint_Start.cs b/src/Cdn/generated/cmdlets/StartAzCdnEndpoint_Start.cs new file mode 100644 index 000000000000..3742ff09ca73 --- /dev/null +++ b/src/Cdn/generated/cmdlets/StartAzCdnEndpoint_Start.cs @@ -0,0 +1,485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Starts an existing CDN endpoint that is on a stopped state. + /// + /// [OpenAPI] Start=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/start" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzCdnEndpoint_Start", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Starts an existing CDN endpoint that is on a stopped state.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class StartAzCdnEndpoint_Start : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("EndpointName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of StartAzCdnEndpoint_Start + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.StartAzCdnEndpoint_Start Clone() + { + var clone = new StartAzCdnEndpoint_Start(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsStart' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsStart(ResourceGroupName, ProfileName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public StartAzCdnEndpoint_Start() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/StartAzCdnEndpoint_StartViaIdentity.cs b/src/Cdn/generated/cmdlets/StartAzCdnEndpoint_StartViaIdentity.cs new file mode 100644 index 000000000000..98bd1fa26579 --- /dev/null +++ b/src/Cdn/generated/cmdlets/StartAzCdnEndpoint_StartViaIdentity.cs @@ -0,0 +1,452 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Starts an existing CDN endpoint that is on a stopped state. + /// + /// [OpenAPI] Start=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/start" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzCdnEndpoint_StartViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Starts an existing CDN endpoint that is on a stopped state.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class StartAzCdnEndpoint_StartViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of StartAzCdnEndpoint_StartViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.StartAzCdnEndpoint_StartViaIdentity Clone() + { + var clone = new StartAzCdnEndpoint_StartViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsStart' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.EndpointsStartViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.EndpointsStart(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public StartAzCdnEndpoint_StartViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/StopAzCdnEndpoint_Stop.cs b/src/Cdn/generated/cmdlets/StopAzCdnEndpoint_Stop.cs new file mode 100644 index 000000000000..adc370750d73 --- /dev/null +++ b/src/Cdn/generated/cmdlets/StopAzCdnEndpoint_Stop.cs @@ -0,0 +1,485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Stops an existing running CDN endpoint. + /// + /// [OpenAPI] Stop=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/stop" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Stop, @"AzCdnEndpoint_Stop", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Stops an existing running CDN endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class StopAzCdnEndpoint_Stop : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("EndpointName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of StopAzCdnEndpoint_Stop + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.StopAzCdnEndpoint_Stop Clone() + { + var clone = new StopAzCdnEndpoint_Stop(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsStop' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsStop(ResourceGroupName, ProfileName, Name, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Name=Name,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public StopAzCdnEndpoint_Stop() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/StopAzCdnEndpoint_StopViaIdentity.cs b/src/Cdn/generated/cmdlets/StopAzCdnEndpoint_StopViaIdentity.cs new file mode 100644 index 000000000000..85fed92ae226 --- /dev/null +++ b/src/Cdn/generated/cmdlets/StopAzCdnEndpoint_StopViaIdentity.cs @@ -0,0 +1,452 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Stops an existing running CDN endpoint. + /// + /// [OpenAPI] Stop=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/stop" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Stop, @"AzCdnEndpoint_StopViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Stops an existing running CDN endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class StopAzCdnEndpoint_StopViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of StopAzCdnEndpoint_StopViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.StopAzCdnEndpoint_StopViaIdentity Clone() + { + var clone = new StopAzCdnEndpoint_StopViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsStop' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.EndpointsStopViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.EndpointsStop(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public StopAzCdnEndpoint_StopViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/TestAzCdnEndpointCustomDomain_ValidateExpanded1.cs b/src/Cdn/generated/cmdlets/TestAzCdnEndpointCustomDomain_ValidateExpanded1.cs new file mode 100644 index 000000000000..53aa27927c22 --- /dev/null +++ b/src/Cdn/generated/cmdlets/TestAzCdnEndpointCustomDomain_ValidateExpanded1.cs @@ -0,0 +1,433 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. + /// + /// + /// [OpenAPI] ValidateCustomDomain=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzCdnEndpointCustomDomain_ValidateExpanded1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class TestAzCdnEndpointCustomDomain_ValidateExpanded1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Input of the custom domain to be validated for DNS mapping. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput _customDomainPropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateCustomDomainInput(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// The host name of the custom domain. Must be a domain name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The host name of the custom domain. Must be a domain name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The host name of the custom domain. Must be a domain name.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + public string HostName { get => _customDomainPropertiesBody.HostName ?? null; set => _customDomainPropertiesBody.HostName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsValidateCustomDomain' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsValidateCustomDomain(ResourceGroupName, ProfileName, EndpointName, SubscriptionId, _customDomainPropertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,SubscriptionId=SubscriptionId,body=_customDomainPropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public TestAzCdnEndpointCustomDomain_ValidateExpanded1() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=_customDomainPropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=_customDomainPropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/TestAzCdnEndpointCustomDomain_ValidateViaIdentityExpanded1.cs b/src/Cdn/generated/cmdlets/TestAzCdnEndpointCustomDomain_ValidateViaIdentityExpanded1.cs new file mode 100644 index 000000000000..6bb504064054 --- /dev/null +++ b/src/Cdn/generated/cmdlets/TestAzCdnEndpointCustomDomain_ValidateViaIdentityExpanded1.cs @@ -0,0 +1,405 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. + /// + /// + /// [OpenAPI] ValidateCustomDomain=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzCdnEndpointCustomDomain_ValidateViaIdentityExpanded1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class TestAzCdnEndpointCustomDomain_ValidateViaIdentityExpanded1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Input of the custom domain to be validated for DNS mapping. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput _customDomainPropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateCustomDomainInput(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The host name of the custom domain. Must be a domain name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The host name of the custom domain. Must be a domain name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The host name of the custom domain. Must be a domain name.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + public string HostName { get => _customDomainPropertiesBody.HostName ?? null; set => _customDomainPropertiesBody.HostName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsValidateCustomDomain' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.EndpointsValidateCustomDomainViaIdentity(InputObject.Id, _customDomainPropertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.EndpointsValidateCustomDomain(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.SubscriptionId ?? null, _customDomainPropertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_customDomainPropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public TestAzCdnEndpointCustomDomain_ValidateViaIdentityExpanded1() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_customDomainPropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_customDomainPropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/TestAzCdnNameAvailability_CheckExpanded.cs b/src/Cdn/generated/cmdlets/TestAzCdnNameAvailability_CheckExpanded.cs new file mode 100644 index 000000000000..e1b2e8a881c0 --- /dev/null +++ b/src/Cdn/generated/cmdlets/TestAzCdnNameAvailability_CheckExpanded.cs @@ -0,0 +1,385 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Check the availability of a resource name. This is needed for resources where name is globally unique, such as a CDN endpoint. + /// + /// + /// [OpenAPI] CheckNameAvailability=>POST:"/providers/Microsoft.Cdn/checkNameAvailability" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzCdnNameAvailability_CheckExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Check the availability of a resource name. This is needed for resources where name is globally unique, such as a CDN endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class TestAzCdnNameAvailability_CheckExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Input of CheckNameAvailability API. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInput _checkNameAvailabilityInputBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckNameAvailabilityInput(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// The resource name to validate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The resource name to validate.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The resource name to validate.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + public string Name { get => _checkNameAvailabilityInputBody.Name ?? null; set => _checkNameAvailabilityInputBody.Name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The type of the resource whose name is to be validated. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The type of the resource whose name is to be validated.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The type of the resource whose name is to be validated.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType Type { get => _checkNameAvailabilityInputBody.Type; set => _checkNameAvailabilityInputBody.Type = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CheckNameAvailability' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CheckNameAvailability(_checkNameAvailabilityInputBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_checkNameAvailabilityInputBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public TestAzCdnNameAvailability_CheckExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_checkNameAvailabilityInputBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_checkNameAvailabilityInputBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/TestAzCdnNameAvailability_CheckExpanded1.cs b/src/Cdn/generated/cmdlets/TestAzCdnNameAvailability_CheckExpanded1.cs new file mode 100644 index 000000000000..0a63c2931631 --- /dev/null +++ b/src/Cdn/generated/cmdlets/TestAzCdnNameAvailability_CheckExpanded1.cs @@ -0,0 +1,403 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Check the availability of a resource name. This is needed for resources where name is globally unique, such as a CDN endpoint. + /// + /// + /// [OpenAPI] CheckNameAvailabilityWithSubscription=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkNameAvailability" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzCdnNameAvailability_CheckExpanded1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Check the availability of a resource name. This is needed for resources where name is globally unique, such as a CDN endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class TestAzCdnNameAvailability_CheckExpanded1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Input of CheckNameAvailability API. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityInput _checkNameAvailabilityInputBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckNameAvailabilityInput(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// The resource name to validate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The resource name to validate.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The resource name to validate.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + public string Name { get => _checkNameAvailabilityInputBody.Name ?? null; set => _checkNameAvailabilityInputBody.Name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// The type of the resource whose name is to be validated. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The type of the resource whose name is to be validated.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The type of the resource whose name is to be validated.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType Type { get => _checkNameAvailabilityInputBody.Type; set => _checkNameAvailabilityInputBody.Type = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CheckNameAvailabilityWithSubscription' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CheckNameAvailabilityWithSubscription(SubscriptionId, _checkNameAvailabilityInputBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,body=_checkNameAvailabilityInputBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public TestAzCdnNameAvailability_CheckExpanded1() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_checkNameAvailabilityInputBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_checkNameAvailabilityInputBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/TestAzCdnProbe_ValidateExpanded.cs b/src/Cdn/generated/cmdlets/TestAzCdnProbe_ValidateExpanded.cs new file mode 100644 index 000000000000..507fcd9e739d --- /dev/null +++ b/src/Cdn/generated/cmdlets/TestAzCdnProbe_ValidateExpanded.cs @@ -0,0 +1,393 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Check if the probe path is a valid path and the file can be accessed. Probe path is the path to a file hosted on the origin + /// server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative to the origin path + /// specified in the endpoint configuration. + /// + /// + /// [OpenAPI] ValidateProbe=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateProbe" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzCdnProbe_ValidateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Check if the probe path is a valid path and the file can be accessed. Probe path is the path to a file hosted on the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative to the origin path specified in the endpoint configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class TestAzCdnProbe_ValidateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Input of the validate probe API. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeInput _validateProbeInputBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateProbeInput(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The probe URL to validate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The probe URL to validate.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The probe URL to validate.", + SerializedName = @"probeURL", + PossibleTypes = new [] { typeof(string) })] + public string ProbeUrl { get => _validateProbeInputBody.ProbeUrl ?? null; set => _validateProbeInputBody.ProbeUrl = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ValidateProbe' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ValidateProbe(SubscriptionId, _validateProbeInputBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,body=_validateProbeInputBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public TestAzCdnProbe_ValidateExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_validateProbeInputBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_validateProbeInputBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutput + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/TestAzFrontDoorCdnEndpointCustomDomain_ValidateExpanded.cs b/src/Cdn/generated/cmdlets/TestAzFrontDoorCdnEndpointCustomDomain_ValidateExpanded.cs new file mode 100644 index 000000000000..65db264a0198 --- /dev/null +++ b/src/Cdn/generated/cmdlets/TestAzFrontDoorCdnEndpointCustomDomain_ValidateExpanded.cs @@ -0,0 +1,436 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api isn't work for apex + /// domain. + /// + /// + /// [OpenAPI] ValidateCustomDomain=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/validateCustomDomain" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzFrontDoorCdnEndpointCustomDomain_ValidateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api isn't work for apex domain.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class TestAzFrontDoorCdnEndpointCustomDomain_ValidateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Input of the custom domain to be validated for DNS mapping. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput _customDomainPropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateCustomDomainInput(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// The host name of the custom domain. Must be a domain name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The host name of the custom domain. Must be a domain name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The host name of the custom domain. Must be a domain name.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + public string HostName { get => _customDomainPropertiesBody.HostName ?? null; set => _customDomainPropertiesBody.HostName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdEndpointsValidateCustomDomain' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdEndpointsValidateCustomDomain(ResourceGroupName, ProfileName, EndpointName, SubscriptionId, _customDomainPropertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,SubscriptionId=SubscriptionId,body=_customDomainPropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public TestAzFrontDoorCdnEndpointCustomDomain_ValidateExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=_customDomainPropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=_customDomainPropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/TestAzFrontDoorCdnEndpointCustomDomain_ValidateViaIdentityExpanded.cs b/src/Cdn/generated/cmdlets/TestAzFrontDoorCdnEndpointCustomDomain_ValidateViaIdentityExpanded.cs new file mode 100644 index 000000000000..0544dd2a6a4e --- /dev/null +++ b/src/Cdn/generated/cmdlets/TestAzFrontDoorCdnEndpointCustomDomain_ValidateViaIdentityExpanded.cs @@ -0,0 +1,407 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api isn't work for apex + /// domain. + /// + /// + /// [OpenAPI] ValidateCustomDomain=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/validateCustomDomain" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzFrontDoorCdnEndpointCustomDomain_ValidateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api isn't work for apex domain.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class TestAzFrontDoorCdnEndpointCustomDomain_ValidateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Input of the custom domain to be validated for DNS mapping. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainInput _customDomainPropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ValidateCustomDomainInput(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The host name of the custom domain. Must be a domain name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The host name of the custom domain. Must be a domain name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The host name of the custom domain. Must be a domain name.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + public string HostName { get => _customDomainPropertiesBody.HostName ?? null; set => _customDomainPropertiesBody.HostName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdEndpointsValidateCustomDomain' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AfdEndpointsValidateCustomDomainViaIdentity(InputObject.Id, _customDomainPropertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AfdEndpointsValidateCustomDomain(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.SubscriptionId ?? null, _customDomainPropertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_customDomainPropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public TestAzFrontDoorCdnEndpointCustomDomain_ValidateViaIdentityExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_customDomainPropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_customDomainPropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/TestAzFrontDoorCdnEndpointNameAvailability_CheckExpanded.cs b/src/Cdn/generated/cmdlets/TestAzFrontDoorCdnEndpointNameAvailability_CheckExpanded.cs new file mode 100644 index 000000000000..76e0c043cd03 --- /dev/null +++ b/src/Cdn/generated/cmdlets/TestAzFrontDoorCdnEndpointNameAvailability_CheckExpanded.cs @@ -0,0 +1,430 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Check the availability of a resource name. This is needed for resources where name is globally unique, such as a afdx + /// endpoint. + /// + /// + /// [OpenAPI] CheckEndpointNameAvailability=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/checkEndpointNameAvailability" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzFrontDoorCdnEndpointNameAvailability_CheckExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Check the availability of a resource name. This is needed for resources where name is globally unique, such as a afdx endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class TestAzFrontDoorCdnEndpointNameAvailability_CheckExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Input of CheckNameAvailability API. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityInput _checkEndpointNameAvailabilityInputBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckEndpointNameAvailabilityInput(); + + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the endpoint name reuse scope. The default value is TenantReuse.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the endpoint name reuse scope. The default value is TenantReuse.", + SerializedName = @"autoGeneratedDomainNameLabelScope", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope AutoGeneratedDomainNameLabelScope { get => _checkEndpointNameAvailabilityInputBody.AutoGeneratedDomainNameLabelScope ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope)""); set => _checkEndpointNameAvailabilityInputBody.AutoGeneratedDomainNameLabelScope = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// The resource name to validate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The resource name to validate.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The resource name to validate.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + public string Name { get => _checkEndpointNameAvailabilityInputBody.Name ?? null; set => _checkEndpointNameAvailabilityInputBody.Name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// The type of the resource whose name is to be validated. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The type of the resource whose name is to be validated.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The type of the resource whose name is to be validated.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType Type { get => _checkEndpointNameAvailabilityInputBody.Type; set => _checkEndpointNameAvailabilityInputBody.Type = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CheckEndpointNameAvailability' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CheckEndpointNameAvailability(SubscriptionId, ResourceGroupName, _checkEndpointNameAvailabilityInputBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,body=_checkEndpointNameAvailabilityInputBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public TestAzFrontDoorCdnEndpointNameAvailability_CheckExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, body=_checkEndpointNameAvailabilityInputBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, body=_checkEndpointNameAvailabilityInputBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckEndpointNameAvailabilityOutput + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/TestAzFrontDoorCdnProfileHostNameAvailability_CheckExpanded.cs b/src/Cdn/generated/cmdlets/TestAzFrontDoorCdnProfileHostNameAvailability_CheckExpanded.cs new file mode 100644 index 000000000000..16acb5a1a999 --- /dev/null +++ b/src/Cdn/generated/cmdlets/TestAzFrontDoorCdnProfileHostNameAvailability_CheckExpanded.cs @@ -0,0 +1,419 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Check the name availability of a host name. + /// + /// [OpenAPI] CheckHostNameAvailability=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkHostNameAvailability" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzFrontDoorCdnProfileHostNameAvailability_CheckExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Check the name availability of a host name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class TestAzFrontDoorCdnProfileHostNameAvailability_CheckExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Input of CheckHostNameAvailability API. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInput _checkHostNameAvailabilityInputBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckHostNameAvailabilityInput(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The host name to validate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The host name to validate.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The host name to validate.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + public string HostName { get => _checkHostNameAvailabilityInputBody.HostName ?? null; set => _checkHostNameAvailabilityInputBody.HostName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdProfilesCheckHostNameAvailability' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdProfilesCheckHostNameAvailability(ResourceGroupName, ProfileName, SubscriptionId, _checkHostNameAvailabilityInputBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,SubscriptionId=SubscriptionId,body=_checkHostNameAvailabilityInputBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public TestAzFrontDoorCdnProfileHostNameAvailability_CheckExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId, body=_checkHostNameAvailabilityInputBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SubscriptionId=SubscriptionId, body=_checkHostNameAvailabilityInputBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/TestAzFrontDoorCdnProfileHostNameAvailability_CheckViaIdentityExpanded.cs b/src/Cdn/generated/cmdlets/TestAzFrontDoorCdnProfileHostNameAvailability_CheckViaIdentityExpanded.cs new file mode 100644 index 000000000000..10f0edf615e1 --- /dev/null +++ b/src/Cdn/generated/cmdlets/TestAzFrontDoorCdnProfileHostNameAvailability_CheckViaIdentityExpanded.cs @@ -0,0 +1,400 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Check the name availability of a host name. + /// + /// [OpenAPI] CheckHostNameAvailability=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkHostNameAvailability" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzFrontDoorCdnProfileHostNameAvailability_CheckViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Check the name availability of a host name.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class TestAzFrontDoorCdnProfileHostNameAvailability_CheckViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Input of CheckHostNameAvailability API. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckHostNameAvailabilityInput _checkHostNameAvailabilityInputBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.CheckHostNameAvailabilityInput(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The host name to validate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The host name to validate.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The host name to validate.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + public string HostName { get => _checkHostNameAvailabilityInputBody.HostName ?? null; set => _checkHostNameAvailabilityInputBody.HostName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdProfilesCheckHostNameAvailability' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AfdProfilesCheckHostNameAvailabilityViaIdentity(InputObject.Id, _checkHostNameAvailabilityInputBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AfdProfilesCheckHostNameAvailability(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.SubscriptionId ?? null, _checkHostNameAvailabilityInputBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_checkHostNameAvailabilityInputBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the + /// cmdlet class. + /// + public TestAzFrontDoorCdnProfileHostNameAvailability_CheckViaIdentityExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_checkHostNameAvailabilityInputBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_checkHostNameAvailabilityInputBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzCdnEndpoint_UpdateExpanded1.cs b/src/Cdn/generated/cmdlets/UpdateAzCdnEndpoint_UpdateExpanded1.cs new file mode 100644 index 000000000000..d8cf6273db76 --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzCdnEndpoint_UpdateExpanded1.cs @@ -0,0 +1,707 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and + /// profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update + /// origin groups, use the Update Origin group operation. To update custom domains, use the Update Custom Domain operation. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzCdnEndpoint_UpdateExpanded1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the Update Custom Domain operation.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzCdnEndpoint_UpdateExpanded1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Properties required to create or update an endpoint. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParameters _endpointUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of content types on which compression applies. The value should be a valid MIME type.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of content types on which compression applies. The value should be a valid MIME type.", + SerializedName = @"contentTypesToCompress", + PossibleTypes = new [] { typeof(string) })] + public string[] ContentTypesToCompress { get => _endpointUpdatePropertiesBody.ContentTypesToCompress ?? null /* arrayOf */; set => _endpointUpdatePropertiesBody.ContentTypesToCompress = value; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string DefaultOriginGroupId { get => _endpointUpdatePropertiesBody.DefaultOriginGroupId ?? null; set => _endpointUpdatePropertiesBody.DefaultOriginGroupId = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// User-friendly description of the policy. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "User-friendly description of the policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"User-friendly description of the policy.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string DeliveryPolicyDescription { get => _endpointUpdatePropertiesBody.DeliveryPolicyDescription ?? null; set => _endpointUpdatePropertiesBody.DeliveryPolicyDescription = value; } + + /// A list of the delivery rules. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of the delivery rules.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of the delivery rules.", + SerializedName = @"rules", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] DeliveryPolicyRule { get => _endpointUpdatePropertiesBody.DeliveryPolicyRule ?? null /* arrayOf */; set => _endpointUpdatePropertiesBody.DeliveryPolicyRule = value; } + + /// + /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified + /// path or content, e.g. block APAC for path /pictures/ + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/", + SerializedName = @"geoFilters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[] GeoFilter { get => _endpointUpdatePropertiesBody.GeoFilter ?? null /* arrayOf */; set => _endpointUpdatePropertiesBody.GeoFilter = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will + /// be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content + /// is smaller than 1 byte or larger than 1 MB. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB.", + SerializedName = @"isCompressionEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsCompressionEnabled { get => _endpointUpdatePropertiesBody.IsCompressionEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _endpointUpdatePropertiesBody.IsCompressionEnabled = value; } + + /// + /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.", + SerializedName = @"isHttpAllowed", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsHttpAllowed { get => _endpointUpdatePropertiesBody.IsHttpAllowed ?? default(global::System.Management.Automation.SwitchParameter); set => _endpointUpdatePropertiesBody.IsHttpAllowed = value; } + + /// + /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.", + SerializedName = @"isHttpsAllowed", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsHttpsAllowed { get => _endpointUpdatePropertiesBody.IsHttpsAllowed ?? default(global::System.Management.Automation.SwitchParameter); set => _endpointUpdatePropertiesBody.IsHttpsAllowed = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("EndpointName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this + /// information, CDN can apply scenario driven optimization. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization.", + SerializedName = @"optimizationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType OptimizationType { get => _endpointUpdatePropertiesBody.OptimizationType ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType)""); set => _endpointUpdatePropertiesBody.OptimizationType = value; } + + /// + /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses + /// single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname + /// determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header + /// value to match the origin hostname by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default.", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + public string OriginHostHeader { get => _endpointUpdatePropertiesBody.OriginHostHeader ?? null; set => _endpointUpdatePropertiesBody.OriginHostHeader = value; } + + /// + /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.", + SerializedName = @"originPath", + PossibleTypes = new [] { typeof(string) })] + public string OriginPath { get => _endpointUpdatePropertiesBody.OriginPath ?? null; set => _endpointUpdatePropertiesBody.OriginPath = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// + /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal + /// routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin.", + SerializedName = @"probePath", + PossibleTypes = new [] { typeof(string) })] + public string ProbePath { get => _endpointUpdatePropertiesBody.ProbePath ?? null; set => _endpointUpdatePropertiesBody.ProbePath = value; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching + /// to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL.", + SerializedName = @"queryStringCachingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior QueryStringCachingBehavior { get => _endpointUpdatePropertiesBody.QueryStringCachingBehavior ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior)""); set => _endpointUpdatePropertiesBody.QueryStringCachingBehavior = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Endpoint tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Endpoint tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Endpoint tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags Tag { get => _endpointUpdatePropertiesBody.Tag ?? null /* object */; set => _endpointUpdatePropertiesBody.Tag = value; } + + /// List of keys used to validate the signed URL hashes. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of keys used to validate the signed URL hashes.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of keys used to validate the signed URL hashes.", + SerializedName = @"urlSigningKeys", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[] UrlSigningKey { get => _endpointUpdatePropertiesBody.UrlSigningKey ?? null /* arrayOf */; set => _endpointUpdatePropertiesBody.UrlSigningKey = value; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string WebApplicationFirewallPolicyLinkId { get => _endpointUpdatePropertiesBody.WebApplicationFirewallPolicyLinkId ?? null; set => _endpointUpdatePropertiesBody.WebApplicationFirewallPolicyLinkId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzCdnEndpoint_UpdateExpanded1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzCdnEndpoint_UpdateExpanded1 Clone() + { + var clone = new UpdateAzCdnEndpoint_UpdateExpanded1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._endpointUpdatePropertiesBody = this._endpointUpdatePropertiesBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsUpdate(ResourceGroupName, ProfileName, Name, SubscriptionId, _endpointUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Name=Name,SubscriptionId=SubscriptionId,body=_endpointUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzCdnEndpoint_UpdateExpanded1() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId, body=_endpointUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId, body=_endpointUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzCdnEndpoint_UpdateViaIdentityExpanded1.cs b/src/Cdn/generated/cmdlets/UpdateAzCdnEndpoint_UpdateViaIdentityExpanded1.cs new file mode 100644 index 000000000000..97c2b147586f --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzCdnEndpoint_UpdateViaIdentityExpanded1.cs @@ -0,0 +1,674 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and + /// profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update + /// origin groups, use the Update Origin group operation. To update custom domains, use the Update Custom Domain operation. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzCdnEndpoint_UpdateViaIdentityExpanded1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the Update Custom Domain operation.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzCdnEndpoint_UpdateViaIdentityExpanded1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Properties required to create or update an endpoint. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParameters _endpointUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.EndpointUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of content types on which compression applies. The value should be a valid MIME type.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of content types on which compression applies. The value should be a valid MIME type.", + SerializedName = @"contentTypesToCompress", + PossibleTypes = new [] { typeof(string) })] + public string[] ContentTypesToCompress { get => _endpointUpdatePropertiesBody.ContentTypesToCompress ?? null /* arrayOf */; set => _endpointUpdatePropertiesBody.ContentTypesToCompress = value; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string DefaultOriginGroupId { get => _endpointUpdatePropertiesBody.DefaultOriginGroupId ?? null; set => _endpointUpdatePropertiesBody.DefaultOriginGroupId = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// User-friendly description of the policy. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "User-friendly description of the policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"User-friendly description of the policy.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string DeliveryPolicyDescription { get => _endpointUpdatePropertiesBody.DeliveryPolicyDescription ?? null; set => _endpointUpdatePropertiesBody.DeliveryPolicyDescription = value; } + + /// A list of the delivery rules. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of the delivery rules.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of the delivery rules.", + SerializedName = @"rules", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] DeliveryPolicyRule { get => _endpointUpdatePropertiesBody.DeliveryPolicyRule ?? null /* arrayOf */; set => _endpointUpdatePropertiesBody.DeliveryPolicyRule = value; } + + /// + /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified + /// path or content, e.g. block APAC for path /pictures/ + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/", + SerializedName = @"geoFilters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[] GeoFilter { get => _endpointUpdatePropertiesBody.GeoFilter ?? null /* arrayOf */; set => _endpointUpdatePropertiesBody.GeoFilter = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will + /// be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content + /// is smaller than 1 byte or larger than 1 MB. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB.", + SerializedName = @"isCompressionEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsCompressionEnabled { get => _endpointUpdatePropertiesBody.IsCompressionEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _endpointUpdatePropertiesBody.IsCompressionEnabled = value; } + + /// + /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.", + SerializedName = @"isHttpAllowed", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsHttpAllowed { get => _endpointUpdatePropertiesBody.IsHttpAllowed ?? default(global::System.Management.Automation.SwitchParameter); set => _endpointUpdatePropertiesBody.IsHttpAllowed = value; } + + /// + /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) + /// must be allowed. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed.", + SerializedName = @"isHttpsAllowed", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsHttpsAllowed { get => _endpointUpdatePropertiesBody.IsHttpsAllowed ?? default(global::System.Management.Automation.SwitchParameter); set => _endpointUpdatePropertiesBody.IsHttpsAllowed = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this + /// information, CDN can apply scenario driven optimization. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization.", + SerializedName = @"optimizationType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType OptimizationType { get => _endpointUpdatePropertiesBody.OptimizationType ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType)""); set => _endpointUpdatePropertiesBody.OptimizationType = value; } + + /// + /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses + /// single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname + /// determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header + /// value to match the origin hostname by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default.", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + public string OriginHostHeader { get => _endpointUpdatePropertiesBody.OriginHostHeader ?? null; set => _endpointUpdatePropertiesBody.OriginHostHeader = value; } + + /// + /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.", + SerializedName = @"originPath", + PossibleTypes = new [] { typeof(string) })] + public string OriginPath { get => _endpointUpdatePropertiesBody.OriginPath ?? null; set => _endpointUpdatePropertiesBody.OriginPath = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// + /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal + /// routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin.", + SerializedName = @"probePath", + PossibleTypes = new [] { typeof(string) })] + public string ProbePath { get => _endpointUpdatePropertiesBody.ProbePath ?? null; set => _endpointUpdatePropertiesBody.ProbePath = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching + /// to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL.", + SerializedName = @"queryStringCachingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior QueryStringCachingBehavior { get => _endpointUpdatePropertiesBody.QueryStringCachingBehavior ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior)""); set => _endpointUpdatePropertiesBody.QueryStringCachingBehavior = value; } + + /// Endpoint tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Endpoint tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Endpoint tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpointUpdateParametersTags Tag { get => _endpointUpdatePropertiesBody.Tag ?? null /* object */; set => _endpointUpdatePropertiesBody.Tag = value; } + + /// List of keys used to validate the signed URL hashes. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of keys used to validate the signed URL hashes.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of keys used to validate the signed URL hashes.", + SerializedName = @"urlSigningKeys", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[] UrlSigningKey { get => _endpointUpdatePropertiesBody.UrlSigningKey ?? null /* arrayOf */; set => _endpointUpdatePropertiesBody.UrlSigningKey = value; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string WebApplicationFirewallPolicyLinkId { get => _endpointUpdatePropertiesBody.WebApplicationFirewallPolicyLinkId ?? null; set => _endpointUpdatePropertiesBody.WebApplicationFirewallPolicyLinkId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzCdnEndpoint_UpdateViaIdentityExpanded1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzCdnEndpoint_UpdateViaIdentityExpanded1 Clone() + { + var clone = new UpdateAzCdnEndpoint_UpdateViaIdentityExpanded1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._endpointUpdatePropertiesBody = this._endpointUpdatePropertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.EndpointsUpdateViaIdentity(InputObject.Id, _endpointUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.EndpointsUpdate(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.SubscriptionId ?? null, _endpointUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_endpointUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzCdnEndpoint_UpdateViaIdentityExpanded1() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_endpointUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_endpointUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzCdnOriginGroup_UpdateExpanded1.cs b/src/Cdn/generated/cmdlets/UpdateAzCdnOriginGroup_UpdateExpanded1.cs new file mode 100644 index 000000000000..c59a2b945d30 --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzCdnOriginGroup_UpdateExpanded1.cs @@ -0,0 +1,557 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Updates an existing origin group within an endpoint. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzCdnOriginGroup_UpdateExpanded1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing origin group within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzCdnOriginGroup_UpdateExpanded1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Origin group properties needed for origin group creation or update. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParameters _originGroupUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Health probe settings to the origin that is used to determine the health of the origin.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health probe settings to the origin that is used to determine the health of the origin.", + SerializedName = @"healthProbeSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get => _originGroupUpdatePropertiesBody.HealthProbeSetting ?? null /* object */; set => _originGroupUpdatePropertiesBody.HealthProbeSetting = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the origin group which is unique within the endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin group which is unique within the endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin group which is unique within the endpoint.", + SerializedName = @"originGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OriginGroupName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// The source of the content being delivered via CDN within given origin group. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The source of the content being delivered via CDN within given origin group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The source of the content being delivered via CDN within given origin group.", + SerializedName = @"origins", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get => _originGroupUpdatePropertiesBody.Origin ?? null /* arrayOf */; set => _originGroupUpdatePropertiesBody.Origin = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is + /// currently not supported. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported.", + SerializedName = @"responseBasedOriginErrorDetectionSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get => _originGroupUpdatePropertiesBody.ResponseBasedOriginErrorDetectionSetting ?? null /* object */; set => _originGroupUpdatePropertiesBody.ResponseBasedOriginErrorDetectionSetting = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.", + SerializedName = @"trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + PossibleTypes = new [] { typeof(int) })] + public int TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get => _originGroupUpdatePropertiesBody.TrafficRestorationTimeToHealedOrNewEndpointsInMinute ?? default(int); set => _originGroupUpdatePropertiesBody.TrafficRestorationTimeToHealedOrNewEndpointsInMinute = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzCdnOriginGroup_UpdateExpanded1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzCdnOriginGroup_UpdateExpanded1 Clone() + { + var clone = new UpdateAzCdnOriginGroup_UpdateExpanded1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._originGroupUpdatePropertiesBody = this._originGroupUpdatePropertiesBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OriginGroupsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OriginGroupsUpdate(ResourceGroupName, ProfileName, EndpointName, Name, SubscriptionId, _originGroupUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,Name=Name,SubscriptionId=SubscriptionId,body=_originGroupUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzCdnOriginGroup_UpdateExpanded1() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId, body=_originGroupUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId, body=_originGroupUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzCdnOriginGroup_UpdateViaIdentityExpanded1.cs b/src/Cdn/generated/cmdlets/UpdateAzCdnOriginGroup_UpdateViaIdentityExpanded1.cs new file mode 100644 index 000000000000..c25745ae0734 --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzCdnOriginGroup_UpdateViaIdentityExpanded1.cs @@ -0,0 +1,513 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Updates an existing origin group within an endpoint. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzCdnOriginGroup_UpdateViaIdentityExpanded1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing origin group within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzCdnOriginGroup_UpdateViaIdentityExpanded1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Origin group properties needed for origin group creation or update. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroupUpdateParameters _originGroupUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginGroupUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Health probe settings to the origin that is used to determine the health of the origin.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health probe settings to the origin that is used to determine the health of the origin.", + SerializedName = @"healthProbeSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get => _originGroupUpdatePropertiesBody.HealthProbeSetting ?? null /* object */; set => _originGroupUpdatePropertiesBody.HealthProbeSetting = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// The source of the content being delivered via CDN within given origin group. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The source of the content being delivered via CDN within given origin group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The source of the content being delivered via CDN within given origin group.", + SerializedName = @"origins", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] Origin { get => _originGroupUpdatePropertiesBody.Origin ?? null /* arrayOf */; set => _originGroupUpdatePropertiesBody.Origin = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is + /// currently not supported. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported.", + SerializedName = @"responseBasedOriginErrorDetectionSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters ResponseBasedOriginErrorDetectionSetting { get => _originGroupUpdatePropertiesBody.ResponseBasedOriginErrorDetectionSetting ?? null /* object */; set => _originGroupUpdatePropertiesBody.ResponseBasedOriginErrorDetectionSetting = value; } + + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.", + SerializedName = @"trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + PossibleTypes = new [] { typeof(int) })] + public int TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get => _originGroupUpdatePropertiesBody.TrafficRestorationTimeToHealedOrNewEndpointsInMinute ?? default(int); set => _originGroupUpdatePropertiesBody.TrafficRestorationTimeToHealedOrNewEndpointsInMinute = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzCdnOriginGroup_UpdateViaIdentityExpanded1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzCdnOriginGroup_UpdateViaIdentityExpanded1 Clone() + { + var clone = new UpdateAzCdnOriginGroup_UpdateViaIdentityExpanded1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._originGroupUpdatePropertiesBody = this._originGroupUpdatePropertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OriginGroupsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.OriginGroupsUpdateViaIdentity(InputObject.Id, _originGroupUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.OriginGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OriginGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.OriginGroupsUpdate(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.OriginGroupName ?? null, InputObject.SubscriptionId ?? null, _originGroupUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_originGroupUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzCdnOriginGroup_UpdateViaIdentityExpanded1() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_originGroupUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_originGroupUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginGroup + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzCdnOrigin_UpdateExpanded1.cs b/src/Cdn/generated/cmdlets/UpdateAzCdnOrigin_UpdateExpanded1.cs new file mode 100644 index 000000000000..8db4f4451442 --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzCdnOrigin_UpdateExpanded1.cs @@ -0,0 +1,645 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Updates an existing origin within an endpoint. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzCdnOrigin_UpdateExpanded1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing origin within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzCdnOrigin_UpdateExpanded1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Origin properties needed for origin update. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParameters _originUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Origin is enabled for load balancing or not + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Origin is enabled for load balancing or not")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Origin is enabled for load balancing or not", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter Enabled { get => _originUpdatePropertiesBody.Enabled ?? default(global::System.Management.Automation.SwitchParameter); set => _originUpdatePropertiesBody.Enabled = value; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + public string HostName { get => _originUpdatePropertiesBody.HostName ?? null; set => _originUpdatePropertiesBody.HostName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// The value of the HTTP port. Must be between 1 and 65535. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The value of the HTTP port. Must be between 1 and 65535.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTP port. Must be between 1 and 65535.", + SerializedName = @"httpPort", + PossibleTypes = new [] { typeof(int) })] + public int HttpPort { get => _originUpdatePropertiesBody.HttpPort ?? default(int); set => _originUpdatePropertiesBody.HttpPort = value; } + + /// The value of the HTTPS port. Must be between 1 and 65535. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The value of the HTTPS port. Must be between 1 and 65535.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTPS port. Must be between 1 and 65535.", + SerializedName = @"httpsPort", + PossibleTypes = new [] { typeof(int) })] + public int HttpsPort { get => _originUpdatePropertiesBody.HttpsPort ?? default(int); set => _originUpdatePropertiesBody.HttpsPort = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the origin which is unique within the endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin which is unique within the endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin which is unique within the endpoint.", + SerializedName = @"originName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OriginName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + public string OriginHostHeader { get => _originUpdatePropertiesBody.OriginHostHeader ?? null; set => _originUpdatePropertiesBody.OriginHostHeader = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5", + SerializedName = @"priority", + PossibleTypes = new [] { typeof(int) })] + public int Priority { get => _originUpdatePropertiesBody.Priority ?? default(int); set => _originUpdatePropertiesBody.Priority = value; } + + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'", + SerializedName = @"privateLinkAlias", + PossibleTypes = new [] { typeof(string) })] + public string PrivateLinkAlias { get => _originUpdatePropertiesBody.PrivateLinkAlias ?? null; set => _originUpdatePropertiesBody.PrivateLinkAlias = value; } + + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A custom message to be included in the approval request to connect to the Private Link.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A custom message to be included in the approval request to connect to the Private Link.", + SerializedName = @"privateLinkApprovalMessage", + PossibleTypes = new [] { typeof(string) })] + public string PrivateLinkApprovalMessage { get => _originUpdatePropertiesBody.PrivateLinkApprovalMessage ?? null; set => _originUpdatePropertiesBody.PrivateLinkApprovalMessage = value; } + + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated", + SerializedName = @"privateLinkLocation", + PossibleTypes = new [] { typeof(string) })] + public string PrivateLinkLocation { get => _originUpdatePropertiesBody.PrivateLinkLocation ?? null; set => _originUpdatePropertiesBody.PrivateLinkLocation = value; } + + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'", + SerializedName = @"privateLinkResourceId", + PossibleTypes = new [] { typeof(string) })] + public string PrivateLinkResourceId { get => _originUpdatePropertiesBody.PrivateLinkResourceId ?? null; set => _originUpdatePropertiesBody.PrivateLinkResourceId = value; } + + /// Backing field for property. + private string _profileName; + + /// Name of the CDN profile which is unique within the resource group. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Weight of the origin in given origin group for load balancing. Must be between 1 and 1000")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Weight of the origin in given origin group for load balancing. Must be between 1 and 1000", + SerializedName = @"weight", + PossibleTypes = new [] { typeof(int) })] + public int Weight { get => _originUpdatePropertiesBody.Weight ?? default(int); set => _originUpdatePropertiesBody.Weight = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzCdnOrigin_UpdateExpanded1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzCdnOrigin_UpdateExpanded1 Clone() + { + var clone = new UpdateAzCdnOrigin_UpdateExpanded1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._originUpdatePropertiesBody = this._originUpdatePropertiesBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OriginsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OriginsUpdate(ResourceGroupName, ProfileName, EndpointName, Name, SubscriptionId, _originUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,Name=Name,SubscriptionId=SubscriptionId,body=_originUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzCdnOrigin_UpdateExpanded1() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId, body=_originUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId, body=_originUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzCdnOrigin_UpdateViaIdentityExpanded1.cs b/src/Cdn/generated/cmdlets/UpdateAzCdnOrigin_UpdateViaIdentityExpanded1.cs new file mode 100644 index 000000000000..c50478ecfa9c --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzCdnOrigin_UpdateViaIdentityExpanded1.cs @@ -0,0 +1,601 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Updates an existing origin within an endpoint. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzCdnOrigin_UpdateViaIdentityExpanded1", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing origin within an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzCdnOrigin_UpdateViaIdentityExpanded1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Origin properties needed for origin update. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOriginUpdateParameters _originUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.OriginUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Origin is enabled for load balancing or not + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Origin is enabled for load balancing or not")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Origin is enabled for load balancing or not", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter Enabled { get => _originUpdatePropertiesBody.Enabled ?? default(global::System.Management.Automation.SwitchParameter); set => _originUpdatePropertiesBody.Enabled = value; } + + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + public string HostName { get => _originUpdatePropertiesBody.HostName ?? null; set => _originUpdatePropertiesBody.HostName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// The value of the HTTP port. Must be between 1 and 65535. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The value of the HTTP port. Must be between 1 and 65535.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTP port. Must be between 1 and 65535.", + SerializedName = @"httpPort", + PossibleTypes = new [] { typeof(int) })] + public int HttpPort { get => _originUpdatePropertiesBody.HttpPort ?? default(int); set => _originUpdatePropertiesBody.HttpPort = value; } + + /// The value of the HTTPS port. Must be between 1 and 65535. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The value of the HTTPS port. Must be between 1 and 65535.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTPS port. Must be between 1 and 65535.", + SerializedName = @"httpsPort", + PossibleTypes = new [] { typeof(int) })] + public int HttpsPort { get => _originUpdatePropertiesBody.HttpsPort ?? default(int); set => _originUpdatePropertiesBody.HttpsPort = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + public string OriginHostHeader { get => _originUpdatePropertiesBody.OriginHostHeader ?? null; set => _originUpdatePropertiesBody.OriginHostHeader = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5", + SerializedName = @"priority", + PossibleTypes = new [] { typeof(int) })] + public int Priority { get => _originUpdatePropertiesBody.Priority ?? default(int); set => _originUpdatePropertiesBody.Priority = value; } + + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'", + SerializedName = @"privateLinkAlias", + PossibleTypes = new [] { typeof(string) })] + public string PrivateLinkAlias { get => _originUpdatePropertiesBody.PrivateLinkAlias ?? null; set => _originUpdatePropertiesBody.PrivateLinkAlias = value; } + + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A custom message to be included in the approval request to connect to the Private Link.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A custom message to be included in the approval request to connect to the Private Link.", + SerializedName = @"privateLinkApprovalMessage", + PossibleTypes = new [] { typeof(string) })] + public string PrivateLinkApprovalMessage { get => _originUpdatePropertiesBody.PrivateLinkApprovalMessage ?? null; set => _originUpdatePropertiesBody.PrivateLinkApprovalMessage = value; } + + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated", + SerializedName = @"privateLinkLocation", + PossibleTypes = new [] { typeof(string) })] + public string PrivateLinkLocation { get => _originUpdatePropertiesBody.PrivateLinkLocation ?? null; set => _originUpdatePropertiesBody.PrivateLinkLocation = value; } + + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'", + SerializedName = @"privateLinkResourceId", + PossibleTypes = new [] { typeof(string) })] + public string PrivateLinkResourceId { get => _originUpdatePropertiesBody.PrivateLinkResourceId ?? null; set => _originUpdatePropertiesBody.PrivateLinkResourceId = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Weight of the origin in given origin group for load balancing. Must be between 1 and 1000")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Weight of the origin in given origin group for load balancing. Must be between 1 and 1000", + SerializedName = @"weight", + PossibleTypes = new [] { typeof(int) })] + public int Weight { get => _originUpdatePropertiesBody.Weight ?? default(int); set => _originUpdatePropertiesBody.Weight = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzCdnOrigin_UpdateViaIdentityExpanded1 + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzCdnOrigin_UpdateViaIdentityExpanded1 Clone() + { + var clone = new UpdateAzCdnOrigin_UpdateViaIdentityExpanded1(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._originUpdatePropertiesBody = this._originUpdatePropertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OriginsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.OriginsUpdateViaIdentity(InputObject.Id, _originUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.OriginName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OriginName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.OriginsUpdate(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.OriginName ?? null, InputObject.SubscriptionId ?? null, _originUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_originUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzCdnOrigin_UpdateViaIdentityExpanded1() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_originUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_originUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOrigin + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzCdnProfile_UpdateExpanded.cs b/src/Cdn/generated/cmdlets/UpdateAzCdnProfile_UpdateExpanded.cs new file mode 100644 index 000000000000..d4ded51ddc29 --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzCdnProfile_UpdateExpanded.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// 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. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzCdnProfile_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"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.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzCdnProfile_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Properties required to update a profile. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParameters _profileUpdateParametersBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProfileName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns.", + SerializedName = @"originResponseTimeoutSeconds", + PossibleTypes = new [] { typeof(int) })] + public int OriginResponseTimeoutSecond { get => _profileUpdateParametersBody.OriginResponseTimeoutSecond ?? default(int); set => _profileUpdateParametersBody.OriginResponseTimeoutSecond = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Profile tags + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Profile tags")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Profile tags", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags Tag { get => _profileUpdateParametersBody.Tag ?? null /* object */; set => _profileUpdateParametersBody.Tag = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzCdnProfile_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzCdnProfile_UpdateExpanded Clone() + { + var clone = new UpdateAzCdnProfile_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._profileUpdateParametersBody = this._profileUpdateParametersBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProfilesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProfilesUpdate(ResourceGroupName, Name, SubscriptionId, _profileUpdateParametersBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,Name=Name,SubscriptionId=SubscriptionId,body=_profileUpdateParametersBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzCdnProfile_UpdateExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId, body=_profileUpdateParametersBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId, body=_profileUpdateParametersBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzCdnProfile_UpdateViaIdentityExpanded.cs b/src/Cdn/generated/cmdlets/UpdateAzCdnProfile_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..ea0cc0e6c655 --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzCdnProfile_UpdateViaIdentityExpanded.cs @@ -0,0 +1,481 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// 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. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzCdnProfile_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"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.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzCdnProfile_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Properties required to update a profile. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParameters _profileUpdateParametersBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ProfileUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns.", + SerializedName = @"originResponseTimeoutSeconds", + PossibleTypes = new [] { typeof(int) })] + public int OriginResponseTimeoutSecond { get => _profileUpdateParametersBody.OriginResponseTimeoutSecond ?? default(int); set => _profileUpdateParametersBody.OriginResponseTimeoutSecond = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Profile tags + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Profile tags")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Profile tags", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags Tag { get => _profileUpdateParametersBody.Tag ?? null /* object */; set => _profileUpdateParametersBody.Tag = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzCdnProfile_UpdateViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzCdnProfile_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzCdnProfile_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._profileUpdateParametersBody = this._profileUpdateParametersBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProfilesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProfilesUpdateViaIdentity(InputObject.Id, _profileUpdateParametersBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProfilesUpdate(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.SubscriptionId ?? null, _profileUpdateParametersBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_profileUpdateParametersBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzCdnProfile_UpdateViaIdentityExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_profileUpdateParametersBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_profileUpdateParametersBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomainValidationToken_Refresh.cs b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomainValidationToken_Refresh.cs new file mode 100644 index 000000000000..e12b57459efe --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomainValidationToken_Refresh.cs @@ -0,0 +1,491 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Updates the domain validation token. + /// + /// [OpenAPI] RefreshValidationToken=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}/refreshValidationToken" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFrontDoorCdnCustomDomainValidationToken_Refresh", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates the domain validation token.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzFrontDoorCdnCustomDomainValidationToken_Refresh : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _customDomainName; + + /// Name of the domain under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the domain under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the domain under the profile which is unique globally.", + SerializedName = @"customDomainName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string CustomDomainName { get => this._customDomainName; set => this._customDomainName = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzFrontDoorCdnCustomDomainValidationToken_Refresh + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnCustomDomainValidationToken_Refresh Clone() + { + var clone = new UpdateAzFrontDoorCdnCustomDomainValidationToken_Refresh(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.CustomDomainName = this.CustomDomainName; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdCustomDomainsRefreshValidationToken' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdCustomDomainsRefreshValidationToken(ResourceGroupName, ProfileName, CustomDomainName, SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,CustomDomainName=CustomDomainName,SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzFrontDoorCdnCustomDomainValidationToken_Refresh() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, CustomDomainName=CustomDomainName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, CustomDomainName=CustomDomainName, SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomainValidationToken_RefreshViaIdentity.cs b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomainValidationToken_RefreshViaIdentity.cs new file mode 100644 index 000000000000..435f7e1f25ca --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomainValidationToken_RefreshViaIdentity.cs @@ -0,0 +1,460 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Updates the domain validation token. + /// + /// [OpenAPI] RefreshValidationToken=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}/refreshValidationToken" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFrontDoorCdnCustomDomainValidationToken_RefreshViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates the domain validation token.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzFrontDoorCdnCustomDomainValidationToken_RefreshViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzFrontDoorCdnCustomDomainValidationToken_RefreshViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnCustomDomainValidationToken_RefreshViaIdentity Clone() + { + var clone = new UpdateAzFrontDoorCdnCustomDomainValidationToken_RefreshViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdCustomDomainsRefreshValidationToken' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AfdCustomDomainsRefreshValidationTokenViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CustomDomainName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CustomDomainName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AfdCustomDomainsRefreshValidationToken(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.CustomDomainName ?? null, InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public UpdateAzFrontDoorCdnCustomDomainValidationToken_RefreshViaIdentity() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomain_UpdateExpanded.cs b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomain_UpdateExpanded.cs new file mode 100644 index 000000000000..e1998ca3d568 --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomain_UpdateExpanded.cs @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Updates an existing domain within a profile. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFrontDoorCdnCustomDomain_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing domain within a profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzFrontDoorCdnCustomDomain_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The domain JSON object required for domain creation or update. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParameters _customDomainUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string AzureDnsZoneId { get => _customDomainUpdatePropertiesBody.AzureDnsZoneId ?? null; set => _customDomainUpdatePropertiesBody.AzureDnsZoneId = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _customDomainName; + + /// Name of the domain under the profile which is unique globally + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the domain under the profile which is unique globally")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the domain under the profile which is unique globally", + SerializedName = @"customDomainName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string CustomDomainName { get => this._customDomainName; set => this._customDomainName = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string PropertiesPreValidatedCustomDomainResourceId { get => _customDomainUpdatePropertiesBody.PropertiesPreValidatedCustomDomainResourceIdId ?? null; set => _customDomainUpdatePropertiesBody.PropertiesPreValidatedCustomDomainResourceIdId = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own + /// certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default.", + SerializedName = @"tlsSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters TlsSetting { get => _customDomainUpdatePropertiesBody.TlsSetting ?? null /* object */; set => _customDomainUpdatePropertiesBody.TlsSetting = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzFrontDoorCdnCustomDomain_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnCustomDomain_UpdateExpanded Clone() + { + var clone = new UpdateAzFrontDoorCdnCustomDomain_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._customDomainUpdatePropertiesBody = this._customDomainUpdatePropertiesBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.CustomDomainName = this.CustomDomainName; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdCustomDomainsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdCustomDomainsUpdate(ResourceGroupName, ProfileName, CustomDomainName, SubscriptionId, _customDomainUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,CustomDomainName=CustomDomainName,SubscriptionId=SubscriptionId,body=_customDomainUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzFrontDoorCdnCustomDomain_UpdateExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, CustomDomainName=CustomDomainName, SubscriptionId=SubscriptionId, body=_customDomainUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, CustomDomainName=CustomDomainName, SubscriptionId=SubscriptionId, body=_customDomainUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomain_UpdateViaIdentityExpanded.cs b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomain_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..ee1d07df6b57 --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomain_UpdateViaIdentityExpanded.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Updates an existing domain within a profile. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/customDomains/{customDomainName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFrontDoorCdnCustomDomain_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing domain within a profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzFrontDoorCdnCustomDomain_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The domain JSON object required for domain creation or update. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainUpdateParameters _customDomainUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdDomainUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string AzureDnsZoneId { get => _customDomainUpdatePropertiesBody.AzureDnsZoneId ?? null; set => _customDomainUpdatePropertiesBody.AzureDnsZoneId = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string PropertiesPreValidatedCustomDomainResourceId { get => _customDomainUpdatePropertiesBody.PropertiesPreValidatedCustomDomainResourceIdId ?? null; set => _customDomainUpdatePropertiesBody.PropertiesPreValidatedCustomDomainResourceIdId = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own + /// certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default.", + SerializedName = @"tlsSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters TlsSetting { get => _customDomainUpdatePropertiesBody.TlsSetting ?? null /* object */; set => _customDomainUpdatePropertiesBody.TlsSetting = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzFrontDoorCdnCustomDomain_UpdateViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnCustomDomain_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzFrontDoorCdnCustomDomain_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._customDomainUpdatePropertiesBody = this._customDomainUpdatePropertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdCustomDomainsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AfdCustomDomainsUpdateViaIdentity(InputObject.Id, _customDomainUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CustomDomainName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CustomDomainName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AfdCustomDomainsUpdate(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.CustomDomainName ?? null, InputObject.SubscriptionId ?? null, _customDomainUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_customDomainUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzFrontDoorCdnCustomDomain_UpdateViaIdentityExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_customDomainUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_customDomainUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomain + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnEndpoint_UpdateExpanded.cs b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnEndpoint_UpdateExpanded.cs new file mode 100644 index 000000000000..de5e255f9d9a --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnEndpoint_UpdateExpanded.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource + /// group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. + /// To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFrontDoorCdnEndpoint_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzFrontDoorCdnEndpoint_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Properties required to create or update an endpoint. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParameters _endpointUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'", + SerializedName = @"enabledState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState EnabledState { get => _endpointUpdatePropertiesBody.EnabledState ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); set => _endpointUpdatePropertiesBody.EnabledState = value; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Endpoint tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Endpoint tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Endpoint tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags Tag { get => _endpointUpdatePropertiesBody.Tag ?? null /* object */; set => _endpointUpdatePropertiesBody.Tag = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzFrontDoorCdnEndpoint_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnEndpoint_UpdateExpanded Clone() + { + var clone = new UpdateAzFrontDoorCdnEndpoint_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._endpointUpdatePropertiesBody = this._endpointUpdatePropertiesBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdEndpointsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdEndpointsUpdate(ResourceGroupName, ProfileName, EndpointName, SubscriptionId, _endpointUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,SubscriptionId=SubscriptionId,body=_endpointUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzFrontDoorCdnEndpoint_UpdateExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=_endpointUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, SubscriptionId=SubscriptionId, body=_endpointUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnEndpoint_UpdateViaIdentityExpanded.cs b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnEndpoint_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..6cfce016b430 --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnEndpoint_UpdateViaIdentityExpanded.cs @@ -0,0 +1,486 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource + /// group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. + /// To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFrontDoorCdnEndpoint_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzFrontDoorCdnEndpoint_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Properties required to create or update an endpoint. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParameters _endpointUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdEndpointUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'", + SerializedName = @"enabledState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState EnabledState { get => _endpointUpdatePropertiesBody.EnabledState ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); set => _endpointUpdatePropertiesBody.EnabledState = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Endpoint tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Endpoint tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Endpoint tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpointUpdateParametersTags Tag { get => _endpointUpdatePropertiesBody.Tag ?? null /* object */; set => _endpointUpdatePropertiesBody.Tag = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzFrontDoorCdnEndpoint_UpdateViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnEndpoint_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzFrontDoorCdnEndpoint_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._endpointUpdatePropertiesBody = this._endpointUpdatePropertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdEndpointsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AfdEndpointsUpdateViaIdentity(InputObject.Id, _endpointUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AfdEndpointsUpdate(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.SubscriptionId ?? null, _endpointUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_endpointUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzFrontDoorCdnEndpoint_UpdateViaIdentityExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_endpointUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_endpointUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdEndpoint + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnOriginGroup_UpdateExpanded.cs b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnOriginGroup_UpdateExpanded.cs new file mode 100644 index 000000000000..14f613ddd080 --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnOriginGroup_UpdateExpanded.cs @@ -0,0 +1,542 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Updates an existing origin group within a profile. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFrontDoorCdnOriginGroup_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing origin group within a profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzFrontDoorCdnOriginGroup_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// AFDOrigin group properties needed for origin group creation or update. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParameters _originGroupUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Health probe settings to the origin that is used to determine the health of the origin.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health probe settings to the origin that is used to determine the health of the origin.", + SerializedName = @"healthProbeSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get => _originGroupUpdatePropertiesBody.HealthProbeSetting ?? null /* object */; set => _originGroupUpdatePropertiesBody.HealthProbeSetting = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Load balancing settings for a backend pool + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Load balancing settings for a backend pool")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Load balancing settings for a backend pool", + SerializedName = @"loadBalancingSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters LoadBalancingSetting { get => _originGroupUpdatePropertiesBody.LoadBalancingSetting ?? null /* object */; set => _originGroupUpdatePropertiesBody.LoadBalancingSetting = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Backing field for property. + private string _originGroupName; + + /// Name of the origin group which is unique within the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin group which is unique within the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin group which is unique within the profile.", + SerializedName = @"originGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string OriginGroupName { get => this._originGroupName; set => this._originGroupName = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'", + SerializedName = @"sessionAffinityState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState SessionAffinityState { get => _originGroupUpdatePropertiesBody.SessionAffinityState ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); set => _originGroupUpdatePropertiesBody.SessionAffinityState = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.", + SerializedName = @"trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + PossibleTypes = new [] { typeof(int) })] + public int TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get => _originGroupUpdatePropertiesBody.TrafficRestorationTimeToHealedOrNewEndpointsInMinute ?? default(int); set => _originGroupUpdatePropertiesBody.TrafficRestorationTimeToHealedOrNewEndpointsInMinute = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzFrontDoorCdnOriginGroup_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnOriginGroup_UpdateExpanded Clone() + { + var clone = new UpdateAzFrontDoorCdnOriginGroup_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._originGroupUpdatePropertiesBody = this._originGroupUpdatePropertiesBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.OriginGroupName = this.OriginGroupName; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdOriginGroupsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdOriginGroupsUpdate(ResourceGroupName, ProfileName, OriginGroupName, SubscriptionId, _originGroupUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,OriginGroupName=OriginGroupName,SubscriptionId=SubscriptionId,body=_originGroupUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzFrontDoorCdnOriginGroup_UpdateExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, SubscriptionId=SubscriptionId, body=_originGroupUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, SubscriptionId=SubscriptionId, body=_originGroupUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnOriginGroup_UpdateViaIdentityExpanded.cs b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnOriginGroup_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..5173982b19c6 --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnOriginGroup_UpdateViaIdentityExpanded.cs @@ -0,0 +1,510 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Updates an existing origin group within a profile. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFrontDoorCdnOriginGroup_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing origin group within a profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzFrontDoorCdnOriginGroup_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// AFDOrigin group properties needed for origin group creation or update. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroupUpdateParameters _originGroupUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginGroupUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Health probe settings to the origin that is used to determine the health of the origin.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Health probe settings to the origin that is used to determine the health of the origin.", + SerializedName = @"healthProbeSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters HealthProbeSetting { get => _originGroupUpdatePropertiesBody.HealthProbeSetting ?? null /* object */; set => _originGroupUpdatePropertiesBody.HealthProbeSetting = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Load balancing settings for a backend pool + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Load balancing settings for a backend pool")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Load balancing settings for a backend pool", + SerializedName = @"loadBalancingSettings", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters LoadBalancingSetting { get => _originGroupUpdatePropertiesBody.LoadBalancingSetting ?? null /* object */; set => _originGroupUpdatePropertiesBody.LoadBalancingSetting = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'", + SerializedName = @"sessionAffinityState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState SessionAffinityState { get => _originGroupUpdatePropertiesBody.SessionAffinityState ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); set => _originGroupUpdatePropertiesBody.SessionAffinityState = value; } + + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint + /// is added. Default is 10 mins. This property is currently not supported. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported.", + SerializedName = @"trafficRestorationTimeToHealedOrNewEndpointsInMinutes", + PossibleTypes = new [] { typeof(int) })] + public int TrafficRestorationTimeToHealedOrNewEndpointsInMinute { get => _originGroupUpdatePropertiesBody.TrafficRestorationTimeToHealedOrNewEndpointsInMinute ?? default(int); set => _originGroupUpdatePropertiesBody.TrafficRestorationTimeToHealedOrNewEndpointsInMinute = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzFrontDoorCdnOriginGroup_UpdateViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnOriginGroup_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzFrontDoorCdnOriginGroup_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._originGroupUpdatePropertiesBody = this._originGroupUpdatePropertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdOriginGroupsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AfdOriginGroupsUpdateViaIdentity(InputObject.Id, _originGroupUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.OriginGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OriginGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AfdOriginGroupsUpdate(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.OriginGroupName ?? null, InputObject.SubscriptionId ?? null, _originGroupUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_originGroupUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzFrontDoorCdnOriginGroup_UpdateViaIdentityExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_originGroupUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_originGroupUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginGroup + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnOrigin_UpdateExpanded.cs b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnOrigin_UpdateExpanded.cs new file mode 100644 index 000000000000..666ba24dcee6 --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnOrigin_UpdateExpanded.cs @@ -0,0 +1,682 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Updates an existing origin within an origin group. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFrontDoorCdnOrigin_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing origin within an origin group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzFrontDoorCdnOrigin_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// AFDOrigin properties needed for origin update. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParameters _originUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string AzureOriginId { get => _originUpdatePropertiesBody.AzureOriginId ?? null; set => _originUpdatePropertiesBody.AzureOriginId = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled + /// if there is a single enabled backend in single enabled backend pool. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool.", + SerializedName = @"enabledState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState EnabledState { get => _originUpdatePropertiesBody.EnabledState ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); set => _originUpdatePropertiesBody.EnabledState = value; } + + /// Whether to enable certificate name check at origin level + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to enable certificate name check at origin level")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable certificate name check at origin level", + SerializedName = @"enforceCertificateNameCheck", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter EnforceCertificateNameCheck { get => _originUpdatePropertiesBody.EnforceCertificateNameCheck ?? default(global::System.Management.Automation.SwitchParameter); set => _originUpdatePropertiesBody.EnforceCertificateNameCheck = value; } + + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + public string HostName { get => _originUpdatePropertiesBody.HostName ?? null; set => _originUpdatePropertiesBody.HostName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// The value of the HTTP port. Must be between 1 and 65535. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The value of the HTTP port. Must be between 1 and 65535.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTP port. Must be between 1 and 65535.", + SerializedName = @"httpPort", + PossibleTypes = new [] { typeof(int) })] + public int HttpPort { get => _originUpdatePropertiesBody.HttpPort ?? default(int); set => _originUpdatePropertiesBody.HttpPort = value; } + + /// The value of the HTTPS port. Must be between 1 and 65535. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The value of the HTTPS port. Must be between 1 and 65535.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTPS port. Must be between 1 and 65535.", + SerializedName = @"httpsPort", + PossibleTypes = new [] { typeof(int) })] + public int HttpsPort { get => _originUpdatePropertiesBody.HttpsPort ?? default(int); set => _originUpdatePropertiesBody.HttpsPort = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Backing field for property. + private string _originGroupName; + + /// Name of the origin group which is unique within the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin group which is unique within the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin group which is unique within the profile.", + SerializedName = @"originGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string OriginGroupName { get => this._originGroupName; set => this._originGroupName = value; } + + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + public string OriginHostHeader { get => _originUpdatePropertiesBody.OriginHostHeader ?? null; set => _originUpdatePropertiesBody.OriginHostHeader = value; } + + /// Backing field for property. + private string _originName; + + /// Name of the origin which is unique within the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the origin which is unique within the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the origin which is unique within the profile.", + SerializedName = @"originName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string OriginName { get => this._originName; set => this._originName = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5", + SerializedName = @"priority", + PossibleTypes = new [] { typeof(int) })] + public int Priority { get => _originUpdatePropertiesBody.Priority ?? default(int); set => _originUpdatePropertiesBody.Priority = value; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string PrivateLinkId { get => _originUpdatePropertiesBody.PrivateLinkId ?? null; set => _originUpdatePropertiesBody.PrivateLinkId = value; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// + /// The group id from the provider of resource the shared private link resource is for. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The group id from the provider of resource the shared private link resource is for.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The group id from the provider of resource the shared private link resource is for.", + SerializedName = @"groupId", + PossibleTypes = new [] { typeof(string) })] + public string SharedPrivateLinkResourceGroupId { get => _originUpdatePropertiesBody.SharedPrivateLinkResourceGroupId ?? null; set => _originUpdatePropertiesBody.SharedPrivateLinkResourceGroupId = value; } + + /// The location of the shared private link resource + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The location of the shared private link resource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location of the shared private link resource", + SerializedName = @"privateLinkLocation", + PossibleTypes = new [] { typeof(string) })] + public string SharedPrivateLinkResourcePrivateLinkLocation { get => _originUpdatePropertiesBody.SharedPrivateLinkResourcePrivateLinkLocation ?? null; set => _originUpdatePropertiesBody.SharedPrivateLinkResourcePrivateLinkLocation = value; } + + /// + /// The request message for requesting approval of the shared private link resource. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The request message for requesting approval of the shared private link resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The request message for requesting approval of the shared private link resource.", + SerializedName = @"requestMessage", + PossibleTypes = new [] { typeof(string) })] + public string SharedPrivateLinkResourceRequestMessage { get => _originUpdatePropertiesBody.SharedPrivateLinkResourceRequestMessage ?? null; set => _originUpdatePropertiesBody.SharedPrivateLinkResourceRequestMessage = value; } + + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus SharedPrivateLinkResourceStatus { get => _originUpdatePropertiesBody.SharedPrivateLinkResourceStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus)""); set => _originUpdatePropertiesBody.SharedPrivateLinkResourceStatus = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Weight of the origin in given origin group for load balancing. Must be between 1 and 1000")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Weight of the origin in given origin group for load balancing. Must be between 1 and 1000", + SerializedName = @"weight", + PossibleTypes = new [] { typeof(int) })] + public int Weight { get => _originUpdatePropertiesBody.Weight ?? default(int); set => _originUpdatePropertiesBody.Weight = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzFrontDoorCdnOrigin_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnOrigin_UpdateExpanded Clone() + { + var clone = new UpdateAzFrontDoorCdnOrigin_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._originUpdatePropertiesBody = this._originUpdatePropertiesBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.OriginGroupName = this.OriginGroupName; + clone.OriginName = this.OriginName; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdOriginsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AfdOriginsUpdate(ResourceGroupName, ProfileName, OriginGroupName, OriginName, SubscriptionId, _originUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,OriginGroupName=OriginGroupName,OriginName=OriginName,SubscriptionId=SubscriptionId,body=_originUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzFrontDoorCdnOrigin_UpdateExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, OriginName=OriginName, SubscriptionId=SubscriptionId, body=_originUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, OriginGroupName=OriginGroupName, OriginName=OriginName, SubscriptionId=SubscriptionId, body=_originUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnOrigin_UpdateViaIdentityExpanded.cs b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnOrigin_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..ed4e784bc0bf --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnOrigin_UpdateViaIdentityExpanded.cs @@ -0,0 +1,637 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Updates an existing origin within an origin group. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/origins/{originName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFrontDoorCdnOrigin_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing origin within an origin group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzFrontDoorCdnOrigin_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// AFDOrigin properties needed for origin update. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOriginUpdateParameters _originUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdOriginUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string AzureOriginId { get => _originUpdatePropertiesBody.AzureOriginId ?? null; set => _originUpdatePropertiesBody.AzureOriginId = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled + /// if there is a single enabled backend in single enabled backend pool. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool.", + SerializedName = @"enabledState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState EnabledState { get => _originUpdatePropertiesBody.EnabledState ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); set => _originUpdatePropertiesBody.EnabledState = value; } + + /// Whether to enable certificate name check at origin level + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to enable certificate name check at origin level")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable certificate name check at origin level", + SerializedName = @"enforceCertificateNameCheck", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter EnforceCertificateNameCheck { get => _originUpdatePropertiesBody.EnforceCertificateNameCheck ?? default(global::System.Management.Automation.SwitchParameter); set => _originUpdatePropertiesBody.EnforceCertificateNameCheck = value; } + + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across + /// all origins in an endpoint. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.", + SerializedName = @"hostName", + PossibleTypes = new [] { typeof(string) })] + public string HostName { get => _originUpdatePropertiesBody.HostName ?? null; set => _originUpdatePropertiesBody.HostName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// The value of the HTTP port. Must be between 1 and 65535. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The value of the HTTP port. Must be between 1 and 65535.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTP port. Must be between 1 and 65535.", + SerializedName = @"httpPort", + PossibleTypes = new [] { typeof(int) })] + public int HttpPort { get => _originUpdatePropertiesBody.HttpPort ?? default(int); set => _originUpdatePropertiesBody.HttpPort = value; } + + /// The value of the HTTPS port. Must be between 1 and 65535. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The value of the HTTPS port. Must be between 1 and 65535.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The value of the HTTPS port. Must be between 1 and 65535.", + SerializedName = @"httpsPort", + PossibleTypes = new [] { typeof(int) })] + public int HttpsPort { get => _originUpdatePropertiesBody.HttpsPort ?? default(int); set => _originUpdatePropertiesBody.HttpsPort = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this + /// value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the + /// origin hostname by default. This overrides the host header defined at Endpoint + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint", + SerializedName = @"originHostHeader", + PossibleTypes = new [] { typeof(string) })] + public string OriginHostHeader { get => _originUpdatePropertiesBody.OriginHostHeader ?? null; set => _originUpdatePropertiesBody.OriginHostHeader = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if + /// any lower priority origin is healthy.Must be between 1 and 5 + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5", + SerializedName = @"priority", + PossibleTypes = new [] { typeof(int) })] + public int Priority { get => _originUpdatePropertiesBody.Priority ?? default(int); set => _originUpdatePropertiesBody.Priority = value; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string PrivateLinkId { get => _originUpdatePropertiesBody.PrivateLinkId ?? null; set => _originUpdatePropertiesBody.PrivateLinkId = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// The group id from the provider of resource the shared private link resource is for. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The group id from the provider of resource the shared private link resource is for.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The group id from the provider of resource the shared private link resource is for.", + SerializedName = @"groupId", + PossibleTypes = new [] { typeof(string) })] + public string SharedPrivateLinkResourceGroupId { get => _originUpdatePropertiesBody.SharedPrivateLinkResourceGroupId ?? null; set => _originUpdatePropertiesBody.SharedPrivateLinkResourceGroupId = value; } + + /// The location of the shared private link resource + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The location of the shared private link resource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location of the shared private link resource", + SerializedName = @"privateLinkLocation", + PossibleTypes = new [] { typeof(string) })] + public string SharedPrivateLinkResourcePrivateLinkLocation { get => _originUpdatePropertiesBody.SharedPrivateLinkResourcePrivateLinkLocation ?? null; set => _originUpdatePropertiesBody.SharedPrivateLinkResourcePrivateLinkLocation = value; } + + /// + /// The request message for requesting approval of the shared private link resource. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The request message for requesting approval of the shared private link resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The request message for requesting approval of the shared private link resource.", + SerializedName = @"requestMessage", + PossibleTypes = new [] { typeof(string) })] + public string SharedPrivateLinkResourceRequestMessage { get => _originUpdatePropertiesBody.SharedPrivateLinkResourceRequestMessage ?? null; set => _originUpdatePropertiesBody.SharedPrivateLinkResourceRequestMessage = value; } + + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus SharedPrivateLinkResourceStatus { get => _originUpdatePropertiesBody.SharedPrivateLinkResourceStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus)""); set => _originUpdatePropertiesBody.SharedPrivateLinkResourceStatus = value; } + + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Weight of the origin in given origin group for load balancing. Must be between 1 and 1000")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Weight of the origin in given origin group for load balancing. Must be between 1 and 1000", + SerializedName = @"weight", + PossibleTypes = new [] { typeof(int) })] + public int Weight { get => _originUpdatePropertiesBody.Weight ?? default(int); set => _originUpdatePropertiesBody.Weight = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzFrontDoorCdnOrigin_UpdateViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnOrigin_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzFrontDoorCdnOrigin_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._originUpdatePropertiesBody = this._originUpdatePropertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AfdOriginsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AfdOriginsUpdateViaIdentity(InputObject.Id, _originUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.OriginGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OriginGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.OriginName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OriginName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AfdOriginsUpdate(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.OriginGroupName ?? null, InputObject.OriginName ?? null, InputObject.SubscriptionId ?? null, _originUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_originUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzFrontDoorCdnOrigin_UpdateViaIdentityExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_originUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_originUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdOrigin + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnRoute_UpdateExpanded.cs b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnRoute_UpdateExpanded.cs new file mode 100644 index 000000000000..f33760bb1c1a --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnRoute_UpdateExpanded.cs @@ -0,0 +1,690 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Updates an existing route with the specified route name under the specified subscription, resource group, profile, and + /// AzureFrontDoor endpoint. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFrontDoorCdnRoute_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzFrontDoorCdnRoute_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The domain JSON object required for domain creation or update. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParameters _routeUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// query parameters to include or exclude (comma separated). + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "query parameters to include or exclude (comma separated).")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"query parameters to include or exclude (comma separated).", + SerializedName = @"queryParameters", + PossibleTypes = new [] { typeof(string) })] + public string CacheConfigurationQueryParameter { get => _routeUpdatePropertiesBody.CacheConfigurationQueryParameter ?? null; set => _routeUpdatePropertiesBody.CacheConfigurationQueryParameter = value; } + + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.", + SerializedName = @"queryStringCachingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior CacheConfigurationQueryStringCachingBehavior { get => _routeUpdatePropertiesBody.CacheConfigurationQueryStringCachingBehavior ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior)""); set => _routeUpdatePropertiesBody.CacheConfigurationQueryStringCachingBehavior = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of content types on which compression applies. The value should be a valid MIME type.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of content types on which compression applies. The value should be a valid MIME type.", + SerializedName = @"contentTypesToCompress", + PossibleTypes = new [] { typeof(string) })] + public string[] CompressionSettingContentTypesToCompress { get => _routeUpdatePropertiesBody.CompressionSettingContentTypesToCompress ?? null /* arrayOf */; set => _routeUpdatePropertiesBody.CompressionSettingContentTypesToCompress = value; } + + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.", + SerializedName = @"isCompressionEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter CompressionSettingIsCompressionEnabled { get => _routeUpdatePropertiesBody.CompressionSettingIsCompressionEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _routeUpdatePropertiesBody.CompressionSettingIsCompressionEnabled = value; } + + /// Domains referenced by this endpoint. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Domains referenced by this endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Domains referenced by this endpoint.", + SerializedName = @"customDomains", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] CustomDomain { get => _routeUpdatePropertiesBody.CustomDomain ?? null /* arrayOf */; set => _routeUpdatePropertiesBody.CustomDomain = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'", + SerializedName = @"enabledState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState EnabledState { get => _routeUpdatePropertiesBody.EnabledState ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); set => _routeUpdatePropertiesBody.EnabledState = value; } + + /// Backing field for property. + private string _endpointName; + + /// Name of the endpoint under the profile which is unique globally. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the endpoint under the profile which is unique globally.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the endpoint under the profile which is unique globally.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string EndpointName { get => this._endpointName; set => this._endpointName = value; } + + /// Protocol this rule will use when forwarding traffic to backends. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Protocol this rule will use when forwarding traffic to backends.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protocol this rule will use when forwarding traffic to backends.", + SerializedName = @"forwardingProtocol", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol ForwardingProtocol { get => _routeUpdatePropertiesBody.ForwardingProtocol ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol)""); set => _routeUpdatePropertiesBody.ForwardingProtocol = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and + /// it will be the first rule that gets executed. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed.", + SerializedName = @"httpsRedirect", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect HttpsRedirect { get => _routeUpdatePropertiesBody.HttpsRedirect ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect)""); set => _routeUpdatePropertiesBody.HttpsRedirect = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// whether this route will be linked to the default endpoint domain. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "whether this route will be linked to the default endpoint domain.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"whether this route will be linked to the default endpoint domain.", + SerializedName = @"linkToDefaultDomain", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain LinkToDefaultDomain { get => _routeUpdatePropertiesBody.LinkToDefaultDomain ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain)""); set => _routeUpdatePropertiesBody.LinkToDefaultDomain = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the routing rule. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the routing rule.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the routing rule.", + SerializedName = @"routeName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RouteName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string OriginGroupId { get => _routeUpdatePropertiesBody.OriginGroupId ?? null; set => _routeUpdatePropertiesBody.OriginGroupId = value; } + + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.", + SerializedName = @"originPath", + PossibleTypes = new [] { typeof(string) })] + public string OriginPath { get => _routeUpdatePropertiesBody.OriginPath ?? null; set => _routeUpdatePropertiesBody.OriginPath = value; } + + /// The route patterns of the rule. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The route patterns of the rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The route patterns of the rule.", + SerializedName = @"patternsToMatch", + PossibleTypes = new [] { typeof(string) })] + public string[] PatternsToMatch { get => _routeUpdatePropertiesBody.PatternsToMatch ?? null /* arrayOf */; set => _routeUpdatePropertiesBody.PatternsToMatch = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// rule sets referenced by this endpoint. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "rule sets referenced by this endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"rule sets referenced by this endpoint.", + SerializedName = @"ruleSets", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] RuleSet { get => _routeUpdatePropertiesBody.RuleSet ?? null /* arrayOf */; set => _routeUpdatePropertiesBody.RuleSet = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// List of supported protocols for this route. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of supported protocols for this route.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of supported protocols for this route.", + SerializedName = @"supportedProtocols", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[] SupportedProtocol { get => _routeUpdatePropertiesBody.SupportedProtocol ?? null /* arrayOf */; set => _routeUpdatePropertiesBody.SupportedProtocol = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzFrontDoorCdnRoute_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnRoute_UpdateExpanded Clone() + { + var clone = new UpdateAzFrontDoorCdnRoute_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._routeUpdatePropertiesBody = this._routeUpdatePropertiesBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.EndpointName = this.EndpointName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RoutesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RoutesUpdate(ResourceGroupName, ProfileName, EndpointName, Name, SubscriptionId, _routeUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,EndpointName=EndpointName,Name=Name,SubscriptionId=SubscriptionId,body=_routeUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzFrontDoorCdnRoute_UpdateExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId, body=_routeUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, EndpointName=EndpointName, Name=Name, SubscriptionId=SubscriptionId, body=_routeUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnRoute_UpdateViaIdentityExpanded.cs b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnRoute_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..f43a611d5439 --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnRoute_UpdateViaIdentityExpanded.cs @@ -0,0 +1,644 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// + /// Updates an existing route with the specified route name under the specified subscription, resource group, profile, and + /// AzureFrontDoor endpoint. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFrontDoorCdnRoute_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzFrontDoorCdnRoute_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The domain JSON object required for domain creation or update. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRouteUpdateParameters _routeUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RouteUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// query parameters to include or exclude (comma separated). + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "query parameters to include or exclude (comma separated).")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"query parameters to include or exclude (comma separated).", + SerializedName = @"queryParameters", + PossibleTypes = new [] { typeof(string) })] + public string CacheConfigurationQueryParameter { get => _routeUpdatePropertiesBody.CacheConfigurationQueryParameter ?? null; set => _routeUpdatePropertiesBody.CacheConfigurationQueryParameter = value; } + + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore + /// specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.", + SerializedName = @"queryStringCachingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior CacheConfigurationQueryStringCachingBehavior { get => _routeUpdatePropertiesBody.CacheConfigurationQueryStringCachingBehavior ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior)""); set => _routeUpdatePropertiesBody.CacheConfigurationQueryStringCachingBehavior = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of content types on which compression applies. The value should be a valid MIME type.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of content types on which compression applies. The value should be a valid MIME type.", + SerializedName = @"contentTypesToCompress", + PossibleTypes = new [] { typeof(string) })] + public string[] CompressionSettingContentTypesToCompress { get => _routeUpdatePropertiesBody.CompressionSettingContentTypesToCompress ?? null /* arrayOf */; set => _routeUpdatePropertiesBody.CompressionSettingContentTypesToCompress = value; } + + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, + /// content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor + /// when requested content is smaller than 1 byte or larger than 1 MB. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.", + SerializedName = @"isCompressionEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter CompressionSettingIsCompressionEnabled { get => _routeUpdatePropertiesBody.CompressionSettingIsCompressionEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _routeUpdatePropertiesBody.CompressionSettingIsCompressionEnabled = value; } + + /// Domains referenced by this endpoint. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Domains referenced by this endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Domains referenced by this endpoint.", + SerializedName = @"customDomains", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] CustomDomain { get => _routeUpdatePropertiesBody.CustomDomain ?? null /* arrayOf */; set => _routeUpdatePropertiesBody.CustomDomain = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'", + SerializedName = @"enabledState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState EnabledState { get => _routeUpdatePropertiesBody.EnabledState ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState)""); set => _routeUpdatePropertiesBody.EnabledState = value; } + + /// Protocol this rule will use when forwarding traffic to backends. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Protocol this rule will use when forwarding traffic to backends.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Protocol this rule will use when forwarding traffic to backends.", + SerializedName = @"forwardingProtocol", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol ForwardingProtocol { get => _routeUpdatePropertiesBody.ForwardingProtocol ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol)""); set => _routeUpdatePropertiesBody.ForwardingProtocol = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and + /// it will be the first rule that gets executed. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed.", + SerializedName = @"httpsRedirect", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect HttpsRedirect { get => _routeUpdatePropertiesBody.HttpsRedirect ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect)""); set => _routeUpdatePropertiesBody.HttpsRedirect = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// whether this route will be linked to the default endpoint domain. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "whether this route will be linked to the default endpoint domain.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"whether this route will be linked to the default endpoint domain.", + SerializedName = @"linkToDefaultDomain", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain LinkToDefaultDomain { get => _routeUpdatePropertiesBody.LinkToDefaultDomain ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain)""); set => _routeUpdatePropertiesBody.LinkToDefaultDomain = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Resource ID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource ID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string OriginGroupId { get => _routeUpdatePropertiesBody.OriginGroupId ?? null; set => _routeUpdatePropertiesBody.OriginGroupId = value; } + + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.", + SerializedName = @"originPath", + PossibleTypes = new [] { typeof(string) })] + public string OriginPath { get => _routeUpdatePropertiesBody.OriginPath ?? null; set => _routeUpdatePropertiesBody.OriginPath = value; } + + /// The route patterns of the rule. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The route patterns of the rule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The route patterns of the rule.", + SerializedName = @"patternsToMatch", + PossibleTypes = new [] { typeof(string) })] + public string[] PatternsToMatch { get => _routeUpdatePropertiesBody.PatternsToMatch ?? null /* arrayOf */; set => _routeUpdatePropertiesBody.PatternsToMatch = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// rule sets referenced by this endpoint. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "rule sets referenced by this endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"rule sets referenced by this endpoint.", + SerializedName = @"ruleSets", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] RuleSet { get => _routeUpdatePropertiesBody.RuleSet ?? null /* arrayOf */; set => _routeUpdatePropertiesBody.RuleSet = value; } + + /// List of supported protocols for this route. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "List of supported protocols for this route.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"List of supported protocols for this route.", + SerializedName = @"supportedProtocols", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[] SupportedProtocol { get => _routeUpdatePropertiesBody.SupportedProtocol ?? null /* arrayOf */; set => _routeUpdatePropertiesBody.SupportedProtocol = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzFrontDoorCdnRoute_UpdateViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnRoute_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzFrontDoorCdnRoute_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._routeUpdatePropertiesBody = this._routeUpdatePropertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RoutesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.RoutesUpdateViaIdentity(InputObject.Id, _routeUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.EndpointName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.RouteName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.RouteName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.RoutesUpdate(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.EndpointName ?? null, InputObject.RouteName ?? null, InputObject.SubscriptionId ?? null, _routeUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_routeUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzFrontDoorCdnRoute_UpdateViaIdentityExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_routeUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_routeUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRoute + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnRule_UpdateExpanded.cs b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnRule_UpdateExpanded.cs new file mode 100644 index 000000000000..5ba2cd5e5efa --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnRule_UpdateExpanded.cs @@ -0,0 +1,563 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Updates an existing delivery rule within a rule set. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFrontDoorCdnRule_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing delivery rule within a rule set.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzFrontDoorCdnRule_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The domain JSON object required for domain creation or update. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParameters _ruleUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleUpdateParameters(); + + /// + /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of actions that are executed when all the conditions of a rule are satisfied.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of actions that are executed when all the conditions of a rule are satisfied.", + SerializedName = @"actions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] Action { get => _ruleUpdatePropertiesBody.Action ?? null /* arrayOf */; set => _ruleUpdatePropertiesBody.Action = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// A list of conditions that must be matched for the actions to be executed + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of conditions that must be matched for the actions to be executed")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of conditions that must be matched for the actions to be executed", + SerializedName = @"conditions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] Condition { get => _ruleUpdatePropertiesBody.Condition ?? null /* arrayOf */; set => _ruleUpdatePropertiesBody.Condition = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults + /// to Continue. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.", + SerializedName = @"matchProcessingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior MatchProcessingBehavior { get => _ruleUpdatePropertiesBody.MatchProcessingBehavior ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior)""); set => _ruleUpdatePropertiesBody.MatchProcessingBehavior = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the delivery rule which is unique within the endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the delivery rule which is unique within the endpoint.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the delivery rule which is unique within the endpoint.", + SerializedName = @"ruleName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + /// be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition + /// and actions listed in it will always be applied. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.", + SerializedName = @"order", + PossibleTypes = new [] { typeof(int) })] + public int Order { get => _ruleUpdatePropertiesBody.Order ?? default(int); set => _ruleUpdatePropertiesBody.Order = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _setName; + + /// Name of the rule set under the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the rule set under the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the rule set under the profile.", + SerializedName = @"ruleSetName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("RuleSetName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SetName { get => this._setName; set => this._setName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzFrontDoorCdnRule_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnRule_UpdateExpanded Clone() + { + var clone = new UpdateAzFrontDoorCdnRule_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._ruleUpdatePropertiesBody = this._ruleUpdatePropertiesBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.SetName = this.SetName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RulesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.RulesUpdate(ResourceGroupName, ProfileName, SetName, Name, SubscriptionId, _ruleUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,SetName=SetName,Name=Name,SubscriptionId=SubscriptionId,body=_ruleUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzFrontDoorCdnRule_UpdateExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SetName=SetName, Name=Name, SubscriptionId=SubscriptionId, body=_ruleUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, SetName=SetName, Name=Name, SubscriptionId=SubscriptionId, body=_ruleUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnRule_UpdateViaIdentityExpanded.cs b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnRule_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..7abf8d957a97 --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnRule_UpdateViaIdentityExpanded.cs @@ -0,0 +1,516 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Updates an existing delivery rule within a rule set. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/rules/{ruleName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFrontDoorCdnRule_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing delivery rule within a rule set.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzFrontDoorCdnRule_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The domain JSON object required for domain creation or update. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleUpdateParameters _ruleUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.RuleUpdateParameters(); + + /// + /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of actions that are executed when all the conditions of a rule are satisfied.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of actions that are executed when all the conditions of a rule are satisfied.", + SerializedName = @"actions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] Action { get => _ruleUpdatePropertiesBody.Action ?? null /* arrayOf */; set => _ruleUpdatePropertiesBody.Action = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// A list of conditions that must be matched for the actions to be executed + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of conditions that must be matched for the actions to be executed")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of conditions that must be matched for the actions to be executed", + SerializedName = @"conditions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] Condition { get => _ruleUpdatePropertiesBody.Condition ?? null /* arrayOf */; set => _ruleUpdatePropertiesBody.Condition = value; } + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults + /// to Continue. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue.", + SerializedName = @"matchProcessingBehavior", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior))] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior MatchProcessingBehavior { get => _ruleUpdatePropertiesBody.MatchProcessingBehavior ?? ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior)""); set => _ruleUpdatePropertiesBody.MatchProcessingBehavior = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will + /// be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition + /// and actions listed in it will always be applied. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied.", + SerializedName = @"order", + PossibleTypes = new [] { typeof(int) })] + public int Order { get => _ruleUpdatePropertiesBody.Order ?? default(int); set => _ruleUpdatePropertiesBody.Order = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzFrontDoorCdnRule_UpdateViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnRule_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzFrontDoorCdnRule_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._ruleUpdatePropertiesBody = this._ruleUpdatePropertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'RulesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.RulesUpdateViaIdentity(InputObject.Id, _ruleUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.RuleSetName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.RuleSetName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.RuleName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.RuleName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.RulesUpdate(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.RuleSetName ?? null, InputObject.RuleName ?? null, InputObject.SubscriptionId ?? null, _ruleUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_ruleUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzFrontDoorCdnRule_UpdateViaIdentityExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_ruleUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_ruleUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnSecurityPolicy_PatchExpanded.cs b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnSecurityPolicy_PatchExpanded.cs new file mode 100644 index 000000000000..b3fd364ca05a --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnSecurityPolicy_PatchExpanded.cs @@ -0,0 +1,502 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Updates an existing security policy within a profile. + /// + /// [OpenAPI] Patch=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFrontDoorCdnSecurityPolicy_PatchExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing security policy within a profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzFrontDoorCdnSecurityPolicy_PatchExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The JSON object containing security policy update parameters. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParameters _securityPolicyUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the security policy under the profile. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the security policy under the profile.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the security policy under the profile.", + SerializedName = @"securityPolicyName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("SecurityPolicyName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// object which contains security policy parameters + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "object which contains security policy parameters")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"object which contains security policy parameters", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters Parameter { get => _securityPolicyUpdatePropertiesBody.Parameter ?? null /* object */; set => _securityPolicyUpdatePropertiesBody.Parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _profileName; + + /// + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", + SerializedName = @"profileName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ProfileName { get => this._profileName; set => this._profileName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// Name of the Resource group within the Azure subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the Resource group within the Azure subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the Resource group within the Azure subscription.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// Azure Subscription ID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription ID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription ID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzFrontDoorCdnSecurityPolicy_PatchExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnSecurityPolicy_PatchExpanded Clone() + { + var clone = new UpdateAzFrontDoorCdnSecurityPolicy_PatchExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._securityPolicyUpdatePropertiesBody = this._securityPolicyUpdatePropertiesBody; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ProfileName = this.ProfileName; + clone.Name = this.Name; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SecurityPoliciesPatch' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SecurityPoliciesPatch(ResourceGroupName, ProfileName, Name, SubscriptionId, _securityPolicyUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,ProfileName=ProfileName,Name=Name,SubscriptionId=SubscriptionId,body=_securityPolicyUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzFrontDoorCdnSecurityPolicy_PatchExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId, body=_securityPolicyUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, ProfileName=ProfileName, Name=Name, SubscriptionId=SubscriptionId, body=_securityPolicyUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnSecurityPolicy_PatchViaIdentityExpanded.cs b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnSecurityPolicy_PatchViaIdentityExpanded.cs new file mode 100644 index 000000000000..72de302b3582 --- /dev/null +++ b/src/Cdn/generated/cmdlets/UpdateAzFrontDoorCdnSecurityPolicy_PatchViaIdentityExpanded.cs @@ -0,0 +1,469 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + using System; + + /// Updates an existing security policy within a profile. + /// + /// [OpenAPI] Patch=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/securityPolicies/{securityPolicyName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzFrontDoorCdnSecurityPolicy_PatchViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Description(@"Updates an existing security policy within a profile.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Generated] + public partial class UpdateAzFrontDoorCdnSecurityPolicy_PatchViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The JSON object containing security policy update parameters. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyUpdateParameters _securityPolicyUpdatePropertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.SecurityPolicyUpdateParameters(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cdn Client => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.ClientAPI; + + /// + /// The credentials, account, tenant, and subscription used for communication with Azure + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// object which contains security policy parameters + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "object which contains security policy parameters")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"object which contains security policy parameters", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters Parameter { get => _securityPolicyUpdatePropertiesBody.Parameter ?? null /* object */; set => _securityPolicyUpdatePropertiesBody.Parameter = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Cdn.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzFrontDoorCdnSecurityPolicy_PatchViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnSecurityPolicy_PatchViaIdentityExpanded Clone() + { + var clone = new UpdateAzFrontDoorCdnSecurityPolicy_PatchViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._securityPolicyUpdatePropertiesBody = this._securityPolicyUpdatePropertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'SecurityPoliciesPatch' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.SecurityPoliciesPatchViaIdentity(InputObject.Id, _securityPolicyUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SecurityPolicyName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SecurityPolicyName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.SecurityPoliciesPatch(InputObject.ResourceGroupName ?? null, InputObject.ProfileName ?? null, InputObject.SecurityPolicyName ?? null, InputObject.SubscriptionId ?? null, _securityPolicyUpdatePropertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_securityPolicyUpdatePropertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzFrontDoorCdnSecurityPolicy_PatchViaIdentityExpanded() + { + + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_securityPolicyUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_securityPolicyUpdatePropertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/AsyncCommandRuntime.cs b/src/Cdn/generated/runtime/AsyncCommandRuntime.cs new file mode 100644 index 000000000000..749b7aa0c8d9 --- /dev/null +++ b/src/Cdn/generated/runtime/AsyncCommandRuntime.cs @@ -0,0 +1,832 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + using System.Management.Automation; + using System.Management.Automation.Host; + using System.Threading; + using System.Linq; + + internal interface IAsyncCommandRuntimeExtensions + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep Wrap(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep func); + System.Collections.Generic.IEnumerable Wrap(System.Collections.Generic.IEnumerable funcs); + + T ExecuteSync(System.Func step); + } + + public class AsyncCommandRuntime : System.Management.Automation.ICommandRuntime2, IAsyncCommandRuntimeExtensions, System.IDisposable + { + private ICommandRuntime2 originalCommandRuntime; + private System.Threading.Thread originalThread; + public bool AllowInteractive { get; set; } = false; + + public CancellationToken cancellationToken; + SemaphoreSlim semaphore = new SemaphoreSlim(1, 1); + ManualResetEventSlim readyToRun = new ManualResetEventSlim(false); + ManualResetEventSlim completed = new ManualResetEventSlim(false); + + System.Action runOnMainThread; + + private System.Management.Automation.PSCmdlet cmdlet; + + internal AsyncCommandRuntime(System.Management.Automation.PSCmdlet cmdlet, CancellationToken cancellationToken) + { + this.originalCommandRuntime = cmdlet.CommandRuntime as ICommandRuntime2; + this.originalThread = System.Threading.Thread.CurrentThread; + this.cancellationToken = cancellationToken; + this.cmdlet = cmdlet; + if (cmdlet.PagingParameters != null) + { + WriteDebug("Client side pagination is enabled for this cmdlet"); + } + cmdlet.CommandRuntime = this; + } + + public PSHost Host => this.originalCommandRuntime.Host; + + public PSTransactionContext CurrentPSTransaction => this.originalCommandRuntime.CurrentPSTransaction; + + private void CheckForInteractive() + { + // This is an interactive call -- if we are not on the original thread, this will only work if this was done at ACR creation time; + if (!AllowInteractive) + { + throw new System.Exception("AsyncCommandRuntime is not configured for interactive calls"); + } + } + private void WaitOurTurn() + { + // wait for our turn to play + semaphore?.Wait(cancellationToken); + + // ensure that completed is not set + completed.Reset(); + } + + private void WaitForCompletion() + { + // wait for the result (or cancellation!) + WaitHandle.WaitAny(new[] { cancellationToken.WaitHandle, completed?.WaitHandle }); + + // let go of the semaphore + semaphore?.Release(); + + } + + public bool ShouldContinue(string query, string caption, bool hasSecurityImpact, ref bool yesToAll, ref bool noToAll) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldContinue(query, caption, hasSecurityImpact, ref yesToAll, ref noToAll); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool yta = yesToAll; + bool nta = noToAll; + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldContinue(query, caption, hasSecurityImpact, ref yta, ref nta); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + yesToAll = yta; + noToAll = nta; + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldContinue(string query, string caption) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldContinue(query, caption); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldContinue(query, caption); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldContinue(string query, string caption, ref bool yesToAll, ref bool noToAll) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldContinue(query, caption, ref yesToAll, ref noToAll); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool yta = yesToAll; + bool nta = noToAll; + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldContinue(query, caption, ref yta, ref nta); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + yesToAll = yta; + noToAll = nta; + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string target) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(target); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(target); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string target, string action) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(target, action); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(target, action); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption, out ShouldProcessReason shouldProcessReason) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption, out shouldProcessReason); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + ShouldProcessReason reason = ShouldProcessReason.None; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption, out reason); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + shouldProcessReason = reason; + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void ThrowTerminatingError(ErrorRecord errorRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.ThrowTerminatingError(errorRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.ThrowTerminatingError(errorRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool TransactionAvailable() + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.TransactionAvailable(); + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.TransactionAvailable(); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteCommandDetail(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteCommandDetail(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteCommandDetail(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteDebug(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteDebug(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteDebug(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteError(ErrorRecord errorRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteError(errorRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteError(errorRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteInformation(InformationRecord informationRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteInformation(informationRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteInformation(informationRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteObject(object sendToPipeline) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteObject(sendToPipeline); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteObject(sendToPipeline); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteObject(object sendToPipeline, bool enumerateCollection) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteObject(sendToPipeline, enumerateCollection); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteObject(sendToPipeline, enumerateCollection); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteProgress(ProgressRecord progressRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteProgress(progressRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteProgress(progressRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteProgress(long sourceId, ProgressRecord progressRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteProgress(sourceId, progressRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteProgress(sourceId, progressRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteVerbose(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteVerbose(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteVerbose(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteWarning(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteWarning(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteWarning(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void Wait(System.Threading.Tasks.Task ProcessRecordAsyncTask, System.Threading.CancellationToken cancellationToken) + { + do + { + WaitHandle.WaitAny(new[] { readyToRun.WaitHandle, ((System.IAsyncResult)ProcessRecordAsyncTask).AsyncWaitHandle }); + if (readyToRun.IsSet) + { + // reset the request for the next time + readyToRun.Reset(); + + // run the delegate on this thread + runOnMainThread(); + + // tell the originator everything is complete + completed.Set(); + } + } + while (!ProcessRecordAsyncTask.IsCompleted); + if (ProcessRecordAsyncTask.IsFaulted) + { + // don't unwrap a Aggregate Exception -- we'll lose the stack trace of the actual exception. + // if( ProcessRecordAsyncTask.Exception is System.AggregateException aggregate ) { + // throw aggregate.InnerException; + // } + throw ProcessRecordAsyncTask.Exception; + } + } + public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep Wrap(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep func) => func.Target.GetType().Name != "Closure" ? func : (p1, p2, p3) => ExecuteSync>(() => func(p1, p2, p3)); + public System.Collections.Generic.IEnumerable Wrap(System.Collections.Generic.IEnumerable funcs) => funcs?.Select(Wrap); + + public T ExecuteSync(System.Func step) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return step(); + } + + T result = default(T); + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + // set the function to run + runOnMainThread = () => { result = step(); }; + // tell the main thread to go ahead + readyToRun.Set(); + // wait for the result (or cancellation!) + WaitForCompletion(); + // return + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void Dispose() + { + if (cmdlet != null) + { + cmdlet.CommandRuntime = this.originalCommandRuntime; + cmdlet = null; + } + + semaphore?.Dispose(); + semaphore = null; + readyToRun?.Dispose(); + readyToRun = null; + completed?.Dispose(); + completed = null; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/AsyncJob.cs b/src/Cdn/generated/runtime/AsyncJob.cs new file mode 100644 index 000000000000..d9c4d1f4f5f4 --- /dev/null +++ b/src/Cdn/generated/runtime/AsyncJob.cs @@ -0,0 +1,270 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + using System.Management.Automation; + using System.Management.Automation.Host; + using System.Threading; + + using System.Threading.Tasks; + + public class LongRunningJobCancelledException : System.Exception + { + public LongRunningJobCancelledException(string message) : base(message) + { + + } + } + + public class AsyncJob : Job, System.Management.Automation.ICommandRuntime2 + { + const int MaxRecords = 1000; + + private string _statusMessage = string.Empty; + + public override string StatusMessage => _statusMessage; + + public override bool HasMoreData => Output.Count > 0 || Progress.Count > 0 || Error.Count > 0 || Warning.Count > 0 || Verbose.Count > 0 || Debug.Count > 0; + + public override string Location => "localhost"; + + public PSHost Host => originalCommandRuntime.Host; + + public PSTransactionContext CurrentPSTransaction => originalCommandRuntime.CurrentPSTransaction; + + public override void StopJob() + { + Cancel(); + } + + private readonly PSCmdlet cmdlet; + private readonly ICommandRuntime2 originalCommandRuntime; + private readonly System.Threading.Thread originalThread; + + private void CheckForInteractive() + { + // This is an interactive call -- We should never allow interactivity in AsnycJob cmdlets. + throw new System.Exception("Cmdlets in AsyncJob; interactive calls are not permitted."); + } + private bool IsJobDone => CancellationToken.IsCancellationRequested || this.JobStateInfo.State == JobState.Failed || this.JobStateInfo.State == JobState.Stopped || this.JobStateInfo.State == JobState.Stopping || this.JobStateInfo.State == JobState.Completed; + + private readonly System.Action Cancel; + private readonly CancellationToken CancellationToken; + + internal AsyncJob(PSCmdlet cmdlet, string line, string name, CancellationToken cancellationToken, System.Action cancelMethod) : base(line, name) + { + SetJobState(JobState.NotStarted); + // know how to cancel/check for cancelation + this.CancellationToken = cancellationToken; + this.Cancel = cancelMethod; + + // we might need these. + this.originalCommandRuntime = cmdlet.CommandRuntime as ICommandRuntime2; + this.originalThread = System.Threading.Thread.CurrentThread; + + // the instance of the cmdlet we're going to run + this.cmdlet = cmdlet; + + // set the command runtime to the AsyncJob + cmdlet.CommandRuntime = this; + } + + /// + /// Monitors the task (which should be ProcessRecordAsync) to control + /// the lifetime of the job itself + /// + /// + public void Monitor(Task task) + { + SetJobState(JobState.Running); + task.ContinueWith(antecedent => + { + if (antecedent.IsCanceled) + { + // if the task was canceled, we're just going to call it completed. + SetJobState(JobState.Completed); + } + else if (antecedent.IsFaulted) + { + foreach (var innerException in antecedent.Exception.Flatten().InnerExceptions) + { + WriteError(new System.Management.Automation.ErrorRecord(innerException, string.Empty, System.Management.Automation.ErrorCategory.NotSpecified, null)); + } + + // a fault indicates an actual failure + SetJobState(JobState.Failed); + } + else + { + // otherwiser it's a completed state. + SetJobState(JobState.Completed); + } + }, CancellationToken); + } + + private void CheckForCancellation() + { + if (IsJobDone) + { + throw new LongRunningJobCancelledException("Long running job is canceled or stopping, continuation of the cmdlet is not permitted."); + } + } + + public void WriteInformation(InformationRecord informationRecord) + { + CheckForCancellation(); + + this.Information.Add(informationRecord); + } + + public bool ShouldContinue(string query, string caption, bool hasSecurityImpact, ref bool yesToAll, ref bool noToAll) + { + CheckForInteractive(); + return false; + } + + public void WriteDebug(string text) + { + _statusMessage = text; + CheckForCancellation(); + + if (Debug.IsOpen && Debug.Count < MaxRecords) + { + Debug.Add(new DebugRecord(text)); + } + } + + public void WriteError(ErrorRecord errorRecord) + { + if (Error.IsOpen) + { + Error.Add(errorRecord); + } + } + + public void WriteObject(object sendToPipeline) + { + CheckForCancellation(); + + if (Output.IsOpen) + { + Output.Add(new PSObject(sendToPipeline)); + } + } + + public void WriteObject(object sendToPipeline, bool enumerateCollection) + { + CheckForCancellation(); + + if (enumerateCollection && sendToPipeline is System.Collections.IEnumerable enumerable) + { + foreach (var item in enumerable) + { + WriteObject(item); + } + } + else + { + WriteObject(sendToPipeline); + } + } + + public void WriteProgress(ProgressRecord progressRecord) + { + CheckForCancellation(); + + if (Progress.IsOpen && Progress.Count < MaxRecords) + { + Progress.Add(progressRecord); + } + } + + public void WriteProgress(long sourceId, ProgressRecord progressRecord) + { + CheckForCancellation(); + + if (Progress.IsOpen && Progress.Count < MaxRecords) + { + Progress.Add(progressRecord); + } + } + + public void WriteVerbose(string text) + { + CheckForCancellation(); + + if (Verbose.IsOpen && Verbose.Count < MaxRecords) + { + Verbose.Add(new VerboseRecord(text)); + } + } + + public void WriteWarning(string text) + { + CheckForCancellation(); + + if (Warning.IsOpen && Warning.Count < MaxRecords) + { + Warning.Add(new WarningRecord(text)); + } + } + + public void WriteCommandDetail(string text) + { + WriteVerbose(text); + } + + public bool ShouldProcess(string target) + { + CheckForInteractive(); + return false; + } + + public bool ShouldProcess(string target, string action) + { + CheckForInteractive(); + return false; + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption) + { + CheckForInteractive(); + return false; + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption, out ShouldProcessReason shouldProcessReason) + { + CheckForInteractive(); + shouldProcessReason = ShouldProcessReason.None; + return false; + } + + public bool ShouldContinue(string query, string caption) + { + CheckForInteractive(); + return false; + } + + public bool ShouldContinue(string query, string caption, ref bool yesToAll, ref bool noToAll) + { + CheckForInteractive(); + return false; + } + + public bool TransactionAvailable() + { + // interactivity required? + return false; + } + + public void ThrowTerminatingError(ErrorRecord errorRecord) + { + if (Error.IsOpen) + { + Error.Add(errorRecord); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/AsyncOperationResponse.cs b/src/Cdn/generated/runtime/AsyncOperationResponse.cs new file mode 100644 index 000000000000..01f867699e5d --- /dev/null +++ b/src/Cdn/generated/runtime/AsyncOperationResponse.cs @@ -0,0 +1,177 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + [System.ComponentModel.TypeConverter(typeof(AsyncOperationResponseTypeConverter))] + public class AsyncOperationResponse + { + private string _target; + public string Target { get => _target; set => _target = value; } + public AsyncOperationResponse() + { + } + internal AsyncOperationResponse(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json) + { + // pull target + { Target = If(json?.PropertyT("target"), out var _v) ? (string)_v : (string)Target; } + } + public string ToJsonString() + { + return $"{{ \"target\" : \"{this.Target}\" }}"; + } + + public static AsyncOperationResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject json ? new AsyncOperationResponse(json) : null; + } + + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static AsyncOperationResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(jsonText)); + + } + + public partial class AsyncOperationResponseTypeConverter : System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter to the parameter using and + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static object ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(AsyncOperationResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AsyncOperationResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString()); ; + } + catch + { + // Unable to use JSON pattern + } + + if (typeof(System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return new AsyncOperationResponse { Target = (sourceValue as System.Management.Automation.PSObject).GetValueForProperty("target", "", global::System.Convert.ToString) }; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return new AsyncOperationResponse { Target = (sourceValue as global::System.Collections.IDictionary).GetValueForProperty("target", "", global::System.Convert.ToString) }; + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs b/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs new file mode 100644 index 000000000000..fa8a12df2971 --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs @@ -0,0 +1,113 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "CmdletSurface")] + [DoNotExport] + public class ExportCmdletSurface : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string CmdletFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public bool IncludeGeneralParameters { get; set; } + + [Parameter] + public bool UseExpandedFormat { get; set; } + + protected override void ProcessRecord() + { + try + { + var variants = GetScriptCmdlets(this, CmdletFolder) + .SelectMany(fi => fi.ToVariants()) + .Where(v => !v.IsDoNotExport) + .ToArray(); + var allProfiles = variants.SelectMany(v => v.Profiles).Distinct().ToArray(); + var profileGroups = allProfiles.Any() + ? variants + .SelectMany(v => (v.Profiles.Any() ? v.Profiles : allProfiles).Select(p => (profile: p, variant: v))) + .GroupBy(pv => pv.profile) + .Select(pvg => new ProfileGroup(pvg.Select(pv => pv.variant).ToArray(), pvg.Key)) + : new[] { new ProfileGroup(variants) }; + foreach (var profileGroup in profileGroups) + { + var variantGroups = profileGroup.Variants + .GroupBy(v => new { v.CmdletName }) + .Select(vg => new VariantGroup(ModuleName, vg.Key.CmdletName, vg.Select(v => v).ToArray(), String.Empty, profileGroup.ProfileName)); + var sb = UseExpandedFormat ? ExpandedFormat(variantGroups) : CondensedFormat(variantGroups); + Directory.CreateDirectory(OutputFolder); + File.WriteAllText(Path.Combine(OutputFolder, $"CmdletSurface-{profileGroup.ProfileName}.md"), sb.ToString()); + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + + private StringBuilder ExpandedFormat(IEnumerable variantGroups) + { + var sb = new StringBuilder(); + foreach (var variantGroup in variantGroups.OrderBy(vg => vg.CmdletName)) + { + sb.Append($"### {variantGroup.CmdletName}{Environment.NewLine}"); + var parameterGroups = variantGroup.ParameterGroups + .Where(pg => !pg.DontShow && (IncludeGeneralParameters || (pg.OrderCategory != ParameterCategory.Azure && pg.OrderCategory != ParameterCategory.Runtime))); + foreach (var parameterGroup in parameterGroups) + { + sb.Append($" - {parameterGroup.ParameterName} `{parameterGroup.ParameterType.ToSyntaxTypeName()}`{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + + private StringBuilder CondensedFormat(IEnumerable variantGroups) + { + var sb = new StringBuilder(); + var condensedGroups = variantGroups + .GroupBy(vg => vg.CmdletNoun) + .Select(vgg => ( + CmdletNoun: vgg.Key, + CmdletVerbs: vgg.Select(vg => vg.CmdletVerb).OrderBy(cv => cv).ToArray(), + ParameterGroups: vgg.SelectMany(vg => vg.ParameterGroups).DistinctBy(p => p.ParameterName).ToArray(), + OutputTypes: vgg.SelectMany(vg => vg.OutputTypes).Select(ot => ot.Type).DistinctBy(t => t.Name).Select(t => t.ToSyntaxTypeName()).ToArray())) + .OrderBy(vg => vg.CmdletNoun); + foreach (var condensedGroup in condensedGroups) + { + sb.Append($"### {condensedGroup.CmdletNoun} [{String.Join(", ", condensedGroup.CmdletVerbs)}] `{String.Join(", ", condensedGroup.OutputTypes)}`{Environment.NewLine}"); + var parameterGroups = condensedGroup.ParameterGroups + .Where(pg => !pg.DontShow && (IncludeGeneralParameters || (pg.OrderCategory != ParameterCategory.Azure && pg.OrderCategory != ParameterCategory.Runtime))); + foreach (var parameterGroup in parameterGroups) + { + sb.Append($" - {parameterGroup.ParameterName} `{parameterGroup.ParameterType.ToSyntaxTypeName()}`{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs b/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs new file mode 100644 index 000000000000..10edb523736c --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs @@ -0,0 +1,74 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.MarkdownTypesExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "ExampleStub")] + [DoNotExport] + public class ExportExampleStub : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + protected override void ProcessRecord() + { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + var exportDirectories = Directory.GetDirectories(ExportsFolder); + if (!exportDirectories.Any()) + { + exportDirectories = new[] { ExportsFolder }; + } + + var exampleText = String.Join(String.Empty, DefaultExampleHelpInfos.Select(ehi => ehi.ToHelpExampleOutput())); + foreach (var exportDirectory in exportDirectories) + { + var outputFolder = OutputFolder; + if (exportDirectory != ExportsFolder) + { + outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); + Directory.CreateDirectory(outputFolder); + } + + var cmdletFilePaths = GetScriptCmdlets(exportDirectory).Select(fi => Path.Combine(outputFolder, $"{fi.Name}.md")).ToArray(); + var currentExamplesFilePaths = Directory.GetFiles(outputFolder).ToArray(); + // Remove examples of non-existing cmdlets + var removedCmdletFilePaths = currentExamplesFilePaths.Except(cmdletFilePaths); + foreach (var removedCmdletFilePath in removedCmdletFilePaths) + { + File.Delete(removedCmdletFilePath); + } + + // Only create example stubs if they don't exist + foreach (var cmdletFilePath in cmdletFilePaths.Except(currentExamplesFilePaths)) + { + File.WriteAllText(cmdletFilePath, exampleText); + } + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs b/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs new file mode 100644 index 000000000000..09c205f5081c --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs @@ -0,0 +1,101 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "FormatPs1xml")] + [DoNotExport] + public class ExportFormatPs1xml : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string FilePath { get; set; } + + private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models"; + private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support"; + private const string PropertiesExcludedForTableview = @"Id,Type"; + + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + + protected override void ProcessRecord() + { + try + { + var viewModels = GetFilteredViewParameters().Select(CreateViewModel).ToList(); + var ps1xml = new Configuration + { + ViewDefinitions = new ViewDefinitions + { + Views = viewModels + } + }; + File.WriteAllText(FilePath, ps1xml.ToXmlString()); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + + private static IEnumerable GetFilteredViewParameters() + { + //https://stackoverflow.com/a/79738/294804 + //https://stackoverflow.com/a/949285/294804 + var types = Assembly.GetExecutingAssembly().GetExportedTypes() + .Where(t => t.IsClass + && (t.Namespace.StartsWith(ModelNamespace) || t.Namespace.StartsWith(SupportNamespace)) + && !t.GetCustomAttributes().Any()); + return types.Select(t => new ViewParameters(t, t.GetProperties() + .Select(p => new PropertyFormat(p)) + .Where(pf => !pf.Property.GetCustomAttributes().Any() + && (!PropertiesExcludedForTableview.Split(',').Contains(pf.Property.Name)) + && (pf.FormatTable != null || (pf.Origin != PropertyOrigin.Inlined && pf.Property.PropertyType.IsPsSimple()))) + .OrderByDescending(pf => pf.Index.HasValue) + .ThenBy(pf => pf.Index) + .ThenByDescending(pf => pf.Origin.HasValue) + .ThenBy(pf => pf.Origin))).Where(vp => vp.Properties.Any()); + } + + private static View CreateViewModel(ViewParameters viewParameters) + { + var entries = viewParameters.Properties.Select(pf => + (TableColumnHeader: new TableColumnHeader { Label = pf.Label, Width = pf.Width }, + TableColumnItem: new TableColumnItem { PropertyName = pf.Property.Name })).ToArray(); + + return new View + { + Name = viewParameters.Type.FullName, + ViewSelectedBy = new ViewSelectedBy + { + TypeName = viewParameters.Type.FullName + }, + TableControl = new TableControl + { + TableHeaders = new TableHeaders + { + TableColumnHeaders = entries.Select(e => e.TableColumnHeader).ToList() + }, + TableRowEntries = new TableRowEntries + { + TableRowEntry = new TableRowEntry + { + TableColumnItems = new TableColumnItems + { + TableItems = entries.Select(e => e.TableColumnItem).ToList() + } + } + } + } + }; + } + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs b/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs new file mode 100644 index 000000000000..b44a2788681d --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs @@ -0,0 +1,53 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.MarkdownRenderer; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "HelpMarkdown")] + [DoNotExport] + public class ExportHelpMarkdown : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSModuleInfo ModuleInfo { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSObject[] FunctionInfo { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSObject[] HelpInfo { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string DocsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExamplesFolder { get; set; } + + protected override void ProcessRecord() + { + try + { + var helpInfos = HelpInfo.Select(hi => hi.ToPsHelpInfo()); + var variantGroups = FunctionInfo.Select(fi => fi.BaseObject).Cast() + .Join(helpInfos, fi => fi.Name, phi => phi.CmdletName, (fi, phi) => fi.ToVariants(phi)) + .Select(va => new VariantGroup(ModuleInfo.Name, va.First().CmdletName, va, String.Empty)); + WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs b/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs new file mode 100644 index 000000000000..aa907dc4d3ce --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs @@ -0,0 +1,117 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "ModelSurface")] + [DoNotExport] + public class ExportModelSurface : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public bool UseExpandedFormat { get; set; } + + private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models"; + private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support"; + + protected override void ProcessRecord() + { + try + { + var types = Assembly.GetExecutingAssembly().GetExportedTypes() + .Where(t => t.IsClass && (t.Namespace.StartsWith(ModelNamespace) || t.Namespace.StartsWith(SupportNamespace))); + var typeInfos = types.Select(t => new ModelTypeInfo + { + Type = t, + TypeName = t.Name, + Properties = t.GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(p => !p.GetIndexParameters().Any()).OrderBy(p => p.Name).ToArray(), + NamespaceGroup = t.Namespace.Split('.').LastOrDefault().EmptyIfNull() + }).Where(mti => mti.Properties.Any()); + var sb = UseExpandedFormat ? ExpandedFormat(typeInfos) : CondensedFormat(typeInfos); + Directory.CreateDirectory(OutputFolder); + File.WriteAllText(Path.Combine(OutputFolder, "ModelSurface.md"), sb.ToString()); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + + private static StringBuilder ExpandedFormat(IEnumerable typeInfos) + { + var sb = new StringBuilder(); + foreach (var typeInfo in typeInfos.OrderBy(mti => mti.TypeName).ThenBy(mti => mti.NamespaceGroup)) + { + sb.Append($"### {typeInfo.TypeName} [{typeInfo.NamespaceGroup}]{Environment.NewLine}"); + foreach (var property in typeInfo.Properties) + { + sb.Append($" - {property.Name} `{property.PropertyType.ToSyntaxTypeName()}`{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + + private static StringBuilder CondensedFormat(IEnumerable typeInfos) + { + var sb = new StringBuilder(); + var typeGroups = typeInfos + .GroupBy(mti => mti.TypeName) + .Select(tig => ( + Types: tig.Select(mti => mti.Type).ToArray(), + TypeName: tig.Key, + Properties: tig.SelectMany(mti => mti.Properties).DistinctBy(p => p.Name).OrderBy(p => p.Name).ToArray(), + NamespaceGroups: tig.Select(mti => mti.NamespaceGroup).OrderBy(ng => ng).ToArray() + )) + .OrderBy(tg => tg.TypeName); + foreach (var typeGroup in typeGroups) + { + var aType = typeGroup.Types.Select(GetAssociativeType).FirstOrDefault(t => t != null); + var aText = aType != null ? $@" \<{aType.ToSyntaxTypeName()}\>" : String.Empty; + sb.Append($"### {typeGroup.TypeName}{aText} [{String.Join(", ", typeGroup.NamespaceGroups)}]{Environment.NewLine}"); + foreach (var property in typeGroup.Properties) + { + var propertyAType = GetAssociativeType(property.PropertyType); + var propertyAText = propertyAType != null ? $" <{propertyAType.ToSyntaxTypeName()}>" : String.Empty; + var enumNames = GetEnumFieldNames(property.PropertyType.Unwrap()); + var enumNamesText = enumNames.Any() ? $" **{{{String.Join(", ", enumNames)}}}**" : String.Empty; + sb.Append($" - {property.Name} `{property.PropertyType.ToSyntaxTypeName()}{propertyAText}`{enumNamesText}{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + + //https://stackoverflow.com/a/4963190/294804 + private static Type GetAssociativeType(Type type) => + type.GetInterfaces().FirstOrDefault(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IAssociativeArray<>))?.GetGenericArguments().First(); + + private static string[] GetEnumFieldNames(Type type) => + type.IsValueType && !type.IsPrimitive && type != typeof(decimal) && type != typeof(DateTime) + ? type.GetFields(BindingFlags.Public | BindingFlags.Static).Where(f => f.FieldType == type).Select(p => p.Name).ToArray() + : new string[] { }; + + private class ModelTypeInfo + { + public Type Type { get; set; } + public string TypeName { get; set; } + public PropertyInfo[] Properties { get; set; } + public string NamespaceGroup { get; set; } + } + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs new file mode 100644 index 000000000000..3eff120386d1 --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -0,0 +1,177 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.PsHelpers; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.MarkdownRenderer; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.PsProxyTypeExtensions; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "ProxyCmdlet", DefaultParameterSetName = "Docs")] + [DoNotExport] + public class ExportProxyCmdlet : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string[] ModulePath { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string InternalFolder { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "Docs")] + [AllowEmptyString] + public string ModuleDescription { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "Docs")] + [ValidateNotNullOrEmpty] + public string DocsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExamplesFolder { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "Docs")] + public Guid ModuleGuid { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "NoDocs")] + public SwitchParameter ExcludeDocs { get; set; } + + protected override void ProcessRecord() + { + try + { + var variants = GetModuleCmdletsAndHelpInfo(this, ModulePath).SelectMany(ci => ci.ToVariants()).Where(v => !v.IsDoNotExport).ToArray(); + var allProfiles = variants.SelectMany(v => v.Profiles).Distinct().ToArray(); + var profileGroups = allProfiles.Any() + ? variants + .SelectMany(v => (v.Profiles.Any() ? v.Profiles : allProfiles).Select(p => (profile: p, variant: v))) + .GroupBy(pv => pv.profile) + .Select(pvg => new ProfileGroup(pvg.Select(pv => pv.variant).ToArray(), pvg.Key)) + : new[] { new ProfileGroup(variants) }; + var variantGroups = profileGroups.SelectMany(pg => pg.Variants + .GroupBy(v => new { v.CmdletName, v.IsInternal }) + .Select(vg => new VariantGroup(ModuleName, vg.Key.CmdletName, vg.Select(v => v).ToArray(), + Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) + .ToArray(); + + var license = new StringBuilder(); + license.Append(@" +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +"); + HashSet LicenseSet = new HashSet(); + foreach (var variantGroup in variantGroups) + { + var parameterGroups = variantGroup.ParameterGroups.ToList(); + var isValidProfile = !String.IsNullOrEmpty(variantGroup.ProfileName) && variantGroup.ProfileName != NoProfiles; + var examplesFolder = isValidProfile ? Path.Combine(ExamplesFolder, variantGroup.ProfileName) : ExamplesFolder; + var markdownInfo = new MarkdownHelpInfo(variantGroup, examplesFolder); + List examples = new List(); + foreach (var it in markdownInfo.Examples) + { + examples.Add(it); + } + variantGroup.HelpInfo.Examples = examples.ToArray(); + var sb = new StringBuilder(); + sb.Append($"{Environment.NewLine}"); + sb.Append(variantGroup.ToHelpCommentOutput()); + sb.Append($"function {variantGroup.CmdletName} {{{Environment.NewLine}"); + sb.Append(variantGroup.Aliases.ToAliasOutput()); + sb.Append(variantGroup.OutputTypes.ToOutputTypeOutput()); + sb.Append(variantGroup.ToCmdletBindingOutput()); + sb.Append(variantGroup.ProfileName.ToProfileOutput()); + + sb.Append("param("); + sb.Append($"{(parameterGroups.Any() ? Environment.NewLine : String.Empty)}"); + foreach (var parameterGroup in parameterGroups) + { + var parameters = parameterGroup.HasAllVariants ? parameterGroup.Parameters.Take(1) : parameterGroup.Parameters; + parameters = parameters.Where(p => !p.IsHidden()); + if (!parameters.Any()) + { + continue; + } + foreach (var parameter in parameters) + { + sb.Append(parameter.ToParameterOutput(variantGroup.HasMultipleVariants, parameterGroup.HasAllVariants)); + } + sb.Append(parameterGroup.Aliases.ToAliasOutput(true)); + sb.Append(parameterGroup.HasValidateNotNull.ToValidateNotNullOutput()); + sb.Append(parameterGroup.HasAllowEmptyArray.ToAllowEmptyArray()); + sb.Append(parameterGroup.CompleterInfo.ToArgumentCompleterOutput()); + sb.Append(parameterGroup.OrderCategory.ToParameterCategoryOutput()); + sb.Append(parameterGroup.InfoAttribute.ToInfoOutput(parameterGroup.ParameterType)); + sb.Append(parameterGroup.ToDefaultInfoOutput()); + sb.Append(parameterGroup.ParameterType.ToParameterTypeOutput()); + sb.Append(parameterGroup.Description.ToParameterDescriptionOutput()); + sb.Append(parameterGroup.ParameterName.ToParameterNameOutput(parameterGroups.IndexOf(parameterGroup) == parameterGroups.Count - 1)); + } + sb.Append($"){Environment.NewLine}{Environment.NewLine}"); + + sb.Append(variantGroup.ToBeginOutput()); + sb.Append(variantGroup.ToProcessOutput()); + sb.Append(variantGroup.ToEndOutput()); + + sb.Append($"}}{Environment.NewLine}"); + + Directory.CreateDirectory(variantGroup.OutputFolder); + File.WriteAllText(variantGroup.FilePath, license.ToString()); + File.AppendAllText(variantGroup.FilePath, sb.ToString()); + if (!LicenseSet.Contains(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1"))) + { + // only add license in the header + File.AppendAllText(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1"), license.ToString()); + LicenseSet.Add(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1")); + } + File.AppendAllText(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1"), sb.ToString()); + } + + if (!ExcludeDocs) + { + var moduleInfo = new PsModuleHelpInfo(ModuleName, ModuleGuid, ModuleDescription); + foreach (var variantGroupsByProfile in variantGroups.GroupBy(vg => vg.ProfileName)) + { + var profileName = variantGroupsByProfile.Key; + var isValidProfile = !String.IsNullOrEmpty(profileName) && profileName != NoProfiles; + var docsFolder = isValidProfile ? Path.Combine(DocsFolder, profileName) : DocsFolder; + var examplesFolder = isValidProfile ? Path.Combine(ExamplesFolder, profileName) : ExamplesFolder; + WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder); + } + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs new file mode 100644 index 000000000000..dd70274ed819 --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -0,0 +1,191 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using System.Text.RegularExpressions; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "Psd1")] + [DoNotExport] + public class ExportPsd1 : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string CustomFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Psd1Path { get; set; } + + [Parameter(Mandatory = true)] + public Guid ModuleGuid { get; set; } + + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + private const string CustomFolderRelative = "./custom"; + private const string Indent = Psd1Indent; + private const string Undefined = "undefined"; + private bool IsUndefined(string value) => string.Equals(Undefined, value, StringComparison.OrdinalIgnoreCase); + + protected override void ProcessRecord() + { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + if (!Directory.Exists(CustomFolder)) + { + throw new ArgumentException($"Custom folder '{CustomFolder}' does not exist"); + } + + string version = Convert.ToString(@"0.1.0"); + // Validate the module version should be semantic version + // Following regex is official from https://semver.org/ + Regex rx = new Regex(@"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$", RegexOptions.Compiled); + if (rx.Matches(version).Count != 1) + { + throw new ArgumentException("Module-version is not a valid Semantic Version"); + } + + string previewVersion = null; + if (version.Contains('-')) + { + string[] versions = version.Split("-".ToCharArray(), 2); + version = versions[0]; + previewVersion = versions[1]; + } + + var sb = new StringBuilder(); + sb.AppendLine("@{"); + sb.AppendLine($@"{GuidStart} = '{ModuleGuid}'"); + sb.AppendLine($@"{Indent}RootModule = '{"./Az.Cdn.psm1"}'"); + sb.AppendLine($@"{Indent}ModuleVersion = '{version}'"); + sb.AppendLine($@"{Indent}CompatiblePSEditions = 'Core', 'Desktop'"); + sb.AppendLine($@"{Indent}Author = '{"Microsoft Corporation"}'"); + sb.AppendLine($@"{Indent}CompanyName = '{"Microsoft Corporation"}'"); + sb.AppendLine($@"{Indent}Copyright = '{"Microsoft Corporation. All rights reserved."}'"); + sb.AppendLine($@"{Indent}Description = '{"Microsoft Azure PowerShell: Cdn cmdlets"}'"); + sb.AppendLine($@"{Indent}PowerShellVersion = '5.1'"); + sb.AppendLine($@"{Indent}DotNetFrameworkVersion = '4.7.2'"); + + // RequiredModules + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}RequiredModules = @({"undefined"})"); + } + + // RequiredAssemblies + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}RequiredAssemblies = @({"undefined"})"); + } + else + { + sb.AppendLine($@"{Indent}RequiredAssemblies = '{"./bin/Az.Cdn.private.dll"}'"); + } + + // NestedModules + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}NestedModules = @({"undefined"})"); + } + + // FormatsToProcess + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}FormatsToProcess = @({"undefined"})"); + } + else + { + var customFormatPs1xmlFiles = Directory.GetFiles(CustomFolder) + .Where(f => f.EndsWith(".format.ps1xml")) + .Select(f => $"{CustomFolderRelative}/{Path.GetFileName(f)}"); + var formatList = customFormatPs1xmlFiles.Prepend("./Az.Cdn.format.ps1xml").ToPsList(); + sb.AppendLine($@"{Indent}FormatsToProcess = {formatList}"); + } + + // TypesToProcess + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}TypesToProcess = @({"undefined"})"); + } + + // ScriptsToProcess + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}ScriptsToProcess = @({"undefined"})"); + } + + var functionInfos = GetScriptCmdlets(ExportsFolder).ToArray(); + // FunctionsToExport + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}FunctionsToExport = @({"undefined"})"); + } + else + { + var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().Append("*").ToPsList(); + sb.AppendLine($@"{Indent}FunctionsToExport = {cmdletsList}"); + } + + // AliasesToExport + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}AliasesToExport = @({"undefined"})"); + } + else + { + var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().Append("*").ToPsList(); + sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + } + + // CmdletsToExport + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}CmdletsToExport = @({"undefined"})"); + } + + sb.AppendLine($@"{Indent}PrivateData = @{{"); + sb.AppendLine($@"{Indent}{Indent}PSData = @{{"); + + if (previewVersion != null) + { + sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = {previewVersion}"); + } + sb.AppendLine($@"{Indent}{Indent}{Indent}Tags = {"Azure ResourceManager ARM PSModule Cdn".Split(' ').ToPsList().NullIfEmpty() ?? "''"}"); + sb.AppendLine($@"{Indent}{Indent}{Indent}LicenseUri = '{"https://aka.ms/azps-license"}'"); + sb.AppendLine($@"{Indent}{Indent}{Indent}ProjectUri = '{"https://github.com/Azure/azure-powershell"}'"); + sb.AppendLine($@"{Indent}{Indent}{Indent}ReleaseNotes = ''"); + var profilesList = ""; + if (IsAzure && !String.IsNullOrEmpty(profilesList)) + { + sb.AppendLine($@"{Indent}{Indent}{Indent}Profiles = {profilesList}"); + } + + sb.AppendLine($@"{Indent}{Indent}}}"); + sb.AppendLine($@"{Indent}}}"); + sb.AppendLine(@"}"); + + File.WriteAllText(Psd1Path, sb.ToString()); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs b/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs new file mode 100644 index 000000000000..e113855afaff --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs @@ -0,0 +1,148 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.PsProxyOutputExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "TestStub")] + [DoNotExport] + public class ExportTestStub : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public SwitchParameter IncludeGenerated { get; set; } + + protected override void ProcessRecord() + { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + var exportDirectories = Directory.GetDirectories(ExportsFolder); + if (!exportDirectories.Any()) + { + exportDirectories = new[] { ExportsFolder }; + } + var utilFile = Path.Combine(OutputFolder, "utils.ps1"); + if (!File.Exists(utilFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { + if ($allChars) { + return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) + } else { + return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) + } +} +$env = @{} +if ($UsePreviousConfigForRecord) { + $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json + $previousEnv.psobject.properties | Foreach-Object { $env[$_.Name] = $_.Value } +} +# Add script method called AddWithCache to $env, when useCache is set true, it will try to get the value from the $env first. +# example: $val = $env.AddWithCache('key', $val, $true) +$env | Add-Member -Type ScriptMethod -Value { param( [string]$key, [object]$val, [bool]$useCache) if ($this.Contains($key) -and $useCache) { return $this[$key] } else { $this[$key] = $val; return $val } } -Name 'AddWithCache' +function setupEnv() { + # Preload subscriptionId and tenant from context, which will be used in test + # as default. You could change them if needed. + $env.SubscriptionId = (Get-AzContext).Subscription.Id + $env.Tenant = (Get-AzContext).Tenant.Id + # For any resources you created for test, you should add it to $env here. + $envFile = 'env.json' + if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' + } + set-content -Path (Join-Path $PSScriptRoot $envFile) -Value (ConvertTo-Json $env) +} +function cleanupEnv() { + # Clean resources you create for testing +} +"); + File.WriteAllText(utilFile, sc.ToString()); + } + foreach (var exportDirectory in exportDirectories) + { + var outputFolder = OutputFolder; + if (exportDirectory != ExportsFolder) + { + outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); + Directory.CreateDirectory(outputFolder); + } + + var variantGroups = GetScriptCmdlets(exportDirectory) + .SelectMany(fi => fi.ToVariants()) + .Where(v => !v.IsDoNotExport) + .GroupBy(v => v.CmdletName) + .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) + .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); + + foreach (var variantGroup in variantGroups) + { + var sb = new StringBuilder(); + sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); + sb.AppendLine(@"{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath)" +); + sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); + sb.AppendLine(@" $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 +} +"); + + + sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); + var variants = variantGroup.Variants + .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) + .ToList(); + + foreach (var variant in variants) + { + sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); + sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); + var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; + sb.AppendLine($"{Indent}}}{variantSeparator}"); + } + sb.AppendLine("}"); + + File.WriteAllText(variantGroup.FilePath, sb.ToString()); + } + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs b/src/Cdn/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs new file mode 100644 index 000000000000..0d1072ece951 --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs @@ -0,0 +1,52 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + [Cmdlet(VerbsCommon.Get, "CommonParameter")] + [OutputType(typeof(Dictionary))] + [DoNotExport] + public class GetCommonParameter : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSCmdlet PSCmdlet { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public Dictionary PSBoundParameter { get; set; } + + protected override void ProcessRecord() + { + try + { + var variants = PSCmdlet.MyInvocation.MyCommand.ToVariants(); + var commonParameterNames = variants.ToParameterGroups() + .Where(pg => pg.OrderCategory == ParameterCategory.Azure || pg.OrderCategory == ParameterCategory.Runtime) + .Select(pg => pg.ParameterName); + if (variants.Any(v => v.SupportsShouldProcess)) + { + commonParameterNames = commonParameterNames.Append("Confirm").Append("WhatIf"); + } + if (variants.Any(v => v.SupportsPaging)) + { + commonParameterNames = commonParameterNames.Append("First").Append("Skip").Append("IncludeTotalCount"); + } + + var names = commonParameterNames.ToArray(); + var keys = PSBoundParameter.Keys.Where(k => names.Contains(k)); + WriteObject(keys.ToDictionary(key => key, key => PSBoundParameter[key]), true); + } + catch (System.Exception ee) + { + System.Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs b/src/Cdn/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs new file mode 100644 index 000000000000..b7544e12baf1 --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + [Cmdlet(VerbsCommon.Get, "ModuleGuid")] + [DoNotExport] + public class GetModuleGuid : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Psd1Path { get; set; } + + protected override void ProcessRecord() + { + try + { + WriteObject(ReadGuidFromPsd1(Psd1Path)); + } + catch (System.Exception ee) + { + System.Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs b/src/Cdn/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs new file mode 100644 index 000000000000..a480539d843b --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs @@ -0,0 +1,54 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + [Cmdlet(VerbsCommon.Get, "ScriptCmdlet")] + [OutputType(typeof(string[]))] + [DoNotExport] + public class GetScriptCmdlet : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ScriptFolder { get; set; } + + [Parameter] + public SwitchParameter IncludeDoNotExport { get; set; } + + [Parameter] + public SwitchParameter AsAlias { get; set; } + + [Parameter] + public SwitchParameter AsFunctionInfo { get; set; } + + protected override void ProcessRecord() + { + try + { + var functionInfos = GetScriptCmdlets(this, ScriptFolder) + .Where(fi => IncludeDoNotExport || !fi.ScriptBlock.Attributes.OfType().Any()) + .ToArray(); + if (AsFunctionInfo) + { + WriteObject(functionInfos, true); + return; + } + var aliases = functionInfos.SelectMany(i => i.ScriptBlock.Attributes).ToAliasNames(); + var names = functionInfos.Select(fi => fi.Name).Distinct(); + var output = (AsAlias ? aliases : names).DefaultIfEmpty("''").ToArray(); + WriteObject(output, true); + } + catch (System.Exception ee) + { + System.Console.Error.WriteLine($"{ee.GetType().Name}: {ee.Message}"); + System.Console.Error.WriteLine(ee.StackTrace); + throw ee; + } + } + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/CollectionExtensions.cs b/src/Cdn/generated/runtime/BuildTime/CollectionExtensions.cs new file mode 100644 index 000000000000..8605a4a75532 --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/CollectionExtensions.cs @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + internal static class CollectionExtensions + { + public static T[] NullIfEmpty(this T[] collection) => (collection?.Any() ?? false) ? collection : null; + public static IEnumerable EmptyIfNull(this IEnumerable collection) => collection ?? Enumerable.Empty(); + + // https://stackoverflow.com/a/4158364/294804 + public static IEnumerable DistinctBy(this IEnumerable collection, Func selector) => + collection.GroupBy(selector).Select(group => group.First()); + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/MarkdownRenderer.cs b/src/Cdn/generated/runtime/BuildTime/MarkdownRenderer.cs new file mode 100644 index 000000000000..ddfcc0f2c733 --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -0,0 +1,114 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.MarkdownTypesExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.PsProxyOutputExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + internal static class MarkdownRenderer + { + public static void WriteMarkdowns(IEnumerable variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder) + { + Directory.CreateDirectory(docsFolder); + var markdownInfos = variantGroups.Where(vg => !vg.IsInternal).Select(vg => new MarkdownHelpInfo(vg, examplesFolder)).OrderBy(mhi => mhi.CmdletName).ToArray(); + + foreach (var markdownInfo in markdownInfos) + { + var sb = new StringBuilder(); + sb.Append(markdownInfo.ToHelpMetadataOutput()); + sb.Append($"# {markdownInfo.CmdletName}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"## SYNOPSIS{Environment.NewLine}{markdownInfo.Synopsis.ToDescriptionFormat()}{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## SYNTAX{Environment.NewLine}{Environment.NewLine}"); + var hasMultipleParameterSets = markdownInfo.SyntaxInfos.Length > 1; + foreach (var syntaxInfo in markdownInfo.SyntaxInfos) + { + sb.Append(syntaxInfo.ToHelpSyntaxOutput(hasMultipleParameterSets)); + } + + sb.Append($"## DESCRIPTION{Environment.NewLine}{markdownInfo.Description.ToDescriptionFormat()}{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## EXAMPLES{Environment.NewLine}{Environment.NewLine}"); + foreach (var exampleInfo in markdownInfo.Examples) + { + sb.Append(exampleInfo.ToHelpExampleOutput()); + } + + sb.Append($"## PARAMETERS{Environment.NewLine}{Environment.NewLine}"); + foreach (var parameter in markdownInfo.Parameters) + { + sb.Append(parameter.ToHelpParameterOutput()); + } + if (markdownInfo.SupportsShouldProcess) + { + foreach (var parameter in SupportsShouldProcessParameters) + { + sb.Append(parameter.ToHelpParameterOutput()); + } + } + + sb.Append($"### CommonParameters{Environment.NewLine}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).{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## INPUTS{Environment.NewLine}{Environment.NewLine}"); + foreach (var input in markdownInfo.Inputs) + { + sb.Append($"### {input}{Environment.NewLine}{Environment.NewLine}"); + } + + sb.Append($"## OUTPUTS{Environment.NewLine}{Environment.NewLine}"); + foreach (var output in markdownInfo.Outputs) + { + sb.Append($"### {output}{Environment.NewLine}{Environment.NewLine}"); + } + + sb.Append($"## NOTES{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}"); + foreach (var alias in markdownInfo.Aliases) + { + sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}"); + } + if (markdownInfo.ComplexInterfaceInfos.Any()) + { + sb.Append($"{ComplexParameterHeader}{Environment.NewLine}"); + } + foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos) + { + sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}"); + } + + sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); + foreach (var relatedLink in markdownInfo.RelatedLinks) + { + sb.Append($"{relatedLink}{Environment.NewLine}{Environment.NewLine}"); + } + + File.WriteAllText(Path.Combine(docsFolder, $"{markdownInfo.CmdletName}.md"), sb.ToString()); + } + + WriteModulePage(moduleHelpInfo, markdownInfos, docsFolder); + } + + private static void WriteModulePage(PsModuleHelpInfo moduleInfo, MarkdownHelpInfo[] markdownInfos, string docsFolder) + { + var sb = new StringBuilder(); + sb.Append(moduleInfo.ToModulePageMetadataOutput()); + sb.Append($"# {moduleInfo.Name} Module{Environment.NewLine}"); + sb.Append($"## Description{Environment.NewLine}{moduleInfo.Description.ToDescriptionFormat()}{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## {moduleInfo.Name} Cmdlets{Environment.NewLine}"); + foreach (var markdownInfo in markdownInfos) + { + sb.Append(markdownInfo.ToModulePageCmdletOutput()); + } + + File.WriteAllText(Path.Combine(docsFolder, $"{moduleInfo.Name}.md"), sb.ToString()); + } + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/Models/PsFormatTypes.cs b/src/Cdn/generated/runtime/BuildTime/Models/PsFormatTypes.cs new file mode 100644 index 000000000000..3862a82c1b18 --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/Models/PsFormatTypes.cs @@ -0,0 +1,138 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Xml.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + internal class ViewParameters + { + public Type Type { get; } + public IEnumerable Properties { get; } + + public ViewParameters(Type type, IEnumerable properties) + { + Type = type; + Properties = properties; + } + } + + internal class PropertyFormat + { + public PropertyInfo Property { get; } + public FormatTableAttribute FormatTable { get; } + + public int? Index { get; } + public string Label { get; } + public int? Width { get; } + public PropertyOrigin? Origin { get; } + + public PropertyFormat(PropertyInfo propertyInfo) + { + Property = propertyInfo; + FormatTable = Property.GetCustomAttributes().FirstOrDefault(); + var origin = Property.GetCustomAttributes().FirstOrDefault(); + + Index = FormatTable?.HasIndex ?? false ? (int?)FormatTable.Index : null; + Label = FormatTable?.Label ?? propertyInfo.Name; + Width = FormatTable?.HasWidth ?? false ? (int?)FormatTable.Width : null; + // If we have an index, we don't want to use Origin. + Origin = FormatTable?.HasIndex ?? false ? null : origin?.Origin; + } + } + + [Serializable] + [XmlRoot(nameof(Configuration))] + public class Configuration + { + [XmlElement("ViewDefinitions")] + public ViewDefinitions ViewDefinitions { get; set; } + } + + [Serializable] + public class ViewDefinitions + { + //https://stackoverflow.com/a/10518657/294804 + [XmlElement("View")] + public List Views { get; set; } + } + + [Serializable] + public class View + { + [XmlElement(nameof(Name))] + public string Name { get; set; } + [XmlElement(nameof(ViewSelectedBy))] + public ViewSelectedBy ViewSelectedBy { get; set; } + [XmlElement(nameof(TableControl))] + public TableControl TableControl { get; set; } + } + + [Serializable] + public class ViewSelectedBy + { + [XmlElement(nameof(TypeName))] + public string TypeName { get; set; } + } + + [Serializable] + public class TableControl + { + [XmlElement(nameof(TableHeaders))] + public TableHeaders TableHeaders { get; set; } + [XmlElement(nameof(TableRowEntries))] + public TableRowEntries TableRowEntries { get; set; } + } + + [Serializable] + public class TableHeaders + { + [XmlElement("TableColumnHeader")] + public List TableColumnHeaders { get; set; } + } + + [Serializable] + public class TableColumnHeader + { + [XmlElement(nameof(Label))] + public string Label { get; set; } + [XmlElement(nameof(Width))] + public int? Width { get; set; } + + //https://stackoverflow.com/a/4095225/294804 + public bool ShouldSerializeWidth() => Width.HasValue; + } + + [Serializable] + public class TableRowEntries + { + [XmlElement(nameof(TableRowEntry))] + public TableRowEntry TableRowEntry { get; set; } + } + + [Serializable] + public class TableRowEntry + { + [XmlElement(nameof(TableColumnItems))] + public TableColumnItems TableColumnItems { get; set; } + } + + [Serializable] + public class TableColumnItems + { + [XmlElement("TableColumnItem")] + public List TableItems { get; set; } + } + + [Serializable] + public class TableColumnItem + { + [XmlElement(nameof(PropertyName))] + public string PropertyName { get; set; } + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs b/src/Cdn/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs new file mode 100644 index 000000000000..bc65cba0d71c --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs @@ -0,0 +1,199 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.PsHelpOutputExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + internal class HelpMetadataOutput + { + public MarkdownHelpInfo HelpInfo { get; } + + public HelpMetadataOutput(MarkdownHelpInfo helpInfo) + { + HelpInfo = helpInfo; + } + + public override string ToString() => $@"--- +external help file:{(!String.IsNullOrEmpty(HelpInfo.ExternalHelpFilename) ? $" {HelpInfo.ExternalHelpFilename}" : String.Empty)} +Module Name: {HelpInfo.ModuleName} +online version: {HelpInfo.OnlineVersion} +schema: {HelpInfo.Schema.ToString(3)} +--- + +"; + } + + internal class HelpSyntaxOutput + { + public MarkdownSyntaxHelpInfo SyntaxInfo { get; } + public bool HasMultipleParameterSets { get; } + + public HelpSyntaxOutput(MarkdownSyntaxHelpInfo syntaxInfo, bool hasMultipleParameterSets) + { + SyntaxInfo = syntaxInfo; + HasMultipleParameterSets = hasMultipleParameterSets; + } + + public override string ToString() + { + var psnText = HasMultipleParameterSets ? $"### {SyntaxInfo.ParameterSetName}{(SyntaxInfo.IsDefault ? " (Default)" : String.Empty)}{Environment.NewLine}" : String.Empty; + return $@"{psnText}``` +{SyntaxInfo.SyntaxText} +``` + +"; + } + } + + internal class HelpExampleOutput + { + private string ExampleTemplate = + "{0}{1}" + Environment.NewLine + + "{2}" + Environment.NewLine + "{3}" + Environment.NewLine + "{4}" + Environment.NewLine + Environment.NewLine + + "{5}" + Environment.NewLine + Environment.NewLine; + + private string ExampleTemplateWithOutput = + "{0}{1}" + Environment.NewLine + + "{2}" + Environment.NewLine + "{3}" + Environment.NewLine + "{4}" + Environment.NewLine + Environment.NewLine + + "{5}" + Environment.NewLine + "{6}" + Environment.NewLine + "{7}" + Environment.NewLine + Environment.NewLine + + "{8}" + Environment.NewLine + Environment.NewLine; + + public MarkdownExampleHelpInfo ExampleInfo { get; } + + public HelpExampleOutput(MarkdownExampleHelpInfo exampleInfo) + { + ExampleInfo = exampleInfo; + } + + public override string ToString() + { + if (string.IsNullOrEmpty(ExampleInfo.Output)) + { + return string.Format(ExampleTemplate, + ExampleNameHeader, ExampleInfo.Name, + ExampleCodeHeader, ExampleInfo.Code, ExampleCodeFooter, + ExampleInfo.Description.ToDescriptionFormat()); + } + else + { + return string.Format(ExampleTemplateWithOutput, + ExampleNameHeader, ExampleInfo.Name, + ExampleCodeHeader, ExampleInfo.Code, ExampleCodeFooter, + ExampleOutputHeader, ExampleInfo.Output, ExampleOutputFooter, + ExampleInfo.Description.ToDescriptionFormat()); ; + } + } + } + + internal class HelpParameterOutput + { + public MarkdownParameterHelpInfo ParameterInfo { get; } + + public HelpParameterOutput(MarkdownParameterHelpInfo parameterInfo) + { + ParameterInfo = parameterInfo; + } + + public override string ToString() + { + var pipelineInputTypes = new[] + { + ParameterInfo.AcceptsPipelineByValue ? "ByValue" : String.Empty, + ParameterInfo.AcceptsPipelineByPropertyName ? "ByPropertyName" : String.Empty + }.JoinIgnoreEmpty(", "); + var pipelineInput = ParameterInfo.AcceptsPipelineByValue || ParameterInfo.AcceptsPipelineByPropertyName + ? $@"{true} ({pipelineInputTypes})" + : false.ToString(); + + return $@"### -{ParameterInfo.Name} +{ParameterInfo.Description.ToDescriptionFormat()} + +```yaml +Type: {ParameterInfo.Type.FullName} +Parameter Sets: {(ParameterInfo.HasAllParameterSets ? "(All)" : ParameterInfo.ParameterSetNames.JoinIgnoreEmpty(", "))} +Aliases:{(ParameterInfo.Aliases.Any() ? $" {ParameterInfo.Aliases.JoinIgnoreEmpty(", ")}" : String.Empty)} + +Required: {ParameterInfo.IsRequired} +Position: {ParameterInfo.Position} +Default value: {ParameterInfo.DefaultValue} +Accept pipeline input: {pipelineInput} +Accept wildcard characters: {ParameterInfo.AcceptsWildcardCharacters} +``` + +"; + } + } + + internal class ModulePageMetadataOutput + { + public PsModuleHelpInfo ModuleInfo { get; } + + private static string HelpLinkPrefix { get; } = @"https://docs.microsoft.com/powershell/module/"; + + public ModulePageMetadataOutput(PsModuleHelpInfo moduleInfo) + { + ModuleInfo = moduleInfo; + } + + public override string ToString() => $@"--- +Module Name: {ModuleInfo.Name} +Module Guid: {ModuleInfo.Guid} +Download Help Link: {HelpLinkPrefix}{ModuleInfo.Name.ToLowerInvariant()} +Help Version: 1.0.0.0 +Locale: en-US +--- + +"; + } + + internal class ModulePageCmdletOutput + { + public MarkdownHelpInfo HelpInfo { get; } + + public ModulePageCmdletOutput(MarkdownHelpInfo helpInfo) + { + HelpInfo = helpInfo; + } + + public override string ToString() => $@"### [{HelpInfo.CmdletName}]({HelpInfo.CmdletName}.md) +{HelpInfo.Synopsis.ToDescriptionFormat()} + +"; + } + + internal static class PsHelpOutputExtensions + { + public static string EscapeAngleBrackets(this string text) => text?.Replace("<", @"\<").Replace(">", @"\>"); + public static string ReplaceSentenceEndWithNewline(this string text) => text?.Replace(". ", $".{Environment.NewLine}").Replace(". ", $".{Environment.NewLine}"); + public static string ReplaceBrWithNewline(this string text) => text?.Replace("
", $"{Environment.NewLine}"); + public static string ToDescriptionFormat(this string text, bool escapeAngleBrackets = true) + { + var description = text?.ReplaceBrWithNewline(); + description = escapeAngleBrackets ? description?.EscapeAngleBrackets() : description; + return description?.ReplaceSentenceEndWithNewline().Trim(); + } + + public const string ExampleNameHeader = "### "; + public const string ExampleCodeHeader = "```powershell"; + public const string ExampleCodeFooter = "```"; + public const string ExampleOutputHeader = "```output"; + public const string ExampleOutputFooter = "```"; + + public static HelpMetadataOutput ToHelpMetadataOutput(this MarkdownHelpInfo helpInfo) => new HelpMetadataOutput(helpInfo); + + public static HelpSyntaxOutput ToHelpSyntaxOutput(this MarkdownSyntaxHelpInfo syntaxInfo, bool hasMultipleParameterSets) => new HelpSyntaxOutput(syntaxInfo, hasMultipleParameterSets); + + public static HelpExampleOutput ToHelpExampleOutput(this MarkdownExampleHelpInfo exampleInfo) => new HelpExampleOutput(exampleInfo); + + public static HelpParameterOutput ToHelpParameterOutput(this MarkdownParameterHelpInfo parameterInfo) => new HelpParameterOutput(parameterInfo); + + public static ModulePageMetadataOutput ToModulePageMetadataOutput(this PsModuleHelpInfo moduleInfo) => new ModulePageMetadataOutput(moduleInfo); + + public static ModulePageCmdletOutput ToModulePageCmdletOutput(this MarkdownHelpInfo helpInfo) => new ModulePageCmdletOutput(helpInfo); + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/Models/PsHelpTypes.cs b/src/Cdn/generated/runtime/BuildTime/Models/PsHelpTypes.cs new file mode 100644 index 000000000000..a009f36f9eec --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/Models/PsHelpTypes.cs @@ -0,0 +1,202 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + internal class PsHelpInfo + { + public string CmdletName { get; } + public string ModuleName { get; } + public string Synopsis { get; } + public string Description { get; } + public string AlertText { get; } + public string Category { get; } + public PsHelpLinkInfo OnlineVersion { get; } + public PsHelpLinkInfo[] RelatedLinks { get; } + public bool? HasCommonParameters { get; } + public bool? HasWorkflowCommonParameters { get; } + + public PsHelpTypeInfo[] InputTypes { get; } + public PsHelpTypeInfo[] OutputTypes { get; } + public PsHelpExampleInfo[] Examples { get; set; } + public string[] Aliases { get; } + + public PsParameterHelpInfo[] Parameters { get; } + public PsHelpSyntaxInfo[] Syntax { get; } + + public object Component { get; } + public object Functionality { get; } + public object PsSnapIn { get; } + public object Role { get; } + public string NonTerminatingErrors { get; } + + public PsHelpInfo(PSObject helpObject = null) + { + helpObject = helpObject ?? new PSObject(); + CmdletName = helpObject.GetProperty("Name").NullIfEmpty() ?? helpObject.GetNestedProperty("details", "name"); + ModuleName = helpObject.GetProperty("ModuleName"); + Synopsis = helpObject.GetProperty("Synopsis"); + Description = helpObject.GetProperty("description").EmptyIfNull().ToDescriptionText().NullIfEmpty() ?? + helpObject.GetNestedProperty("details", "description").EmptyIfNull().ToDescriptionText(); + AlertText = helpObject.GetNestedProperty("alertSet", "alert").EmptyIfNull().ToDescriptionText(); + Category = helpObject.GetProperty("Category"); + HasCommonParameters = helpObject.GetProperty("CommonParameters").ToNullableBool(); + HasWorkflowCommonParameters = helpObject.GetProperty("WorkflowCommonParameters").ToNullableBool(); + + var links = helpObject.GetNestedProperty("relatedLinks", "navigationLink").EmptyIfNull().Select(nl => nl.ToLinkInfo()).ToArray(); + OnlineVersion = links.FirstOrDefault(l => l.Text?.ToLowerInvariant().StartsWith("online version:") ?? links.Length == 1); + RelatedLinks = links.Where(l => !l.Text?.ToLowerInvariant().StartsWith("online version:") ?? links.Length != 1).ToArray(); + + InputTypes = helpObject.GetNestedProperty("inputTypes", "inputType").EmptyIfNull().Select(it => it.ToTypeInfo()).ToArray(); + OutputTypes = helpObject.GetNestedProperty("returnValues", "returnValue").EmptyIfNull().Select(rv => rv.ToTypeInfo()).ToArray(); + Examples = helpObject.GetNestedProperty("examples", "example").EmptyIfNull().Select(e => e.ToExampleInfo()).ToArray(); + Aliases = helpObject.GetProperty("aliases").EmptyIfNull().Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); + + Parameters = helpObject.GetNestedProperty("parameters", "parameter").EmptyIfNull().Select(p => p.ToPsParameterHelpInfo()).ToArray(); + Syntax = helpObject.GetNestedProperty("syntax", "syntaxItem").EmptyIfNull().Select(si => si.ToSyntaxInfo()).ToArray(); + + Component = helpObject.GetProperty("Component"); + Functionality = helpObject.GetProperty("Functionality"); + PsSnapIn = helpObject.GetProperty("PSSnapIn"); + Role = helpObject.GetProperty("Role"); + NonTerminatingErrors = helpObject.GetProperty("nonTerminatingErrors"); + } + } + + internal class PsHelpTypeInfo + { + public string Name { get; } + public string Description { get; } + + public PsHelpTypeInfo(PSObject typeObject) + { + Name = typeObject.GetNestedProperty("type", "name").EmptyIfNull().Trim(); + Description = typeObject.GetProperty("description").EmptyIfNull().ToDescriptionText(); + } + } + + internal class PsHelpLinkInfo + { + public string Uri { get; } + public string Text { get; } + + public PsHelpLinkInfo(PSObject linkObject) + { + Uri = linkObject.GetProperty("uri"); + Text = linkObject.GetProperty("linkText"); + } + } + + internal class PsHelpSyntaxInfo + { + public string CmdletName { get; } + public PsParameterHelpInfo[] Parameters { get; } + + public PsHelpSyntaxInfo(PSObject syntaxObject) + { + CmdletName = syntaxObject.GetProperty("name"); + Parameters = syntaxObject.GetProperty("parameter").EmptyIfNull().Select(p => p.ToPsParameterHelpInfo()).ToArray(); + } + } + + internal class PsHelpExampleInfo + { + public string Title { get; } + public string Code { get; } + public string Output { get; } + public string Remarks { get; } + + public PsHelpExampleInfo(PSObject exampleObject) + { + Title = exampleObject.GetProperty("title"); + Code = exampleObject.GetProperty("code"); + Output = exampleObject.GetProperty("output"); + Remarks = exampleObject.GetProperty("remarks").EmptyIfNull().ToDescriptionText(); + } + public PsHelpExampleInfo(MarkdownExampleHelpInfo markdownExample) + { + Title = markdownExample.Name; + Code = markdownExample.Code; + Output = markdownExample.Output; + Remarks = markdownExample.Description; + } + + public static implicit operator PsHelpExampleInfo(MarkdownExampleHelpInfo markdownExample) => new PsHelpExampleInfo(markdownExample); + } + + internal class PsParameterHelpInfo + { + public string DefaultValueAsString { get; } + + public string Name { get; } + public string TypeName { get; } + public string Description { get; } + public string SupportsPipelineInput { get; } + public string PositionText { get; } + public string[] ParameterSetNames { get; } + public string[] Aliases { get; } + + public bool? SupportsGlobbing { get; } + public bool? IsRequired { get; } + public bool? IsVariableLength { get; } + public bool? IsDynamic { get; } + + public PsParameterHelpInfo(PSObject parameterHelpObject = null) + { + parameterHelpObject = parameterHelpObject ?? new PSObject(); + DefaultValueAsString = parameterHelpObject.GetProperty("defaultValue"); + Name = parameterHelpObject.GetProperty("name"); + TypeName = parameterHelpObject.GetProperty("parameterValue").NullIfEmpty() ?? parameterHelpObject.GetNestedProperty("type", "name"); + Description = parameterHelpObject.GetProperty("Description").EmptyIfNull().ToDescriptionText(); + SupportsPipelineInput = parameterHelpObject.GetProperty("pipelineInput"); + PositionText = parameterHelpObject.GetProperty("position"); + ParameterSetNames = parameterHelpObject.GetProperty("parameterSetName").EmptyIfNull().Split(new[] { ", " }, StringSplitOptions.RemoveEmptyEntries); + Aliases = parameterHelpObject.GetProperty("aliases").EmptyIfNull().Split(new[] { ", " }, StringSplitOptions.RemoveEmptyEntries); + + SupportsGlobbing = parameterHelpObject.GetProperty("globbing").ToNullableBool(); + IsRequired = parameterHelpObject.GetProperty("required").ToNullableBool(); + IsVariableLength = parameterHelpObject.GetProperty("variableLength").ToNullableBool(); + IsDynamic = parameterHelpObject.GetProperty("isDynamic").ToNullableBool(); + } + } + + internal class PsModuleHelpInfo + { + public string Name { get; } + public Guid Guid { get; } + public string Description { get; } + + public PsModuleHelpInfo(PSModuleInfo moduleInfo) + : this(moduleInfo?.Name ?? String.Empty, moduleInfo?.Guid ?? Guid.NewGuid(), moduleInfo?.Description ?? String.Empty) + { + } + + public PsModuleHelpInfo(string name, Guid guid, string description) + { + Name = name; + Guid = guid; + Description = description; + } + } + + internal static class HelpTypesExtensions + { + public static PsHelpInfo ToPsHelpInfo(this PSObject helpObject) => new PsHelpInfo(helpObject); + public static PsParameterHelpInfo ToPsParameterHelpInfo(this PSObject parameterHelpObject) => new PsParameterHelpInfo(parameterHelpObject); + + public static string ToDescriptionText(this IEnumerable descriptionObject) => descriptionObject != null + ? String.Join(Environment.NewLine, descriptionObject.Select(dl => dl.GetProperty("Text").EmptyIfNull())).NullIfWhiteSpace() + : null; + public static PsHelpTypeInfo ToTypeInfo(this PSObject typeObject) => new PsHelpTypeInfo(typeObject); + public static PsHelpExampleInfo ToExampleInfo(this PSObject exampleObject) => new PsHelpExampleInfo(exampleObject); + public static PsHelpLinkInfo ToLinkInfo(this PSObject linkObject) => new PsHelpLinkInfo(linkObject); + public static PsHelpSyntaxInfo ToSyntaxInfo(this PSObject syntaxObject) => new PsHelpSyntaxInfo(syntaxObject); + public static PsModuleHelpInfo ToModuleInfo(this PSModuleInfo moduleInfo) => new PsModuleHelpInfo(moduleInfo); + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs b/src/Cdn/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs new file mode 100644 index 000000000000..a761fbf1477e --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs @@ -0,0 +1,294 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.MarkdownTypesExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.PsHelpOutputExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + internal class MarkdownHelpInfo + { + public string ExternalHelpFilename { get; } + public string ModuleName { get; } + public string OnlineVersion { get; } + public Version Schema { get; } + + public string CmdletName { get; } + public string[] Aliases { get; } + public string Synopsis { get; } + public string Description { get; } + + public MarkdownSyntaxHelpInfo[] SyntaxInfos { get; } + public MarkdownExampleHelpInfo[] Examples { get; } + public MarkdownParameterHelpInfo[] Parameters { get; } + + public string[] Inputs { get; } + public string[] Outputs { get; } + public ComplexInterfaceInfo[] ComplexInterfaceInfos { get; } + public string[] RelatedLinks { get; } + + public bool SupportsShouldProcess { get; } + public bool SupportsPaging { get; } + + public MarkdownHelpInfo(VariantGroup variantGroup, string examplesFolder, string externalHelpFilename = "") + { + ExternalHelpFilename = externalHelpFilename; + ModuleName = variantGroup.RootModuleName != "" ? variantGroup.RootModuleName : variantGroup.ModuleName; + var helpInfo = variantGroup.HelpInfo; + var commentInfo = variantGroup.CommentInfo; + Schema = Version.Parse("2.0.0"); + + CmdletName = variantGroup.CmdletName; + Aliases = (variantGroup.Aliases.NullIfEmpty() ?? helpInfo.Aliases).Where(a => a != "None").ToArray(); + Synopsis = commentInfo.Synopsis; + Description = commentInfo.Description; + + SyntaxInfos = variantGroup.Variants + .Select(v => new MarkdownSyntaxHelpInfo(v, variantGroup.ParameterGroups, v.VariantName == variantGroup.DefaultParameterSetName)) + .OrderByDescending(v => v.IsDefault).ThenBy(v => v.ParameterSetName).ToArray(); + Examples = GetExamplesFromMarkdown(examplesFolder).NullIfEmpty() + ?? helpInfo.Examples.Select(e => e.ToExampleHelpInfo()).ToArray().NullIfEmpty() + ?? DefaultExampleHelpInfos; + + Parameters = variantGroup.ParameterGroups + .Where(pg => !pg.DontShow && !pg.Parameters.All(p => p.IsHidden())) + .Select(pg => new MarkdownParameterHelpInfo( + variantGroup.Variants.SelectMany(v => v.HelpInfo.Parameters).Where(phi => phi.Name == pg.ParameterName).ToArray(), pg)) + .OrderBy(phi => phi.Name).ToArray(); + + Inputs = commentInfo.Inputs; + Outputs = commentInfo.Outputs; + + ComplexInterfaceInfos = variantGroup.ComplexInterfaceInfos; + OnlineVersion = commentInfo.OnlineVersion; + RelatedLinks = commentInfo.RelatedLinks; + + SupportsShouldProcess = variantGroup.SupportsShouldProcess; + SupportsPaging = variantGroup.SupportsPaging; + } + + private MarkdownExampleHelpInfo[] GetExamplesFromMarkdown(string examplesFolder) + { + var filePath = Path.Combine(examplesFolder, $"{CmdletName}.md"); + if (!Directory.Exists(examplesFolder) || !File.Exists(filePath)) return null; + + var lines = File.ReadAllLines(filePath); + var nameIndices = lines.Select((l, i) => l.StartsWith(ExampleNameHeader) ? i : -1).Where(i => i != -1).ToArray(); + //https://codereview.stackexchange.com/a/187148/68772 + var indexCountGroups = nameIndices.Skip(1).Append(lines.Length).Zip(nameIndices, (next, current) => (NameIndex: current, LineCount: next - current)); + var exampleGroups = indexCountGroups.Select(icg => lines.Skip(icg.NameIndex).Take(icg.LineCount).ToArray()); + return exampleGroups.Select(eg => + { + var name = eg.First().Replace(ExampleNameHeader, String.Empty); + var codeStartIndex = eg.Select((l, i) => l.StartsWith(ExampleCodeHeader) ? (int?)i : null).FirstOrDefault(i => i.HasValue); + var codeEndIndex = eg.Select((l, i) => l.StartsWith(ExampleCodeFooter) ? (int?)i : null).FirstOrDefault(i => i.HasValue && i != codeStartIndex); + var code = codeStartIndex.HasValue && codeEndIndex.HasValue + ? String.Join(Environment.NewLine, eg.Skip(codeStartIndex.Value + 1).Take(codeEndIndex.Value - (codeStartIndex.Value + 1))) + : String.Empty; + var outputStartIndex = eg.Select((l, i) => l.StartsWith(ExampleOutputHeader) ? (int?)i : null).FirstOrDefault(i => i.HasValue); + var outputEndIndex = eg.Select((l, i) => l.StartsWith(ExampleOutputFooter) ? (int?)i : null).FirstOrDefault(i => i.HasValue && i > outputStartIndex); + var output = outputStartIndex.HasValue && outputEndIndex.HasValue + ? String.Join(Environment.NewLine, eg.Skip(outputStartIndex.Value + 1).Take(outputEndIndex.Value - (outputStartIndex.Value + 1))) + : String.Empty; + var descriptionStartIndex = (outputEndIndex ?? (codeEndIndex ?? 0)) + 1; + descriptionStartIndex = String.IsNullOrWhiteSpace(eg[descriptionStartIndex]) ? descriptionStartIndex + 1 : descriptionStartIndex; + var descriptionEndIndex = eg.Length - 1; + descriptionEndIndex = String.IsNullOrWhiteSpace(eg[descriptionEndIndex]) ? descriptionEndIndex - 1 : descriptionEndIndex; + var description = String.Join(Environment.NewLine, eg.Skip(descriptionStartIndex).Take((descriptionEndIndex + 1) - descriptionStartIndex)); + return new MarkdownExampleHelpInfo(name, code, output, description); + }).ToArray(); + } + } + + internal class MarkdownSyntaxHelpInfo + { + public Variant Variant { get; } + public bool IsDefault { get; } + public string ParameterSetName { get; } + public Parameter[] Parameters { get; } + public string SyntaxText { get; } + + public MarkdownSyntaxHelpInfo(Variant variant, ParameterGroup[] parameterGroups, bool isDefault) + { + Variant = variant; + IsDefault = isDefault; + ParameterSetName = Variant.VariantName; + Parameters = Variant.Parameters + .Where(p => !p.DontShow && !p.IsHidden()).OrderByDescending(p => p.IsMandatory) + //https://stackoverflow.com/a/6461526/294804 + .ThenByDescending(p => p.Position.HasValue).ThenBy(p => p.Position) + // Use the OrderCategory of the parameter group because the final order category is the highest of the group, and not the order category of the individual parameters from the variants. + .ThenBy(p => parameterGroups.First(pg => pg.ParameterName == p.ParameterName).OrderCategory).ThenBy(p => p.ParameterName).ToArray(); + SyntaxText = CreateSyntaxFormat(); + } + + //https://github.com/PowerShell/platyPS/blob/a607a926bfffe1e1a1e53c19e0057eddd0c07611/src/Markdown.MAML/Renderer/Markdownv2Renderer.cs#L29-L32 + private const int SyntaxLineWidth = 110; + private string CreateSyntaxFormat() + { + var parameterStrings = Parameters.Select(p => p.ToPropertySyntaxOutput().ToString()); + if (Variant.SupportsShouldProcess) + { + parameterStrings = parameterStrings.Append(" [-Confirm]").Append(" [-WhatIf]"); + } + parameterStrings = parameterStrings.Append(" []"); + + var lines = new List(20); + return parameterStrings.Aggregate(Variant.CmdletName, (current, ps) => + { + var combined = current + ps; + if (combined.Length <= SyntaxLineWidth) return combined; + + lines.Add(current); + return ps; + }, last => + { + lines.Add(last); + return String.Join(Environment.NewLine, lines); + }); + } + } + + internal class MarkdownExampleHelpInfo + { + public string Name { get; } + public string Code { get; } + public string Output { get; } + public string Description { get; } + + public MarkdownExampleHelpInfo(string name, string code, string output, string description) + { + Name = name; + Code = code; + Output = output; + Description = description; + } + } + + internal class MarkdownParameterHelpInfo + { + public string Name { get; set; } + public string Description { get; set; } + public Type Type { get; set; } + public string Position { get; set; } + public string DefaultValue { get; set; } + + public bool HasAllParameterSets { get; set; } + public string[] ParameterSetNames { get; set; } + public string[] Aliases { get; set; } + + public bool IsRequired { get; set; } + public bool IsDynamic { get; set; } + public bool AcceptsPipelineByValue { get; set; } + public bool AcceptsPipelineByPropertyName { get; set; } + public bool AcceptsWildcardCharacters { get; set; } + + // For use by common parameters that have no backing data in the objects themselves. + public MarkdownParameterHelpInfo() { } + + public MarkdownParameterHelpInfo(PsParameterHelpInfo[] parameterHelpInfos, ParameterGroup parameterGroup) + { + Name = parameterGroup.ParameterName; + Description = parameterGroup.Description.NullIfEmpty() + ?? parameterHelpInfos.Select(phi => phi.Description).FirstOrDefault(d => !String.IsNullOrEmpty(d)).EmptyIfNull(); + Type = parameterGroup.ParameterType; + Position = parameterGroup.FirstPosition?.ToString() + ?? parameterHelpInfos.Select(phi => phi.PositionText).FirstOrDefault(d => !String.IsNullOrEmpty(d)).ToUpperFirstCharacter().NullIfEmpty() + ?? "Named"; + // This no longer uses firstHelpInfo.DefaultValueAsString since it seems to be broken. For example, it has a value of 0 for Int32, but no default value was declared. + DefaultValue = parameterGroup.DefaultInfo?.Script ?? "None"; + + HasAllParameterSets = parameterGroup.HasAllVariants; + ParameterSetNames = (parameterGroup.Parameters.Select(p => p.VariantName).ToArray().NullIfEmpty() + ?? parameterHelpInfos.SelectMany(phi => phi.ParameterSetNames).Distinct()) + .OrderBy(psn => psn).ToArray(); + Aliases = parameterGroup.Aliases.NullIfEmpty() ?? parameterHelpInfos.SelectMany(phi => phi.Aliases).ToArray(); + + IsRequired = parameterHelpInfos.Select(phi => phi.IsRequired).FirstOrDefault(r => r == true) ?? parameterGroup.Parameters.Any(p => p.IsMandatory); + IsDynamic = parameterHelpInfos.Select(phi => phi.IsDynamic).FirstOrDefault(d => d == true) ?? false; + AcceptsPipelineByValue = parameterHelpInfos.Select(phi => phi.SupportsPipelineInput?.Contains("ByValue")).FirstOrDefault(bv => bv == true) ?? parameterGroup.ValueFromPipeline; + AcceptsPipelineByPropertyName = parameterHelpInfos.Select(phi => phi.SupportsPipelineInput?.Contains("ByPropertyName")).FirstOrDefault(bv => bv == true) ?? parameterGroup.ValueFromPipelineByPropertyName; + AcceptsWildcardCharacters = parameterGroup.SupportsWildcards; + } + } + + internal static class MarkdownTypesExtensions + { + public static MarkdownExampleHelpInfo ToExampleHelpInfo(this PsHelpExampleInfo exampleInfo) => new MarkdownExampleHelpInfo(exampleInfo.Title, exampleInfo.Code, exampleInfo.Output, exampleInfo.Remarks); + + public static MarkdownExampleHelpInfo[] DefaultExampleHelpInfos = + { + new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), + }; + + public static MarkdownParameterHelpInfo[] SupportsShouldProcessParameters = + { + new MarkdownParameterHelpInfo + { + Name = "Confirm", + Description ="Prompts you for confirmation before running the cmdlet.", + Type = typeof(SwitchParameter), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new [] { "cf" } + }, + new MarkdownParameterHelpInfo + { + Name = "WhatIf", + Description ="Shows what would happen if the cmdlet runs. The cmdlet is not run.", + Type = typeof(SwitchParameter), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new [] { "wi" } + } + }; + + public static MarkdownParameterHelpInfo[] SupportsPagingParameters = + { + new MarkdownParameterHelpInfo + { + Name = "First", + Description ="Gets only the first 'n' objects.", + Type = typeof(ulong), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new string[0] + }, + new MarkdownParameterHelpInfo + { + Name = "IncludeTotalCount", + Description ="Reports the number of objects in the data set (an integer) followed by the objects. If the cmdlet cannot determine the total count, it returns \"Unknown total count\".", + Type = typeof(SwitchParameter), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new string[0] + }, + new MarkdownParameterHelpInfo + { + Name = "Skip", + Description ="Ignores the first 'n' objects and then gets the remaining objects.", + Type = typeof(ulong), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new string[0] + } + }; + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/Cdn/generated/runtime/BuildTime/Models/PsProxyOutputs.cs new file mode 100644 index 000000000000..8cbefc7f2b97 --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -0,0 +1,611 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using System.Text.RegularExpressions; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.PsProxyOutputExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.PsProxyTypeExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + internal class OutputTypeOutput + { + public PSTypeName[] OutputTypes { get; } + + public OutputTypeOutput(IEnumerable outputTypes) + { + OutputTypes = outputTypes.ToArray(); + } + + public override string ToString() => OutputTypes != null && OutputTypes.Any() ? $"[OutputType({OutputTypes.Select(ot => $"[{ot}]").JoinIgnoreEmpty(ItemSeparator)})]{Environment.NewLine}" : String.Empty; + } + + internal class CmdletBindingOutput + { + public VariantGroup VariantGroup { get; } + + public CmdletBindingOutput(VariantGroup variantGroup) + { + VariantGroup = variantGroup; + } + + public override string ToString() + { + var dpsText = VariantGroup.DefaultParameterSetName.IsValidDefaultParameterSetName() ? $"DefaultParameterSetName='{VariantGroup.DefaultParameterSetName}'" : String.Empty; + var sspText = VariantGroup.SupportsShouldProcess ? $"SupportsShouldProcess{ItemSeparator}ConfirmImpact='Medium'" : String.Empty; + var pbText = $"PositionalBinding={false.ToPsBool()}"; + var propertyText = new[] { dpsText, pbText, sspText }.JoinIgnoreEmpty(ItemSeparator); + return $"[CmdletBinding({propertyText})]{Environment.NewLine}"; + } + } + + internal class ParameterOutput + { + public Parameter Parameter { get; } + public bool HasMultipleVariantsInVariantGroup { get; } + public bool HasAllVariantsInParameterGroup { get; } + + public ParameterOutput(Parameter parameter, bool hasMultipleVariantsInVariantGroup, bool hasAllVariantsInParameterGroup) + { + Parameter = parameter; + HasMultipleVariantsInVariantGroup = hasMultipleVariantsInVariantGroup; + HasAllVariantsInParameterGroup = hasAllVariantsInParameterGroup; + } + + public override string ToString() + { + var psnText = HasMultipleVariantsInVariantGroup && !HasAllVariantsInParameterGroup ? $"ParameterSetName='{Parameter.VariantName}'" : String.Empty; + var positionText = Parameter.Position != null ? $"Position={Parameter.Position}" : String.Empty; + var mandatoryText = Parameter.IsMandatory ? "Mandatory" : String.Empty; + var dontShowText = Parameter.DontShow ? "DontShow" : String.Empty; + var vfpText = Parameter.ValueFromPipeline ? "ValueFromPipeline" : String.Empty; + var vfpbpnText = Parameter.ValueFromPipelineByPropertyName ? "ValueFromPipelineByPropertyName" : String.Empty; + var propertyText = new[] { psnText, positionText, mandatoryText, dontShowText, vfpText, vfpbpnText }.JoinIgnoreEmpty(ItemSeparator); + return $"{Indent}[Parameter({propertyText})]{Environment.NewLine}"; + } + } + + internal class AliasOutput + { + public string[] Aliases { get; } + public bool IncludeIndent { get; } + + public AliasOutput(string[] aliases, bool includeIndent = false) + { + Aliases = aliases; + IncludeIndent = includeIndent; + } + + public override string ToString() => Aliases?.Any() ?? false ? $"{(IncludeIndent ? Indent : String.Empty)}[Alias({Aliases.Select(an => $"'{an}'").JoinIgnoreEmpty(ItemSeparator)})]{Environment.NewLine}" : String.Empty; + } + + internal class ValidateNotNullOutput + { + public bool HasValidateNotNull { get; } + + public ValidateNotNullOutput(bool hasValidateNotNull) + { + HasValidateNotNull = hasValidateNotNull; + } + + public override string ToString() => HasValidateNotNull ? $"{Indent}[ValidateNotNull()]{Environment.NewLine}" : String.Empty; + } + + internal class AllowEmptyArrayOutput + { + public bool HasAllowEmptyArray { get; } + + public AllowEmptyArrayOutput(bool hasAllowEmptyArray) + { + HasAllowEmptyArray = hasAllowEmptyArray; + } + + public override string ToString() => HasAllowEmptyArray ? $"{Indent}[AllowEmptyCollection()]{Environment.NewLine}" : String.Empty; + } + internal class ArgumentCompleterOutput + { + public CompleterInfo CompleterInfo { get; } + + public ArgumentCompleterOutput(CompleterInfo completerInfo) + { + CompleterInfo = completerInfo; + } + + public override string ToString() => CompleterInfo != null + ? $"{Indent}[ArgumentCompleter({(CompleterInfo.IsTypeCompleter ? $"[{CompleterInfo.Type.Unwrap().ToPsType()}]" : $"{{{CompleterInfo.Script.ToPsSingleLine("; ")}}}")})]{Environment.NewLine}" + : String.Empty; + } + + internal class DefaultInfoOutput + { + public bool HasDefaultInfo { get; } + public DefaultInfo DefaultInfo { get; } + + public DefaultInfoOutput(ParameterGroup parameterGroup) + { + HasDefaultInfo = parameterGroup.HasDefaultInfo; + DefaultInfo = parameterGroup.DefaultInfo; + } + + public override string ToString() + { + var nameText = !String.IsNullOrEmpty(DefaultInfo?.Name) ? $"Name='{DefaultInfo?.Name}'" : String.Empty; + var descriptionText = !String.IsNullOrEmpty(DefaultInfo?.Description) ? $"Description='{DefaultInfo?.Description.ToPsStringLiteral()}'" : String.Empty; + var scriptText = !String.IsNullOrEmpty(DefaultInfo?.Script) ? $"Script='{DefaultInfo?.Script.ToPsSingleLine("; ")}'" : String.Empty; + var propertyText = new[] { nameText, descriptionText, scriptText }.JoinIgnoreEmpty(ItemSeparator); + return HasDefaultInfo ? $"{Indent}[{typeof(DefaultInfoAttribute).ToPsAttributeType()}({propertyText})]{Environment.NewLine}" : String.Empty; + } + } + + internal class ParameterTypeOutput + { + public Type ParameterType { get; } + + public ParameterTypeOutput(Type parameterType) + { + ParameterType = parameterType; + } + + public override string ToString() => $"{Indent}[{ParameterType.ToPsType()}]{Environment.NewLine}"; + } + + internal class ParameterNameOutput + { + public string ParameterName { get; } + public bool IsLast { get; } + + public ParameterNameOutput(string parameterName, bool isLast) + { + ParameterName = parameterName; + IsLast = isLast; + } + + public override string ToString() => $"{Indent}${{{ParameterName}}}{(IsLast ? String.Empty : $",{Environment.NewLine}")}{Environment.NewLine}"; + } + + internal class BaseOutput + { + public VariantGroup VariantGroup { get; } + + protected static readonly bool IsAzure = Convert.ToBoolean(@"true"); + public BaseOutput(VariantGroup variantGroup) + { + VariantGroup = variantGroup; + } + public string ClearTelemetryContext() + { + return (!VariantGroup.IsInternal && IsAzure) ? $@"{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()" : ""; + } + } + + internal class BeginOutput : BaseOutput + { + public BeginOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + public string GetProcessCustomAttributesAtRuntime() + { + return VariantGroup.IsInternal ? "" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet]{Environment.NewLine}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; + } + private string GetTelemetry() + { + if (!VariantGroup.IsInternal && IsAzure) + { + return $@" +{Indent}{Indent}if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {{ +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Runspace.Version.ToString() +{Indent}{Indent}}} +{Indent}{Indent}$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId +{Indent}{Indent}if ($preTelemetryId -eq '') {{ +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}}} else {{ +{Indent}{Indent}{Indent}$internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets +{Indent}{Indent}{Indent}if ($internalCalledCmdlets -eq '') {{ +{Indent}{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name +{Indent}{Indent}{Indent}}} else {{ +{Indent}{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name +{Indent}{Indent}{Indent}}} +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' +{Indent}{Indent}}} +"; + } + return ""; + } + public override string ToString() => $@"begin {{ +{Indent}try {{ +{Indent}{Indent}$outBuffer = $null +{Indent}{Indent}if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {{ +{Indent}{Indent}{Indent}$PSBoundParameters['OutBuffer'] = 1 +{Indent}{Indent}}} +{Indent}{Indent}$parameterSet = $PSCmdlet.ParameterSetName +{GetTelemetry()} +{GetParameterSetToCmdletMapping()}{GetDefaultValuesStatements()} +{GetProcessCustomAttributesAtRuntime()} +{Indent}{Indent}$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) +{Indent}{Indent}$scriptCmd = {{& $wrappedCmd @PSBoundParameters}} +{Indent}{Indent}$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) +{Indent}{Indent}$steppablePipeline.Begin($PSCmdlet) +{Indent}}} catch {{ +{ClearTelemetryContext()} +{Indent}{Indent}throw +{Indent}}} +}} + +"; + + private string GetParameterSetToCmdletMapping() + { + var sb = new StringBuilder(); + sb.AppendLine($"{Indent}{Indent}$mapping = @{{"); + foreach (var variant in VariantGroup.Variants) + { + sb.AppendLine($@"{Indent}{Indent}{Indent}{variant.VariantName} = '{variant.PrivateModuleName}\{variant.PrivateCmdletName}';"); + } + sb.Append($"{Indent}{Indent}}}"); + return sb.ToString(); + } + + private string GetDefaultValuesStatements() + { + var defaultInfos = VariantGroup.ParameterGroups.Where(pg => pg.HasDefaultInfo).Select(pg => pg.DefaultInfo).ToArray(); + var sb = new StringBuilder(); + + foreach (var defaultInfo in defaultInfos) + { + var variantListString = defaultInfo.ParameterGroup.VariantNames.ToPsList(); + var parameterName = defaultInfo.ParameterGroup.ParameterName; + sb.AppendLine(); + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.Append($"{Indent}{Indent}}}"); + } + return sb.ToString(); + } + } + + internal class ProcessOutput : BaseOutput + { + public ProcessOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + private string GetFinally() + { + if (IsAzure && !VariantGroup.IsInternal) + { + return $@" +{Indent}finally {{ +{Indent}{Indent}$backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId +{Indent}{Indent}$backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() +{Indent}}} +"; + } + return ""; + } + public override string ToString() => $@"process {{ +{Indent}try {{ +{Indent}{Indent}$steppablePipeline.Process($_) +{Indent}}} catch {{ +{ClearTelemetryContext()} +{Indent}{Indent}throw +{Indent}}} +{GetFinally()} +}} +"; + } + + internal class EndOutput : BaseOutput + { + public EndOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + private string GetTelemetry() + { + if (!VariantGroup.IsInternal && IsAzure) + { + return $@" +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets +{Indent}{Indent}if ($preTelemetryId -eq '') {{ +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Cdn.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() +{Indent}{Indent}}} +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId +"; + } + return ""; + } + public override string ToString() => $@"end {{ +{Indent}try {{ +{Indent}{Indent}$steppablePipeline.End() +{GetTelemetry()} +{Indent}}} catch {{ +{ClearTelemetryContext()} +{Indent}{Indent}throw +{Indent}}} +}} +"; + } + + internal class HelpCommentOutput + { + public VariantGroup VariantGroup { get; } + public CommentInfo CommentInfo { get; } + + public HelpCommentOutput(VariantGroup variantGroup) + { + VariantGroup = variantGroup; + CommentInfo = variantGroup.CommentInfo; + } + + public override string ToString() + { + var inputs = String.Join(Environment.NewLine, CommentInfo.Inputs.Select(i => $".Inputs{Environment.NewLine}{i}")); + var inputsText = !String.IsNullOrEmpty(inputs) ? $"{Environment.NewLine}{inputs}" : String.Empty; + var outputs = String.Join(Environment.NewLine, CommentInfo.Outputs.Select(o => $".Outputs{Environment.NewLine}{o}")); + var outputsText = !String.IsNullOrEmpty(outputs) ? $"{Environment.NewLine}{outputs}" : String.Empty; + var notes = String.Join($"{Environment.NewLine}{Environment.NewLine}", VariantGroup.ComplexInterfaceInfos.Select(cii => cii.ToNoteOutput())); + var notesText = !String.IsNullOrEmpty(notes) ? $"{Environment.NewLine}.Notes{Environment.NewLine}{ComplexParameterHeader}{notes}" : String.Empty; + var relatedLinks = String.Join(Environment.NewLine, CommentInfo.RelatedLinks.Select(l => $".Link{Environment.NewLine}{l}")); + var relatedLinksText = !String.IsNullOrEmpty(relatedLinks) ? $"{Environment.NewLine}{relatedLinks}" : String.Empty; + var examples = ""; + foreach (var example in VariantGroup.HelpInfo.Examples) + { + examples = examples + ".Example" + "\r\n" + example.Code + "\r\n"; + } + return $@"<# +.Synopsis +{CommentInfo.Synopsis.ToDescriptionFormat(false)} +.Description +{CommentInfo.Description.ToDescriptionFormat(false)} +{examples}{inputsText}{outputsText}{notesText} +.Link +{CommentInfo.OnlineVersion}{relatedLinksText} +#> +"; + } + } + + internal class ParameterDescriptionOutput + { + public string Description { get; } + + public ParameterDescriptionOutput(string description) + { + Description = description; + } + + public override string ToString() => !String.IsNullOrEmpty(Description) + ? Description.ToDescriptionFormat(false).NormalizeNewLines() + .Split(new[] { Environment.NewLine }, StringSplitOptions.None) + .Aggregate(String.Empty, (c, n) => c + $"{Indent}# {n}{Environment.NewLine}") + : String.Empty; + } + + internal class ProfileOutput + { + public string ProfileName { get; } + + public ProfileOutput(string profileName) + { + ProfileName = profileName; + } + + public override string ToString() => ProfileName != NoProfiles ? $"[{typeof(ProfileAttribute).ToPsAttributeType()}('{ProfileName}')]{Environment.NewLine}" : String.Empty; + } + + internal class DescriptionOutput + { + public string Description { get; } + + public DescriptionOutput(string description) + { + Description = description; + } + + public override string ToString() => !String.IsNullOrEmpty(Description) ? $"[{typeof(DescriptionAttribute).ToPsAttributeType()}('{Description.ToPsStringLiteral()}')]{Environment.NewLine}" : String.Empty; + } + + internal class ParameterCategoryOutput + { + public ParameterCategory Category { get; } + + public ParameterCategoryOutput(ParameterCategory category) + { + Category = category; + } + + public override string ToString() => $"{Indent}[{typeof(CategoryAttribute).ToPsAttributeType()}('{Category}')]{Environment.NewLine}"; + } + + internal class InfoOutput + { + public InfoAttribute Info { get; } + public Type ParameterType { get; } + + public InfoOutput(InfoAttribute info, Type parameterType) + { + Info = info; + ParameterType = parameterType; + } + + public override string ToString() + { + // Rendering of InfoAttribute members that are not used currently + /*var serializedNameText = Info.SerializedName != null ? $"SerializedName='{Info.SerializedName}'" : String.Empty; + var readOnlyText = Info.ReadOnly ? "ReadOnly" : String.Empty; + var descriptionText = !String.IsNullOrEmpty(Info.Description) ? $"Description='{Info.Description.ToPsStringLiteral()}'" : String.Empty;*/ + + var requiredText = Info.Required ? "Required" : String.Empty; + var unwrappedType = ParameterType.Unwrap(); + var hasValidPossibleTypes = Info.PossibleTypes.Any(pt => pt != unwrappedType); + var possibleTypesText = hasValidPossibleTypes + ? $"PossibleTypes=({Info.PossibleTypes.Select(pt => $"[{pt.ToPsType()}]").JoinIgnoreEmpty(ItemSeparator)})" + : String.Empty; + var propertyText = new[] { /*serializedNameText, */requiredText,/* readOnlyText,*/ possibleTypesText/*, descriptionText*/ }.JoinIgnoreEmpty(ItemSeparator); + return hasValidPossibleTypes ? $"{Indent}[{typeof(InfoAttribute).ToPsAttributeType()}({propertyText})]{Environment.NewLine}" : String.Empty; + } + } + + internal class PropertySyntaxOutput + { + public string ParameterName { get; } + public Type ParameterType { get; } + public bool IsMandatory { get; } + public int? Position { get; } + + public bool IncludeSpace { get; } + public bool IncludeDash { get; } + + public PropertySyntaxOutput(Parameter parameter) + { + ParameterName = parameter.ParameterName; + ParameterType = parameter.ParameterType; + IsMandatory = parameter.IsMandatory; + Position = parameter.Position; + IncludeSpace = true; + IncludeDash = true; + } + + public PropertySyntaxOutput(ComplexInterfaceInfo complexInterfaceInfo) + { + ParameterName = complexInterfaceInfo.Name; + ParameterType = complexInterfaceInfo.Type; + IsMandatory = complexInterfaceInfo.Required; + Position = null; + IncludeSpace = false; + IncludeDash = false; + } + + public override string ToString() + { + var leftOptional = !IsMandatory ? "[" : String.Empty; + var leftPositional = Position != null ? "[" : String.Empty; + var rightPositional = Position != null ? "]" : String.Empty; + var type = ParameterType != typeof(SwitchParameter) ? $" <{ParameterType.ToSyntaxTypeName()}>" : String.Empty; + var rightOptional = !IsMandatory ? "]" : String.Empty; + var space = IncludeSpace ? " " : String.Empty; + var dash = IncludeDash ? "-" : String.Empty; + return $"{space}{leftOptional}{leftPositional}{dash}{ParameterName}{rightPositional}{type}{rightOptional}"; + } + } + + internal static class PsProxyOutputExtensions + { + public const string NoParameters = "__NoParameters"; + + public const string AllParameterSets = "__AllParameterSets"; + + public const string HalfIndent = " "; + + public const string Indent = HalfIndent + HalfIndent; + + public const string ItemSeparator = ", "; + + public static readonly string ComplexParameterHeader = $"COMPLEX PARAMETER PROPERTIES{Environment.NewLine}{Environment.NewLine}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.{Environment.NewLine}{Environment.NewLine}"; + + public static string ToPsBool(this bool value) => $"${value.ToString().ToLowerInvariant()}"; + + public static string ToPsType(this Type type) + { + var regex = new Regex(@"^(.*)`{1}\d+(.*)$"); + var typeText = type.ToString(); + var match = regex.Match(typeText); + return match.Success ? $"{match.Groups[1]}{match.Groups[2]}" : typeText; + } + + public static string ToPsAttributeType(this Type type) => type.ToPsType().RemoveEnd("Attribute"); + + // https://stackoverflow.com/a/5284606/294804 + private static string RemoveEnd(this string text, string suffix) => text.EndsWith(suffix) ? text.Substring(0, text.Length - suffix.Length) : text; + + public static string ToPsSingleLine(this string value, string replacer = " ") => value.ReplaceNewLines(replacer, new[] { "
", "\r\n", "\n" }); + + public static string ToPsStringLiteral(this string value) => value?.Replace("'", "''").Replace("‘", "''").Replace("’", "''").ToPsSingleLine().Trim() ?? String.Empty; + + public static string JoinIgnoreEmpty(this IEnumerable values, string separator) => String.Join(separator, values?.Where(v => !String.IsNullOrEmpty(v))); + + // https://stackoverflow.com/a/41961738/294804 + public static string ToSyntaxTypeName(this Type type) + { + if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)) + { + return $"{type.GetGenericArguments().First().ToSyntaxTypeName()}?"; + } + + if (type.IsGenericType) + { + var genericTypes = String.Join(ItemSeparator, type.GetGenericArguments().Select(ToSyntaxTypeName)); + return $"{type.Name.Split('`').First()}<{genericTypes}>"; + } + + return type.Name; + } + + public static OutputTypeOutput ToOutputTypeOutput(this IEnumerable outputTypes) => new OutputTypeOutput(outputTypes); + + public static CmdletBindingOutput ToCmdletBindingOutput(this VariantGroup variantGroup) => new CmdletBindingOutput(variantGroup); + + public static ParameterOutput ToParameterOutput(this Parameter parameter, bool hasMultipleVariantsInVariantGroup, bool hasAllVariantsInParameterGroup) => new ParameterOutput(parameter, hasMultipleVariantsInVariantGroup, hasAllVariantsInParameterGroup); + + public static AliasOutput ToAliasOutput(this string[] aliases, bool includeIndent = false) => new AliasOutput(aliases, includeIndent); + + public static ValidateNotNullOutput ToValidateNotNullOutput(this bool hasValidateNotNull) => new ValidateNotNullOutput(hasValidateNotNull); + + public static AllowEmptyArrayOutput ToAllowEmptyArray(this bool hasAllowEmptyArray) => new AllowEmptyArrayOutput(hasAllowEmptyArray); + + public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => new ArgumentCompleterOutput(completerInfo); + + public static DefaultInfoOutput ToDefaultInfoOutput(this ParameterGroup parameterGroup) => new DefaultInfoOutput(parameterGroup); + + public static ParameterTypeOutput ToParameterTypeOutput(this Type parameterType) => new ParameterTypeOutput(parameterType); + + public static ParameterNameOutput ToParameterNameOutput(this string parameterName, bool isLast) => new ParameterNameOutput(parameterName, isLast); + + public static BeginOutput ToBeginOutput(this VariantGroup variantGroup) => new BeginOutput(variantGroup); + + public static ProcessOutput ToProcessOutput(this VariantGroup variantGroup) => new ProcessOutput(variantGroup); + + public static EndOutput ToEndOutput(this VariantGroup variantGroup) => new EndOutput(variantGroup); + + public static HelpCommentOutput ToHelpCommentOutput(this VariantGroup variantGroup) => new HelpCommentOutput(variantGroup); + + public static ParameterDescriptionOutput ToParameterDescriptionOutput(this string description) => new ParameterDescriptionOutput(description); + + public static ProfileOutput ToProfileOutput(this string profileName) => new ProfileOutput(profileName); + + public static DescriptionOutput ToDescriptionOutput(this string description) => new DescriptionOutput(description); + + public static ParameterCategoryOutput ToParameterCategoryOutput(this ParameterCategory category) => new ParameterCategoryOutput(category); + + public static PropertySyntaxOutput ToPropertySyntaxOutput(this Parameter parameter) => new PropertySyntaxOutput(parameter); + + public static PropertySyntaxOutput ToPropertySyntaxOutput(this ComplexInterfaceInfo complexInterfaceInfo) => new PropertySyntaxOutput(complexInterfaceInfo); + + public static InfoOutput ToInfoOutput(this InfoAttribute info, Type parameterType) => new InfoOutput(info, parameterType); + + public static string ToNoteOutput(this ComplexInterfaceInfo complexInterfaceInfo, string currentIndent = "", bool includeDashes = false, bool includeBackticks = false, bool isFirst = true) + { + string RenderProperty(ComplexInterfaceInfo info, string indent, bool dash, bool backtick) => + $"{indent}{(dash ? "- " : String.Empty)}{(backtick ? "`" : String.Empty)}{info.ToPropertySyntaxOutput()}{(backtick ? "`" : String.Empty)}: {info.Description}"; + + var nested = complexInterfaceInfo.NestedInfos.Select(ni => + { + var nestedIndent = $"{currentIndent}{HalfIndent}"; + return ni.IsComplexInterface + ? ni.ToNoteOutput(nestedIndent, includeDashes, includeBackticks, false) + : RenderProperty(ni, nestedIndent, includeDashes, includeBackticks); + }).Prepend(RenderProperty(complexInterfaceInfo, currentIndent, !isFirst && includeDashes, !isFirst && includeBackticks)); + return String.Join(Environment.NewLine, nested); + } + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/src/Cdn/generated/runtime/BuildTime/Models/PsProxyTypes.cs new file mode 100644 index 000000000000..a07a9984fea0 --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -0,0 +1,514 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.PsProxyOutputExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell.PsProxyTypeExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + internal class ProfileGroup + { + public string ProfileName { get; } + public Variant[] Variants { get; } + public string ProfileFolder { get; } + + public ProfileGroup(Variant[] variants, string profileName = NoProfiles) + { + ProfileName = profileName; + Variants = variants; + ProfileFolder = ProfileName != NoProfiles ? ProfileName : String.Empty; + } + } + + internal class VariantGroup + { + public string ModuleName { get; } + + public string RootModuleName {get => @"";} + public string CmdletName { get; } + public string CmdletVerb { get; } + public string CmdletNoun { get; } + public string ProfileName { get; } + public Variant[] Variants { get; } + public ParameterGroup[] ParameterGroups { get; } + public ComplexInterfaceInfo[] ComplexInterfaceInfos { get; } + + public string[] Aliases { get; } + public PSTypeName[] OutputTypes { get; } + public bool SupportsShouldProcess { get; } + public bool SupportsPaging { get; } + public string DefaultParameterSetName { get; } + public bool HasMultipleVariants { get; } + public PsHelpInfo HelpInfo { get; } + public bool IsGenerated { get; } + public bool IsInternal { get; } + + public string OutputFolder { get; } + public string FileName { get; } + public string FilePath { get; } + + public CommentInfo CommentInfo { get; } + + public VariantGroup(string moduleName, string cmdletName, Variant[] variants, string outputFolder, string profileName = NoProfiles, bool isTest = false, bool isInternal = false) + { + ModuleName = moduleName; + CmdletName = cmdletName; + var cmdletNameParts = CmdletName.Split('-'); + CmdletVerb = cmdletNameParts.First(); + CmdletNoun = cmdletNameParts.Last(); + ProfileName = profileName; + Variants = variants; + ParameterGroups = Variants.ToParameterGroups().OrderBy(pg => pg.OrderCategory).ThenByDescending(pg => pg.IsMandatory).ToArray(); + var aliasDuplicates = ParameterGroups.SelectMany(pg => pg.Aliases) + //https://stackoverflow.com/a/18547390/294804 + .GroupBy(a => a).Where(g => g.Count() > 1).Select(g => g.Key).ToArray(); + if (aliasDuplicates.Any()) + { + throw new ParsingMetadataException($"The alias(es) [{String.Join(", ", aliasDuplicates)}] are defined on multiple parameters for cmdlet '{CmdletName}', which is not supported."); + } + ComplexInterfaceInfos = ParameterGroups.Where(pg => !pg.DontShow && pg.IsComplexInterface).OrderBy(pg => pg.ParameterName).Select(pg => pg.ComplexInterfaceInfo).ToArray(); + + Aliases = Variants.SelectMany(v => v.Attributes).ToAliasNames().ToArray(); + OutputTypes = Variants.SelectMany(v => v.Info.OutputType).Where(ot => ot.Type != null).GroupBy(ot => ot.Type).Select(otg => otg.First()).ToArray(); + SupportsShouldProcess = Variants.Any(v => v.SupportsShouldProcess); + SupportsPaging = Variants.Any(v => v.SupportsPaging); + DefaultParameterSetName = DetermineDefaultParameterSetName(); + HasMultipleVariants = Variants.Length > 1; + HelpInfo = Variants.Select(v => v.HelpInfo).FirstOrDefault() ?? new PsHelpInfo(); + IsGenerated = Variants.All(v => v.Attributes.OfType().Any()); + IsInternal = isInternal; + + OutputFolder = outputFolder; + FileName = $"{CmdletName}{(isTest ? ".Tests" : String.Empty)}.ps1"; + FilePath = Path.Combine(OutputFolder, FileName); + + CommentInfo = new CommentInfo(this); + } + + private string DetermineDefaultParameterSetName() + { + var defaultParameterSet = Variants + .Select(v => v.Metadata.DefaultParameterSetName) + .LastOrDefault(dpsn => dpsn.IsValidDefaultParameterSetName()); + + if (String.IsNullOrEmpty(defaultParameterSet)) + { + var variantParamCountGroups = Variants + .Select(v => ( + variant: v.VariantName, + paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), + isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) + .GroupBy(vpc => vpc.isSimple) + .ToArray(); + var variantParameterCounts = (variantParamCountGroups.Any(g => g.Key) ? variantParamCountGroups.Where(g => g.Key) : variantParamCountGroups).SelectMany(g => g).ToArray(); + var smallestParameterCount = variantParameterCounts.Min(vpc => vpc.paramCount); + defaultParameterSet = variantParameterCounts.First(vpc => vpc.paramCount == smallestParameterCount).variant; + } + + return defaultParameterSet; + } + } + + internal class Variant + { + public string CmdletName { get; } + public string VariantName { get; } + public CommandInfo Info { get; } + public CommandMetadata Metadata { get; } + public PsHelpInfo HelpInfo { get; } + public bool HasParameterSets { get; } + public bool IsFunction { get; } + public string PrivateModuleName { get; } + public string PrivateCmdletName { get; } + public bool SupportsShouldProcess { get; } + public bool SupportsPaging { get; } + + public Attribute[] Attributes { get; } + public Parameter[] Parameters { get; } + public Parameter[] CmdletOnlyParameters { get; } + public bool IsInternal { get; } + public bool IsDoNotExport { get; } + public string[] Profiles { get; } + + public Variant(string cmdletName, string variantName, CommandInfo info, CommandMetadata metadata, bool hasParameterSets = false, PsHelpInfo helpInfo = null) + { + CmdletName = cmdletName; + VariantName = variantName; + Info = info; + HelpInfo = helpInfo ?? new PsHelpInfo(); + Metadata = metadata; + HasParameterSets = hasParameterSets; + IsFunction = Info.CommandType == CommandTypes.Function; + PrivateModuleName = Info.Source; + PrivateCmdletName = Metadata.Name; + SupportsShouldProcess = Metadata.SupportsShouldProcess; + SupportsPaging = Metadata.SupportsPaging; + + Attributes = this.ToAttributes(); + Parameters = this.ToParameters().OrderBy(p => p.OrderCategory).ThenByDescending(p => p.IsMandatory).ToArray(); + IsInternal = Attributes.OfType().Any(); + IsDoNotExport = Attributes.OfType().Any(); + CmdletOnlyParameters = Parameters.Where(p => !p.Categories.Any(c => c == ParameterCategory.Azure || c == ParameterCategory.Runtime)).ToArray(); + Profiles = Attributes.OfType().SelectMany(pa => pa.Profiles).ToArray(); + } + } + + internal class ParameterGroup + { + public string ParameterName { get; } + public Parameter[] Parameters { get; } + + public string[] VariantNames { get; } + public string[] AllVariantNames { get; } + public bool HasAllVariants { get; } + public Type ParameterType { get; } + public string Description { get; } + + public string[] Aliases { get; } + public bool HasValidateNotNull { get; } + public bool HasAllowEmptyArray { get; } + public CompleterInfo CompleterInfo { get; } + public DefaultInfo DefaultInfo { get; } + public bool HasDefaultInfo { get; } + public ParameterCategory OrderCategory { get; } + public bool DontShow { get; } + public bool IsMandatory { get; } + public bool SupportsWildcards { get; } + public bool IsComplexInterface { get; } + public ComplexInterfaceInfo ComplexInterfaceInfo { get; } + public InfoAttribute InfoAttribute { get; } + + public int? FirstPosition { get; } + public bool ValueFromPipeline { get; } + public bool ValueFromPipelineByPropertyName { get; } + public bool IsInputType { get; } + + public ParameterGroup(string parameterName, Parameter[] parameters, string[] allVariantNames) + { + ParameterName = parameterName; + Parameters = parameters; + + VariantNames = Parameters.Select(p => p.VariantName).ToArray(); + AllVariantNames = allVariantNames; + HasAllVariants = VariantNames.Any(vn => vn == AllParameterSets) || !AllVariantNames.Except(VariantNames).Any(); + var types = Parameters.Select(p => p.ParameterType).Distinct().ToArray(); + if (types.Length > 1) + { + throw new ParsingMetadataException($"The parameter '{ParameterName}' has multiple parameter types [{String.Join(", ", types.Select(t => t.Name))}] defined, which is not supported."); + } + ParameterType = types.First(); + Description = Parameters.Select(p => p.Description).FirstOrDefault(d => !String.IsNullOrEmpty(d)).EmptyIfNull(); + + Aliases = Parameters.SelectMany(p => p.Attributes).ToAliasNames().ToArray(); + HasValidateNotNull = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); + HasAllowEmptyArray = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); + CompleterInfo = Parameters.Select(p => p.CompleterInfoAttribute).FirstOrDefault()?.ToCompleterInfo() + ?? Parameters.Select(p => p.ArgumentCompleterAttribute).FirstOrDefault()?.ToCompleterInfo(); + DefaultInfo = Parameters.Select(p => p.DefaultInfoAttribute).FirstOrDefault()?.ToDefaultInfo(this) + ?? Parameters.Select(p => p.DefaultValueAttribute).FirstOrDefault(dv => dv != null)?.ToDefaultInfo(this); + HasDefaultInfo = DefaultInfo != null && !String.IsNullOrEmpty(DefaultInfo.Script); + // When DefaultInfo is present, force all parameters from this group to be optional. + if (HasDefaultInfo) + { + foreach (var parameter in Parameters) + { + parameter.IsMandatory = false; + } + } + OrderCategory = Parameters.Select(p => p.OrderCategory).Distinct().DefaultIfEmpty(ParameterCategory.Body).Min(); + DontShow = Parameters.All(p => p.DontShow); + IsMandatory = HasAllVariants && Parameters.Any(p => p.IsMandatory); + SupportsWildcards = Parameters.Any(p => p.SupportsWildcards); + IsComplexInterface = Parameters.Any(p => p.IsComplexInterface); + ComplexInterfaceInfo = Parameters.Where(p => p.IsComplexInterface).Select(p => p.ComplexInterfaceInfo).FirstOrDefault(); + InfoAttribute = Parameters.Select(p => p.InfoAttribute).First(); + + FirstPosition = Parameters.Select(p => p.Position).FirstOrDefault(p => p != null); + ValueFromPipeline = Parameters.Any(p => p.ValueFromPipeline); + ValueFromPipelineByPropertyName = Parameters.Any(p => p.ValueFromPipelineByPropertyName); + IsInputType = ValueFromPipeline || ValueFromPipelineByPropertyName; + } + } + + internal class Parameter + { + public string VariantName { get; } + public string ParameterName { get; } + public ParameterMetadata Metadata { get; } + public PsParameterHelpInfo HelpInfo { get; } + public Type ParameterType { get; } + + public Attribute[] Attributes { get; } + public ParameterCategory[] Categories { get; } + public ParameterCategory OrderCategory { get; } + public PSDefaultValueAttribute DefaultValueAttribute { get; } + public DefaultInfoAttribute DefaultInfoAttribute { get; } + public ParameterAttribute ParameterAttribute { get; } + public bool SupportsWildcards { get; } + public CompleterInfoAttribute CompleterInfoAttribute { get; } + public ArgumentCompleterAttribute ArgumentCompleterAttribute { get; } + + public bool ValueFromPipeline { get; } + public bool ValueFromPipelineByPropertyName { get; } + public int? Position { get; } + public bool DontShow { get; } + public bool IsMandatory { get; set; } + + public InfoAttribute InfoAttribute { get; } + public ComplexInterfaceInfo ComplexInterfaceInfo { get; } + public bool IsComplexInterface { get; } + public string Description { get; } + + public Parameter(string variantName, string parameterName, ParameterMetadata metadata, PsParameterHelpInfo helpInfo = null) + { + VariantName = variantName; + ParameterName = parameterName; + Metadata = metadata; + HelpInfo = helpInfo ?? new PsParameterHelpInfo(); + + Attributes = Metadata.Attributes.ToArray(); + ParameterType = Attributes.OfType().FirstOrDefault()?.Type ?? Metadata.ParameterType; + Categories = Attributes.OfType().SelectMany(ca => ca.Categories).Distinct().ToArray(); + OrderCategory = Categories.DefaultIfEmpty(ParameterCategory.Body).Min(); + DefaultValueAttribute = Attributes.OfType().FirstOrDefault(); + DefaultInfoAttribute = Attributes.OfType().FirstOrDefault(); + ParameterAttribute = Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == VariantName || pa.ParameterSetName == AllParameterSets); + if (ParameterAttribute == null) + { + throw new ParsingMetadataException($"The variant '{VariantName}' has multiple parameter sets defined, which is not supported."); + } + SupportsWildcards = Attributes.OfType().Any(); + CompleterInfoAttribute = Attributes.OfType().FirstOrDefault(); + ArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(); + + ValueFromPipeline = ParameterAttribute.ValueFromPipeline; + ValueFromPipelineByPropertyName = ParameterAttribute.ValueFromPipelineByPropertyName; + Position = ParameterAttribute.Position == Int32.MinValue ? (int?)null : ParameterAttribute.Position; + DontShow = ParameterAttribute.DontShow; + IsMandatory = ParameterAttribute.Mandatory; + + var complexParameterName = ParameterName.ToUpperInvariant(); + var complexMessage = $"{Environment.NewLine}To construct, see NOTES section for {complexParameterName} properties and create a hash table."; + var description = ParameterAttribute.HelpMessage.NullIfEmpty() ?? HelpInfo.Description.NullIfEmpty() ?? InfoAttribute?.Description.NullIfEmpty() ?? String.Empty; + // Remove the complex type message as it will be reinserted if this is a complex type + description = description.NormalizeNewLines().Replace(complexMessage, String.Empty).Replace(complexMessage.ToPsSingleLine(), String.Empty); + // Make an InfoAttribute for processing only if one isn't provided + InfoAttribute = Attributes.OfType().FirstOrDefault() ?? new InfoAttribute { PossibleTypes = new[] { ParameterType.Unwrap() }, Required = IsMandatory }; + // Set the description if the InfoAttribute does not have one since they are exported without a description + InfoAttribute.Description = String.IsNullOrEmpty(InfoAttribute.Description) ? description : InfoAttribute.Description; + ComplexInterfaceInfo = InfoAttribute.ToComplexInterfaceInfo(complexParameterName, ParameterType, true); + IsComplexInterface = ComplexInterfaceInfo.IsComplexInterface; + Description = $"{description}{(IsComplexInterface ? complexMessage : String.Empty)}"; + } + } + + internal class ComplexInterfaceInfo + { + public InfoAttribute InfoAttribute { get; } + + public string Name { get; } + public Type Type { get; } + public bool Required { get; } + public bool ReadOnly { get; } + public string Description { get; } + + public ComplexInterfaceInfo[] NestedInfos { get; } + public bool IsComplexInterface { get; } + + public ComplexInterfaceInfo(string name, Type type, InfoAttribute infoAttribute, bool? required, List seenTypes) + { + Name = name; + Type = type; + InfoAttribute = infoAttribute; + + Required = required ?? InfoAttribute.Required; + ReadOnly = InfoAttribute.ReadOnly; + Description = InfoAttribute.Description.ToPsSingleLine(); + + var unwrappedType = Type.Unwrap(); + var hasBeenSeen = seenTypes?.Contains(unwrappedType) ?? false; + (seenTypes ?? (seenTypes = new List())).Add(unwrappedType); + NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[]{} : + unwrappedType.GetInterfaces() + .Concat(InfoAttribute.PossibleTypes) + .SelectMany(pt => pt.GetProperties() + .SelectMany(pi => pi.GetCustomAttributes(true).OfType() + .Select(ia => ia.ToComplexInterfaceInfo(pi.Name, pi.PropertyType, seenTypes: seenTypes)))) + .Where(cii => !cii.ReadOnly).OrderByDescending(cii => cii.Required).ToArray(); + // https://stackoverflow.com/a/503359/294804 + var associativeArrayInnerType = Type.GetInterfaces() + .FirstOrDefault(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IAssociativeArray<>)) + ?.GetTypeInfo().GetGenericArguments().First(); + if (!hasBeenSeen && associativeArrayInnerType != null) + { + var anyInfo = new InfoAttribute { Description = "This indicates any property can be added to this object." }; + NestedInfos = NestedInfos.Prepend(anyInfo.ToComplexInterfaceInfo("(Any)", associativeArrayInnerType)).ToArray(); + } + IsComplexInterface = NestedInfos.Any(); + } + } + + internal class CommentInfo + { + public string Description { get; } + public string Synopsis { get; } + + public string[] Examples { get; } + public string[] Inputs { get; } + public string[] Outputs { get; } + + public string OnlineVersion { get; } + public string[] RelatedLinks { get; } + + private const string HelpLinkPrefix = @"https://docs.microsoft.com/powershell/module/"; + + public CommentInfo(VariantGroup variantGroup) + { + var helpInfo = variantGroup.HelpInfo; + Description = variantGroup.Variants.SelectMany(v => v.Attributes).OfType().FirstOrDefault()?.Description.NullIfEmpty() + ?? helpInfo.Description.EmptyIfNull(); + // If there is no Synopsis, PowerShell may put in the Syntax string as the Synopsis. This seems unintended, so we remove the Synopsis in this situation. + var synopsis = helpInfo.Synopsis.EmptyIfNull().Trim().StartsWith(variantGroup.CmdletName) ? String.Empty : helpInfo.Synopsis; + Synopsis = synopsis.NullIfEmpty() ?? Description; + + Examples = helpInfo.Examples.Select(rl => rl.Code).ToArray(); + + Inputs = (variantGroup.ParameterGroups.Where(pg => pg.IsInputType).Select(pg => pg.ParameterType.FullName).ToArray().NullIfEmpty() ?? + helpInfo.InputTypes.Where(it => it.Name.NullIfWhiteSpace() != null).Select(it => it.Name).ToArray()) + .Where(i => i != "None").Distinct().OrderBy(i => i).ToArray(); + Outputs = (variantGroup.OutputTypes.Select(ot => ot.Type.FullName).ToArray().NullIfEmpty() ?? + helpInfo.OutputTypes.Where(it => it.Name.NullIfWhiteSpace() != null).Select(ot => ot.Name).ToArray()) + .Where(o => o != "None").Distinct().OrderBy(o => o).ToArray(); + + // Use root module name in the help link + var moduleName = variantGroup.RootModuleName == "" ? variantGroup.ModuleName.ToLowerInvariant() : variantGroup.RootModuleName.ToLowerInvariant(); + OnlineVersion = helpInfo.OnlineVersion?.Uri.NullIfEmpty() ?? $@"{HelpLinkPrefix}{moduleName}/{variantGroup.CmdletName.ToLowerInvariant()}"; + RelatedLinks = helpInfo.RelatedLinks.Select(rl => rl.Text).ToArray(); + } + } + + internal class CompleterInfo + { + public string Name { get; } + public string Description { get; } + public string Script { get; } + public Type Type { get; } + public bool IsTypeCompleter { get; } + + public CompleterInfo(CompleterInfoAttribute infoAttribute) + { + Name = infoAttribute.Name; + Description = infoAttribute.Description; + Script = infoAttribute.Script; + } + + public CompleterInfo(ArgumentCompleterAttribute completerAttribute) + { + Script = completerAttribute.ScriptBlock?.ToString(); + if (completerAttribute.Type != null) + { + Type = completerAttribute.Type; + IsTypeCompleter = true; + } + } + } + + internal class DefaultInfo + { + public string Name { get; } + public string Description { get; } + public string Script { get; } + public ParameterGroup ParameterGroup { get; } + + public DefaultInfo(DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) + { + Name = infoAttribute.Name; + Description = infoAttribute.Description; + Script = infoAttribute.Script; + ParameterGroup = parameterGroup; + } + + public DefaultInfo(PSDefaultValueAttribute defaultValueAttribute, ParameterGroup parameterGroup) + { + Description = defaultValueAttribute.Help; + ParameterGroup = parameterGroup; + if (defaultValueAttribute.Value != null) + { + Script = defaultValueAttribute.Value.ToString(); + } + } + } + + internal static class PsProxyTypeExtensions + { + public const string NoProfiles = "__NoProfiles"; + + public static bool IsValidDefaultParameterSetName(this string parameterSetName) => + !String.IsNullOrEmpty(parameterSetName) && parameterSetName != AllParameterSets; + + public static Variant[] ToVariants(this CommandInfo info, PsHelpInfo helpInfo) + { + var metadata = new CommandMetadata(info); + var privateCmdletName = metadata.Name.Split('!').First(); + var parts = privateCmdletName.Split('_'); + return parts.Length > 1 + ? new[] { new Variant(parts[0], parts[1], info, metadata, helpInfo: helpInfo) } + // Process multiple parameter sets, so we declare a variant per parameter set. + : info.ParameterSets.Select(ps => new Variant(privateCmdletName, ps.Name, info, metadata, true, helpInfo)).ToArray(); + } + + public static Variant[] ToVariants(this CmdletAndHelpInfo info) => info.CommandInfo.ToVariants(info.HelpInfo); + + public static Variant[] ToVariants(this CommandInfo info, PSObject helpInfo = null) => info.ToVariants(helpInfo?.ToPsHelpInfo()); + + public static Parameter[] ToParameters(this Variant variant) + { + var parameters = variant.Metadata.Parameters.AsEnumerable(); + var parameterHelp = variant.HelpInfo.Parameters.AsEnumerable(); + + if (variant.HasParameterSets) + { + parameters = parameters.Where(p => p.Value.ParameterSets.Keys.Any(k => k == variant.VariantName || k == AllParameterSets)); + parameterHelp = parameterHelp.Where(ph => (!ph.ParameterSetNames.Any() || ph.ParameterSetNames.Any(psn => psn == variant.VariantName || psn == AllParameterSets)) && ph.Name != "IncludeTotalCount"); + } + var result = parameters.Select(p => new Parameter(variant.VariantName, p.Key, p.Value, parameterHelp.FirstOrDefault(ph => ph.Name == p.Key))); + if (variant.SupportsPaging) { + // If supportsPaging is set, we will need to add First and Skip parameters since they are treated as common parameters which as not contained on Metadata>parameters + variant.Info.Parameters["First"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Gets only the first 'n' objects."; + variant.Info.Parameters["Skip"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Ignores the first 'n' objects and then gets the remaining objects."; + result = result.Append(new Parameter(variant.VariantName, "First", variant.Info.Parameters["First"], parameterHelp.FirstOrDefault(ph => ph.Name == "First"))); + result = result.Append(new Parameter(variant.VariantName, "Skip", variant.Info.Parameters["Skip"], parameterHelp.FirstOrDefault(ph => ph.Name == "Skip"))); + } + return result.ToArray(); + } + + public static Attribute[] ToAttributes(this Variant variant) => variant.IsFunction + ? ((FunctionInfo)variant.Info).ScriptBlock.Attributes.ToArray() + : variant.Metadata.CommandType.GetCustomAttributes(false).Cast().ToArray(); + + public static IEnumerable ToParameterGroups(this Variant[] variants) + { + var allVariantNames = variants.Select(vg => vg.VariantName).ToArray(); + return variants + .SelectMany(v => v.Parameters) + .GroupBy(p => p.ParameterName, StringComparer.InvariantCultureIgnoreCase) + .Select(pg => new ParameterGroup(pg.Key, pg.Select(p => p).ToArray(), allVariantNames)); + } + + public static ComplexInterfaceInfo ToComplexInterfaceInfo(this InfoAttribute infoAttribute, string name, Type type, bool? required = null, List seenTypes = null) + => new ComplexInterfaceInfo(name, type, infoAttribute, required, seenTypes); + + public static CompleterInfo ToCompleterInfo(this CompleterInfoAttribute infoAttribute) => new CompleterInfo(infoAttribute); + public static CompleterInfo ToCompleterInfo(this ArgumentCompleterAttribute completerAttribute) => new CompleterInfo(completerAttribute); + + public static DefaultInfo ToDefaultInfo(this DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) => new DefaultInfo(infoAttribute, parameterGroup); + public static DefaultInfo ToDefaultInfo(this PSDefaultValueAttribute defaultValueAttribute, ParameterGroup parameterGroup) => new DefaultInfo(defaultValueAttribute, parameterGroup); + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/PsAttributes.cs b/src/Cdn/generated/runtime/BuildTime/PsAttributes.cs new file mode 100644 index 000000000000..cc2f772d7f6e --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/PsAttributes.cs @@ -0,0 +1,114 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn +{ + [AttributeUsage(AttributeTargets.Class)] + public class DescriptionAttribute : Attribute + { + public string Description { get; } + + public DescriptionAttribute(string description) + { + Description = description; + } + } + + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)] + public class DoNotExportAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class)] + public class InternalExportAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class)] + public class GeneratedAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)] + public class DoNotFormatAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class)] + public class ProfileAttribute : Attribute + { + public string[] Profiles { get; } + + public ProfileAttribute(params string[] profiles) + { + Profiles = profiles; + } + } + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] + public class CategoryAttribute : Attribute + { + public ParameterCategory[] Categories { get; } + + public CategoryAttribute(params ParameterCategory[] categories) + { + Categories = categories; + } + } + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] + public class ExportAsAttribute : Attribute + { + public Type Type { get; set; } + + public ExportAsAttribute(Type type) + { + Type = type; + } + } + + public enum ParameterCategory + { + // Note: Order is significant + Uri = 0, + Path, + Query, + Header, + Cookie, + Body, + Azure, + Runtime + } + + [AttributeUsage(AttributeTargets.Property)] + public class OriginAttribute : Attribute + { + public PropertyOrigin Origin { get; } + + public OriginAttribute(PropertyOrigin origin) + { + Origin = origin; + } + } + + public enum PropertyOrigin + { + // Note: Order is significant + Inherited = 0, + Owned, + Inlined + } + + [AttributeUsage(AttributeTargets.Property)] + public class FormatTableAttribute : Attribute + { + public int Index { get; set; } = -1; + public bool HasIndex => Index != -1; + public string Label { get; set; } + public int Width { get; set; } = -1; + public bool HasWidth => Width != -1; + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/PsExtensions.cs b/src/Cdn/generated/runtime/BuildTime/PsExtensions.cs new file mode 100644 index 000000000000..1ce9a0a1330b --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/PsExtensions.cs @@ -0,0 +1,169 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + internal static class PsExtensions + { + // https://stackoverflow.com/a/863944/294804 + // https://stackoverflow.com/a/4452598/294804 + // https://stackoverflow.com/a/28701974/294804 + // Note: This will unwrap nested collections, but we don't generate nested collections. + public static Type Unwrap(this Type type) + { + if (type.IsArray) + { + return type.GetElementType().Unwrap(); + } + + var typeInfo = type.GetTypeInfo(); + if (typeInfo.IsGenericType + && (typeInfo.GetGenericTypeDefinition() == typeof(Nullable<>) || typeof(IEnumerable<>).IsAssignableFrom(type))) + { + return typeInfo.GetGenericArguments().First().Unwrap(); + } + + return type; + } + + // https://stackoverflow.com/a/863944/294804 + private static bool IsSimple(this Type type) + { + var typeInfo = type.GetTypeInfo(); + return typeInfo.IsPrimitive + || typeInfo.IsEnum + || type == typeof(string) + || type == typeof(decimal); + } + + // https://stackoverflow.com/a/32025393/294804 + private static bool HasImplicitConversion(this Type baseType, Type targetType) => + baseType.GetMethods(BindingFlags.Public | BindingFlags.Static) + .Where(mi => mi.Name == "op_Implicit" && mi.ReturnType == targetType) + .Any(mi => mi.GetParameters().FirstOrDefault()?.ParameterType == baseType); + + public static bool IsPsSimple(this Type type) + { + var unwrappedType = type.Unwrap(); + return unwrappedType.IsSimple() + || unwrappedType == typeof(SwitchParameter) + || unwrappedType == typeof(Hashtable) + || unwrappedType == typeof(PSCredential) + || unwrappedType == typeof(ScriptBlock) + || unwrappedType == typeof(DateTime) + || unwrappedType == typeof(Uri) + || unwrappedType.HasImplicitConversion(typeof(string)); + } + + public static string ToPsList(this IEnumerable items) => String.Join(", ", items.Select(i => $"'{i}'")); + + public static IEnumerable ToAliasNames(this IEnumerable attributes) => attributes.OfType().SelectMany(aa => aa.AliasNames).Distinct(); + + public static bool IsArrayAndElementTypeIsT(this object item) + { + var itemType = item.GetType(); + var tType = typeof(T); + return itemType.IsArray && !tType.IsArray && tType.IsAssignableFrom(itemType.GetElementType()); + } + + public static bool IsTArrayAndElementTypeIsItem(this object item) + { + var itemType = item.GetType(); + var tType = typeof(T); + return !itemType.IsArray && tType.IsArray && (tType.GetElementType()?.IsAssignableFrom(itemType) ?? false); + } + + public static bool IsTypeOrArrayOfType(this object item) => item is T || item.IsArrayAndElementTypeIsT() || item.IsTArrayAndElementTypeIsItem(); + + public static T NormalizeArrayType(this object item) + { + if (item is T result) + { + return result; + } + + if (item.IsArrayAndElementTypeIsT()) + { + var array = (T[])Convert.ChangeType(item, typeof(T[])); + return array.FirstOrDefault(); + } + + if (item.IsTArrayAndElementTypeIsItem()) + { + var tType = typeof(T); + var array = Array.CreateInstance(tType.GetElementType(), 1); + array.SetValue(item, 0); + return (T)Convert.ChangeType(array, tType); + } + + return default(T); + } + + public static T GetNestedProperty(this PSObject psObject, params string[] names) => psObject.Properties.GetNestedProperty(names); + + public static T GetNestedProperty(this PSMemberInfoCollection properties, params string[] names) + { + var lastName = names.Last(); + var nestedProperties = names.Take(names.Length - 1).Aggregate(properties, (p, n) => p?.GetProperty(n)?.Properties); + return nestedProperties != null ? nestedProperties.GetProperty(lastName) : default(T); + } + + public static T GetProperty(this PSObject psObject, string name) => psObject.Properties.GetProperty(name); + + public static T GetProperty(this PSMemberInfoCollection properties, string name) + { + switch (properties[name]?.Value) + { + case PSObject psObject when psObject.BaseObject is PSCustomObject && psObject.ImmediateBaseObject.IsTypeOrArrayOfType(): + return psObject.ImmediateBaseObject.NormalizeArrayType(); + case PSObject psObject when psObject.BaseObject.IsTypeOrArrayOfType(): + return psObject.BaseObject.NormalizeArrayType(); + case object value when value.IsTypeOrArrayOfType(): + return value.NormalizeArrayType(); + default: + return default(T); + } + } + + public static IEnumerable RunScript(this PSCmdlet cmdlet, string script) + => PsHelpers.RunScript(cmdlet.InvokeCommand, script); + + public static void RunScript(this PSCmdlet cmdlet, string script) + => cmdlet.RunScript(script); + + public static IEnumerable RunScript(this EngineIntrinsics engineIntrinsics, string script) + => PsHelpers.RunScript(engineIntrinsics.InvokeCommand, script); + + public static void RunScript(this EngineIntrinsics engineIntrinsics, string script) + => engineIntrinsics.RunScript(script); + + public static IEnumerable RunScript(this PSCmdlet cmdlet, ScriptBlock block) + => PsHelpers.RunScript(cmdlet.InvokeCommand, block.ToString()); + + public static void RunScript(this PSCmdlet cmdlet, ScriptBlock block) + => cmdlet.RunScript(block.ToString()); + + public static IEnumerable RunScript(this EngineIntrinsics engineIntrinsics, ScriptBlock block) + => PsHelpers.RunScript(engineIntrinsics.InvokeCommand, block.ToString()); + + public static void RunScript(this EngineIntrinsics engineIntrinsics, ScriptBlock block) + => engineIntrinsics.RunScript(block.ToString()); + + /// + /// Returns if a parameter should be hidden by checking for . + /// + /// A PowerShell parameter. + public static bool IsHidden(this Parameter parameter) + { + return parameter.Attributes.Any(attr => attr is DoNotExportAttribute); + } + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/PsHelpers.cs b/src/Cdn/generated/runtime/BuildTime/PsHelpers.cs new file mode 100644 index 000000000000..8df81b47fe46 --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/PsHelpers.cs @@ -0,0 +1,104 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using Pwsh = System.Management.Automation.PowerShell; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + internal static class PsHelpers + { + public static IEnumerable RunScript(string script) + => Pwsh.Create().AddScript(script).Invoke(); + + public static void RunScript(string script) + => RunScript(script); + + public static IEnumerable RunScript(CommandInvocationIntrinsics cii, string script) + => cii.InvokeScript(script).Select(o => o?.BaseObject).Where(o => o != null).OfType(); + + public static void RunScript(CommandInvocationIntrinsics cii, string script) + => RunScript(cii, script); + + public static IEnumerable GetModuleCmdlets(PSCmdlet cmdlet, params string[] modulePaths) + { + var getCmdletsCommand = String.Join(" + ", modulePaths.Select(mp => $"(Get-Command -Module (Import-Module '{mp}' -PassThru))")); + return (cmdlet?.RunScript(getCmdletsCommand) ?? RunScript(getCmdletsCommand)) + .Where(ci => ci.CommandType != CommandTypes.Alias); + } + + public static IEnumerable GetModuleCmdlets(params string[] modulePaths) + => GetModuleCmdlets(null, modulePaths); + + public static IEnumerable GetScriptCmdlets(PSCmdlet cmdlet, string scriptFolder) + { + // https://stackoverflow.com/a/40969712/294804 + var getCmdletsCommand = $@" +$currentFunctions = Get-ChildItem function: +Get-ChildItem -Path '{scriptFolder}' -Recurse -Include '*.ps1' -File | ForEach-Object {{ . $_.FullName }} +Get-ChildItem function: | Where-Object {{ ($currentFunctions -notcontains $_) -and $_.CmdletBinding }} +"; + return cmdlet?.RunScript(getCmdletsCommand) ?? RunScript(getCmdletsCommand); + } + + public static IEnumerable GetScriptCmdlets(string scriptFolder) + => GetScriptCmdlets(null, scriptFolder); + + public static IEnumerable GetScriptHelpInfo(PSCmdlet cmdlet, params string[] modulePaths) + { + var importModules = String.Join(Environment.NewLine, modulePaths.Select(mp => $"Import-Module '{mp}'")); + var getHelpCommand = $@" +$currentFunctions = Get-ChildItem function: +{importModules} +Get-ChildItem function: | Where-Object {{ ($currentFunctions -notcontains $_) -and $_.CmdletBinding }} | ForEach-Object {{ Get-Help -Name $_.Name -Full }} +"; + return cmdlet?.RunScript(getHelpCommand) ?? RunScript(getHelpCommand); + } + + public static IEnumerable GetScriptHelpInfo(params string[] modulePaths) + => GetScriptHelpInfo(null, modulePaths); + + public static IEnumerable GetModuleCmdletsAndHelpInfo(PSCmdlet cmdlet, params string[] modulePaths) + { + var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp => + $@"(Get-Command -Module (Import-Module '{mp}' -PassThru) | Where-Object {{ $_.CommandType -ne 'Alias' }} | ForEach-Object {{ @{{ CommandInfo = $_; HelpInfo = ( invoke-command {{ try {{ Get-Help -Name $_.Name -Full }} catch{{ '' }} }} ) }} }})" + )); + return (cmdlet?.RunScript(getCmdletAndHelp) ?? RunScript(getCmdletAndHelp)) + .Select(h => new CmdletAndHelpInfo { CommandInfo = (h["CommandInfo"] as PSObject)?.BaseObject as CommandInfo, HelpInfo = h["HelpInfo"] as PSObject }); + } + + public static IEnumerable GetModuleCmdletsAndHelpInfo(params string[] modulePaths) + => GetModuleCmdletsAndHelpInfo(null, modulePaths); + + public static CmdletAndHelpInfo ToCmdletAndHelpInfo(this CommandInfo commandInfo, PSObject helpInfo) => new CmdletAndHelpInfo { CommandInfo = commandInfo, HelpInfo = helpInfo }; + + public const string Psd1Indent = " "; + public const string GuidStart = Psd1Indent + "GUID"; + + public static Guid ReadGuidFromPsd1(string psd1Path) + { + var guid = Guid.NewGuid(); + if (File.Exists(psd1Path)) + { + var currentGuid = File.ReadAllLines(psd1Path) + .FirstOrDefault(l => l.StartsWith(GuidStart))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries) + .LastOrDefault()?.Replace("'", String.Empty); + guid = currentGuid != null ? Guid.Parse(currentGuid) : guid; + } + + return guid; + } + } + + internal class CmdletAndHelpInfo + { + public CommandInfo CommandInfo { get; set; } + public PSObject HelpInfo { get; set; } + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/StringExtensions.cs b/src/Cdn/generated/runtime/BuildTime/StringExtensions.cs new file mode 100644 index 000000000000..d685b963b704 --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/StringExtensions.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + internal static class StringExtensions + { + public static string NullIfEmpty(this string text) => String.IsNullOrEmpty(text) ? null : text; + public static string NullIfWhiteSpace(this string text) => String.IsNullOrWhiteSpace(text) ? null : text; + public static string EmptyIfNull(this string text) => text ?? String.Empty; + + public static bool? ToNullableBool(this string text) => String.IsNullOrEmpty(text) ? (bool?)null : Convert.ToBoolean(text.ToLowerInvariant()); + + public static string ToUpperFirstCharacter(this string text) => String.IsNullOrEmpty(text) ? text : $"{text[0].ToString().ToUpperInvariant()}{text.Remove(0, 1)}"; + + public static string ReplaceNewLines(this string value, string replacer = " ", string[] newLineSymbols = null) + => (newLineSymbols ?? new []{ "\r\n", "\n" }).Aggregate(value.EmptyIfNull(), (current, symbol) => current.Replace(symbol, replacer)); + public static string NormalizeNewLines(this string value) => value.ReplaceNewLines("\u00A0").Replace("\u00A0", Environment.NewLine); + } +} diff --git a/src/Cdn/generated/runtime/BuildTime/XmlExtensions.cs b/src/Cdn/generated/runtime/BuildTime/XmlExtensions.cs new file mode 100644 index 000000000000..b63f76ed3105 --- /dev/null +++ b/src/Cdn/generated/runtime/BuildTime/XmlExtensions.cs @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.IO; +using System.Xml; +using System.Xml.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + internal static class XmlExtensions + { + public static string ToXmlString(this T inputObject, bool excludeDeclaration = false) + { + var serializer = new XmlSerializer(typeof(T)); + //https://stackoverflow.com/a/760290/294804 + //https://stackoverflow.com/a/3732234/294804 + var namespaces = new XmlSerializerNamespaces(new[] { XmlQualifiedName.Empty }); + var xmlSettings = new XmlWriterSettings { OmitXmlDeclaration = excludeDeclaration, Indent = true }; + using (var stringWriter = new StringWriter()) + using (var xmlWriter = XmlWriter.Create(stringWriter, xmlSettings)) + { + serializer.Serialize(xmlWriter, inputObject, namespaces); + return stringWriter.ToString(); + } + } + } +} diff --git a/src/Cdn/generated/runtime/CmdInfoHandler.cs b/src/Cdn/generated/runtime/CmdInfoHandler.cs new file mode 100644 index 000000000000..7a74b59272c9 --- /dev/null +++ b/src/Cdn/generated/runtime/CmdInfoHandler.cs @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Management.Automation; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + using NextDelegate = Func, Task>, Task>; + using SignalDelegate = Func, Task>; + + public class CmdInfoHandler + { + private readonly string processRecordId; + private readonly string parameterSetName; + private readonly InvocationInfo invocationInfo; + + public CmdInfoHandler(string processRecordId, InvocationInfo invocationInfo, string parameterSetName) + { + this.processRecordId = processRecordId; + this.parameterSetName = parameterSetName; + this.invocationInfo = invocationInfo; + } + + public Task SendAsync(HttpRequestMessage request, CancellationToken token, Action cancel, SignalDelegate signal, NextDelegate next) + { + request.Headers.Add("x-ms-client-request-id", processRecordId); + request.Headers.Add("CommandName", invocationInfo?.InvocationName); + request.Headers.Add("FullCommandName", invocationInfo?.MyCommand?.Name); + request.Headers.Add("ParameterSetName", parameterSetName); + + // continue with pipeline. + return next(request, token, cancel, signal); + } + } +} diff --git a/src/Cdn/generated/runtime/Conversions/ConversionException.cs b/src/Cdn/generated/runtime/Conversions/ConversionException.cs new file mode 100644 index 000000000000..19f6fecc6fe4 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/ConversionException.cs @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal class ConversionException : Exception + { + internal ConversionException(string message) + : base(message) { } + + internal ConversionException(JsonNode node, Type targetType) + : base($"Cannot convert '{node.Type}' to a {targetType.Name}") { } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/IJsonConverter.cs b/src/Cdn/generated/runtime/Conversions/IJsonConverter.cs new file mode 100644 index 000000000000..0edf884a5b84 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/IJsonConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal interface IJsonConverter + { + JsonNode ToJson(object value); + + object FromJson(JsonNode node); + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/BinaryConverter.cs b/src/Cdn/generated/runtime/Conversions/Instances/BinaryConverter.cs new file mode 100644 index 000000000000..f08e60064d68 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/BinaryConverter.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class BinaryConverter : JsonConverter + { + internal override JsonNode ToJson(byte[] value) => new XBinary(value); + + internal override byte[] FromJson(JsonNode node) + { + switch (node.Type) + { + case JsonType.String : return Convert.FromBase64String(node.ToString()); // Base64 Encoded + case JsonType.Binary : return ((XBinary)node).Value; + } + + throw new ConversionException(node, typeof(byte[])); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/BooleanConverter.cs b/src/Cdn/generated/runtime/Conversions/Instances/BooleanConverter.cs new file mode 100644 index 000000000000..d3fb4021ae0f --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/BooleanConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class BooleanConverter : JsonConverter + { + internal override JsonNode ToJson(bool value) => new JsonBoolean(value); + + internal override bool FromJson(JsonNode node) => (bool)node; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/DateTimeConverter.cs b/src/Cdn/generated/runtime/Conversions/Instances/DateTimeConverter.cs new file mode 100644 index 000000000000..d9ee2c8cc801 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/DateTimeConverter.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class DateTimeConverter : JsonConverter + { + internal override JsonNode ToJson(DateTime value) + { + return new JsonDate(value); + } + + internal override DateTime FromJson(JsonNode node) => (DateTime)node; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs b/src/Cdn/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs new file mode 100644 index 000000000000..94063be496d2 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class DateTimeOffsetConverter : JsonConverter + { + internal override JsonNode ToJson(DateTimeOffset value) => new JsonDate(value); + + internal override DateTimeOffset FromJson(JsonNode node) => (DateTimeOffset)node; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/DecimalConverter.cs b/src/Cdn/generated/runtime/Conversions/Instances/DecimalConverter.cs new file mode 100644 index 000000000000..d22815dbcaf8 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/DecimalConverter.cs @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class DecimalConverter : JsonConverter + { + internal override JsonNode ToJson(decimal value) => new JsonNumber(value.ToString()); + + internal override decimal FromJson(JsonNode node) + { + return (decimal)node; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/DoubleConverter.cs b/src/Cdn/generated/runtime/Conversions/Instances/DoubleConverter.cs new file mode 100644 index 000000000000..862b7b12560c --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/DoubleConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class DoubleConverter : JsonConverter + { + internal override JsonNode ToJson(double value) => new JsonNumber(value); + + internal override double FromJson(JsonNode node) => (double)node; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/EnumConverter.cs b/src/Cdn/generated/runtime/Conversions/Instances/EnumConverter.cs new file mode 100644 index 000000000000..aed07495298e --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/EnumConverter.cs @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class EnumConverter : IJsonConverter + { + private readonly Type type; + + internal EnumConverter(Type type) + { + this.type = type ?? throw new ArgumentNullException(nameof(type)); + } + + public JsonNode ToJson(object value) => new JsonString(value.ToString()); + + public object FromJson(JsonNode node) + { + if (node.Type == JsonType.Number) + { + return Enum.ToObject(type, (int)node); + } + + return Enum.Parse(type, node.ToString(), ignoreCase: true); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/GuidConverter.cs b/src/Cdn/generated/runtime/Conversions/Instances/GuidConverter.cs new file mode 100644 index 000000000000..79add1d27a2c --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/GuidConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class GuidConverter : JsonConverter + { + internal override JsonNode ToJson(Guid value) => new JsonString(value.ToString()); + + internal override Guid FromJson(JsonNode node) => (Guid)node; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/HashSet'1Converter.cs b/src/Cdn/generated/runtime/Conversions/Instances/HashSet'1Converter.cs new file mode 100644 index 000000000000..a7b659aabff5 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/HashSet'1Converter.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class HashSetConverter : JsonConverter> + { + internal override JsonNode ToJson(HashSet value) + { + return new XSet(value); + } + + internal override HashSet FromJson(JsonNode node) + { + var collection = node as ICollection; + + if (collection.Count == 0) return null; + + // TODO: Remove Linq depedency + return new HashSet(collection.Cast()); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/Int16Converter.cs b/src/Cdn/generated/runtime/Conversions/Instances/Int16Converter.cs new file mode 100644 index 000000000000..73a05c0504c5 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/Int16Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class Int16Converter : JsonConverter + { + internal override JsonNode ToJson(short value) => new JsonNumber(value); + + internal override short FromJson(JsonNode node) => (short)node; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/Int32Converter.cs b/src/Cdn/generated/runtime/Conversions/Instances/Int32Converter.cs new file mode 100644 index 000000000000..7753ed203029 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/Int32Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class Int32Converter : JsonConverter + { + internal override JsonNode ToJson(int value) => new JsonNumber(value); + + internal override int FromJson(JsonNode node) => (int)node; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/Int64Converter.cs b/src/Cdn/generated/runtime/Conversions/Instances/Int64Converter.cs new file mode 100644 index 000000000000..394cd7297ae3 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/Int64Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class Int64Converter : JsonConverter + { + internal override JsonNode ToJson(long value) => new JsonNumber(value); + + internal override long FromJson(JsonNode node) => (long)node; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/JsonArrayConverter.cs b/src/Cdn/generated/runtime/Conversions/Instances/JsonArrayConverter.cs new file mode 100644 index 000000000000..12acf102cf16 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/JsonArrayConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class JsonArrayConverter : JsonConverter + { + internal override JsonNode ToJson(JsonArray value) => value; + + internal override JsonArray FromJson(JsonNode node) => (JsonArray)node; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/JsonObjectConverter.cs b/src/Cdn/generated/runtime/Conversions/Instances/JsonObjectConverter.cs new file mode 100644 index 000000000000..5812e8ae31b3 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/JsonObjectConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class JsonObjectConverter : JsonConverter + { + internal override JsonNode ToJson(JsonObject value) => value; + + internal override JsonObject FromJson(JsonNode node) => (JsonObject)node; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/SingleConverter.cs b/src/Cdn/generated/runtime/Conversions/Instances/SingleConverter.cs new file mode 100644 index 000000000000..c4300b57bf0c --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/SingleConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class SingleConverter : JsonConverter + { + internal override JsonNode ToJson(float value) => new JsonNumber(value.ToString()); + + internal override float FromJson(JsonNode node) => (float)node; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/StringConverter.cs b/src/Cdn/generated/runtime/Conversions/Instances/StringConverter.cs new file mode 100644 index 000000000000..c0d09bbb53b9 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/StringConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class StringConverter : JsonConverter + { + internal override JsonNode ToJson(string value) => new JsonString(value); + + internal override string FromJson(JsonNode node) => node.ToString(); + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/TimeSpanConverter.cs b/src/Cdn/generated/runtime/Conversions/Instances/TimeSpanConverter.cs new file mode 100644 index 000000000000..4391e8be5bdb --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/TimeSpanConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class TimeSpanConverter : JsonConverter + { + internal override JsonNode ToJson(TimeSpan value) => new JsonString(value.ToString()); + + internal override TimeSpan FromJson(JsonNode node) => (TimeSpan)node; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/UInt16Converter.cs b/src/Cdn/generated/runtime/Conversions/Instances/UInt16Converter.cs new file mode 100644 index 000000000000..8314918d5aa3 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/UInt16Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class UInt16Converter : JsonConverter + { + internal override JsonNode ToJson(ushort value) => new JsonNumber(value); + + internal override ushort FromJson(JsonNode node) => (ushort)node; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/UInt32Converter.cs b/src/Cdn/generated/runtime/Conversions/Instances/UInt32Converter.cs new file mode 100644 index 000000000000..d645e742ccd6 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/UInt32Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class UInt32Converter : JsonConverter + { + internal override JsonNode ToJson(uint value) => new JsonNumber(value); + + internal override uint FromJson(JsonNode node) => (uint)node; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/UInt64Converter.cs b/src/Cdn/generated/runtime/Conversions/Instances/UInt64Converter.cs new file mode 100644 index 000000000000..1a4e178de158 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/UInt64Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class UInt64Converter : JsonConverter + { + internal override JsonNode ToJson(ulong value) => new JsonNumber(value.ToString()); + + internal override ulong FromJson(JsonNode node) => (ulong)node; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/Instances/UriConverter.cs b/src/Cdn/generated/runtime/Conversions/Instances/UriConverter.cs new file mode 100644 index 000000000000..79c4c631c7f3 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/Instances/UriConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class UriConverter : JsonConverter + { + internal override JsonNode ToJson(Uri value) => new JsonString(value.AbsoluteUri); + + internal override Uri FromJson(JsonNode node) => (Uri)node; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/JsonConverter.cs b/src/Cdn/generated/runtime/Conversions/JsonConverter.cs new file mode 100644 index 000000000000..b131075d448b --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/JsonConverter.cs @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public abstract class JsonConverter : IJsonConverter + { + internal abstract T FromJson(JsonNode node); + + internal abstract JsonNode ToJson(T value); + + #region IConverter + + object IJsonConverter.FromJson(JsonNode node) => FromJson(node); + + JsonNode IJsonConverter.ToJson(object value) => ToJson((T)value); + + #endregion + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/JsonConverterAttribute.cs b/src/Cdn/generated/runtime/Conversions/JsonConverterAttribute.cs new file mode 100644 index 000000000000..fcff2ce432cf --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/JsonConverterAttribute.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class JsonConverterAttribute : Attribute + { + internal JsonConverterAttribute(Type type) + { + Converter = (IJsonConverter)Activator.CreateInstance(type); + } + + internal IJsonConverter Converter { get; } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/JsonConverterFactory.cs b/src/Cdn/generated/runtime/Conversions/JsonConverterFactory.cs new file mode 100644 index 000000000000..7b4fe26c4c31 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/JsonConverterFactory.cs @@ -0,0 +1,91 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class JsonConverterFactory + { + private static readonly Dictionary converters = new Dictionary(); + + static JsonConverterFactory() + { + AddInternal(new BooleanConverter()); + AddInternal(new DateTimeConverter()); + AddInternal(new DateTimeOffsetConverter()); + AddInternal(new BinaryConverter()); + AddInternal(new DecimalConverter()); + AddInternal(new DoubleConverter()); + AddInternal(new GuidConverter()); + AddInternal(new Int16Converter()); + AddInternal(new Int32Converter()); + AddInternal(new Int64Converter()); + AddInternal(new SingleConverter()); + AddInternal(new StringConverter()); + AddInternal(new TimeSpanConverter()); + AddInternal(new UInt16Converter()); + AddInternal(new UInt32Converter()); + AddInternal(new UInt64Converter()); + AddInternal(new UriConverter()); + + // Hash sets + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + + // JSON + + AddInternal(new JsonObjectConverter()); + AddInternal(new JsonArrayConverter()); + } + + internal static Dictionary Instances => converters; + + internal static IJsonConverter Get(Type type) + { + var details = TypeDetails.Get(type); + + if (details.JsonConverter == null) + { + throw new ConversionException($"No converter found for '{type.Name}'."); + } + + return details.JsonConverter; + } + + internal static bool TryGet(Type type, out IJsonConverter converter) + { + var typeDetails = TypeDetails.Get(type); + + converter = typeDetails.JsonConverter; + + return converter != null; + } + + private static void AddInternal(JsonConverter converter) + => converters.Add(typeof(T), converter); + + private static void AddInternal(IJsonConverter converter) + => converters.Add(typeof(T), converter); + + internal static void Add(JsonConverter converter) + { + if (converter == null) + { + throw new ArgumentNullException(nameof(converter)); + } + + AddInternal(converter); + + var type = TypeDetails.Get(); + + type.JsonConverter = converter; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Conversions/StringLikeConverter.cs b/src/Cdn/generated/runtime/Conversions/StringLikeConverter.cs new file mode 100644 index 000000000000..c5cd1de52898 --- /dev/null +++ b/src/Cdn/generated/runtime/Conversions/StringLikeConverter.cs @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class StringLikeConverter : IJsonConverter + { + private readonly Type type; + private readonly MethodInfo parseMethod; + + internal StringLikeConverter(Type type) + { + this.type = type ?? throw new ArgumentNullException(nameof(type)); + this.parseMethod = StringLikeHelper.GetParseMethod(type); + } + + public object FromJson(JsonNode node) => + parseMethod.Invoke(null, new[] { node.ToString() }); + + public JsonNode ToJson(object value) => new JsonString(value.ToString()); + } + + internal static class StringLikeHelper + { + private static readonly Type[] parseMethodParamaterTypes = new[] { typeof(string) }; + + internal static bool IsStringLike(Type type) + { + return GetParseMethod(type) != null; + } + + internal static MethodInfo GetParseMethod(Type type) + { + MethodInfo method = type.GetMethod("Parse", parseMethodParamaterTypes); + + if (method?.IsPublic != true) return null; + + return method; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Customizations/IJsonSerializable.cs b/src/Cdn/generated/runtime/Customizations/IJsonSerializable.cs new file mode 100644 index 000000000000..3a760d3ccff1 --- /dev/null +++ b/src/Cdn/generated/runtime/Customizations/IJsonSerializable.cs @@ -0,0 +1,263 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json; +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + public interface IJsonSerializable + { + JsonNode ToJson(JsonObject container = null, SerializationMode serializationMode = SerializationMode.None); + } + internal static class JsonSerializable + { + /// + /// Serializes an enumerable and returns a JsonNode. + /// + /// an IEnumerable collection of items + /// A JsonNode that contains the collection of items serialized. + private static JsonNode ToJsonValue(System.Collections.IEnumerable enumerable) + { + if (enumerable != null) + { + // is it a byte array of some kind? + if (enumerable is System.Collections.Generic.IEnumerable byteEnumerable) + { + return new XBinary(System.Linq.Enumerable.ToArray(byteEnumerable)); + } + + var hasValues = false; + // just create an array of value nodes. + var result = new XNodeArray(); + foreach (var each in enumerable) + { + // we had at least one value. + hasValues = true; + + // try to serialize it. + var node = ToJsonValue(each); + if (null != node) + { + result.Add(node); + } + } + + // if we were able to add values, (or it was just empty), return it. + if (result.Count > 0 || !hasValues) + { + return result; + } + } + + // we couldn't serialize the values. Sorry. + return null; + } + + /// + /// Serializes a valuetype to a JsonNode. + /// + /// a ValueType (ie, a primitive, enum or struct) to be serialized + /// a JsonNode with the serialized value + private static JsonNode ToJsonValue(ValueType vValue) + { + // numeric type + if (vValue is SByte || vValue is Int16 || vValue is Int32 || vValue is Int64 || vValue is Byte || vValue is UInt16 || vValue is UInt32 || vValue is UInt64 || vValue is decimal || vValue is float || vValue is double) + { + return new JsonNumber(vValue.ToString()); + } + + // boolean type + if (vValue is bool bValue) + { + return new JsonBoolean(bValue); + } + + // dates + if (vValue is DateTime dtValue) + { + return new JsonDate(dtValue); + } + + // DictionaryEntity struct type + if (vValue is System.Collections.DictionaryEntry deValue) + { + return new JsonObject { { deValue.Key.ToString(), ToJsonValue(deValue.Value) } }; + } + + // sorry, no idea. + return null; + } + /// + /// Attempts to serialize an object by using ToJson() or ToJsonString() if they exist. + /// + /// the object to be serialized. + /// the serialized JsonNode (if successful), otherwise, null + private static JsonNode TryToJsonValue(dynamic oValue) + { + object jsonValue = null; + dynamic v = oValue; + try + { + jsonValue = v.ToJson().ToString(); + } + catch + { + // no harm... + try + { + jsonValue = v.ToJsonString().ToString(); + } + catch + { + // no worries here either. + } + } + + // if we got something out, let's use it. + if (null != jsonValue) + { + // JsonNumber is really a literal json value. Just don't try to cast that back to an actual number, ok? + return new JsonNumber(jsonValue.ToString()); + } + + return null; + } + + /// + /// Serialize an object by using a variety of methods. + /// + /// the object to be serialized. + /// the serialized JsonNode (if successful), otherwise, null + internal static JsonNode ToJsonValue(object value) + { + // things that implement our interface are preferred. + if (value is Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IJsonSerializable jsonSerializable) + { + return jsonSerializable.ToJson(); + } + + // strings are easy. + if (value is string || value is char) + { + return new JsonString(value.ToString()); + } + + // value types are fairly straightforward (fallback to ToJson()/ToJsonString() or literal JsonString ) + if (value is System.ValueType vValue) + { + return ToJsonValue(vValue) ?? TryToJsonValue(vValue) ?? new JsonString(vValue.ToString()); + } + + // dictionaries are objects that should be able to serialize + if (value is System.Collections.Generic.IDictionary dictionary) + { + return Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.JsonSerializable.ToJson(dictionary, null); + } + + // hashtables are converted to dictionaries for serialization + if (value is System.Collections.Hashtable hashtable) + { + var dict = new System.Collections.Generic.Dictionary(); + DictionaryExtensions.HashTableToDictionary(hashtable, dict); + return Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.JsonSerializable.ToJson(dict, null); + } + + // enumerable collections are handled like arrays (again, fallback to ToJson()/ToJsonString() or literal JsonString) + if (value is System.Collections.IEnumerable enumerableValue) + { + // some kind of enumerable value + return ToJsonValue(enumerableValue) ?? TryToJsonValue(value) ?? new JsonString(value.ToString()); + } + + // at this point, we're going to fallback to a string literal here, since we really have no idea what it is. + return new JsonString(value.ToString()); + } + + internal static JsonObject ToJson(System.Collections.Generic.Dictionary dictionary, JsonObject container) => ToJson((System.Collections.Generic.IDictionary)dictionary, container); + + /// + /// Serializes a dictionary into a JsonObject container. + /// + /// The dictionary to serailize + /// the container to serialize the dictionary into + /// the container + internal static JsonObject ToJson(System.Collections.Generic.IDictionary dictionary, JsonObject container) + { + container = container ?? new JsonObject(); + if (dictionary != null && dictionary.Count > 0) + { + foreach (var key in dictionary) + { + // currently, we don't serialize null values. + if (null != key.Value) + { + container.Add(key.Key, ToJsonValue(key.Value)); + continue; + } + } + } + return container; + } + + internal static Func> DeserializeDictionary(Func> dictionaryFactory) + { + return (node) => FromJson(node, dictionaryFactory(), (object)(DeserializeDictionary(dictionaryFactory)) as Func); + } + + internal static System.Collections.Generic.IDictionary FromJson(JsonObject json, System.Collections.Generic.Dictionary container, System.Func objectFactory, System.Collections.Generic.HashSet excludes = null) => FromJson(json, (System.Collections.Generic.IDictionary)container, objectFactory, excludes); + + + internal static System.Collections.Generic.IDictionary FromJson(JsonObject json, System.Collections.Generic.IDictionary container, System.Func objectFactory, System.Collections.Generic.HashSet excludes = null) + { + if (null == json) + { + return container; + } + + foreach (var key in json.Keys) + { + if (true == excludes?.Contains(key)) + { + continue; + } + + var value = json[key]; + try + { + switch (value.Type) + { + case JsonType.Null: + // skip null values. + continue; + + case JsonType.Array: + case JsonType.Boolean: + case JsonType.Date: + case JsonType.Binary: + case JsonType.Number: + case JsonType.String: + container.Add(key, (V)value.ToValue()); + break; + case JsonType.Object: + if (objectFactory != null) + { + var v = objectFactory(value as JsonObject); + if (null != v) + { + container.Add(key, v); + } + } + break; + } + } + catch + { + } + } + return container; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Customizations/JsonArray.cs b/src/Cdn/generated/runtime/Customizations/JsonArray.cs new file mode 100644 index 000000000000..774ff3c2f423 --- /dev/null +++ b/src/Cdn/generated/runtime/Customizations/JsonArray.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public partial class JsonArray + { + internal override object ToValue() => Count == 0 ? new object[0] : System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Select(this, each => each.ToValue())); + } + + +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Customizations/JsonBoolean.cs b/src/Cdn/generated/runtime/Customizations/JsonBoolean.cs new file mode 100644 index 000000000000..29bfcbf94803 --- /dev/null +++ b/src/Cdn/generated/runtime/Customizations/JsonBoolean.cs @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal partial class JsonBoolean + { + internal static JsonBoolean Create(bool? value) => value is bool b ? new JsonBoolean(b) : null; + internal bool ToBoolean() => Value; + + internal override object ToValue() => Value; + } + + +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Customizations/JsonNode.cs b/src/Cdn/generated/runtime/Customizations/JsonNode.cs new file mode 100644 index 000000000000..387a517fb26d --- /dev/null +++ b/src/Cdn/generated/runtime/Customizations/JsonNode.cs @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + using System; + using System.Collections.Generic; + + public partial class JsonNode + { + /// + /// Returns the content of this node as the underlying value. + /// Will default to the string representation if not overridden in child classes. + /// + /// an object with the underlying value of the node. + internal virtual object ToValue() { + return this.ToString(); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Customizations/JsonNumber.cs b/src/Cdn/generated/runtime/Customizations/JsonNumber.cs new file mode 100644 index 000000000000..04d1ff374bec --- /dev/null +++ b/src/Cdn/generated/runtime/Customizations/JsonNumber.cs @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + using System; + + public partial class JsonNumber + { + internal static readonly DateTime EpochDate = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); + private static long ToUnixTime(DateTime dateTime) + { + return (long)dateTime.Subtract(EpochDate).TotalSeconds; + } + private static DateTime FromUnixTime(long totalSeconds) + { + return EpochDate.AddSeconds(totalSeconds); + } + internal byte ToByte() => this; + internal int ToInt() => this; + internal long ToLong() => this; + internal short ToShort() => this; + internal UInt16 ToUInt16() => this; + internal UInt32 ToUInt32() => this; + internal UInt64 ToUInt64() => this; + internal decimal ToDecimal() => this; + internal double ToDouble() => this; + internal float ToFloat() => this; + + internal static JsonNumber Create(int? value) => value is int n ? new JsonNumber(n) : null; + internal static JsonNumber Create(long? value) => value is long n ? new JsonNumber(n) : null; + internal static JsonNumber Create(float? value) => value is float n ? new JsonNumber(n) : null; + internal static JsonNumber Create(double? value) => value is double n ? new JsonNumber(n) : null; + internal static JsonNumber Create(decimal? value) => value is decimal n ? new JsonNumber(n) : null; + internal static JsonNumber Create(DateTime? value) => value is DateTime date ? new JsonNumber(ToUnixTime(date)) : null; + + public static implicit operator DateTime(JsonNumber number) => FromUnixTime(number); + internal DateTime ToDateTime() => this; + + internal JsonNumber(decimal value) + { + this.value = value.ToString(); + } + internal override object ToValue() + { + if (IsInteger) + { + if (int.TryParse(this.value, out int iValue)) + { + return iValue; + } + if (long.TryParse(this.value, out long lValue)) + { + return lValue; + } + } + else + { + if (float.TryParse(this.value, out float fValue)) + { + return fValue; + } + if (double.TryParse(this.value, out double dValue)) + { + return dValue; + } + if (decimal.TryParse(this.value, out decimal dcValue)) + { + return dcValue; + } + } + return null; + } + } + + +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Customizations/JsonObject.cs b/src/Cdn/generated/runtime/Customizations/JsonObject.cs new file mode 100644 index 000000000000..1774b294bc1b --- /dev/null +++ b/src/Cdn/generated/runtime/Customizations/JsonObject.cs @@ -0,0 +1,183 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + using System; + using System.Collections.Generic; + + public partial class JsonObject + { + internal override object ToValue() => Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.JsonSerializable.FromJson(this, new System.Collections.Generic.Dictionary(), (obj) => obj.ToValue()); + + internal void SafeAdd(string name, Func valueFn) + { + if (valueFn != null) + { + var value = valueFn(); + if (null != value) + { + items.Add(name, value); + } + } + } + + internal void SafeAdd(string name, JsonNode value) + { + if (null != value) + { + items.Add(name, value); + } + } + + internal T NullableProperty(string propertyName) where T : JsonNode + { + if (this.TryGetValue(propertyName, out JsonNode value)) + { + if (value.IsNull) + { + return null; + } + if (value is T tval) + { + return tval; + } + /* it's present, but not the correct type... */ + //throw new Exception($"Property {propertyName} in object expected type {typeof(T).Name} but value of type {value.Type.ToString()} was found."); + } + return null; + } + + internal JsonObject Property(string propertyName) + { + return PropertyT(propertyName); + } + + internal T PropertyT(string propertyName) where T : JsonNode + { + if (this.TryGetValue(propertyName, out JsonNode value)) + { + if (value.IsNull) + { + return null; // we're going to assume that the consumer knows what to do if null is explicity returned? + } + + if (value is T tval) + { + return tval; + } + /* it's present, but not the correct type... */ + // throw new Exception($"Property {propertyName} in object expected type {typeof(T).Name} but value of type {value.Type.ToString()} was found."); + } + return null; + } + + internal int NumberProperty(string propertyName, ref int output) => output = this.PropertyT(propertyName)?.ToInt() ?? output; + internal float NumberProperty(string propertyName, ref float output) => output = this.PropertyT(propertyName)?.ToFloat() ?? output; + internal byte NumberProperty(string propertyName, ref byte output) => output = this.PropertyT(propertyName)?.ToByte() ?? output; + internal long NumberProperty(string propertyName, ref long output) => output = this.PropertyT(propertyName)?.ToLong() ?? output; + internal double NumberProperty(string propertyName, ref double output) => output = this.PropertyT(propertyName)?.ToDouble() ?? output; + internal decimal NumberProperty(string propertyName, ref decimal output) => output = this.PropertyT(propertyName)?.ToDecimal() ?? output; + internal short NumberProperty(string propertyName, ref short output) => output = this.PropertyT(propertyName)?.ToShort() ?? output; + internal DateTime NumberProperty(string propertyName, ref DateTime output) => output = this.PropertyT(propertyName)?.ToDateTime() ?? output; + + internal int? NumberProperty(string propertyName, ref int? output) => output = this.NullableProperty(propertyName)?.ToInt() ?? null; + internal float? NumberProperty(string propertyName, ref float? output) => output = this.NullableProperty(propertyName)?.ToFloat() ?? null; + internal byte? NumberProperty(string propertyName, ref byte? output) => output = this.NullableProperty(propertyName)?.ToByte() ?? null; + internal long? NumberProperty(string propertyName, ref long? output) => output = this.NullableProperty(propertyName)?.ToLong() ?? null; + internal double? NumberProperty(string propertyName, ref double? output) => output = this.NullableProperty(propertyName)?.ToDouble() ?? null; + internal decimal? NumberProperty(string propertyName, ref decimal? output) => output = this.NullableProperty(propertyName)?.ToDecimal() ?? null; + internal short? NumberProperty(string propertyName, ref short? output) => output = this.NullableProperty(propertyName)?.ToShort() ?? null; + + internal DateTime? NumberProperty(string propertyName, ref DateTime? output) => output = this.NullableProperty(propertyName)?.ToDateTime() ?? null; + + + internal string StringProperty(string propertyName) => this.PropertyT(propertyName)?.ToString(); + internal string StringProperty(string propertyName, ref string output) => output = this.PropertyT(propertyName)?.ToString() ?? output; + internal char StringProperty(string propertyName, ref char output) => output = this.PropertyT(propertyName)?.ToChar() ?? output; + internal char? StringProperty(string propertyName, ref char? output) => output = this.PropertyT(propertyName)?.ToChar() ?? null; + + internal DateTime StringProperty(string propertyName, ref DateTime output) => DateTime.TryParse(this.PropertyT(propertyName)?.ToString(), out output) ? output : output; + internal DateTime? StringProperty(string propertyName, ref DateTime? output) => output = DateTime.TryParse(this.PropertyT(propertyName)?.ToString(), out var o) ? o : output; + + + internal bool BooleanProperty(string propertyName, ref bool output) => output = this.PropertyT(propertyName)?.ToBoolean() ?? output; + internal bool? BooleanProperty(string propertyName, ref bool? output) => output = this.PropertyT(propertyName)?.ToBoolean() ?? null; + + internal T[] ArrayProperty(string propertyName, ref T[] output, Func deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + output = new T[array.Count]; + for (var i = 0; i < output.Length; i++) + { + output[i] = deserializer(array[i]); + } + } + return output; + } + internal T[] ArrayProperty(string propertyName, Func deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + var output = new T[array.Count]; + for (var i = 0; i < output.Length; i++) + { + output[i] = deserializer(array[i]); + } + return output; + } + return new T[0]; + } + internal void IterateArrayProperty(string propertyName, Action deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + for (var i = 0; i < array.Count; i++) + { + deserializer(array[i]); + } + } + } + + internal Dictionary DictionaryProperty(string propertyName, ref Dictionary output, Func deserializer) + { + var dictionary = this.PropertyT(propertyName); + if (output == null) + { + output = new Dictionary(); + } + else + { + output.Clear(); + } + if (dictionary != null) + { + foreach (var key in dictionary.Keys) + { + output[key] = deserializer(dictionary[key]); + } + } + return output; + } + + internal static JsonObject Create(IDictionary source, Func selector) + { + if (source == null || selector == null) + { + return null; + } + var result = new JsonObject(); + + foreach (var key in source.Keys) + { + result.SafeAdd(key, selector(source[key])); + } + return result; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Customizations/JsonString.cs b/src/Cdn/generated/runtime/Customizations/JsonString.cs new file mode 100644 index 000000000000..ec588d6f956d --- /dev/null +++ b/src/Cdn/generated/runtime/Customizations/JsonString.cs @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + using System; + using System.Globalization; + using System.Linq; + + public partial class JsonString + { + internal static string DateFormat = "yyyy-MM-dd"; + internal static string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK"; + internal static string DateTimeRfc1123Format = "R"; + + internal static JsonString Create(string value) => value == null ? null : new JsonString(value); + internal static JsonString Create(char? value) => value is char c ? new JsonString(c.ToString()) : null; + + internal static JsonString CreateDate(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateFormat, CultureInfo.CurrentCulture)) : null; + internal static JsonString CreateDateTime(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateTimeFormat, CultureInfo.CurrentCulture)) : null; + internal static JsonString CreateDateTimeRfc1123(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateTimeRfc1123Format, CultureInfo.CurrentCulture)) : null; + + internal char ToChar() => this.Value?.ToString()?.FirstOrDefault() ?? default(char); + public static implicit operator char(JsonString value) => value?.ToString()?.FirstOrDefault() ?? default(char); + public static implicit operator char? (JsonString value) => value?.ToString()?.FirstOrDefault(); + + public static implicit operator DateTime(JsonString value) => DateTime.TryParse(value, out var output) ? output : default(DateTime); + public static implicit operator DateTime? (JsonString value) => DateTime.TryParse(value, out var output) ? output : default(DateTime?); + + } + + +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Customizations/XNodeArray.cs b/src/Cdn/generated/runtime/Customizations/XNodeArray.cs new file mode 100644 index 000000000000..f65717ad135e --- /dev/null +++ b/src/Cdn/generated/runtime/Customizations/XNodeArray.cs @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + using System; + using System.Linq; + + public partial class XNodeArray + { + internal static XNodeArray Create(T[] source, Func selector) + { + if (source == null || selector == null) + { + return null; + } + var result = new XNodeArray(); + foreach (var item in source.Select(selector)) + { + result.SafeAdd(item); + } + return result; + } + internal void SafeAdd(JsonNode item) + { + if (item != null) + { + items.Add(item); + } + } + internal void SafeAdd(Func itemFn) + { + if (itemFn != null) + { + var item = itemFn(); + if (item != null) + { + items.Add(item); + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Debugging.cs b/src/Cdn/generated/runtime/Debugging.cs new file mode 100644 index 000000000000..8b08f7a40c30 --- /dev/null +++ b/src/Cdn/generated/runtime/Debugging.cs @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + internal static class AttachDebugger + { + internal static void Break() + { + while (!System.Diagnostics.Debugger.IsAttached) + { + System.Console.Error.WriteLine($"Waiting for debugger to attach to process {System.Diagnostics.Process.GetCurrentProcess().Id}"); + for (int i = 0; i < 50; i++) + { + if (System.Diagnostics.Debugger.IsAttached) + { + break; + } + System.Threading.Thread.Sleep(100); + System.Console.Error.Write("."); + } + System.Console.Error.WriteLine(); + } + System.Diagnostics.Debugger.Break(); + } + } +} diff --git a/src/Cdn/generated/runtime/DictionaryExtensions.cs b/src/Cdn/generated/runtime/DictionaryExtensions.cs new file mode 100644 index 000000000000..eef33e2890bf --- /dev/null +++ b/src/Cdn/generated/runtime/DictionaryExtensions.cs @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + internal static class DictionaryExtensions + { + internal static void HashTableToDictionary(System.Collections.Hashtable hashtable, System.Collections.Generic.IDictionary dictionary) + { + if (null == hashtable) + { + return; + } + foreach (var each in hashtable.Keys) + { + var key = each.ToString(); + var value = hashtable[key]; + if (null != value) + { + try + { + dictionary[key] = (V)value; + } + catch + { + // Values getting dropped; not compatible with target dictionary. Not sure what to do here. + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/EventData.cs b/src/Cdn/generated/runtime/EventData.cs new file mode 100644 index 000000000000..18e88ee8e8e5 --- /dev/null +++ b/src/Cdn/generated/runtime/EventData.cs @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + + using System; + using System.Threading; + + ///Represents the data in signaled event. + public partial class EventData + { + /// + /// The type of the event being signaled + /// + public string Id; + + /// + /// The user-ready message from the event. + /// + public string Message; + + /// + /// When the event is about a parameter, this is the parameter name. + /// Used in Validation Events + /// + public string Parameter; + + /// + /// This represents a numeric value associated with the event. + /// Use for progress-style events + /// + public double Value; + + /// + /// Any extended data for an event should be serialized and stored here. + /// + public string ExtendedData; + + /// + /// If the event triggers after the request message has been created, this will contain the Request Message (which in HTTP calls would be HttpRequestMessage) + /// + /// Typically you'd cast this to the expected type to use it: + /// + /// if(eventData.RequestMessgae is HttpRequestMessage httpRequest) + /// { + /// httpRequest.Headers.Add("x-request-flavor", "vanilla"); + /// } + /// + /// + public object RequestMessage; + + /// + /// If the event triggers after the response is back, this will contain the Response Message (which in HTTP calls would be HttpResponseMessage) + /// + /// Typically you'd cast this to the expected type to use it: + /// + /// if(eventData.ResponseMessage is HttpResponseMessage httpResponse){ + /// var flavor = httpResponse.Headers.GetValue("x-request-flavor"); + /// } + /// + /// + public object ResponseMessage; + + /// + /// Cancellation method for this event. + /// + /// If the event consumer wishes to cancel the request that initiated this event, call Cancel() + /// + /// + /// The original initiator of the request must provide the implementation of this. + /// + public System.Action Cancel; + } + +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/EventDataExtensions.cs b/src/Cdn/generated/runtime/EventDataExtensions.cs new file mode 100644 index 000000000000..f21ba7d5b4df --- /dev/null +++ b/src/Cdn/generated/runtime/EventDataExtensions.cs @@ -0,0 +1,94 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + using System; + + [System.ComponentModel.TypeConverter(typeof(EventDataConverter))] + /// + /// PowerShell-specific data on top of the llc# EventData + /// + /// + /// In PowerShell, we add on the EventDataConverter to support sending events between modules. + /// Obviously, this code would need to be duplcated on both modules. + /// This is preferable to sharing a common library, as versioning makes that problematic. + /// + public partial class EventData : EventArgs + { + } + + /// + /// A PowerShell PSTypeConverter to adapt an EventData object that has been passed. + /// Usually used between modules. + /// + public class EventDataConverter : System.Management.Automation.PSTypeConverter + { + public override bool CanConvertTo(object sourceValue, Type destinationType) => false; + public override object ConvertTo(object sourceValue, Type destinationType, IFormatProvider formatProvider, bool ignoreCase) => null; + public override bool CanConvertFrom(dynamic sourceValue, Type destinationType) => destinationType == typeof(EventData) && CanConvertFrom(sourceValue); + public override object ConvertFrom(dynamic sourceValue, Type destinationType, IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Verifies that a given object has the required members to convert it to the target type (EventData) + /// + /// Uses a dynamic type so that it is able to use the simplest code without excessive checking. + /// + /// The instance to verify + /// True, if the object has all the required parameters. + public static bool CanConvertFrom(dynamic sourceValue) + { + try + { + // check if this has *required* parameters... + sourceValue?.Id?.GetType(); + sourceValue?.Message?.GetType(); + sourceValue?.Cancel?.GetType(); + + // remaining parameters are not *required*, + // and if they have values, it will copy them at conversion time. + } + catch + { + // if anything throws an exception (because it's null, or doesn't have that member) + return false; + } + return true; + } + + /// + /// Returns result of the delegate as the expected type, or default(T) + /// + /// This isolates any exceptions from the consumer. + /// + /// A delegate that returns a value + /// The desired output type + /// The value from the function if the type is correct + private static T To(Func srcValue) + { + try { return srcValue(); } + catch { return default(T); } + } + + /// + /// Converts an incoming object to the expected type by treating the incoming object as a dynamic, and coping the expected values. + /// + /// the incoming object + /// EventData + public static EventData ConvertFrom(dynamic sourceValue) + { + return new EventData + { + Id = To(() => sourceValue.Id), + Message = To(() => sourceValue.Message), + Parameter = To(() => sourceValue.Parameter), + Value = To(() => sourceValue.Value), + RequestMessage = To(() => sourceValue.RequestMessage), + ResponseMessage = To(() => sourceValue.ResponseMessage), + Cancel = To(() => sourceValue.Cancel) + }; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/EventListener.cs b/src/Cdn/generated/runtime/EventListener.cs new file mode 100644 index 000000000000..68af7a3a6306 --- /dev/null +++ b/src/Cdn/generated/runtime/EventListener.cs @@ -0,0 +1,247 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + + using System; + using System.Linq; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData = System.Func; + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public interface IValidates + { + Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IEventListener listener); + } + + /// + /// The IEventListener Interface defines the communication mechanism for Signaling events during a remote call. + /// + /// + /// The interface is designed to be as minimal as possible, allow for quick peeking of the event type (id) + /// and the cancellation status and provides a delegate for retrieving the event details themselves. + /// + public interface IEventListener + { + Task Signal(string id, CancellationToken token, GetEventData createMessage); + CancellationToken Token { get; } + System.Action Cancel { get; } + } + + internal static partial class Extensions + { + public static Task Signal(this IEventListener instance, string id, CancellationToken token, Func createMessage) => instance.Signal(id, token, createMessage); + public static Task Signal(this IEventListener instance, string id, CancellationToken token) => instance.Signal(id, token, () => new EventData { Id = id, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpRequestMessage request, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = request, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, EventData message) => instance.Signal(id, token, () => { message.Id = id; message.Cancel = instance.Cancel; return message; }); + + public static Task Signal(this IEventListener instance, string id, Func createMessage) => instance.Signal(id, instance.Token, createMessage); + public static Task Signal(this IEventListener instance, string id) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpRequestMessage request, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = request, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, EventData message) => instance.Signal(id, instance.Token, () => { message.Id = id; message.Cancel = instance.Cancel; return message; }); + + public static Task Signal(this IEventListener instance, string id, System.Uri uri) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = uri.ToString(), Cancel = instance.Cancel }); + + public static async Task AssertNotNull(this IEventListener instance, string parameterName, object value) + { + if (value == null) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' should not be null", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertMinimumLength(this IEventListener instance, string parameterName, string value, int length) + { + if (value != null && value.Length < length) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, Message = $"Length of '{parameterName}' is less than {length}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertMaximumLength(this IEventListener instance, string parameterName, string value, int length) + { + if (value != null && value.Length > length) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, Message = $"Length of '{parameterName}' is greater than {length}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + + public static async Task AssertRegEx(this IEventListener instance, string parameterName, string value, string regularExpression) + { + if (value != null && !System.Text.RegularExpressions.Regex.Match(value, regularExpression).Success) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' does not validate against pattern /{regularExpression}/", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertEnum(this IEventListener instance, string parameterName, string value, params string[] values) + { + if (!values.Any(each => each.Equals(value))) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' is not one of ({values.Aggregate((c, e) => $"'{e}',{c}")}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertObjectIsValid(this IEventListener instance, string parameterName, object inst) + { + await (inst as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.IValidates)?.Validate(instance); + } + + public static async Task AssertIsLessThan(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) >= 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be less than {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsGreaterThan(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) <= 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be greater than {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsLessThanOrEqual(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) > 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be less than or equal to {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsGreaterThanOrEqual(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) < 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be greater than or equal to {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, Int64? value, Int64 multiple) + { + if (null != value && value % multiple != 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, double? value, double multiple) + { + if (null != value) + { + var i = (Int64)(value / multiple); + if (i != value / multiple) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, decimal? value, decimal multiple) + { + if (null != value) + { + var i = (Int64)(value / multiple); + if (i != value / multiple) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + } + } + + /// + /// An Implementation of the IEventListener that supports subscribing to events and dispatching them + /// (used for manually using the lowlevel interface) + /// + public class EventListener : CancellationTokenSource, IEnumerable>, IEventListener + { + private Dictionary calls = new Dictionary(); + public IEnumerator> GetEnumerator() => calls.GetEnumerator(); + IEnumerator IEnumerable.GetEnumerator() => calls.GetEnumerator(); + public EventListener() + { + } + + public new Action Cancel => base.Cancel; + private Event tracer; + + public EventListener(params (string name, Event callback)[] initializer) + { + foreach (var each in initializer) + { + Add(each.name, each.callback); + } + } + + public void Add(string name, SynchEvent callback) + { + Add(name, (message) => { callback(message); return Task.CompletedTask; }); + } + + public void Add(string name, Event callback) + { + if (callback != null) + { + if (string.IsNullOrEmpty(name)) + { + if (calls.ContainsKey(name)) + { + tracer += callback; + } + else + { + tracer = callback; + } + } + else + { + if (calls.ContainsKey(name)) + { + calls[name ?? System.String.Empty] += callback; + } + else + { + calls[name ?? System.String.Empty] = callback; + } + } + } + } + + + public async Task Signal(string id, CancellationToken token, GetEventData createMessage) + { + using (NoSynchronizationContext) + { + if (!string.IsNullOrEmpty(id) && (calls.TryGetValue(id, out Event listener) || tracer != null)) + { + var message = createMessage(); + message.Id = id; + + await listener?.Invoke(message); + await tracer?.Invoke(message); + + if (token.IsCancellationRequested) + { + throw new OperationCanceledException($"Canceled by event {id} ", this.Token); + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Events.cs b/src/Cdn/generated/runtime/Events.cs new file mode 100644 index 000000000000..d6ff12d994a2 --- /dev/null +++ b/src/Cdn/generated/runtime/Events.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + public static partial class Events + { + public const string Log = nameof(Log); + public const string Validation = nameof(Validation); + public const string ValidationWarning = nameof(ValidationWarning); + public const string AfterValidation = nameof(AfterValidation); + public const string RequestCreated = nameof(RequestCreated); + public const string ResponseCreated = nameof(ResponseCreated); + public const string URLCreated = nameof(URLCreated); + public const string Finally = nameof(Finally); + public const string HeaderParametersAdded = nameof(HeaderParametersAdded); + public const string BodyContentSet = nameof(BodyContentSet); + public const string BeforeCall = nameof(BeforeCall); + public const string BeforeResponseDispatch = nameof(BeforeResponseDispatch); + public const string FollowingNextLink = nameof(FollowingNextLink); + public const string DelayBeforePolling = nameof(DelayBeforePolling); + public const string Polling = nameof(Polling); + + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/EventsExtensions.cs b/src/Cdn/generated/runtime/EventsExtensions.cs new file mode 100644 index 000000000000..71d12bf3a2ac --- /dev/null +++ b/src/Cdn/generated/runtime/EventsExtensions.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + public static partial class Events + { + public const string CmdletProcessRecordStart = nameof(CmdletProcessRecordStart); + public const string CmdletProcessRecordAsyncStart = nameof(CmdletProcessRecordAsyncStart); + public const string CmdletException = nameof(CmdletException); + public const string CmdletGetPipeline = nameof(CmdletGetPipeline); + public const string CmdletBeforeAPICall = nameof(CmdletBeforeAPICall); + public const string CmdletBeginProcessing = nameof(CmdletBeginProcessing); + public const string CmdletEndProcessing = nameof(CmdletEndProcessing); + public const string CmdletProcessRecordEnd = nameof(CmdletProcessRecordEnd); + public const string CmdletProcessRecordAsyncEnd = nameof(CmdletProcessRecordAsyncEnd); + public const string CmdletAfterAPICall = nameof(CmdletAfterAPICall); + + public const string Verbose = nameof(Verbose); + public const string Debug = nameof(Debug); + public const string Information = nameof(Information); + public const string Error = nameof(Error); + public const string Warning = nameof(Warning); + } + +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Extensions.cs b/src/Cdn/generated/runtime/Extensions.cs new file mode 100644 index 000000000000..0fbd64b40d61 --- /dev/null +++ b/src/Cdn/generated/runtime/Extensions.cs @@ -0,0 +1,117 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + using System.Linq; + using System; + + internal static partial class Extensions + { + public static T[] SubArray(this T[] array, int offset, int length) + { + return new ArraySegment(array, offset, length) + .ToArray(); + } + + public static T ReadHeaders(this T instance, global::System.Net.Http.Headers.HttpResponseHeaders headers) where T : class + { + (instance as IHeaderSerializable)?.ReadHeaders(headers); + return instance; + } + + internal static bool If(T input, out T output) + { + if (null == input) + { + output = default(T); + return false; + } + output = input; + return true; + } + + internal static void AddIf(T value, System.Action addMethod) + { + // if value is present (and it's not just an empty JSON Object) + if (null != value && (value as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject)?.Keys.Count != 0) + { + addMethod(value); + } + } + + internal static void AddIf(T value, string serializedName, System.Action addMethod) + { + // if value is present (and it's not just an empty JSON Object) + if (null != value && (value as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject)?.Keys.Count != 0) + { + addMethod(serializedName, value); + } + } + + /// + /// Returns the first header value as a string from an HttpReponseMessage. + /// + /// the HttpResponseMessage to fetch a header from + /// the header name + /// the first header value as a string from an HttpReponseMessage. string.empty if there is no header value matching + internal static string GetFirstHeader(this System.Net.Http.HttpResponseMessage response, string headerName) => response.Headers.FirstOrDefault(each => string.Equals(headerName, each.Key, System.StringComparison.OrdinalIgnoreCase)).Value?.FirstOrDefault() ?? string.Empty; + + /// + /// Sets the Synchronization Context to null, and returns an IDisposable that when disposed, + /// will restore the synchonization context to the original value. + /// + /// This is used a less-invasive means to ensure that code in the library that doesn't + /// need to be continued in the original context doesn't have to have ConfigureAwait(false) + /// on every single await + /// + /// If the SynchronizationContext is null when this is used, the resulting IDisposable + /// will not do anything (this prevents excessive re-setting of the SynchronizationContext) + /// + /// Usage: + /// + /// using(NoSynchronizationContext) { + /// await SomeAsyncOperation(); + /// await SomeOtherOperation(); + /// } + /// + /// + /// + /// An IDisposable that will return the SynchronizationContext to original state + internal static System.IDisposable NoSynchronizationContext => System.Threading.SynchronizationContext.Current == null ? Dummy : new NoSyncContext(); + + /// + /// An instance of the Dummy IDispoable. + /// + /// + internal static System.IDisposable Dummy = new DummyDisposable(); + + /// + /// An IDisposable that does absolutely nothing. + /// + internal class DummyDisposable : System.IDisposable + { + public void Dispose() + { + } + } + /// + /// An IDisposable that saves the SynchronizationContext,sets it to null and + /// restores it to the original upon Dispose(). + /// + /// NOTE: This is designed to be less invasive than using .ConfigureAwait(false) + /// on every single await in library code (ie, places where we know we don't need + /// to continue in the same context as we went async) + /// + internal class NoSyncContext : System.IDisposable + { + private System.Threading.SynchronizationContext original = System.Threading.SynchronizationContext.Current; + internal NoSyncContext() + { + System.Threading.SynchronizationContext.SetSynchronizationContext(null); + } + public void Dispose() => System.Threading.SynchronizationContext.SetSynchronizationContext(original); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs b/src/Cdn/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs new file mode 100644 index 000000000000..5290446c13b7 --- /dev/null +++ b/src/Cdn/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal static class StringBuilderExtensions + { + /// + /// Extracts the buffered value and resets the buffer + /// + internal static string Extract(this StringBuilder builder) + { + var text = builder.ToString(); + + builder.Clear(); + + return text; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Helpers/Extensions/TypeExtensions.cs b/src/Cdn/generated/runtime/Helpers/Extensions/TypeExtensions.cs new file mode 100644 index 000000000000..7814c932e644 --- /dev/null +++ b/src/Cdn/generated/runtime/Helpers/Extensions/TypeExtensions.cs @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal static class TypeExtensions + { + internal static bool IsNullable(this Type type) => + type.IsGenericType && type.GetGenericTypeDefinition().Equals(typeof(Nullable<>)); + + internal static Type GetOpenGenericInterface(this Type candidateType, Type openGenericInterfaceType) + { + + if (candidateType.IsGenericType && candidateType.GetGenericTypeDefinition() == openGenericInterfaceType) + { + return candidateType; + } + + // Check if it references it's own converter.... + + foreach (Type interfaceType in candidateType.GetInterfaces()) + { + if (interfaceType.IsGenericType + && interfaceType.GetGenericTypeDefinition().Equals(openGenericInterfaceType)) + { + return interfaceType; + } + } + + return null; + } + + // Author: Sebastian Good + // http://stackoverflow.com/questions/503263/how-to-determine-if-a-type-implements-a-specific-generic-interface-type + internal static bool ImplementsOpenGenericInterface(this Type candidateType, Type openGenericInterfaceType) + { + if (candidateType.Equals(openGenericInterfaceType)) + { + return true; + } + + if (candidateType.IsGenericType && candidateType.GetGenericTypeDefinition().Equals(openGenericInterfaceType)) + { + return true; + } + + foreach (Type i in candidateType.GetInterfaces()) + { + if (i.IsGenericType && i.ImplementsOpenGenericInterface(openGenericInterfaceType)) + { + return true; + } + } + + return false; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Helpers/Seperator.cs b/src/Cdn/generated/runtime/Helpers/Seperator.cs new file mode 100644 index 000000000000..b54b3e9831ef --- /dev/null +++ b/src/Cdn/generated/runtime/Helpers/Seperator.cs @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal static class Seperator + { + internal static readonly char[] Dash = { '-' }; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Helpers/TypeDetails.cs b/src/Cdn/generated/runtime/Helpers/TypeDetails.cs new file mode 100644 index 000000000000..201665ba1829 --- /dev/null +++ b/src/Cdn/generated/runtime/Helpers/TypeDetails.cs @@ -0,0 +1,116 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + + + + internal class TypeDetails + { + private readonly Type info; + + internal TypeDetails(Type info) + { + this.info = info ?? throw new ArgumentNullException(nameof(info)); + } + + internal Type NonNullType { get; set; } + + internal object DefaultValue { get; set; } + + internal bool IsNullable { get; set; } + + internal bool IsList { get; set; } + + internal bool IsStringLike { get; set; } + + internal bool IsEnum => info.IsEnum; + + internal bool IsArray => info.IsArray; + + internal bool IsValueType => info.IsValueType; + + internal Type ElementType { get; set; } + + internal IJsonConverter JsonConverter { get; set; } + + #region Creation + + private static readonly ConcurrentDictionary cache = new ConcurrentDictionary(); + + internal static TypeDetails Get() => Get(typeof(T)); + + internal static TypeDetails Get(Type type) => cache.GetOrAdd(type, Create); + + private static TypeDetails Create(Type type) + { + var isGenericList = !type.IsPrimitive && type.ImplementsOpenGenericInterface(typeof(IList<>)); + var isList = !type.IsPrimitive && (isGenericList || typeof(IList).IsAssignableFrom(type)); + + var isNullable = type.IsNullable(); + + Type elementType; + + if (type.IsArray) + { + elementType = type.GetElementType(); + } + else if (isGenericList) + { + var iList = type.GetOpenGenericInterface(typeof(IList<>)); + + elementType = iList.GetGenericArguments()[0]; + } + else + { + elementType = null; + } + + var nonNullType = isNullable ? type.GetGenericArguments()[0] : type; + + var isStringLike = false; + + IJsonConverter converter; + + var jsonConverterAttribute = type.GetCustomAttribute(); + + if (jsonConverterAttribute != null) + { + converter = jsonConverterAttribute.Converter; + } + else if (nonNullType.IsEnum) + { + converter = new EnumConverter(nonNullType); + } + else if (JsonConverterFactory.Instances.TryGetValue(nonNullType, out converter)) + { + } + else if (StringLikeHelper.IsStringLike(nonNullType)) + { + isStringLike = true; + + converter = new StringLikeConverter(nonNullType); + } + + return new TypeDetails(nonNullType) { + NonNullType = nonNullType, + DefaultValue = type.IsValueType ? Activator.CreateInstance(type) : null, + IsNullable = isNullable, + IsList = isList, + IsStringLike = isStringLike, + ElementType = elementType, + JsonConverter = converter + }; + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Helpers/XHelper.cs b/src/Cdn/generated/runtime/Helpers/XHelper.cs new file mode 100644 index 000000000000..cb810c0993ce --- /dev/null +++ b/src/Cdn/generated/runtime/Helpers/XHelper.cs @@ -0,0 +1,75 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal static class XHelper + { + internal static JsonNode Create(JsonType type, TypeCode code, object value) + { + switch (type) + { + case JsonType.Binary : return new XBinary((byte[])value); + case JsonType.Boolean : return new JsonBoolean((bool)value); + case JsonType.Number : return new JsonNumber(value.ToString()); + case JsonType.String : return new JsonString((string)value); + } + + throw new Exception($"JsonType '{type}' does not have a fast conversion"); + } + + internal static bool TryGetElementType(TypeCode code, out JsonType type) + { + switch (code) + { + case TypeCode.Boolean : type = JsonType.Boolean; return true; + case TypeCode.Byte : type = JsonType.Number; return true; + case TypeCode.DateTime : type = JsonType.Date; return true; + case TypeCode.Decimal : type = JsonType.Number; return true; + case TypeCode.Double : type = JsonType.Number; return true; + case TypeCode.Empty : type = JsonType.Null; return true; + case TypeCode.Int16 : type = JsonType.Number; return true; + case TypeCode.Int32 : type = JsonType.Number; return true; + case TypeCode.Int64 : type = JsonType.Number; return true; + case TypeCode.SByte : type = JsonType.Number; return true; + case TypeCode.Single : type = JsonType.Number; return true; + case TypeCode.String : type = JsonType.String; return true; + case TypeCode.UInt16 : type = JsonType.Number; return true; + case TypeCode.UInt32 : type = JsonType.Number; return true; + case TypeCode.UInt64 : type = JsonType.Number; return true; + } + + type = default; + + return false; + } + + internal static JsonType GetElementType(TypeCode code) + { + switch (code) + { + case TypeCode.Boolean : return JsonType.Boolean; + case TypeCode.Byte : return JsonType.Number; + case TypeCode.DateTime : return JsonType.Date; + case TypeCode.Decimal : return JsonType.Number; + case TypeCode.Double : return JsonType.Number; + case TypeCode.Empty : return JsonType.Null; + case TypeCode.Int16 : return JsonType.Number; + case TypeCode.Int32 : return JsonType.Number; + case TypeCode.Int64 : return JsonType.Number; + case TypeCode.SByte : return JsonType.Number; + case TypeCode.Single : return JsonType.Number; + case TypeCode.String : return JsonType.String; + case TypeCode.UInt16 : return JsonType.Number; + case TypeCode.UInt32 : return JsonType.Number; + case TypeCode.UInt64 : return JsonType.Number; + default : return JsonType.Object; + } + + throw new Exception($"TypeCode '{code}' does not have a fast converter"); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/HttpPipeline.cs b/src/Cdn/generated/runtime/HttpPipeline.cs new file mode 100644 index 000000000000..576055775a08 --- /dev/null +++ b/src/Cdn/generated/runtime/HttpPipeline.cs @@ -0,0 +1,88 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + using System.Net.Http; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + using System.Collections; + using System.Linq; + + using GetEventData = System.Func; + using NextDelegate = System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>; + + using SignalDelegate = System.Func, System.Threading.Tasks.Task>; + using GetParameterDelegate = System.Func, string, object>; + using SendAsyncStepDelegate = System.Func, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>; + using PipelineChangeDelegate = System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>; + using ModuleLoadPipelineDelegate = System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>, System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>>; + using NewRequestPipelineDelegate = System.Action, System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>, System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>>; + +/* + public class DelegateBasedEventListener : IEventListener + { + private EventListenerDelegate _listener; + public DelegateBasedEventListener(EventListenerDelegate listener) + { + _listener = listener; + } + public CancellationToken Token => CancellationToken.None; + public System.Action Cancel => () => { }; + + + public Task Signal(string id, CancellationToken token, GetEventData createMessage) + { + return _listener(id, token, () => createMessage()); + } + } +*/ + /// + /// This is a necessary extension to the SendAsyncFactory to support the 'generic' delegate format. + /// + public partial class SendAsyncFactory + { + /// + /// This translates a generic-defined delegate for a listener into one that fits our ISendAsync pattern. + /// (Provided to support out-of-module delegation for Azure Cmdlets) + /// + /// The Pipeline Step as a delegate + public SendAsyncFactory(SendAsyncStepDelegate step) => this.implementation = (request, listener, next) => + step( + request, + listener.Token, + listener.Cancel, + (id, token, getEventData) => listener.Signal(id, token, () => { + var data = EventDataConverter.ConvertFrom( getEventData() ) as EventData; + data.Id = id; + data.Cancel = listener.Cancel; + data.RequestMessage = request; + return data; + }), + (req, token, cancel, listenerDelegate) => next.SendAsync(req, listener)); + } + + public partial class HttpPipeline : ISendAsync + { + public HttpPipeline Append(SendAsyncStepDelegate item) + { + if (item != null) + { + Append(new SendAsyncFactory(item)); + } + return this; + } + + public HttpPipeline Prepend(SendAsyncStepDelegate item) + { + if (item != null) + { + Prepend(new SendAsyncFactory(item)); + } + return this; + } + } +} diff --git a/src/Cdn/generated/runtime/HttpPipelineMocking.ps1 b/src/Cdn/generated/runtime/HttpPipelineMocking.ps1 new file mode 100644 index 000000000000..53b027c2a1aa --- /dev/null +++ b/src/Cdn/generated/runtime/HttpPipelineMocking.ps1 @@ -0,0 +1,110 @@ +$ErrorActionPreference = "Stop" + +# get the recording path +if (-not $TestRecordingFile) { + $TestRecordingFile = Join-Path $PSScriptRoot 'recording.json' +} + +# create the Http Pipeline Recorder +$Mock = New-Object -Type Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PipelineMock $TestRecordingFile + +# set the recorder to the appropriate mode (default to 'live') +Write-Host -ForegroundColor Green "Running '$TestMode' mode..." +switch ($TestMode) { + 'record' { + Write-Host -ForegroundColor Green "Recording to $TestRecordingFile" + $Mock.SetRecord() + $null = erase -ea 0 $TestRecordingFile + } + 'playback' { + if (-not (Test-Path $TestRecordingFile)) { + Write-Host -fore:yellow "Recording file '$TestRecordingFile' is not present. Tests expecting recorded responses will fail" + } else { + Write-Host -ForegroundColor Green "Using recording $TestRecordingFile" + } + $Mock.SetPlayback() + $Mock.ForceResponseHeaders["Retry-After"] = "0"; + } + default: { + $Mock.SetLive() + } +} + +# overrides for Pester Describe/Context/It + +function Describe( + [Parameter(Mandatory = $true, Position = 0)] + [string] $Name, + + [Alias('Tags')] + [string[]] $Tag = @(), + + [Parameter(Position = 1)] + [ValidateNotNull()] + [ScriptBlock] $Fixture = $(Throw "No test script block is provided. (Have you put the open curly brace on the next line?)") +) { + $Mock.PushDescription($Name) + try { + return pester\Describe -Name $Name -Tag $Tag -Fixture $fixture + } + finally { + $Mock.PopDescription() + } +} + +function Context( + [Parameter(Mandatory = $true, Position = 0)] + [string] $Name, + + [Alias('Tags')] + [string[]] $Tag = @(), + + [Parameter(Position = 1)] + [ValidateNotNull()] + [ScriptBlock] $Fixture = $(Throw "No test script block is provided. (Have you put the open curly brace on the next line?)") +) { + $Mock.PushContext($Name) + try { + return pester\Context -Name $Name -Tag $Tag -Fixture $fixture + } + finally { + $Mock.PopContext() + } +} + +function It { + [CmdletBinding(DefaultParameterSetName = 'Normal')] + param( + [Parameter(Mandatory = $true, Position = 0)] + [string]$Name, + + [Parameter(Position = 1)] + [ScriptBlock] $Test = { }, + + [System.Collections.IDictionary[]] $TestCases, + + [Parameter(ParameterSetName = 'Pending')] + [Switch] $Pending, + + [Parameter(ParameterSetName = 'Skip')] + [Alias('Ignore')] + [Switch] $Skip + ) + $Mock.PushScenario($Name) + + try { + if ($skip) { + return pester\It -Name $Name -Test $Test -TestCases $TestCases -Skip + } + if ($pending) { + return pester\It -Name $Name -Test $Test -TestCases $TestCases -Pending + } + return pester\It -Name $Name -Test $Test -TestCases $TestCases + } + finally { + $null = $Mock.PopScenario() + } +} + +# set the HttpPipelineAppend for all the cmdlets +$PSDefaultParameterValues["*:HttpPipelinePrepend"] = $Mock diff --git a/src/Cdn/generated/runtime/IAssociativeArray.cs b/src/Cdn/generated/runtime/IAssociativeArray.cs new file mode 100644 index 000000000000..214443a8749f --- /dev/null +++ b/src/Cdn/generated/runtime/IAssociativeArray.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +#define DICT_PROPERTIES +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + /// A subset of IDictionary that doesn't implement IEnumerable or IDictionary to work around PowerShell's aggressive formatter + public interface IAssociativeArray + { +#if DICT_PROPERTIES + System.Collections.Generic.IEnumerable Keys { get; } + System.Collections.Generic.IEnumerable Values { get; } + int Count { get; } +#endif + System.Collections.Generic.IDictionary AdditionalProperties { get; } + T this[string index] { get; set; } + void Add(string key, T value); + bool ContainsKey(string key); + bool Remove(string key); + bool TryGetValue(string key, out T value); + void Clear(); + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/IHeaderSerializable.cs b/src/Cdn/generated/runtime/IHeaderSerializable.cs new file mode 100644 index 000000000000..8e1493938113 --- /dev/null +++ b/src/Cdn/generated/runtime/IHeaderSerializable.cs @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + public interface IHeaderSerializable + { + void ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers); + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/ISendAsync.cs b/src/Cdn/generated/runtime/ISendAsync.cs new file mode 100644 index 000000000000..711da241f4dd --- /dev/null +++ b/src/Cdn/generated/runtime/ISendAsync.cs @@ -0,0 +1,296 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + using System.Net.Http; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + using System.Collections; + using System.Linq; + + /// + /// The interface for sending an HTTP request across the wire. + /// + public interface ISendAsync + { + Task SendAsync(HttpRequestMessage request, IEventListener callback); + } + + public class SendAsyncTerminalFactory : ISendAsyncTerminalFactory, ISendAsync + { + SendAsync implementation; + + public SendAsyncTerminalFactory(SendAsync implementation) => this.implementation = implementation; + public SendAsyncTerminalFactory(ISendAsync implementation) => this.implementation = implementation.SendAsync; + public ISendAsync Create() => this; + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => implementation(request, callback); + } + + public partial class SendAsyncFactory : ISendAsyncFactory + { + public class Sender : ISendAsync + { + internal ISendAsync next; + internal SendAsyncStep implementation; + + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => implementation(request, callback, next); + } + SendAsyncStep implementation; + + public SendAsyncFactory(SendAsyncStep implementation) => this.implementation = implementation; + public ISendAsync Create(ISendAsync next) => new Sender { next = next, implementation = implementation }; + + } + + public class HttpClientFactory : ISendAsyncTerminalFactory, ISendAsync + { + HttpClient client; + public HttpClientFactory() : this(new HttpClient()) + { + } + public HttpClientFactory(HttpClient client) => this.client = client; + public ISendAsync Create() => this; + + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, callback.Token); + } + + public interface ISendAsyncFactory + { + ISendAsync Create(ISendAsync next); + } + + public interface ISendAsyncTerminalFactory + { + ISendAsync Create(); + } + + public partial class HttpPipeline : ISendAsync + { + private ISendAsync pipeline; + private ISendAsyncTerminalFactory terminal; + private List steps = new List(); + + public HttpPipeline() : this(new HttpClientFactory()) + { + } + + public HttpPipeline(ISendAsyncTerminalFactory terminalStep) + { + if (terminalStep == null) + { + throw new System.ArgumentNullException(nameof(terminalStep), "Terminal Step Factory in HttpPipeline may not be null"); + } + TerminalFactory = terminalStep; + } + + /// + /// Returns an HttpPipeline with the current state of this pipeline. + /// + public HttpPipeline Clone() => new HttpPipeline(terminal) { steps = this.steps.ToList(), pipeline = this.pipeline }; + + public ISendAsyncTerminalFactory TerminalFactory + { + get => terminal; + set + { + if (value == null) + { + throw new System.ArgumentNullException("TerminalFactory in HttpPipeline may not be null"); + } + terminal = value; + } + } + + public ISendAsync Pipeline + { + get + { + // if the pipeline has been created and not invalidated, return it. + if (this.pipeline != null) + { + return this.pipeline; + } + + // create the pipeline from scratch. + var next = terminal.Create(); + foreach (var factory in steps) + { + // skip factories that return null. + next = factory.Create(next) ?? next; + } + return this.pipeline = next; + } + } + + public int Count => steps.Count; + + public HttpPipeline Prepend(ISendAsyncFactory item) + { + if (item != null) + { + steps.Add(item); + pipeline = null; + } + return this; + } + + public HttpPipeline Append(SendAsyncStep item) + { + if (item != null) + { + Append(new SendAsyncFactory(item)); + } + return this; + } + + public HttpPipeline Prepend(SendAsyncStep item) + { + if (item != null) + { + Prepend(new SendAsyncFactory(item)); + } + return this; + } + public HttpPipeline Append(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Append(new SendAsyncFactory(item)); + } + } + return this; + } + + public HttpPipeline Prepend(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Prepend(new SendAsyncFactory(item)); + } + } + return this; + } + + public HttpPipeline Append(ISendAsyncFactory item) + { + if (item != null) + { + steps.Insert(0, item); + pipeline = null; + } + return this; + } + public HttpPipeline Prepend(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Prepend(item); + } + } + return this; + } + + public HttpPipeline Append(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Append(item); + } + } + return this; + } + + // you can use this as the ISendAsync Implementation + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => Pipeline.SendAsync(request, callback); + } + + internal static partial class Extensions + { + internal static HttpRequestMessage CloneAndDispose(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + using (original) + { + return original.Clone(requestUri, method); + } + } + + internal static Task CloneWithContentAndDispose(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + using (original) + { + return original.CloneWithContent(requestUri, method); + } + } + + /// + /// Clones an HttpRequestMessage (without the content) + /// + /// Original HttpRequestMessage (Will be diposed before returning) + /// A clone of the HttpRequestMessage + internal static HttpRequestMessage Clone(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + var clone = new HttpRequestMessage + { + Method = method ?? original.Method, + RequestUri = requestUri ?? original.RequestUri, + Version = original.Version, + }; + + foreach (KeyValuePair prop in original.Properties) + { + clone.Properties.Add(prop); + } + + foreach (KeyValuePair> header in original.Headers) + { + /* + **temporarily skip cloning telemetry related headers** + clone.Headers.TryAddWithoutValidation(header.Key, header.Value); + */ + if (!"x-ms-unique-id".Equals(header.Key) && !"x-ms-client-request-id".Equals(header.Key) && !"CommandName".Equals(header.Key) && !"FullCommandName".Equals(header.Key) && !"ParameterSetName".Equals(header.Key) && !"User-Agent".Equals(header.Key)) + { + clone.Headers.TryAddWithoutValidation(header.Key, header.Value); + } + } + + return clone; + } + + /// + /// Clones an HttpRequestMessage (including the content stream and content headers) + /// + /// Original HttpRequestMessage (Will be diposed before returning) + /// A clone of the HttpRequestMessage + internal static async Task CloneWithContent(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + var clone = original.Clone(requestUri, method); + var stream = new System.IO.MemoryStream(); + if (original.Content != null) + { + await original.Content.CopyToAsync(stream).ConfigureAwait(false); + stream.Position = 0; + clone.Content = new StreamContent(stream); + if (original.Content.Headers != null) + { + foreach (var h in original.Content.Headers) + { + clone.Content.Headers.Add(h.Key, h.Value); + } + } + } + return clone; + } + } +} diff --git a/src/Cdn/generated/runtime/InfoAttribute.cs b/src/Cdn/generated/runtime/InfoAttribute.cs new file mode 100644 index 000000000000..544e80d0be34 --- /dev/null +++ b/src/Cdn/generated/runtime/InfoAttribute.cs @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + using System; + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Class)] + public class InfoAttribute : Attribute + { + public bool Required { get; set; } = false; + public bool ReadOnly { get; set; } = false; + public Type[] PossibleTypes { get; set; } = new Type[0]; + public string Description { get; set; } = ""; + public string SerializedName { get; set; } = ""; + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class CompleterInfoAttribute : Attribute + { + public string Script { get; set; } = ""; + public string Name { get; set; } = ""; + public string Description { get; set; } = ""; + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class DefaultInfoAttribute : Attribute + { + public string Script { get; set; } = ""; + public string Name { get; set; } = ""; + public string Description { get; set; } = ""; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Iso/IsoDate.cs b/src/Cdn/generated/runtime/Iso/IsoDate.cs new file mode 100644 index 000000000000..f0254d8ce0b8 --- /dev/null +++ b/src/Cdn/generated/runtime/Iso/IsoDate.cs @@ -0,0 +1,214 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal struct IsoDate + { + internal int Year { get; set; } // 0-3000 + + internal int Month { get; set; } // 1-12 + + internal int Day { get; set; } // 1-31 + + internal int Hour { get; set; } // 0-24 + + internal int Minute { get; set; } // 0-60 (60 is a special case) + + internal int Second { get; set; } // 0-60 (60 is used for leap seconds) + + internal double Millisecond { get; set; } // 0-999.9... + + internal TimeSpan Offset { get; set; } + + internal DateTimeKind Kind { get; set; } + + internal TimeSpan TimeOfDay => new TimeSpan(Hour, Minute, Second); + + internal DateTime ToDateTime() + { + if (Kind == DateTimeKind.Utc || Offset == TimeSpan.Zero) + { + return new DateTime(Year, Month, Day, Hour, Minute, Second, (int)Millisecond, DateTimeKind.Utc); + } + + return ToDateTimeOffset().DateTime; + } + + internal DateTimeOffset ToDateTimeOffset() + { + return new DateTimeOffset( + Year, + Month, + Day, + Hour, + Minute, + Second, + (int)Millisecond, + Offset + ); + } + + internal DateTime ToUtcDateTime() + { + return ToDateTimeOffset().UtcDateTime; + } + + public override string ToString() + { + var sb = new StringBuilder(); + + // yyyy-MM-dd + sb.Append($"{Year}-{Month:00}-{Day:00}"); + + if (TimeOfDay > new TimeSpan(0)) + { + sb.Append($"T{Hour:00}:{Minute:00}"); + + if (TimeOfDay.Seconds > 0) + { + sb.Append($":{Second:00}"); + } + } + + if (Offset.Ticks == 0) + { + sb.Append('Z'); // UTC + } + else + { + if (Offset.Ticks >= 0) + { + sb.Append('+'); + } + + sb.Append($"{Offset.Hours:00}:{Offset.Minutes:00}"); + } + + return sb.ToString(); + } + + internal static IsoDate FromDateTimeOffset(DateTimeOffset date) + { + return new IsoDate { + Year = date.Year, + Month = date.Month, + Day = date.Day, + Hour = date.Hour, + Minute = date.Minute, + Second = date.Second, + Offset = date.Offset, + Kind = date.Offset == TimeSpan.Zero ? DateTimeKind.Utc : DateTimeKind.Unspecified + }; + } + + private static readonly char[] timeSeperators = { ':', '.' }; + + internal static IsoDate Parse(string text) + { + var tzIndex = -1; + var timeIndex = text.IndexOf('T'); + + var builder = new IsoDate { Day = 1, Month = 1 }; + + // TODO: strip the time zone offset off the end + string dateTime = text; + string timeZone = null; + + if (dateTime.IndexOf('Z') > -1) + { + tzIndex = dateTime.LastIndexOf('Z'); + + builder.Kind = DateTimeKind.Utc; + } + else if (dateTime.LastIndexOf('+') > 10) + { + tzIndex = dateTime.LastIndexOf('+'); + } + else if (dateTime.LastIndexOf('-') > 10) + { + tzIndex = dateTime.LastIndexOf('-'); + } + + if (tzIndex > -1) + { + timeZone = dateTime.Substring(tzIndex); + dateTime = dateTime.Substring(0, tzIndex); + } + + string date = (timeIndex == -1) ? dateTime : dateTime.Substring(0, timeIndex); + + var dateParts = date.Split(Seperator.Dash); // '-' + + for (int i = 0; i < dateParts.Length; i++) + { + var part = dateParts[i]; + + switch (i) + { + case 0: builder.Year = int.Parse(part); break; + case 1: builder.Month = int.Parse(part); break; + case 2: builder.Day = int.Parse(part); break; + } + } + + if (timeIndex > -1) + { + string[] timeParts = dateTime.Substring(timeIndex + 1).Split(timeSeperators); + + for (int i = 0; i < timeParts.Length; i++) + { + var part = timeParts[i]; + + switch (i) + { + case 0: builder.Hour = int.Parse(part); break; + case 1: builder.Minute = int.Parse(part); break; + case 2: builder.Second = int.Parse(part); break; + case 3: builder.Millisecond = double.Parse("0." + part) * 1000; break; + } + } + } + + if (timeZone != null && timeZone != "Z") + { + var hours = int.Parse(timeZone.Substring(1, 2)); + var minutes = int.Parse(timeZone.Substring(4, 2)); + + if (timeZone[0] == '-') + { + hours = -hours; + minutes = -minutes; + } + + builder.Offset = new TimeSpan(hours, minutes, 0); + } + + return builder; + } + } + + /* + YYYY # eg 1997 + YYYY-MM # eg 1997-07 + YYYY-MM-DD # eg 1997-07-16 + YYYY-MM-DDThh:mmTZD # eg 1997-07-16T19:20+01:00 + YYYY-MM-DDThh:mm:ssTZD # eg 1997-07-16T19:20:30+01:00 + YYYY-MM-DDThh:mm:ss.sTZD # eg 1997-07-16T19:20:30.45+01:00 + + where: + + YYYY = four-digit year + MM = two-digit month (01=January, etc.) + DD = two-digit day of month (01 through 31) + hh = two digits of hour (00 through 23) (am/pm NOT allowed) + mm = two digits of minute (00 through 59) + ss = two digits of second (00 through 59) + s = one or more digits representing a decimal fraction of a second + TZD = time zone designator (Z or +hh:mm or -hh:mm) + */ +} diff --git a/src/Cdn/generated/runtime/JsonType.cs b/src/Cdn/generated/runtime/JsonType.cs new file mode 100644 index 000000000000..a8e7782495f9 --- /dev/null +++ b/src/Cdn/generated/runtime/JsonType.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal enum JsonType + { + Null = 0, + Object = 1, + Array = 2, + Binary = 3, + Boolean = 4, + Date = 5, + Number = 6, + String = 7 + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/MessageAttribute.cs b/src/Cdn/generated/runtime/MessageAttribute.cs new file mode 100644 index 000000000000..87a3dd33fea0 --- /dev/null +++ b/src/Cdn/generated/runtime/MessageAttribute.cs @@ -0,0 +1,360 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.generated.runtime.Properties; + using System; + using System.Collections.Generic; + using System.Globalization; + using System.Linq; + using System.Management.Automation; + using System.Text; + + [AttributeUsage(AttributeTargets.All)] + public class GenericBreakingChangeAttribute : Attribute + { + private string _message; + //A dexcription of what the change is about, non mandatory + public string ChangeDescription { get; set; } = null; + + //The version the change is effective from, non mandatory + public string DeprecateByVersion { get; } + public bool DeprecateByVersionSet { get; } = false; + + //The date on which the change comes in effect + public DateTime ChangeInEfectByDate { get; } + public bool ChangeInEfectByDateSet { get; } = false; + + //Old way of calling the cmdlet + public string OldWay { get; set; } + //New way fo calling the cmdlet + public string NewWay { get; set; } + + public GenericBreakingChangeAttribute(string message) + { + _message = message; + } + + public GenericBreakingChangeAttribute(string message, string deprecateByVersion) + { + _message = message; + this.DeprecateByVersion = deprecateByVersion; + this.DeprecateByVersionSet = true; + } + + public GenericBreakingChangeAttribute(string message, string deprecateByVersion, string changeInEfectByDate) + { + _message = message; + this.DeprecateByVersion = deprecateByVersion; + this.DeprecateByVersionSet = true; + + if (DateTime.TryParse(changeInEfectByDate, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result)) + { + this.ChangeInEfectByDate = result; + this.ChangeInEfectByDateSet = true; + } + } + + public DateTime getInEffectByDate() + { + return this.ChangeInEfectByDate.Date; + } + + + /** + * This function prints out the breaking change message for the attribute on the cmdline + * */ + public void PrintCustomAttributeInfo(Action writeOutput) + { + + if (!GetAttributeSpecificMessage().StartsWith(Environment.NewLine)) + { + writeOutput(Environment.NewLine); + } + writeOutput(string.Format(Resources.BreakingChangesAttributesDeclarationMessage, GetAttributeSpecificMessage())); + + + if (!string.IsNullOrWhiteSpace(ChangeDescription)) + { + writeOutput(string.Format(Resources.BreakingChangesAttributesChangeDescriptionMessage, this.ChangeDescription)); + } + + if (ChangeInEfectByDateSet) + { + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByDateMessage, this.ChangeInEfectByDate.ToString("d"))); + } + + if (DeprecateByVersionSet) + { + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion)); + } + + if (OldWay != null && NewWay != null) + { + writeOutput(string.Format(Resources.BreakingChangesAttributesUsageChangeMessageConsole, OldWay, NewWay)); + } + } + + public virtual bool IsApplicableToInvocation(InvocationInfo invocation) + { + return true; + } + + protected virtual string GetAttributeSpecificMessage() + { + return _message; + } + } + + [AttributeUsage(AttributeTargets.All)] + public class CmdletBreakingChangeAttribute : GenericBreakingChangeAttribute + { + + public string ReplacementCmdletName { get; set; } + + public CmdletBreakingChangeAttribute() : + base(string.Empty) + { + } + + public CmdletBreakingChangeAttribute(string deprecateByVersione) : + base(string.Empty, deprecateByVersione) + { + } + + public CmdletBreakingChangeAttribute(string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByVersion, changeInEfectByDate) + { + } + + protected override string GetAttributeSpecificMessage() + { + if (string.IsNullOrWhiteSpace(ReplacementCmdletName)) + { + return Resources.BreakingChangesAttributesCmdLetDeprecationMessageNoReplacement; + } + else + { + return string.Format(Resources.BreakingChangesAttributesCmdLetDeprecationMessageWithReplacement, ReplacementCmdletName); + } + } + } + + [AttributeUsage(AttributeTargets.All)] + public class ParameterSetBreakingChangeAttribute : GenericBreakingChangeAttribute + { + public string[] ChangedParameterSet { set; get; } + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet) : + base(string.Empty) + { + ChangedParameterSet = changedParameterSet; + } + + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByVersione) : + base(string.Empty, deprecateByVersione) + { + ChangedParameterSet = changedParameterSet; + } + + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByVersion, changeInEfectByDate) + { + ChangedParameterSet = changedParameterSet; + } + + protected override string GetAttributeSpecificMessage() + { + + return Resources.BreakingChangesAttributesParameterSetDeprecationMessageNoReplacement; + + } + + public bool IsApplicableToInvocation(InvocationInfo invocation, string parameterSetName) + { + if (ChangedParameterSet != null) + return ChangedParameterSet.Contains(parameterSetName); + return false; + } + + } + + [AttributeUsage(AttributeTargets.All)] + public class PreviewMessageAttribute : Attribute + { + public string _message; + + public PreviewMessageAttribute() + { + this._message = Resources.PreviewCmdletMessage; + } + + public PreviewMessageAttribute(string message) + { + this._message = message; + } + + public void PrintCustomAttributeInfo(System.Management.Automation.PSCmdlet psCmdlet) + { + psCmdlet.WriteWarning(this._message); + } + + public virtual bool IsApplicableToInvocation(InvocationInfo invocation) + { + return true; + } + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class ParameterBreakingChangeAttribute : GenericBreakingChangeAttribute + { + public string NameOfParameterChanging { get; } + + public string ReplaceMentCmdletParameterName { get; set; } = null; + + public bool IsBecomingMandatory { get; set; } = false; + + public String OldParamaterType { get; set; } + + public String NewParameterType { get; set; } + + public ParameterBreakingChangeAttribute(string nameOfParameterChanging) : + base(string.Empty) + { + this.NameOfParameterChanging = nameOfParameterChanging; + } + + public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByVersion) : + base(string.Empty, deprecateByVersion) + { + this.NameOfParameterChanging = nameOfParameterChanging; + } + + public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByVersion, changeInEfectByDate) + { + this.NameOfParameterChanging = nameOfParameterChanging; + } + + protected override string GetAttributeSpecificMessage() + { + StringBuilder message = new StringBuilder(); + if (!string.IsNullOrWhiteSpace(ReplaceMentCmdletParameterName)) + { + if (IsBecomingMandatory) + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterReplacedMandatory, NameOfParameterChanging, ReplaceMentCmdletParameterName)); + } + else + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterReplaced, NameOfParameterChanging, ReplaceMentCmdletParameterName)); + } + } + else + { + if (IsBecomingMandatory) + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterMandatoryNow, NameOfParameterChanging)); + } + else + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterChanging, NameOfParameterChanging)); + } + } + + //See if the type of the param is changing + if (OldParamaterType != null && !string.IsNullOrWhiteSpace(NewParameterType)) + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterTypeChange, OldParamaterType, NewParameterType)); + } + return message.ToString(); + } + + /// + /// See if the bound parameters contain the current parameter, if they do + /// then the attribbute is applicable + /// If the invocationInfo is null we return true + /// + /// + /// bool + public override bool IsApplicableToInvocation(InvocationInfo invocationInfo) + { + bool? applicable = invocationInfo == null ? true : invocationInfo.BoundParameters?.Keys?.Contains(this.NameOfParameterChanging); + return applicable.HasValue ? applicable.Value : false; + } + } + + [AttributeUsage(AttributeTargets.All)] + public class OutputBreakingChangeAttribute : GenericBreakingChangeAttribute + { + public string DeprecatedCmdLetOutputType { get; } + + //This is still a String instead of a Type as this + //might be undefined at the time of adding the attribute + public string ReplacementCmdletOutputType { get; set; } + + public string[] DeprecatedOutputProperties { get; set; } + + public string[] NewOutputProperties { get; set; } + + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType) : + base(string.Empty) + { + this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; + } + + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByVersion) : + base(string.Empty, deprecateByVersion) + { + this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; + } + + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByVersion, changeInEfectByDate) + { + this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; + } + + protected override string GetAttributeSpecificMessage() + { + StringBuilder message = new StringBuilder(); + + //check for the deprecation scenario + if (string.IsNullOrWhiteSpace(ReplacementCmdletOutputType) && NewOutputProperties == null && DeprecatedOutputProperties == null && string.IsNullOrWhiteSpace(ChangeDescription)) + { + message.Append(string.Format(Resources.BreakingChangesAttributesCmdLetOutputTypeDeprecated, DeprecatedCmdLetOutputType)); + } + else + { + if (!string.IsNullOrWhiteSpace(ReplacementCmdletOutputType)) + { + message.Append(string.Format(Resources.BreakingChangesAttributesCmdLetOutputChange1, DeprecatedCmdLetOutputType, ReplacementCmdletOutputType)); + } + else + { + message.Append(string.Format(Resources.BreakingChangesAttributesCmdLetOutputChange2, DeprecatedCmdLetOutputType)); + } + + if (DeprecatedOutputProperties != null && DeprecatedOutputProperties.Length > 0) + { + message.Append(Resources.BreakingChangesAttributesCmdLetOutputPropertiesRemoved); + foreach (string property in DeprecatedOutputProperties) + { + message.Append(" '" + property + "'"); + } + } + + if (NewOutputProperties != null && NewOutputProperties.Length > 0) + { + message.Append(Resources.BreakingChangesAttributesCmdLetOutputPropertiesAdded); + foreach (string property in NewOutputProperties) + { + message.Append(" '" + property + "'"); + } + } + } + return message.ToString(); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/MessageAttributeHelper.cs b/src/Cdn/generated/runtime/MessageAttributeHelper.cs new file mode 100644 index 000000000000..66d0e8613ca9 --- /dev/null +++ b/src/Cdn/generated/runtime/MessageAttributeHelper.cs @@ -0,0 +1,161 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.generated.runtime.Properties; + using System; + using System.Collections.Generic; + using System.Linq; + using System.Management.Automation; + using System.Reflection; + using System.Text; + using System.Threading.Tasks; + public class MessageAttributeHelper + { + public const string BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK = "https://aka.ms/azps-changewarnings"; + public const string SUPPRESS_ERROR_OR_WARNING_MESSAGE_ENV_VARIABLE_NAME = "SuppressAzurePowerShellBreakingChangeWarnings"; + + /** + * This function takes in a CommandInfo (CmdletInfo or FunctionInfo) + * And reads all the deprecation attributes attached to it + * Prints a message on the cmdline For each of the attribute found + * + * the boundParameterNames is a list of parameters bound to the cmdlet at runtime, + * We only process the Parameter beaking change attributes attached only params listed in this list (if present) + * */ + public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + { + bool supressWarningOrError = false; + + try + { + supressWarningOrError = bool.Parse(System.Environment.GetEnvironmentVariable(SUPPRESS_ERROR_OR_WARNING_MESSAGE_ENV_VARIABLE_NAME)); + } + catch (Exception) + { + //no action + } + + if (supressWarningOrError) + { + //Do not process the attributes at runtime... The env variable to override the warning messages is set + return; + } + + List attributes = new List(GetAllBreakingChangeAttributesInType(commandInfo, invocationInfo, parameterSet)); + StringBuilder sb = new StringBuilder(); + Action appendBreakingChangeInfo = (string s) => sb.Append(s); + + if (attributes != null && attributes.Count > 0) + { + appendBreakingChangeInfo(string.Format(Resources.BreakingChangesAttributesHeaderMessage, commandInfo.Name.Split('_')[0])); + + foreach (GenericBreakingChangeAttribute attribute in attributes) + { + attribute.PrintCustomAttributeInfo(appendBreakingChangeInfo); + } + + appendBreakingChangeInfo(string.Format(Resources.BreakingChangesAttributesFooterMessage, BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK)); + + psCmdlet.WriteWarning(sb.ToString()); + } + + List previewAttributes = new List(GetAllPreviewAttributesInType(commandInfo, invocationInfo)); + + if (previewAttributes != null && previewAttributes.Count > 0) + { + foreach (PreviewMessageAttribute attribute in previewAttributes) + { + attribute.PrintCustomAttributeInfo(psCmdlet); + } + } + } + + + /** + * This function takes in a CommandInfo (CmdletInfo or FunctionInfo) + * And returns all the deprecation attributes attached to it + * + * the boundParameterNames is a list of parameters bound to the cmdlet at runtime, + * We only process the Parameter beaking change attributes attached only params listed in this list (if present) + **/ + private static IEnumerable GetAllBreakingChangeAttributesInType(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet) + { + List attributeList = new List(); + + if (commandInfo.GetType() == typeof(CmdletInfo)) + { + var type = ((CmdletInfo)commandInfo).ImplementingType; + attributeList.AddRange(type.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast()); + + foreach (MethodInfo m in type.GetRuntimeMethods()) + { + attributeList.AddRange((m.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast())); + } + + foreach (FieldInfo f in type.GetRuntimeFields()) + { + attributeList.AddRange(f.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast()); + } + + foreach (PropertyInfo p in type.GetRuntimeProperties()) + { + attributeList.AddRange(p.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast()); + } + } + else if (commandInfo.GetType() == typeof(FunctionInfo)) + { + attributeList.AddRange(((FunctionInfo)commandInfo).ScriptBlock.Attributes.Where(e => typeof(GenericBreakingChangeAttribute).IsAssignableFrom(e.GetType())).Cast()); + foreach (var parameter in ((FunctionInfo)commandInfo).Parameters) + { + attributeList.AddRange(parameter.Value.Attributes.Where(e => typeof(GenericBreakingChangeAttribute).IsAssignableFrom(e.GetType())).Cast()); + } + } + return invocationInfo == null ? attributeList : attributeList.Where(e => e.GetType() == typeof(ParameterSetBreakingChangeAttribute) ? ((ParameterSetBreakingChangeAttribute)e).IsApplicableToInvocation(invocationInfo, parameterSet) : e.IsApplicableToInvocation(invocationInfo)); + } + private static IEnumerable GetAllPreviewAttributesInType(CommandInfo commandInfo, InvocationInfo invocationInfo) + { + List attributeList = new List(); + if (commandInfo.GetType() == typeof(CmdletInfo)) + { + var type = ((CmdletInfo)commandInfo).ImplementingType; + attributeList.AddRange(type.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast()); + + foreach (MethodInfo m in type.GetRuntimeMethods()) + { + attributeList.AddRange((m.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast())); + } + + foreach (FieldInfo f in type.GetRuntimeFields()) + { + attributeList.AddRange(f.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast()); + } + + foreach (PropertyInfo p in type.GetRuntimeProperties()) + { + attributeList.AddRange(p.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast()); + } + } + else if (commandInfo.GetType() == typeof(FunctionInfo)) + { + attributeList.AddRange(((FunctionInfo)commandInfo).ScriptBlock.Attributes.Where(e => typeof(PreviewMessageAttribute).IsAssignableFrom(e.GetType())).Cast()); + foreach (var parameter in ((FunctionInfo)commandInfo).Parameters) + { + attributeList.AddRange(parameter.Value.Attributes.Where(e => typeof(PreviewMessageAttribute).IsAssignableFrom(e.GetType())).Cast()); + } + } + return invocationInfo == null ? attributeList : attributeList.Where(e => e.IsApplicableToInvocation(invocationInfo)); + } + } +} diff --git a/src/Cdn/generated/runtime/Method.cs b/src/Cdn/generated/runtime/Method.cs new file mode 100644 index 000000000000..ad0eb20ac8c7 --- /dev/null +++ b/src/Cdn/generated/runtime/Method.cs @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + internal static class Method + { + internal static System.Net.Http.HttpMethod Get = System.Net.Http.HttpMethod.Get; + internal static System.Net.Http.HttpMethod Put = System.Net.Http.HttpMethod.Put; + internal static System.Net.Http.HttpMethod Head = System.Net.Http.HttpMethod.Head; + internal static System.Net.Http.HttpMethod Post = System.Net.Http.HttpMethod.Post; + internal static System.Net.Http.HttpMethod Delete = System.Net.Http.HttpMethod.Delete; + internal static System.Net.Http.HttpMethod Options = System.Net.Http.HttpMethod.Options; + internal static System.Net.Http.HttpMethod Trace = System.Net.Http.HttpMethod.Trace; + internal static System.Net.Http.HttpMethod Patch = new System.Net.Http.HttpMethod("PATCH"); + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Models/JsonMember.cs b/src/Cdn/generated/runtime/Models/JsonMember.cs new file mode 100644 index 000000000000..095c94d0d562 --- /dev/null +++ b/src/Cdn/generated/runtime/Models/JsonMember.cs @@ -0,0 +1,83 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Reflection; +using System.Runtime.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + + + internal sealed class JsonMember + { + private readonly TypeDetails type; + + private readonly Func getter; + private readonly Action setter; + + internal JsonMember(PropertyInfo property, int defaultOrder) + { + getter = property.GetValue; + setter = property.SetValue; + + var dataMember = property.GetCustomAttribute(); + + Name = dataMember?.Name ?? property.Name; + Order = dataMember?.Order ?? defaultOrder; + EmitDefaultValue = dataMember?.EmitDefaultValue ?? true; + + this.type = TypeDetails.Get(property.PropertyType); + + CanRead = property.CanRead; + } + + internal JsonMember(FieldInfo field, int defaultOrder) + { + getter = field.GetValue; + setter = field.SetValue; + + var dataMember = field.GetCustomAttribute(); + + Name = dataMember?.Name ?? field.Name; + Order = dataMember?.Order ?? defaultOrder; + EmitDefaultValue = dataMember?.EmitDefaultValue ?? true; + + this.type = TypeDetails.Get(field.FieldType); + + CanRead = true; + } + + internal string Name { get; } + + internal int Order { get; } + + internal TypeDetails TypeDetails => type; + + internal Type Type => type.NonNullType; + + internal bool IsList => type.IsList; + + // Arrays, Sets, ... + internal Type ElementType => type.ElementType; + + internal IJsonConverter Converter => type.JsonConverter; + + internal bool EmitDefaultValue { get; } + + internal bool IsStringLike => type.IsStringLike; + + internal object DefaultValue => type.DefaultValue; + + internal bool CanRead { get; } + + #region Helpers + + internal object GetValue(object instance) => getter(instance); + + internal void SetValue(object instance, object value) => setter(instance, value); + + #endregion + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Models/JsonModel.cs b/src/Cdn/generated/runtime/Models/JsonModel.cs new file mode 100644 index 000000000000..b45f8c724f3c --- /dev/null +++ b/src/Cdn/generated/runtime/Models/JsonModel.cs @@ -0,0 +1,89 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal class JsonModel + { + private Dictionary map; + private readonly object _sync = new object(); + + private JsonModel(Type type, List members) + { + Type = type ?? throw new ArgumentNullException(nameof(type)); + Members = members ?? throw new ArgumentNullException(nameof(members)); + } + + internal string Name => Type.Name; + + internal Type Type { get; } + + internal List Members { get; } + + internal JsonMember this[string name] + { + get + { + if (map == null) + { + lock (_sync) + { + if (map == null) + { + map = new Dictionary(); + + foreach (JsonMember m in Members) + { + map[m.Name.ToLower()] = m; + } + } + } + } + + + map.TryGetValue(name.ToLower(), out JsonMember member); + + return member; + } + } + + internal static JsonModel FromType(Type type) + { + var members = new List(); + + int i = 0; + + // BindingFlags.Instance | BindingFlags.Public + + foreach (var member in type.GetFields()) + { + if (member.IsStatic) continue; + + if (member.IsDefined(typeof(IgnoreDataMemberAttribute))) continue; + + members.Add(new JsonMember(member, i)); + + i++; + } + + foreach (var member in type.GetProperties(BindingFlags.Public | BindingFlags.Instance)) + { + if (member.IsDefined(typeof(IgnoreDataMemberAttribute))) continue; + + members.Add(new JsonMember(member, i)); + + i++; + } + + members.Sort((a, b) => a.Order.CompareTo(b.Order)); // inline sort + + return new JsonModel(type, members); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Models/JsonModelCache.cs b/src/Cdn/generated/runtime/Models/JsonModelCache.cs new file mode 100644 index 000000000000..19d9dd3a9f2d --- /dev/null +++ b/src/Cdn/generated/runtime/Models/JsonModelCache.cs @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Runtime.CompilerServices; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal static class JsonModelCache + { + private static readonly ConditionalWeakTable cache + = new ConditionalWeakTable(); + + internal static JsonModel Get(Type type) => cache.GetValue(type, Create); + + private static JsonModel Create(Type type) => JsonModel.FromType(type); + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Nodes/Collections/JsonArray.cs b/src/Cdn/generated/runtime/Nodes/Collections/JsonArray.cs new file mode 100644 index 000000000000..4d829d33440c --- /dev/null +++ b/src/Cdn/generated/runtime/Nodes/Collections/JsonArray.cs @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public abstract partial class JsonArray : JsonNode, IEnumerable + { + internal override JsonType Type => JsonType.Array; + + internal abstract JsonType? ElementType { get; } + + public abstract int Count { get; } + + internal virtual bool IsSet => false; + + internal bool IsEmpty => Count == 0; + + #region IEnumerable + + IEnumerator IEnumerable.GetEnumerator() + { + throw new NotImplementedException(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + throw new NotImplementedException(); + } + + #endregion + + #region Static Helpers + + internal static JsonArray Create(short[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(int[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(long[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(decimal[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(float[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(string[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(XBinary[] values) + => new XImmutableArray(values); + + #endregion + + internal static new JsonArray Parse(string text) + => (JsonArray)JsonNode.Parse(text); + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Nodes/Collections/XImmutableArray.cs b/src/Cdn/generated/runtime/Nodes/Collections/XImmutableArray.cs new file mode 100644 index 000000000000..b6efbc09c0be --- /dev/null +++ b/src/Cdn/generated/runtime/Nodes/Collections/XImmutableArray.cs @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal sealed class XImmutableArray : JsonArray, IEnumerable + { + private readonly T[] values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XImmutableArray(T[] values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + public override JsonNode this[int index] => + XHelper.Create(elementType, elementCode, values[index]); + + internal override JsonType? ElementType => elementType; + + public override int Count => values.Length; + + public bool IsReadOnly => true; + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (T value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (T value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + + #region Static Constructor + + internal XImmutableArray Create(T[] items) + { + return new XImmutableArray(items); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Nodes/Collections/XList.cs b/src/Cdn/generated/runtime/Nodes/Collections/XList.cs new file mode 100644 index 000000000000..dca09ff71caa --- /dev/null +++ b/src/Cdn/generated/runtime/Nodes/Collections/XList.cs @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal sealed class XList : JsonArray, IEnumerable + { + private readonly IList values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XList(IList values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + public override JsonNode this[int index] => + XHelper.Create(elementType, elementCode, values[index]); + + internal override JsonType? ElementType => elementType; + + public override int Count => values.Count; + + public bool IsReadOnly => values.IsReadOnly; + + #region IList + + public void Add(T value) + { + values.Add(value); + } + + public bool Contains(T value) => values.Contains(value); + + #endregion + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Nodes/Collections/XNodeArray.cs b/src/Cdn/generated/runtime/Nodes/Collections/XNodeArray.cs new file mode 100644 index 000000000000..271acdde8dcc --- /dev/null +++ b/src/Cdn/generated/runtime/Nodes/Collections/XNodeArray.cs @@ -0,0 +1,68 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed partial class XNodeArray : JsonArray, ICollection + { + private readonly List items; + + internal XNodeArray() + { + items = new List(); + } + + internal XNodeArray(params JsonNode[] values) + { + items = new List(values); + } + + public override JsonNode this[int index] => items[index]; + + internal override JsonType? ElementType => null; + + public bool IsReadOnly => false; + + public override int Count => items.Count; + + #region ICollection Members + + public void Add(JsonNode item) + { + items.Add(item); + } + + void ICollection.Clear() + { + items.Clear(); + } + + public bool Contains(JsonNode item) => items.Contains(item); + + void ICollection.CopyTo(JsonNode[] array, int arrayIndex) + { + items.CopyTo(array, arrayIndex); + } + + public bool Remove(JsonNode item) + { + return items.Remove(item); + } + + #endregion + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + #endregion + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Nodes/Collections/XSet.cs b/src/Cdn/generated/runtime/Nodes/Collections/XSet.cs new file mode 100644 index 000000000000..08690099d8dc --- /dev/null +++ b/src/Cdn/generated/runtime/Nodes/Collections/XSet.cs @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal sealed class XSet : JsonArray, IEnumerable + { + private readonly HashSet values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XSet(IEnumerable values) + : this(new HashSet(values)) + { } + + internal XSet(HashSet values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + internal override JsonType Type => JsonType.Array; + + internal override JsonType? ElementType => elementType; + + public bool IsReadOnly => true; + + public override int Count => values.Count; + + internal override bool IsSet => true; + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + + internal HashSet AsHashSet() => values; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Nodes/JsonBoolean.cs b/src/Cdn/generated/runtime/Nodes/JsonBoolean.cs new file mode 100644 index 000000000000..fbbd5a8ce399 --- /dev/null +++ b/src/Cdn/generated/runtime/Nodes/JsonBoolean.cs @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal sealed partial class JsonBoolean : JsonNode + { + internal static readonly JsonBoolean True = new JsonBoolean(true); + internal static readonly JsonBoolean False = new JsonBoolean(false); + + internal JsonBoolean(bool value) + { + Value = value; + } + + internal bool Value { get; } + + internal override JsonType Type => JsonType.Boolean; + + internal static new JsonBoolean Parse(string text) + { + switch (text) + { + case "false": return False; + case "true": return True; + + default: throw new ArgumentException($"Expected true or false. Was {text}."); + } + } + + #region Implicit Casts + + public static implicit operator bool(JsonBoolean data) => data.Value; + + public static implicit operator JsonBoolean(bool data) => new JsonBoolean(data); + + #endregion + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Nodes/JsonDate.cs b/src/Cdn/generated/runtime/Nodes/JsonDate.cs new file mode 100644 index 000000000000..3e47bc5133cf --- /dev/null +++ b/src/Cdn/generated/runtime/Nodes/JsonDate.cs @@ -0,0 +1,173 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + + + internal sealed partial class JsonDate : JsonNode, IEquatable, IComparable + { + internal static bool AssumeUtcWhenKindIsUnspecified = true; + + private readonly DateTimeOffset value; + + internal JsonDate(DateTime value) + { + if (value.Kind == DateTimeKind.Unspecified && AssumeUtcWhenKindIsUnspecified) + { + value = DateTime.SpecifyKind(value, DateTimeKind.Utc); + } + + this.value = value; + } + + internal JsonDate(DateTimeOffset value) + { + this.value = value; + } + + internal override JsonType Type => JsonType.Date; + + #region Helpers + + internal DateTimeOffset ToDateTimeOffset() + { + return value; + } + + internal DateTime ToDateTime() + { + if (value.Offset == TimeSpan.Zero) + { + return value.UtcDateTime; + } + + return value.DateTime; + } + + internal DateTime ToUtcDateTime() => value.UtcDateTime; + + internal int ToUnixTimeSeconds() + { + return (int)value.ToUnixTimeSeconds(); + } + + internal long ToUnixTimeMilliseconds() + { + return (int)value.ToUnixTimeMilliseconds(); + } + + internal string ToIsoString() + { + return IsoDate.FromDateTimeOffset(value).ToString(); + } + + #endregion + + public override string ToString() + { + return ToIsoString(); + } + + internal static new JsonDate Parse(string text) + { + if (text == null) throw new ArgumentNullException(nameof(text)); + + // TODO support: unixtimeseconds.partialseconds + + if (text.Length > 4 && _IsNumber(text)) // UnixTime + { + var date = DateTimeOffset.FromUnixTimeSeconds(long.Parse(text)); + + return new JsonDate(date); + } + else if (text.Length <= 4 || text[4] == '-') // ISO: 2012- + { + return new JsonDate(IsoDate.Parse(text).ToDateTimeOffset()); + } + else + { + // NOT ISO ENCODED + // "Thu, 5 Apr 2012 16:59:01 +0200", + return new JsonDate(DateTimeOffset.Parse(text)); + } + } + + private static bool _IsNumber(string text) + { + foreach (var c in text) + { + if (!char.IsDigit(c)) return false; + } + + return true; + } + + internal static JsonDate FromUnixTime(int seconds) + { + return new JsonDate(DateTimeOffset.FromUnixTimeSeconds(seconds)); + } + + internal static JsonDate FromUnixTime(double seconds) + { + var milliseconds = (long)(seconds * 1000d); + + return new JsonDate(DateTimeOffset.FromUnixTimeMilliseconds(milliseconds)); + } + + #region Implicit Casts + + public static implicit operator DateTimeOffset(JsonDate value) + => value.ToDateTimeOffset(); + + public static implicit operator DateTime(JsonDate value) + => value.ToDateTime(); + + // From Date + public static implicit operator JsonDate(DateTimeOffset value) + { + return new JsonDate(value); + } + + public static implicit operator JsonDate(DateTime value) + { + return new JsonDate(value); + } + + // From String + public static implicit operator JsonDate(string value) + { + return Parse(value); + } + + #endregion + + #region Equality + + public override bool Equals(object obj) + { + return obj is JsonDate date && date.value == this.value; + } + + public bool Equals(JsonDate other) + { + return this.value == other.value; + } + + public override int GetHashCode() => value.GetHashCode(); + + #endregion + + #region IComparable Members + + int IComparable.CompareTo(JsonDate other) + { + return value.CompareTo(other.value); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Nodes/JsonNode.cs b/src/Cdn/generated/runtime/Nodes/JsonNode.cs new file mode 100644 index 000000000000..a1b5fb7f1805 --- /dev/null +++ b/src/Cdn/generated/runtime/Nodes/JsonNode.cs @@ -0,0 +1,250 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + + + public abstract partial class JsonNode + { + internal abstract JsonType Type { get; } + + public virtual JsonNode this[int index] => throw new NotImplementedException(); + + public virtual JsonNode this[string name] + { + get => throw new NotImplementedException(); + set => throw new NotImplementedException(); + } + + #region Type Helpers + + internal bool IsArray => Type == JsonType.Array; + + internal bool IsDate => Type == JsonType.Date; + + internal bool IsObject => Type == JsonType.Object; + + internal bool IsNumber => Type == JsonType.Number; + + internal bool IsNull => Type == JsonType.Null; + + #endregion + + internal void WriteTo(TextWriter textWriter, bool pretty = true) + { + var writer = new JsonWriter(textWriter, pretty); + + writer.WriteNode(this); + } + + internal T As() + where T : new() + => new JsonSerializer().Deseralize((JsonObject)this); + + internal T[] ToArrayOf() + { + return (T[])new JsonSerializer().DeserializeArray(typeof(T[]), (JsonArray)this); + } + + #region ToString Overrides + + public override string ToString() => ToString(pretty: true); + + internal string ToString(bool pretty) + { + var sb = new StringBuilder(); + + using (var writer = new StringWriter(sb)) + { + WriteTo(writer, pretty); + + return sb.ToString(); + } + } + + #endregion + + #region Static Constructors + + internal static JsonNode Parse(string text) + { + return Parse(new SourceReader(new StringReader(text))); + } + + internal static JsonNode Parse(TextReader textReader) + => Parse(new SourceReader(textReader)); + + private static JsonNode Parse(SourceReader sourceReader) + { + using (var parser = new JsonParser(sourceReader)) + { + return parser.ReadNode(); + } + } + + internal static JsonNode FromObject(object instance) + => new JsonSerializer().Serialize(instance); + + #endregion + + #region Implict Casts + + public static implicit operator string(JsonNode node) => node.ToString(); + + #endregion + + #region Explict Casts + + public static explicit operator DateTime(JsonNode node) + { + switch (node.Type) + { + case JsonType.Date: + return ((JsonDate)node).ToDateTime(); + + case JsonType.String: + return JsonDate.Parse(node.ToString()).ToDateTime(); + + case JsonType.Number: + var num = (JsonNumber)node; + + if (num.IsInteger) + { + return DateTimeOffset.FromUnixTimeSeconds(num).UtcDateTime; + } + else + { + return DateTimeOffset.FromUnixTimeMilliseconds((long)((double)num * 1000)).UtcDateTime; + } + } + + throw new ConversionException(node, typeof(DateTime)); + } + + public static explicit operator DateTimeOffset(JsonNode node) + { + switch (node.Type) + { + case JsonType.Date : return ((JsonDate)node).ToDateTimeOffset(); + case JsonType.String : return JsonDate.Parse(node.ToString()).ToDateTimeOffset(); + + case JsonType.Number: + var num = (JsonNumber)node; + + if (num.IsInteger) + { + return DateTimeOffset.FromUnixTimeSeconds(num); + } + else + { + return DateTimeOffset.FromUnixTimeMilliseconds((long)((double)num * 1000)); + } + + } + + throw new ConversionException(node, typeof(DateTimeOffset)); + } + + public static explicit operator float(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return float.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(float)); + } + + public static explicit operator double(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return double.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(double)); + } + + public static explicit operator decimal(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number: return (JsonNumber)node; + case JsonType.String: return decimal.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(decimal)); + } + + public static explicit operator Guid(JsonNode node) + => new Guid(node.ToString()); + + public static explicit operator short(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return short.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(short)); + } + + public static explicit operator int(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return int.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(int)); + } + + public static explicit operator long(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number: return (JsonNumber)node; + case JsonType.String: return long.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(long)); + } + + public static explicit operator bool(JsonNode node) + => ((JsonBoolean)node).Value; + + public static explicit operator ushort(JsonNode node) + => (JsonNumber)node; + + public static explicit operator uint(JsonNode node) + => (JsonNumber)node; + + public static explicit operator ulong(JsonNode node) + => (JsonNumber)node; + + public static explicit operator TimeSpan(JsonNode node) + => TimeSpan.Parse(node.ToString()); + + public static explicit operator Uri(JsonNode node) + { + if (node.Type == JsonType.String) + { + return new Uri(node.ToString()); + } + + throw new ConversionException(node, typeof(Uri)); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Nodes/JsonNumber.cs b/src/Cdn/generated/runtime/Nodes/JsonNumber.cs new file mode 100644 index 000000000000..eaea7a153362 --- /dev/null +++ b/src/Cdn/generated/runtime/Nodes/JsonNumber.cs @@ -0,0 +1,109 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed partial class JsonNumber : JsonNode + { + private readonly string value; + private readonly bool overflows = false; + + internal JsonNumber(string value) + { + this.value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal JsonNumber(int value) + { + this.value = value.ToString(); + } + + internal JsonNumber(long value) + { + this.value = value.ToString(); + + if (value > 9007199254740991) + { + overflows = true; + } + } + + internal JsonNumber(float value) + { + this.value = value.ToString(System.Globalization.CultureInfo.InvariantCulture); + } + + internal JsonNumber(double value) + { + this.value = value.ToString(System.Globalization.CultureInfo.InvariantCulture); + } + + internal override JsonType Type => JsonType.Number; + + internal string Value => value; + + #region Helpers + + internal bool Overflows => overflows; + + internal bool IsInteger => !value.Contains("."); + + internal bool IsFloat => value.Contains("."); + + #endregion + + #region Casting + + public static implicit operator byte(JsonNumber number) + => byte.Parse(number.Value); + + public static implicit operator short(JsonNumber number) + => short.Parse(number.Value); + + public static implicit operator int(JsonNumber number) + => int.Parse(number.Value); + + public static implicit operator long(JsonNumber number) + => long.Parse(number.value); + + public static implicit operator UInt16(JsonNumber number) + => ushort.Parse(number.Value); + + public static implicit operator UInt32(JsonNumber number) + => uint.Parse(number.Value); + + public static implicit operator UInt64(JsonNumber number) + => ulong.Parse(number.Value); + + public static implicit operator decimal(JsonNumber number) + => decimal.Parse(number.Value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator Double(JsonNumber number) + => double.Parse(number.value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator float(JsonNumber number) + => float.Parse(number.value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator JsonNumber(short data) + => new JsonNumber(data.ToString()); + + public static implicit operator JsonNumber(int data) + => new JsonNumber(data); + + public static implicit operator JsonNumber(long data) + => new JsonNumber(data); + + public static implicit operator JsonNumber(Single data) + => new JsonNumber(data.ToString()); + + public static implicit operator JsonNumber(double data) + => new JsonNumber(data.ToString()); + + #endregion + + public override string ToString() => value; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Nodes/JsonObject.cs b/src/Cdn/generated/runtime/Nodes/JsonObject.cs new file mode 100644 index 000000000000..01072033cb2a --- /dev/null +++ b/src/Cdn/generated/runtime/Nodes/JsonObject.cs @@ -0,0 +1,172 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public partial class JsonObject : JsonNode, IDictionary + { + private readonly Dictionary items; + + internal JsonObject() + { + items = new Dictionary(); + } + + internal JsonObject(IEnumerable> properties) + { + if (properties == null) throw new ArgumentNullException(nameof(properties)); + + items = new Dictionary(); + + foreach (var field in properties) + { + items.Add(field.Key, field.Value); + } + } + + #region IDictionary Constructors + + internal JsonObject(IDictionary dic) + { + items = new Dictionary(dic.Count); + + foreach (var pair in dic) + { + Add(pair.Key, pair.Value); + } + } + + #endregion + + internal override JsonType Type => JsonType.Object; + + #region Add Overloads + + public void Add(string name, JsonNode value) => + items.Add(name, value); + + public void Add(string name, byte[] value) => + items.Add(name, new XBinary(value)); + + public void Add(string name, DateTime value) => + items.Add(name, new JsonDate(value)); + + public void Add(string name, int value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, long value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, float value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, double value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, string value) => + items.Add(name, new JsonString(value)); + + public void Add(string name, bool value) => + items.Add(name, new JsonBoolean(value)); + + public void Add(string name, Uri url) => + items.Add(name, new JsonString(url.AbsoluteUri)); + + public void Add(string name, string[] values) => + items.Add(name, new XImmutableArray(values)); + + public void Add(string name, int[] values) => + items.Add(name, new XImmutableArray(values)); + + #endregion + + #region ICollection> Members + + void ICollection>.Add(KeyValuePair item) + { + items.Add(item.Key, item.Value); + } + + void ICollection>.Clear() + { + items.Clear(); + } + + bool ICollection>.Contains(KeyValuePair item) => + throw new NotImplementedException(); + + void ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex) => + throw new NotImplementedException(); + + + int ICollection>.Count => items.Count; + + bool ICollection>.IsReadOnly => false; + + bool ICollection>.Remove(KeyValuePair item) => + throw new NotImplementedException(); + + #endregion + + #region IDictionary Members + + public bool ContainsKey(string key) => items.ContainsKey(key); + + public ICollection Keys => items.Keys; + + public bool Remove(string key) => items.Remove(key); + + public bool TryGetValue(string key, out JsonNode value) => + items.TryGetValue(key, out value); + + public ICollection Values => items.Values; + + public override JsonNode this[string key] + { + get => items[key]; + set => items[key] = value; + } + + #endregion + + #region IEnumerable + + IEnumerator> IEnumerable>.GetEnumerator() + => items.GetEnumerator(); + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + #endregion + + #region Helpers + + internal static new JsonObject FromObject(object instance) => + (JsonObject)new JsonSerializer().Serialize(instance); + + #endregion + + #region Static Constructors + + internal static JsonObject FromStream(Stream stream) + { + using (var tr = new StreamReader(stream)) + { + return (JsonObject)Parse(tr); + } + } + + internal static new JsonObject Parse(string text) + { + return (JsonObject)JsonNode.Parse(text); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Nodes/JsonString.cs b/src/Cdn/generated/runtime/Nodes/JsonString.cs new file mode 100644 index 000000000000..7cb783d79cd5 --- /dev/null +++ b/src/Cdn/generated/runtime/Nodes/JsonString.cs @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed partial class JsonString : JsonNode, IEquatable + { + private readonly string value; + + internal JsonString(string value) + { + this.value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal override JsonType Type => JsonType.String; + + internal string Value => value; + + internal int Length => value.Length; + + #region #region Implicit Casts + + public static implicit operator string(JsonString data) => data.Value; + + public static implicit operator JsonString(string value) => new JsonString(value); + + #endregion + + public override int GetHashCode() => value.GetHashCode(); + + public override string ToString() => value; + + #region IEquatable + + bool IEquatable.Equals(JsonString other) => this.Value == other.Value; + + #endregion + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Nodes/XBinary.cs b/src/Cdn/generated/runtime/Nodes/XBinary.cs new file mode 100644 index 000000000000..3ee75e4f52a8 --- /dev/null +++ b/src/Cdn/generated/runtime/Nodes/XBinary.cs @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal sealed class XBinary : JsonNode + { + private readonly byte[] _value; + private readonly string _base64; + + internal XBinary(byte[] value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal XBinary(string base64EncodedString) + { + _base64 = base64EncodedString ?? throw new ArgumentNullException(nameof(base64EncodedString)); + } + + internal override JsonType Type => JsonType.Binary; + + internal byte[] Value => _value ?? Convert.FromBase64String(_base64); + + #region #region Implicit Casts + + public static implicit operator byte[] (XBinary data) => data.Value; + + public static implicit operator XBinary(byte[] data) => new XBinary(data); + + #endregion + + public override int GetHashCode() => Value.GetHashCode(); + + public override string ToString() => _base64 ?? Convert.ToBase64String(_value); + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Nodes/XNull.cs b/src/Cdn/generated/runtime/Nodes/XNull.cs new file mode 100644 index 000000000000..c3c69833c02a --- /dev/null +++ b/src/Cdn/generated/runtime/Nodes/XNull.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal sealed class XNull : JsonNode + { + internal static readonly XNull Instance = new XNull(); + + private XNull() { } + + internal override JsonType Type => JsonType.Null; + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Parser/Exceptions/ParseException.cs b/src/Cdn/generated/runtime/Parser/Exceptions/ParseException.cs new file mode 100644 index 000000000000..cbc2eb06e497 --- /dev/null +++ b/src/Cdn/generated/runtime/Parser/Exceptions/ParseException.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal class ParserException : Exception + { + internal ParserException(string message) + : base(message) + { } + + internal ParserException(string message, SourceLocation location) + : base(message) + { + + Location = location; + } + + internal SourceLocation Location { get; } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Parser/JsonParser.cs b/src/Cdn/generated/runtime/Parser/JsonParser.cs new file mode 100644 index 000000000000..cd4057e05c30 --- /dev/null +++ b/src/Cdn/generated/runtime/Parser/JsonParser.cs @@ -0,0 +1,180 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public class JsonParser : IDisposable + { + private readonly TokenReader reader; + + internal JsonParser(TextReader reader) + : this(new SourceReader(reader)) { } + + internal JsonParser(SourceReader sourceReader) + { + if (sourceReader == null) + throw new ArgumentNullException(nameof(sourceReader)); + + this.reader = new TokenReader(new JsonTokenizer(sourceReader)); + + this.reader.Next(); // Start with the first token + } + + internal IEnumerable ReadNodes() + { + JsonNode node; + + while ((node = ReadNode()) != null) yield return node; + } + + internal JsonNode ReadNode() + { + if (reader.Current.Kind == TokenKind.Eof || reader.Current.IsTerminator) + { + return null; + } + + switch (reader.Current.Kind) + { + case TokenKind.LeftBrace : return ReadObject(); // { + case TokenKind.LeftBracket : return ReadArray(); // [ + + default: throw new ParserException($"Expected '{{' or '['. Was {reader.Current}."); + } + } + + private JsonNode ReadFieldValue() + { + // Boolean, Date, Null, Number, String, Uri + if (reader.Current.IsLiteral) + { + return ReadLiteral(); + } + else + { + switch (reader.Current.Kind) + { + case TokenKind.LeftBracket: return ReadArray(); + case TokenKind.LeftBrace : return ReadObject(); + + default: throw new ParserException($"Unexpected token reading field value. Was {reader.Current}."); + } + } + } + + private JsonNode ReadLiteral() + { + var literal = reader.Current; + + reader.Next(); // Read the literal token + + switch (literal.Kind) + { + case TokenKind.Boolean : return JsonBoolean.Parse(literal.Value); + case TokenKind.Null : return XNull.Instance; + case TokenKind.Number : return new JsonNumber(literal.Value); + case TokenKind.String : return new JsonString(literal.Value); + + default: throw new ParserException($"Unexpected token reading literal. Was {literal}."); + } + } + + internal JsonObject ReadObject() + { + reader.Ensure(TokenKind.LeftBrace, "object"); + + reader.Next(); // Read '{' (Object start) + + var jsonObject = new JsonObject(); + + // Read the object's fields until we reach the end of the object ('}') + while (reader.Current.Kind != TokenKind.RightBrace) + { + if (reader.Current.Kind == TokenKind.Comma) + { + reader.Next(); // Read ',' (Seperator) + } + + // Ensure we have a field name + reader.Ensure(TokenKind.String, "Expected field name"); + + var field = ReadField(); + + jsonObject.Add(field.Key, field.Value); + } + + reader.Next(); // Read '}' (Object end) + + return jsonObject; + } + + + // TODO: Use ValueTuple in C#7 + private KeyValuePair ReadField() + { + var fieldName = reader.Current.Value; + + reader.Next(); // Read the field name + + reader.Ensure(TokenKind.Colon, "field"); + + reader.Next(); // Read ':' (Field value indicator) + + return new KeyValuePair(fieldName, ReadFieldValue()); + } + + + internal JsonArray ReadArray() + { + reader.Ensure(TokenKind.LeftBracket, "array"); + + var array = new XNodeArray(); + + reader.Next(); // Read the '[' (Array start) + + // Read the array's items + while (reader.Current.Kind != TokenKind.RightBracket) + { + if (reader.Current.Kind == TokenKind.Comma) + { + reader.Next(); // Read the ',' (Seperator) + } + + if (reader.Current.IsLiteral) + { + array.Add(ReadLiteral()); // Boolean, Date, Number, Null, String, Uri + } + else if (reader.Current.Kind == TokenKind.LeftBracket) + { + array.Add(ReadArray()); // Array + } + else if (reader.Current.Kind == TokenKind.LeftBrace) + { + array.Add(ReadObject()); // Object + } + else + { + throw new ParserException($"Expected comma, literal, or object. Was {reader.Current}."); + } + } + + reader.Next(); // Read the ']' (Array end) + + return array; + } + + #region IDisposable + + public void Dispose() + { + reader.Dispose(); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Parser/JsonToken.cs b/src/Cdn/generated/runtime/Parser/JsonToken.cs new file mode 100644 index 000000000000..6e536f3e7a88 --- /dev/null +++ b/src/Cdn/generated/runtime/Parser/JsonToken.cs @@ -0,0 +1,66 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal enum TokenKind + { + LeftBrace, // { Object start + RightBrace, // } Object end + + LeftBracket, // [ Array start + RightBracket, // ] Array end + + Comma, // , Comma + Colon, // : Value indicator + Dot, // . Access field indicator + Terminator, // \0 Stream terminator + + Boolean = 31, // true or false + Null = 33, // null + Number = 34, // i.e. -1.93, -1, 0, 1, 1.1 + String = 35, // i.e. "text" + + Eof = 50 + } + + internal /* readonly */ struct JsonToken + { + internal static readonly JsonToken BraceOpen = new JsonToken(TokenKind.LeftBrace, "{"); + internal static readonly JsonToken BraceClose = new JsonToken(TokenKind.RightBrace, "}"); + + internal static readonly JsonToken BracketOpen = new JsonToken(TokenKind.LeftBracket, "["); + internal static readonly JsonToken BracketClose = new JsonToken(TokenKind.RightBracket, "]"); + + internal static readonly JsonToken Colon = new JsonToken(TokenKind.Colon, ":"); + internal static readonly JsonToken Comma = new JsonToken(TokenKind.Comma, ","); + internal static readonly JsonToken Terminator = new JsonToken(TokenKind.Terminator, "\0"); + + internal static readonly JsonToken True = new JsonToken(TokenKind.Boolean, "true"); + internal static readonly JsonToken False = new JsonToken(TokenKind.Boolean, "false"); + internal static readonly JsonToken Null = new JsonToken(TokenKind.Null, "null"); + + internal static readonly JsonToken Eof = new JsonToken(TokenKind.Eof, null); + + internal JsonToken(TokenKind kind, string value) + { + Kind = kind; + Value = value; + } + + internal readonly TokenKind Kind; + + internal readonly string Value; + + public override string ToString() => Kind + ": " + Value; + + #region Helpers + + internal bool IsLiteral => (byte)Kind > 30 && (byte)Kind < 40; + + internal bool IsTerminator => Kind == TokenKind.Terminator; + + #endregion + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Parser/JsonTokenizer.cs b/src/Cdn/generated/runtime/Parser/JsonTokenizer.cs new file mode 100644 index 000000000000..3d87a6779331 --- /dev/null +++ b/src/Cdn/generated/runtime/Parser/JsonTokenizer.cs @@ -0,0 +1,177 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + using System.IO; + + + public class JsonTokenizer : IDisposable + { + private readonly StringBuilder sb = new StringBuilder(); + + private readonly SourceReader reader; + + internal JsonTokenizer(TextReader reader) + : this(new SourceReader(reader)) { } + + internal JsonTokenizer(SourceReader reader) + { + this.reader = reader; + + reader.Next(); // Start with the first char + } + + internal JsonToken ReadNext() + { + reader.SkipWhitespace(); + + if (reader.IsEof) return JsonToken.Eof; + + switch (reader.Current) + { + case '"': return ReadQuotedString(); + + // Symbols + case '[' : reader.Next(); return JsonToken.BracketOpen; // Array start + case ']' : reader.Next(); return JsonToken.BracketClose; // Array end + case ',' : reader.Next(); return JsonToken.Comma; // Value seperator + case ':' : reader.Next(); return JsonToken.Colon; // Field value indicator + case '{' : reader.Next(); return JsonToken.BraceOpen; // Object start + case '}' : reader.Next(); return JsonToken.BraceClose; // Object end + case '\0' : reader.Next(); return JsonToken.Terminator; // Stream terminiator + + default: return ReadLiteral(); + } + } + + private JsonToken ReadQuotedString() + { + Expect('"', "quoted string indicator"); + + reader.Next(); // Read '"' (Starting quote) + + // Read until we reach an unescaped quote char + while (reader.Current != '"') + { + EnsureNotEof("quoted string"); + + if (reader.Current == '\\') + { + char escapedCharacter = reader.ReadEscapeCode(); + + sb.Append(escapedCharacter); + + continue; + } + + StoreCurrentCharacterAndReadNext(); + } + + reader.Next(); // Read '"' (Ending quote) + + return new JsonToken(TokenKind.String, value: sb.Extract()); + } + + private JsonToken ReadLiteral() + { + if (char.IsDigit(reader.Current) || + reader.Current == '-' || + reader.Current == '+') + { + return ReadNumber(); + } + + return ReadIdentifer(); + } + + private JsonToken ReadNumber() + { + // Read until we hit a non-numeric character + // -6.247737e-06 + // E + + while (char.IsDigit(reader.Current) + || reader.Current == '.' + || reader.Current == 'e' + || reader.Current == 'E' + || reader.Current == '-' + || reader.Current == '+') + { + StoreCurrentCharacterAndReadNext(); + } + + return new JsonToken(TokenKind.Number, value: sb.Extract()); + } + + int count = 0; + + private JsonToken ReadIdentifer() + { + count++; + + if (!char.IsLetter(reader.Current)) + { + throw new ParserException( + message : $"Expected literal (number, boolean, or null). Was '{reader.Current}'.", + location : reader.Location + ); + } + + // Read letters, numbers, and underscores '_' + while (char.IsLetterOrDigit(reader.Current) || reader.Current == '_') + { + StoreCurrentCharacterAndReadNext(); + } + + string text = sb.Extract(); + + switch (text) + { + case "true": return JsonToken.True; + case "false": return JsonToken.False; + case "null": return JsonToken.Null; + + default: return new JsonToken(TokenKind.String, text); + } + } + + private void Expect(char character, string description) + { + if (reader.Current != character) + { + throw new ParserException( + message: $"Expected {description} ('{character}'). Was '{reader.Current}'.", + location: reader.Location + ); + } + } + + private void EnsureNotEof(string tokenType) + { + if (reader.IsEof) + { + throw new ParserException( + message: $"Unexpected EOF while reading {tokenType}.", + location: reader.Location + ); + } + } + + private void StoreCurrentCharacterAndReadNext() + { + sb.Append(reader.Current); + + reader.Next(); + } + + public void Dispose() + { + reader.Dispose(); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Parser/Location.cs b/src/Cdn/generated/runtime/Parser/Location.cs new file mode 100644 index 000000000000..7d3d8c944922 --- /dev/null +++ b/src/Cdn/generated/runtime/Parser/Location.cs @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal struct SourceLocation + { + private int line; + private int column; + private int position; + + internal SourceLocation(int line = 0, int column = 0, int position = 0) + { + this.line = line; + this.column = column; + this.position = position; + } + + internal int Line => line; + + internal int Column => column; + + internal int Position => position; + + internal void Advance() + { + this.column++; + this.position++; + } + + internal void MarkNewLine() + { + this.line++; + this.column = 0; + } + + internal SourceLocation Clone() + { + return new SourceLocation(line, column, position); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Parser/Readers/SourceReader.cs b/src/Cdn/generated/runtime/Parser/Readers/SourceReader.cs new file mode 100644 index 000000000000..110264cec391 --- /dev/null +++ b/src/Cdn/generated/runtime/Parser/Readers/SourceReader.cs @@ -0,0 +1,130 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Globalization; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public sealed class SourceReader : IDisposable + { + private readonly TextReader source; + + private char current; + + private readonly SourceLocation location = new SourceLocation(); + + private bool isEof = false; + + internal SourceReader(TextReader textReader) + { + this.source = textReader ?? throw new ArgumentNullException(nameof(textReader)); + } + + /// + /// Advances to the next character + /// + internal void Next() + { + // Advance to the new line when we see a new line '\n'. + // A new line may be prefixed by a carriage return '\r'. + + if (current == '\n') + { + location.MarkNewLine(); + } + + int charCode = source.Read(); // -1 for end + + if (charCode >= 0) + { + current = (char)charCode; + } + else + { + // If we've already marked this as the EOF, throw an exception + if (isEof) + { + throw new EndOfStreamException("Cannot advance past end of stream."); + } + + isEof = true; + + current = '\0'; + } + + location.Advance(); + } + + internal void SkipWhitespace() + { + while (char.IsWhiteSpace(current)) + { + Next(); + } + } + + internal char ReadEscapeCode() + { + Next(); + + char escapedChar = current; + + Next(); // Consume escaped character + + switch (escapedChar) + { + // Special escape codes + case '"': return '"'; // " (Quotation mark) U+0022 + case '/': return '/'; // / (Solidus) U+002F + case '\\': return '\\'; // \ (Reverse solidus) U+005C + + // Control Characters + case '0': return '\0'; // Nul (0) U+0000 + case 'a': return '\a'; // Alert (7) + case 'b': return '\b'; // Backspace (8) U+0008 + case 'f': return '\f'; // Form feed (12) U+000C + case 'n': return '\n'; // Line feed (10) U+000A + case 'r': return '\r'; // Carriage return (13) U+000D + case 't': return '\t'; // Horizontal tab (9) U+0009 + case 'v': return '\v'; // Vertical tab + + // Unicode escape sequence + case 'u': return ReadUnicodeEscapeSequence(); // U+XXXX + + default: throw new Exception($"Unrecognized escape sequence '\\{escapedChar}'"); + } + } + + private readonly char[] hexCode = new char[4]; + + private char ReadUnicodeEscapeSequence() + { + hexCode[0] = current; Next(); + hexCode[1] = current; Next(); + hexCode[2] = current; Next(); + hexCode[3] = current; Next(); + + return Convert.ToChar(int.Parse( + s : new string(hexCode), + style : NumberStyles.HexNumber, + provider: NumberFormatInfo.InvariantInfo + )); + } + + internal char Current => current; + + internal bool IsEof => isEof; + + internal char Peek() => (char)source.Peek(); + + internal SourceLocation Location => location; + + public void Dispose() + { + source.Dispose(); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Parser/TokenReader.cs b/src/Cdn/generated/runtime/Parser/TokenReader.cs new file mode 100644 index 000000000000..07381db8e54c --- /dev/null +++ b/src/Cdn/generated/runtime/Parser/TokenReader.cs @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + public class TokenReader : IDisposable + { + private readonly JsonTokenizer tokenizer; + private JsonToken current; + + internal TokenReader(JsonTokenizer tokenizer) + { + this.tokenizer = tokenizer ?? throw new ArgumentNullException(nameof(tokenizer)); + } + + internal void Next() + { + current = tokenizer.ReadNext(); + } + + internal JsonToken Current => current; + + internal void Ensure(TokenKind kind, string readerName) + { + if (current.Kind != kind) + { + throw new ParserException($"Expected {kind} while reading {readerName}). Was {current}."); + } + } + + public void Dispose() + { + tokenizer.Dispose(); + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/PipelineMocking.cs b/src/Cdn/generated/runtime/PipelineMocking.cs new file mode 100644 index 000000000000..d8cd204840ad --- /dev/null +++ b/src/Cdn/generated/runtime/PipelineMocking.cs @@ -0,0 +1,262 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + using System.Threading.Tasks; + using System.Collections.Generic; + using System.Net.Http; + using System.Linq; + using System.Net; + using Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json; + + public enum MockMode + { + Live, + Record, + Playback, + + } + + public class PipelineMock + { + + private System.Collections.Generic.Stack scenario = new System.Collections.Generic.Stack(); + private System.Collections.Generic.Stack context = new System.Collections.Generic.Stack(); + private System.Collections.Generic.Stack description = new System.Collections.Generic.Stack(); + + private readonly string recordingPath; + private int counter = 0; + + public static implicit operator Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep(PipelineMock instance) => instance.SendAsync; + + public MockMode Mode { get; set; } = MockMode.Live; + public PipelineMock(string recordingPath) + { + this.recordingPath = recordingPath; + } + + public void PushContext(string text) => context.Push(text); + + public void PushDescription(string text) => description.Push(text); + + + public void PushScenario(string it) + { + // reset counter too + counter = 0; + + scenario.Push(it); + } + + public void PopContext() => context.Pop(); + + public void PopDescription() => description.Pop(); + + public void PopScenario() => scenario.Pop(); + + public void SetRecord() => Mode = MockMode.Record; + + public void SetPlayback() => Mode = MockMode.Playback; + + public void SetLive() => Mode = MockMode.Live; + + public string Scenario => (scenario.Count > 0 ? scenario.Peek() : "[NoScenario]"); + public string Description => (description.Count > 0 ? description.Peek() : "[NoDescription]"); + public string Context => (context.Count > 0 ? context.Peek() : "[NoContext]"); + + /// + /// Headers that we substitute out blank values for in the recordings + /// Add additional headers as necessary + /// + public static HashSet Blacklist = new HashSet(System.StringComparer.CurrentCultureIgnoreCase) { + "Authorization", + }; + + public Dictionary ForceResponseHeaders = new Dictionary(); + + internal static XImmutableArray Removed = new XImmutableArray(new string[] { "[Filtered]" }); + + internal static IEnumerable> FilterHeaders(IEnumerable>> headers) => headers.Select(header => new KeyValuePair(header.Key, Blacklist.Contains(header.Key) ? Removed : new XImmutableArray(header.Value.ToArray()))); + + internal static JsonNode SerializeContent(HttpContent content, ref bool isBase64) => content == null ? XNull.Instance : SerializeContent(content.ReadAsByteArrayAsync().Result, ref isBase64); + + internal static JsonNode SerializeContent(byte[] content, ref bool isBase64) + { + if (null == content || content.Length == 0) + { + return XNull.Instance; + } + var first = content[0]; + var last = content[content.Length - 1]; + + // plaintext for JSON/SGML/XML/HTML/STRINGS/ARRAYS + if ((first == '{' && last == '}') || (first == '<' && last == '>') || (first == '[' && last == ']') || (first == '"' && last == '"')) + { + return new JsonString(System.Text.Encoding.UTF8.GetString(content)); + } + + // base64 for everyone else + return new JsonString(System.Convert.ToBase64String(content)); + } + + internal static byte[] DeserializeContent(string content, bool isBase64) + { + if (string.IsNullOrWhiteSpace(content)) + { + return new byte[0]; + } + + if (isBase64) + { + try + { + return System.Convert.FromBase64String(content); + } + catch + { + // hmm. didn't work, return it as a string I guess. + } + } + return System.Text.Encoding.UTF8.GetBytes(content); + } + + public void SaveMessage(string rqKey, HttpRequestMessage request, HttpResponseMessage response) + { + var messages = System.IO.File.Exists(this.recordingPath) ? Load() : new JsonObject() ?? new JsonObject(); + bool isBase64Request = false; + bool isBase64Response = false; + messages[rqKey] = new JsonObject { + { "Request",new JsonObject { + { "Method", request.Method.Method }, + { "RequestUri", request.RequestUri }, + { "Content", SerializeContent( request.Content, ref isBase64Request) }, + { "isContentBase64", isBase64Request }, + { "Headers", new JsonObject(FilterHeaders(request.Headers)) }, + { "ContentHeaders", request.Content == null ? new JsonObject() : new JsonObject(FilterHeaders(request.Content.Headers))} + } }, + {"Response", new JsonObject { + { "StatusCode", (int)response.StatusCode}, + { "Headers", new JsonObject(FilterHeaders(response.Headers))}, + { "ContentHeaders", new JsonObject(FilterHeaders(response.Content.Headers))}, + { "Content", SerializeContent(response.Content, ref isBase64Response) }, + { "isContentBase64", isBase64Response }, + }} + }; + System.IO.File.WriteAllText(this.recordingPath, messages.ToString()); + } + + private JsonObject Load() + { + if (System.IO.File.Exists(this.recordingPath)) + { + try + { + return JsonObject.FromStream(System.IO.File.OpenRead(this.recordingPath)); + } + catch + { + throw new System.Exception($"Invalid recording file: '{recordingPath}'"); + } + } + + throw new System.ArgumentException($"Missing recording file: '{recordingPath}'", nameof(recordingPath)); + } + + public HttpResponseMessage LoadMessage(string rqKey) + { + var responses = Load(); + var message = responses.Property(rqKey); + + if (null == message) + { + throw new System.ArgumentException($"Missing Request '{rqKey}' in recording file", nameof(rqKey)); + } + + var sc = 0; + var reqMessage = message.Property("Request"); + var respMessage = message.Property("Response"); + + // --------------------------- deserialize response ---------------------------------------------------------------- + bool isBase64Response = false; + respMessage.BooleanProperty("isContentBase64", ref isBase64Response); + var response = new HttpResponseMessage + { + StatusCode = (HttpStatusCode)respMessage.NumberProperty("StatusCode", ref sc), + Content = new System.Net.Http.ByteArrayContent(DeserializeContent(respMessage.StringProperty("Content"), isBase64Response)) + }; + + foreach (var each in respMessage.Property("Headers")) + { + response.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + foreach (var frh in ForceResponseHeaders) + { + response.Headers.Remove(frh.Key); + response.Headers.TryAddWithoutValidation(frh.Key, frh.Value); + } + + foreach (var each in respMessage.Property("ContentHeaders")) + { + response.Content.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + // --------------------------- deserialize request ---------------------------------------------------------------- + bool isBase64Request = false; + reqMessage.BooleanProperty("isContentBase64", ref isBase64Request); + response.RequestMessage = new HttpRequestMessage + { + Method = new HttpMethod(reqMessage.StringProperty("Method")), + RequestUri = new System.Uri(reqMessage.StringProperty("RequestUri")), + Content = new System.Net.Http.ByteArrayContent(DeserializeContent(reqMessage.StringProperty("Content"), isBase64Request)) + }; + + foreach (var each in reqMessage.Property("Headers")) + { + response.RequestMessage.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + foreach (var each in reqMessage.Property("ContentHeaders")) + { + response.RequestMessage.Content.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + return response; + } + + public async Task SendAsync(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + counter++; + var rqkey = $"{Description}+{Context}+{Scenario}+${request.Method.Method}+{request.RequestUri}+{counter}"; + + switch (Mode) + { + case MockMode.Record: + //Add following code since the request.Content will be released after sendAsync + var requestClone = request; + if (requestClone.Content != null) + { + requestClone = await request.CloneWithContent(request.RequestUri, request.Method); + } + // make the call + var response = await next.SendAsync(request, callback); + + // save the message to the recording file + SaveMessage(rqkey, requestClone, response); + + // return the response. + return response; + + case MockMode.Playback: + // load and return the response. + return LoadMessage(rqkey); + + default: + // pass-thru, do nothing + return await next.SendAsync(request, callback); + } + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Properties/Resources.Designer.cs b/src/Cdn/generated/runtime/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..176438664757 --- /dev/null +++ b/src/Cdn/generated/runtime/Properties/Resources.Designer.cs @@ -0,0 +1,5633 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.generated.runtime.Properties +{ + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager + { + get + { + if (object.ReferenceEquals(resourceMan, null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.PowerShell.Cmdlets.Cdn.generated.runtime.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to The remote server returned an error: (401) Unauthorized.. + /// + public static string AccessDeniedExceptionMessage + { + get + { + return ResourceManager.GetString("AccessDeniedExceptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account id doesn't match one in subscription.. + /// + public static string AccountIdDoesntMatchSubscription + { + get + { + return ResourceManager.GetString("AccountIdDoesntMatchSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account needs to be specified. + /// + public static string AccountNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("AccountNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account "{0}" has been added.. + /// + public static string AddAccountAdded + { + get + { + return ResourceManager.GetString("AddAccountAdded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To switch to a different subscription, please use Select-AzureSubscription.. + /// + public static string AddAccountChangeSubscription + { + get + { + return ResourceManager.GetString("AddAccountChangeSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Skipping external tenant {0}, because you are using a guest or a foreign principal object identity. In order to access this tenant, please run Add-AzureAccount without "-Credential".. + /// + public static string AddAccountNonInteractiveGuestOrFpo + { + get + { + return ResourceManager.GetString("AddAccountNonInteractiveGuestOrFpo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription "{0}" is selected as the default subscription.. + /// + public static string AddAccountShowDefaultSubscription + { + get + { + return ResourceManager.GetString("AddAccountShowDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To view all the subscriptions, please use Get-AzureSubscription.. + /// + public static string AddAccountViewSubscriptions + { + get + { + return ResourceManager.GetString("AddAccountViewSubscriptions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} is created successfully.. + /// + public static string AddOnCreatedMessage + { + get + { + return ResourceManager.GetString("AddOnCreatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-on name {0} is already used.. + /// + public static string AddOnNameAlreadyUsed + { + get + { + return ResourceManager.GetString("AddOnNameAlreadyUsed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} not found.. + /// + public static string AddOnNotFound + { + get + { + return ResourceManager.GetString("AddOnNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-on {0} is removed successfully.. + /// + public static string AddOnRemovedMessage + { + get + { + return ResourceManager.GetString("AddOnRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} is updated successfully.. + /// + public static string AddOnUpdatedMessage + { + get + { + return ResourceManager.GetString("AddOnUpdatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}.. + /// + public static string AddRoleMessageCreate + { + get + { + return ResourceManager.GetString("AddRoleMessageCreate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Node.js by running ‘npm install azure’.. + /// + public static string AddRoleMessageCreateNode + { + get + { + return ResourceManager.GetString("AddRoleMessageCreateNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for PHP by running "pear WindowsAzure/WindowsAzure".. + /// + public static string AddRoleMessageCreatePHP + { + get + { + return ResourceManager.GetString("AddRoleMessageCreatePHP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to set role permissions. Please give the 'Network Service' user 'Read & execute' and 'Modify' permissions to the role folder, or run PowerShell as an Administrator. + /// + public static string AddRoleMessageInsufficientPermissions + { + get + { + return ResourceManager.GetString("AddRoleMessageInsufficientPermissions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A role name '{0}' already exists. + /// + public static string AddRoleMessageRoleExists + { + get + { + return ResourceManager.GetString("AddRoleMessageRoleExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Profile {0} already has an endpoint with name {1}. + /// + public static string AddTrafficManagerEndpointFailed + { + get + { + return ResourceManager.GetString("AddTrafficManagerEndpointFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure PowerShell collects usage data in order to improve your experience. + ///The data is anonymous and does not include commandline argument values. + ///The data is collected by Microsoft. + /// + ///Use the Disable-AzDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Az.Accounts module. To disable data collection: PS > Disable-AzDataCollection. + ///Use the Enable-AzDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Az.Accounts module. To enable [rest of string was truncated]";. + /// + public static string ARMDataCollectionMessage + { + get + { + return ResourceManager.GetString("ARMDataCollectionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [Common.Authentication]: Authenticating for account {0} with single tenant {1}.. + /// + public static string AuthenticatingForSingleTenant + { + get + { + return ResourceManager.GetString("AuthenticatingForSingleTenant", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Windows Azure Powershell\. + /// + public static string AzureDirectory + { + get + { + return ResourceManager.GetString("AzureDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://manage.windowsazure.com. + /// + public static string AzurePortalUrl + { + get + { + return ResourceManager.GetString("AzurePortalUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_PORTAL_URL. + /// + public static string AzurePortalUrlEnv + { + get + { + return ResourceManager.GetString("AzurePortalUrlEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Selected profile must not be null.. + /// + public static string AzureProfileMustNotBeNull + { + get + { + return ResourceManager.GetString("AzureProfileMustNotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure SDK\{0}\. + /// + public static string AzureSdkDirectory + { + get + { + return ResourceManager.GetString("AzureSdkDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File '{0}' already exists. Use the -Force parameter to overwrite it.. + /// + public static string AzureVMDscArchiveAlreadyExists + { + get + { + return ResourceManager.GetString("AzureVMDscArchiveAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find configuration data file: {0}. + /// + public static string AzureVMDscCannotFindConfigurationDataFile + { + get + { + return ResourceManager.GetString("AzureVMDscCannotFindConfigurationDataFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create Archive. + /// + public static string AzureVMDscCreateArchiveAction + { + get + { + return ResourceManager.GetString("AzureVMDscCreateArchiveAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The configuration data must be a .psd1 file. + /// + public static string AzureVMDscInvalidConfigurationDataFile + { + get + { + return ResourceManager.GetString("AzureVMDscInvalidConfigurationDataFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parsing configuration script: {0}. + /// + public static string AzureVMDscParsingConfiguration + { + get + { + return ResourceManager.GetString("AzureVMDscParsingConfiguration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Storage Blob '{0}' already exists. Use the -Force parameter to overwrite it.. + /// + public static string AzureVMDscStorageBlobAlreadyExists + { + get + { + return ResourceManager.GetString("AzureVMDscStorageBlobAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upload '{0}'. + /// + public static string AzureVMDscUploadToBlobStorageAction + { + get + { + return ResourceManager.GetString("AzureVMDscUploadToBlobStorageAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Execution failed because a background thread could not prompt the user.. + /// + public static string BaseShouldMethodFailureReason + { + get + { + return ResourceManager.GetString("BaseShouldMethodFailureReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Base Uri was empty.. + /// + public static string BaseUriEmpty + { + get + { + return ResourceManager.GetString("BaseUriEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} begin processing without ParameterSet.. + /// + public static string BeginProcessingWithoutParameterSetLog + { + get + { + return ResourceManager.GetString("BeginProcessingWithoutParameterSetLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} begin processing with ParameterSet '{1}'.. + /// + public static string BeginProcessingWithParameterSetLog + { + get + { + return ResourceManager.GetString("BeginProcessingWithParameterSetLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Blob with the name {0} already exists in the account.. + /// + public static string BlobAlreadyExistsInTheAccount + { + get + { + return ResourceManager.GetString("BlobAlreadyExistsInTheAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://{0}.blob.core.windows.net/. + /// + public static string BlobEndpointUri + { + get + { + return ResourceManager.GetString("BlobEndpointUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_BLOBSTORAGE_TEMPLATE. + /// + public static string BlobEndpointUriEnv + { + get + { + return ResourceManager.GetString("BlobEndpointUriEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is changing.. + /// + public static string BreakingChangeAttributeParameterChanging + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterChanging", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is becoming mandatory.. + /// + public static string BreakingChangeAttributeParameterMandatoryNow + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterMandatoryNow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is being replaced by parameter : '{1}'.. + /// + public static string BreakingChangeAttributeParameterReplaced + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterReplaced", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is being replaced by mandatory parameter : '{1}'.. + /// + public static string BreakingChangeAttributeParameterReplacedMandatory + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterReplacedMandatory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type of the parameter is changing from '{0}' to '{1}'.. + /// + public static string BreakingChangeAttributeParameterTypeChange + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterTypeChange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Change description : {0} + ///. + /// + public static string BreakingChangesAttributesChangeDescriptionMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesChangeDescriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet is being deprecated. There will be no replacement for it.. + /// + public static string BreakingChangesAttributesCmdLetDeprecationMessageNoReplacement + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetDeprecationMessageNoReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet is being deprecated. There will be no replacement for it.. + /// + public static string BreakingChangesAttributesParameterSetDeprecationMessageNoReplacement + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesParameterSetDeprecationMessageNoReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet '{0}' is replacing this cmdlet.. + /// + public static string BreakingChangesAttributesCmdLetDeprecationMessageWithReplacement + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetDeprecationMessageWithReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The output type is changing from the existing type :'{0}' to the new type :'{1}'. + /// + public static string BreakingChangesAttributesCmdLetOutputChange1 + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputChange1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "The output type '{0}' is changing". + /// + public static string BreakingChangesAttributesCmdLetOutputChange2 + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputChange2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ///- The following properties are being added to the output type : + ///. + /// + public static string BreakingChangesAttributesCmdLetOutputPropertiesAdded + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputPropertiesAdded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + /// - The following properties in the output type are being deprecated : + ///. + /// + public static string BreakingChangesAttributesCmdLetOutputPropertiesRemoved + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputPropertiesRemoved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The output type '{0}' is being deprecated without a replacement.. + /// + public static string BreakingChangesAttributesCmdLetOutputTypeDeprecated + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputTypeDeprecated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to - {0} + /// + ///. + /// + public static string BreakingChangesAttributesDeclarationMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesDeclarationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to - Cmdlet : '{0}' + /// - {1} + ///. + /// + public static string BreakingChangesAttributesDeclarationMessageWithCmdletName + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesDeclarationMessageWithCmdletName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to NOTE : Go to {0} for steps to suppress (and other related information on) the breaking change messages.. + /// + public static string BreakingChangesAttributesFooterMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesFooterMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Breaking changes in the cmdlet '{0}' :. + /// + public static string BreakingChangesAttributesHeaderMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesHeaderMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note : This change will take effect on '{0}' + ///. + /// + public static string BreakingChangesAttributesInEffectByDateMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesInEffectByDateMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note :The change is expected to take effect from the version : '{0}' + /// + ///. + /// + public static string BreakingChangesAttributesInEffectByVersion + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesInEffectByVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ```powershell + ///# Old + ///{0} + /// + ///# New + ///{1} + ///``` + /// + ///. + /// + public static string BreakingChangesAttributesUsageChangeMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesUsageChangeMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cmdlet invocation changes : + /// Old Way : {0} + /// New Way : {1}. + /// + public static string BreakingChangesAttributesUsageChangeMessageConsole + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesUsageChangeMessageConsole", resourceCulture); + } + } + + /// + /// The cmdlet is in experimental stage. The function may not be enabled in current subscription. + /// + public static string ExperimentalCmdletMessage + { + get + { + return ResourceManager.GetString("ExperimentalCmdletMessage", resourceCulture); + } + } + + + + /// + /// Looks up a localized string similar to CACHERUNTIMEURL. + /// + public static string CacheRuntimeUrl + { + get + { + return ResourceManager.GetString("CacheRuntimeUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cache. + /// + public static string CacheRuntimeValue + { + get + { + return ResourceManager.GetString("CacheRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CacheRuntimeVersion. + /// + public static string CacheRuntimeVersionKey + { + get + { + return ResourceManager.GetString("CacheRuntimeVersionKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}). + /// + public static string CacheVersionWarningText + { + get + { + return ResourceManager.GetString("CacheVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot change built-in environment {0}.. + /// + public static string CannotChangeBuiltinEnvironment + { + get + { + return ResourceManager.GetString("CannotChangeBuiltinEnvironment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find {0} with name {1}.. + /// + public static string CannotFind + { + get + { + return ResourceManager.GetString("CannotFind", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deployment for service {0} with {1} slot doesn't exist. + /// + public static string CannotFindDeployment + { + get + { + return ResourceManager.GetString("CannotFindDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can't find valid Microsoft Azure role in current directory {0}. + /// + public static string CannotFindRole + { + get + { + return ResourceManager.GetString("CannotFindRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service {0} configuration file (ServiceConfiguration.Cloud.cscfg) is either null or doesn't exist. + /// + public static string CannotFindServiceConfigurationFile + { + get + { + return ResourceManager.GetString("CannotFindServiceConfigurationFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid service path! Cannot locate ServiceDefinition.csdef in current folder or parent folders.. + /// + public static string CannotFindServiceRoot + { + get + { + return ResourceManager.GetString("CannotFindServiceRoot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named {0} with id {1} is not currently imported. You must import this subscription before it can be updated.. + /// + public static string CannotUpdateUnknownSubscription + { + get + { + return ResourceManager.GetString("CannotUpdateUnknownSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ManagementCertificate. + /// + public static string CertificateElementName + { + get + { + return ResourceManager.GetString("CertificateElementName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to certificate.pfx. + /// + public static string CertificateFileName + { + get + { + return ResourceManager.GetString("CertificateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Certificate imported into CurrentUser\My\{0}. + /// + public static string CertificateImportedMessage + { + get + { + return ResourceManager.GetString("CertificateImportedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No certificate was found in the certificate store with thumbprint {0}. + /// + public static string CertificateNotFoundInStore + { + get + { + return ResourceManager.GetString("CertificateNotFoundInStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your account does not have access to the private key for certificate {0}. + /// + public static string CertificatePrivateKeyAccessError + { + get + { + return ResourceManager.GetString("CertificatePrivateKeyAccessError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} {1} deployment for {2} service. + /// + public static string ChangeDeploymentStateWaitMessage + { + get + { + return ResourceManager.GetString("ChangeDeploymentStateWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cloud service {0} is in {1} state.. + /// + public static string ChangeDeploymentStatusCompleteMessage + { + get + { + return ResourceManager.GetString("ChangeDeploymentStatusCompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Changing/Removing public environment '{0}' is not allowed.. + /// + public static string ChangePublicEnvironmentMessage + { + get + { + return ResourceManager.GetString("ChangePublicEnvironmentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} is set to value {1}. + /// + public static string ChangeSettingsElementMessage + { + get + { + return ResourceManager.GetString("ChangeSettingsElementMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Changing public environment is not supported.. + /// + public static string ChangingDefaultEnvironmentNotSupported + { + get + { + return ResourceManager.GetString("ChangingDefaultEnvironmentNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Choose which publish settings file to use:. + /// + public static string ChoosePublishSettingsFile + { + get + { + return ResourceManager.GetString("ChoosePublishSettingsFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel. + /// + public static string ClientDiagnosticLevelName + { + get + { + return ResourceManager.GetString("ClientDiagnosticLevelName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1. + /// + public static string ClientDiagnosticLevelValue + { + get + { + return ResourceManager.GetString("ClientDiagnosticLevelValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cloud_package.cspkg. + /// + public static string CloudPackageFileName + { + get + { + return ResourceManager.GetString("CloudPackageFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceConfiguration.Cloud.cscfg. + /// + public static string CloudServiceConfigurationFileName + { + get + { + return ResourceManager.GetString("CloudServiceConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-ons for {0}. + /// + public static string CloudServiceDescription + { + get + { + return ResourceManager.GetString("CloudServiceDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Communication could not be established. This could be due to an invalid subscription ID. Note that subscription IDs are case sensitive.. + /// + public static string CommunicationCouldNotBeEstablished + { + get + { + return ResourceManager.GetString("CommunicationCouldNotBeEstablished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complete. + /// + public static string CompleteMessage + { + get + { + return ResourceManager.GetString("CompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OperationID : '{0}'. + /// + public static string ComputeCloudExceptionOperationIdMessage + { + get + { + return ResourceManager.GetString("ComputeCloudExceptionOperationIdMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to config.json. + /// + public static string ConfigurationFileName + { + get + { + return ResourceManager.GetString("ConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to VirtualMachine creation failed.. + /// + public static string CreateFailedErrorMessage + { + get + { + return ResourceManager.GetString("CreateFailedErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating the website failed. If this is the first website for this subscription, please create it using the management portal instead.. + /// + public static string CreateWebsiteFailed + { + get + { + return ResourceManager.GetString("CreateWebsiteFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core. + /// + public static string DataCacheClientsType + { + get + { + return ResourceManager.GetString("DataCacheClientsType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to //blobcontainer[@datacenter='{0}']. + /// + public static string DatacenterBlobQuery + { + get + { + return ResourceManager.GetString("DatacenterBlobQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft Azure PowerShell Data Collection Confirmation. + /// + public static string DataCollectionActivity + { + get + { + return ResourceManager.GetString("DataCollectionActivity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You choose not to participate in Microsoft Azure PowerShell data collection.. + /// + public static string DataCollectionConfirmNo + { + get + { + return ResourceManager.GetString("DataCollectionConfirmNo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This confirmation message will be dismissed in '{0}' second(s).... + /// + public static string DataCollectionConfirmTime + { + get + { + return ResourceManager.GetString("DataCollectionConfirmTime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You choose to participate in Microsoft Azure PowerShell data collection.. + /// + public static string DataCollectionConfirmYes + { + get + { + return ResourceManager.GetString("DataCollectionConfirmYes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The setting profile has been saved to the following path '{0}'.. + /// + public static string DataCollectionSaveFileInformation + { + get + { + return ResourceManager.GetString("DataCollectionSaveFileInformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Setting: {0} as the default and current subscription. To view other subscriptions use Get-AzureSubscription. + /// + public static string DefaultAndCurrentSubscription + { + get + { + return ResourceManager.GetString("DefaultAndCurrentSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to none. + /// + public static string DefaultFileVersion + { + get + { + return ResourceManager.GetString("DefaultFileVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There are no hostnames which could be used for validation.. + /// + public static string DefaultHostnamesValidation + { + get + { + return ResourceManager.GetString("DefaultHostnamesValidation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 8080. + /// + public static string DefaultPort + { + get + { + return ResourceManager.GetString("DefaultPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1000. + /// + public static string DefaultRoleCachingInMB + { + get + { + return ResourceManager.GetString("DefaultRoleCachingInMB", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Auto. + /// + public static string DefaultUpgradeMode + { + get + { + return ResourceManager.GetString("DefaultUpgradeMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 80. + /// + public static string DefaultWebPort + { + get + { + return ResourceManager.GetString("DefaultWebPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delete. + /// + public static string Delete + { + get + { + return ResourceManager.GetString("Delete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} slot for service {1} is already in {2} state. + /// + public static string DeploymentAlreadyInState + { + get + { + return ResourceManager.GetString("DeploymentAlreadyInState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The deployment in {0} slot for service {1} is removed. + /// + public static string DeploymentRemovedMessage + { + get + { + return ResourceManager.GetString("DeploymentRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel. + /// + public static string DiagnosticLevelName + { + get + { + return ResourceManager.GetString("DiagnosticLevelName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1. + /// + public static string DiagnosticLevelValue + { + get + { + return ResourceManager.GetString("DiagnosticLevelValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The key to add already exists in the dictionary.. + /// + public static string DictionaryAddAlreadyContainsKey + { + get + { + return ResourceManager.GetString("DictionaryAddAlreadyContainsKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The array index cannot be less than zero.. + /// + public static string DictionaryCopyToArrayIndexLessThanZero + { + get + { + return ResourceManager.GetString("DictionaryCopyToArrayIndexLessThanZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The supplied array does not have enough room to contain the copied elements.. + /// + public static string DictionaryCopyToArrayTooShort + { + get + { + return ResourceManager.GetString("DictionaryCopyToArrayTooShort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided dns {0} doesn't exist. + /// + public static string DnsDoesNotExist + { + get + { + return ResourceManager.GetString("DnsDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft Azure Certificate. + /// + public static string EnableRemoteDesktop_FriendlyCertificateName + { + get + { + return ResourceManager.GetString("EnableRemoteDesktop_FriendlyCertificateName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Endpoint can't be retrieved for storage account. + /// + public static string EndPointNotFoundForBlobStorage + { + get + { + return ResourceManager.GetString("EndPointNotFoundForBlobStorage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} end processing.. + /// + public static string EndProcessingLog + { + get + { + return ResourceManager.GetString("EndProcessingLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To use Active Directory authentication, you must configure the ActiveDirectoryEndpoint, ActiveDirectoryTenantId, and ActiveDirectorServiceEndpointResourceId for environment of '{0}'. You can configure these properties for this environment using the Set-AzureEnvironment cmdlet.. + /// + public static string EnvironmentDoesNotSupportActiveDirectory + { + get + { + return ResourceManager.GetString("EnvironmentDoesNotSupportActiveDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The environment '{0}' already exists.. + /// + public static string EnvironmentExists + { + get + { + return ResourceManager.GetString("EnvironmentExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Environment name doesn't match one in subscription.. + /// + public static string EnvironmentNameDoesntMatchSubscription + { + get + { + return ResourceManager.GetString("EnvironmentNameDoesntMatchSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Environment name needs to be specified.. + /// + public static string EnvironmentNameNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("EnvironmentNameNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Environment needs to be specified.. + /// + public static string EnvironmentNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("EnvironmentNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The environment name '{0}' is not found.. + /// + public static string EnvironmentNotFound + { + get + { + return ResourceManager.GetString("EnvironmentNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to environments.xml. + /// + public static string EnvironmentsFileName + { + get + { + return ResourceManager.GetString("EnvironmentsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error creating VirtualMachine. + /// + public static string ErrorCreatingVirtualMachine + { + get + { + return ResourceManager.GetString("ErrorCreatingVirtualMachine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to download available runtimes for location '{0}'. + /// + public static string ErrorRetrievingRuntimesForLocation + { + get + { + return ResourceManager.GetString("ErrorRetrievingRuntimesForLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error updating VirtualMachine. + /// + public static string ErrorUpdatingVirtualMachine + { + get + { + return ResourceManager.GetString("ErrorUpdatingVirtualMachine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Job Id {0} failed. Error: {1}, ExceptionDetails: {2}. + /// + public static string FailedJobErrorMessage + { + get + { + return ResourceManager.GetString("FailedJobErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File path is not valid.. + /// + public static string FilePathIsNotValid + { + get + { + return ResourceManager.GetString("FilePathIsNotValid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP request was forbidden with client authentication scheme 'Anonymous'.. + /// + public static string FirstPurchaseErrorMessage + { + get + { + return ResourceManager.GetString("FirstPurchaseErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This add-on requires you to purchase the first instance through the Microsoft Azure Portal. Subsequent purchases can be performed through PowerShell.. + /// + public static string FirstPurchaseMessage + { + get + { + return ResourceManager.GetString("FirstPurchaseMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation Status:. + /// + public static string GatewayOperationStatus + { + get + { + return ResourceManager.GetString("GatewayOperationStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\General. + /// + public static string GeneralScaffolding + { + get + { + return ResourceManager.GetString("GeneralScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Getting all available Microsoft Azure Add-Ons, this may take few minutes.... + /// + public static string GetAllAddOnsWaitMessage + { + get + { + return ResourceManager.GetString("GetAllAddOnsWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name{0}Primary Key{0}Seconday Key. + /// + public static string GetStorageKeysHeader + { + get + { + return ResourceManager.GetString("GetStorageKeysHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Git not found. Please install git and place it in your command line path.. + /// + public static string GitNotFound + { + get + { + return ResourceManager.GetString("GitNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find publish settings. Please run Import-AzurePublishSettingsFile.. + /// + public static string GlobalSettingsManager_Load_PublishSettingsNotFound + { + get + { + return ResourceManager.GetString("GlobalSettingsManager_Load_PublishSettingsNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the WadCfg end element in the config.. + /// + public static string IaasDiagnosticsBadConfigNoEndWadCfg + { + get + { + return ResourceManager.GetString("IaasDiagnosticsBadConfigNoEndWadCfg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WadCfg start element in the config is not matching the end element.. + /// + public static string IaasDiagnosticsBadConfigNoMatchingWadCfg + { + get + { + return ResourceManager.GetString("IaasDiagnosticsBadConfigNoMatchingWadCfg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the WadCfg element in the config.. + /// + public static string IaasDiagnosticsBadConfigNoWadCfg + { + get + { + return ResourceManager.GetString("IaasDiagnosticsBadConfigNoWadCfg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode.dll. + /// + public static string IISNodeDll + { + get + { + return ResourceManager.GetString("IISNodeDll", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode. + /// + public static string IISNodeEngineKey + { + get + { + return ResourceManager.GetString("IISNodeEngineKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode-dev\\release\\x64. + /// + public static string IISNodePath + { + get + { + return ResourceManager.GetString("IISNodePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode. + /// + public static string IISNodeRuntimeValue + { + get + { + return ResourceManager.GetString("IISNodeRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing IISNode version {0} in Azure for WebRole '{1}' (the version locally installed is: {2}). + /// + public static string IISNodeVersionWarningText + { + get + { + return ResourceManager.GetString("IISNodeVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Illegal characters in path.. + /// + public static string IllegalPath + { + get + { + return ResourceManager.GetString("IllegalPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. + /// + public static string InternalServerErrorMessage + { + get + { + return ResourceManager.GetString("InternalServerErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot enable memcach protocol on a cache worker role {0}.. + /// + public static string InvalidCacheRoleName + { + get + { + return ResourceManager.GetString("InvalidCacheRoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings. + /// + public static string InvalidCertificate + { + get + { + return ResourceManager.GetString("InvalidCertificate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid certificate format.. + /// + public static string InvalidCertificateSingle + { + get + { + return ResourceManager.GetString("InvalidCertificateSingle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided configuration path is invalid or doesn't exist. + /// + public static string InvalidConfigPath + { + get + { + return ResourceManager.GetString("InvalidConfigPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The country name is invalid, please use a valid two character country code, as described in ISO 3166-1 alpha-2.. + /// + public static string InvalidCountryNameMessage + { + get + { + return ResourceManager.GetString("InvalidCountryNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No default subscription has been designated. Use Select-AzureSubscription -Default <subscriptionName> to set the default subscription.. + /// + public static string InvalidDefaultSubscription + { + get + { + return ResourceManager.GetString("InvalidDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deployment with {0} does not exist. + /// + public static string InvalidDeployment + { + get + { + return ResourceManager.GetString("InvalidDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The deployment slot name {0} is invalid. Slot name must be either "Staging" or "Production".. + /// + public static string InvalidDeploymentSlot + { + get + { + return ResourceManager.GetString("InvalidDeploymentSlot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "{0}" is an invalid DNS name for {1}. + /// + public static string InvalidDnsName + { + get + { + return ResourceManager.GetString("InvalidDnsName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid service endpoint.. + /// + public static string InvalidEndpoint + { + get + { + return ResourceManager.GetString("InvalidEndpoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided file in {0} must be have {1} extension. + /// + public static string InvalidFileExtension + { + get + { + return ResourceManager.GetString("InvalidFileExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File {0} has invalid characters. + /// + public static string InvalidFileName + { + get + { + return ResourceManager.GetString("InvalidFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must create your git publishing credentials using the Microsoft Azure portal. + ///Please follow these steps in the portal: + ///1. On the left side open "Web Sites" + ///2. Click on any website + ///3. Choose "Setup Git Publishing" or "Reset deployment credentials" + ///4. Back in the PowerShell window, rerun this command by typing "New-AzureWebSite {site name} -Git -PublishingUsername {username}. + /// + public static string InvalidGitCredentials + { + get + { + return ResourceManager.GetString("InvalidGitCredentials", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value {0} provided is not a valid GUID. Please provide a valid GUID.. + /// + public static string InvalidGuid + { + get + { + return ResourceManager.GetString("InvalidGuid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified hostname does not exist. Please specify a valid hostname for the site.. + /// + public static string InvalidHostnameValidation + { + get + { + return ResourceManager.GetString("InvalidHostnameValidation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} instances must be greater than or equal 0 and less than or equal 20. + /// + public static string InvalidInstancesCount + { + get + { + return ResourceManager.GetString("InvalidInstancesCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error creating your webjob. Please make sure that the script is in the root folder of the zip file.. + /// + public static string InvalidJobFile + { + get + { + return ResourceManager.GetString("InvalidJobFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not download a valid runtime manifest, Please check your internet connection and try again.. + /// + public static string InvalidManifestError + { + get + { + return ResourceManager.GetString("InvalidManifestError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The account {0} was not found. Please specify a valid account name.. + /// + public static string InvalidMediaServicesAccount + { + get + { + return ResourceManager.GetString("InvalidMediaServicesAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided name "{0}" does not match the service bus namespace naming rules.. + /// + public static string InvalidNamespaceName + { + get + { + return ResourceManager.GetString("InvalidNamespaceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path must specify a valid path to an Azure profile.. + /// + public static string InvalidNewProfilePath + { + get + { + return ResourceManager.GetString("InvalidNewProfilePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Value cannot be null. Parameter name: '{0}'. + /// + public static string InvalidNullArgument + { + get + { + return ResourceManager.GetString("InvalidNullArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is invalid or empty. + /// + public static string InvalidOrEmptyArgumentMessage + { + get + { + return ResourceManager.GetString("InvalidOrEmptyArgumentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided package path is invalid or doesn't exist. + /// + public static string InvalidPackagePath + { + get + { + return ResourceManager.GetString("InvalidPackagePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is an invalid parameter set name.. + /// + public static string InvalidParameterSetName + { + get + { + return ResourceManager.GetString("InvalidParameterSetName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} doesn't exist in {1} or you've not passed valid value for it. + /// + public static string InvalidPath + { + get + { + return ResourceManager.GetString("InvalidPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path {0} has invalid characters. + /// + public static string InvalidPathName + { + get + { + return ResourceManager.GetString("InvalidPathName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain one of the following sets of properties: {SubscriptionId, Certificate}, {SubscriptionId, Username, Password}, {SubscriptionId, ServicePrincipal, Password, Tenant}, {SubscriptionId, AccountId, Token}. + /// + public static string InvalidProfileProperties + { + get + { + return ResourceManager.GetString("InvalidProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile. + /// + public static string InvalidPublishSettingsSchema + { + get + { + return ResourceManager.GetString("InvalidPublishSettingsSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided role name "{0}" has invalid characters. + /// + public static string InvalidRoleNameMessage + { + get + { + return ResourceManager.GetString("InvalidRoleNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid name for the service root folder is required. + /// + public static string InvalidRootNameMessage + { + get + { + return ResourceManager.GetString("InvalidRootNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is not a recognized runtime type. + /// + public static string InvalidRuntimeError + { + get + { + return ResourceManager.GetString("InvalidRuntimeError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid language is required. + /// + public static string InvalidScaffoldingLanguageArg + { + get + { + return ResourceManager.GetString("InvalidScaffoldingLanguageArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No subscription is currently selected. Use Select-Subscription to activate a subscription.. + /// + public static string InvalidSelectedSubscription + { + get + { + return ResourceManager.GetString("InvalidSelectedSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided location "{0}" does not exist in the available locations use Get-AzureSBLocation for listing available locations.. + /// + public static string InvalidServiceBusLocation + { + get + { + return ResourceManager.GetString("InvalidServiceBusLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please provide a service name or run this command from inside a service project directory.. + /// + public static string InvalidServiceName + { + get + { + return ResourceManager.GetString("InvalidServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must provide valid value for {0}. + /// + public static string InvalidServiceSettingElement + { + get + { + return ResourceManager.GetString("InvalidServiceSettingElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to settings.json is invalid or doesn't exist. + /// + public static string InvalidServiceSettingMessage + { + get + { + return ResourceManager.GetString("InvalidServiceSettingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named '{0}' cannot be found. Use Set-AzureSubscription to initialize the subscription data.. + /// + public static string InvalidSubscription + { + get + { + return ResourceManager.GetString("InvalidSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided subscription id {0} is not valid. + /// + public static string InvalidSubscriptionId + { + get + { + return ResourceManager.GetString("InvalidSubscriptionId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Must specify a non-null subscription name.. + /// + public static string InvalidSubscriptionName + { + get + { + return ResourceManager.GetString("InvalidSubscriptionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid subscription name is required. This can be provided using the -Subscription parameter or by setting the subscription via the Set-AzureSubscription cmdlet. + /// + public static string InvalidSubscriptionNameMessage + { + get + { + return ResourceManager.GetString("InvalidSubscriptionNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided subscriptions file {0} has invalid content.. + /// + public static string InvalidSubscriptionsDataSchema + { + get + { + return ResourceManager.GetString("InvalidSubscriptionsDataSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} VM size should be ExtraSmall, Small, Medium, Large or ExtraLarge.. + /// + public static string InvalidVMSize + { + get + { + return ResourceManager.GetString("InvalidVMSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The web job file must have *.zip extension. + /// + public static string InvalidWebJobFile + { + get + { + return ResourceManager.GetString("InvalidWebJobFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Singleton option works for continuous jobs only.. + /// + public static string InvalidWebJobSingleton + { + get + { + return ResourceManager.GetString("InvalidWebJobSingleton", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The website {0} was not found. Please specify a valid website name.. + /// + public static string InvalidWebsite + { + get + { + return ResourceManager.GetString("InvalidWebsite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No job for id: {0} was found.. + /// + public static string JobNotFound + { + get + { + return ResourceManager.GetString("JobNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to engines. + /// + public static string JsonEnginesSectionName + { + get + { + return ResourceManager.GetString("JsonEnginesSectionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Scaffolding for this language is not yet supported. + /// + public static string LanguageScaffoldingIsNotSupported + { + get + { + return ResourceManager.GetString("LanguageScaffoldingIsNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Link already established. + /// + public static string LinkAlreadyEstablished + { + get + { + return ResourceManager.GetString("LinkAlreadyEstablished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to local_package.csx. + /// + public static string LocalPackageFileName + { + get + { + return ResourceManager.GetString("LocalPackageFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceConfiguration.Local.cscfg. + /// + public static string LocalServiceConfigurationFileName + { + get + { + return ResourceManager.GetString("LocalServiceConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Looking for {0} deployment for {1} cloud service.... + /// + public static string LookingForDeploymentMessage + { + get + { + return ResourceManager.GetString("LookingForDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Looking for cloud service {0}.... + /// + public static string LookingForServiceMessage + { + get + { + return ResourceManager.GetString("LookingForServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure Long-Running Job. + /// + public static string LROJobName + { + get + { + return ResourceManager.GetString("LROJobName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet failed in background execution. The returned error was '{0}'. Please execute the cmdlet again. You may need to execute this cmdlet synchronously, by omitting the '-AsJob' parameter.. + /// + public static string LROTaskExceptionMessage + { + get + { + return ResourceManager.GetString("LROTaskExceptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to managementCertificate.pem. + /// + public static string ManagementCertificateFileName + { + get + { + return ResourceManager.GetString("ManagementCertificateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ?whr={0}. + /// + public static string ManagementPortalRealmFormat + { + get + { + return ResourceManager.GetString("ManagementPortalRealmFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to //baseuri. + /// + public static string ManifestBaseUriQuery + { + get + { + return ResourceManager.GetString("ManifestBaseUriQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to uri. + /// + public static string ManifestBlobUriKey + { + get + { + return ResourceManager.GetString("ManifestBlobUriKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to http://az413943.vo.msecnd.net/node/runtimemanifest_0.7.5.2.xml. + /// + public static string ManifestUri + { + get + { + return ResourceManager.GetString("ManifestUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain a 'Certificate' of type 'X509Certificate2'.. + /// + public static string MissingCertificateInProfileProperties + { + get + { + return ResourceManager.GetString("MissingCertificateInProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain a 'Password' with an associated 'Username' or 'ServicePrincipal'.. + /// + public static string MissingPasswordInProfileProperties + { + get + { + return ResourceManager.GetString("MissingPasswordInProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain a 'SubscriptionId'.. + /// + public static string MissingSubscriptionInProfileProperties + { + get + { + return ResourceManager.GetString("MissingSubscriptionInProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple Add-Ons found holding name {0}. + /// + public static string MultipleAddOnsFoundMessage + { + get + { + return ResourceManager.GetString("MultipleAddOnsFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple possible publishing users. Please go to the Portal and use the listed deployment user, or click 'set/reset deployment credentials' to set up a new user account, then reurn this cmdlet and specify PublishingUsername.. + /// + public static string MultiplePublishingUsernames + { + get + { + return ResourceManager.GetString("MultiplePublishingUsernames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The first publish settings file "{0}" is used. If you want to use another file specify the file name.. + /// + public static string MultiplePublishSettingsFilesFoundMessage + { + get + { + return ResourceManager.GetString("MultiplePublishSettingsFilesFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.NamedCaches. + /// + public static string NamedCacheSettingName + { + get + { + return ResourceManager.GetString("NamedCacheSettingName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]}. + /// + public static string NamedCacheSettingValue + { + get + { + return ResourceManager.GetString("NamedCacheSettingValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A publishing username is required. Please specify one using the argument PublishingUsername.. + /// + public static string NeedPublishingUsernames + { + get + { + return ResourceManager.GetString("NeedPublishingUsernames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to New Add-On Confirmation. + /// + public static string NewAddOnConformation + { + get + { + return ResourceManager.GetString("NewAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my + ///contact information with {2}.. + /// + public static string NewMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("NewMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen because the namespace name is already used or due to an incorrect location name. Use Get-AzureSBLocation cmdlet to list valid names.. + /// + public static string NewNamespaceErrorMessage + { + get + { + return ResourceManager.GetString("NewNamespaceErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of + ///use and privacy statement at {0} and (c) agree to sharing my contact information with {2}.. + /// + public static string NewNonMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("NewNonMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service has been created at {0}. + /// + public static string NewServiceCreatedMessage + { + get + { + return ResourceManager.GetString("NewServiceCreatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No. + /// + public static string No + { + get + { + return ResourceManager.GetString("No", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no access token cached for subscription {0}, user id {1}. Use the Add-AzureAccount cmdlet to log in again and get a token for this subscription.. + /// + public static string NoCachedToken + { + get + { + return ResourceManager.GetString("NoCachedToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service does not have any cache worker roles, add one first by running cmdlet Add-AzureCacheWorkerRole.. + /// + public static string NoCacheWorkerRoles + { + get + { + return ResourceManager.GetString("NoCacheWorkerRoles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No clouds available. + /// + public static string NoCloudsAvailable + { + get + { + return ResourceManager.GetString("NoCloudsAvailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "There is no current context, please log in using Connect-AzAccount.". + /// + public static string NoCurrentContextForDataCmdlet + { + get + { + return ResourceManager.GetString("NoCurrentContextForDataCmdlet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to nodejs. + /// + public static string NodeDirectory + { + get + { + return ResourceManager.GetString("NodeDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node. + /// + public static string NodeEngineKey + { + get + { + return ResourceManager.GetString("NodeEngineKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node.exe. + /// + public static string NodeExe + { + get + { + return ResourceManager.GetString("NodeExe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no default subscription set, please set a default subscription by running Set-AzureSubscription -Default <subscription name>. + /// + public static string NoDefaultSubscriptionMessage + { + get + { + return ResourceManager.GetString("NoDefaultSubscriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft SDKs\Azure\Nodejs\Nov2011. + /// + public static string NodeModulesPath + { + get + { + return ResourceManager.GetString("NodeModulesPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to nodejs. + /// + public static string NodeProgramFilesFolderName + { + get + { + return ResourceManager.GetString("NodeProgramFilesFolderName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node. + /// + public static string NodeRuntimeValue + { + get + { + return ResourceManager.GetString("NodeRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\Node. + /// + public static string NodeScaffolding + { + get + { + return ResourceManager.GetString("NodeScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.Node. + /// + public static string NodeScaffoldingResources + { + get + { + return ResourceManager.GetString("NodeScaffoldingResources", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing Node version {0} in Azure for Role '{1}' (the Node version locally installed is: {2}). + /// + public static string NodeVersionWarningText + { + get + { + return ResourceManager.GetString("NodeVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No, I do not agree. + /// + public static string NoHint + { + get + { + return ResourceManager.GetString("NoHint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please connect to internet before executing this cmdlet. + /// + public static string NoInternetConnection + { + get + { + return ResourceManager.GetString("NoInternetConnection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <NONE>. + /// + public static string None + { + get + { + return ResourceManager.GetString("None", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No publish settings files with extension *.publishsettings are found in the directory "{0}".. + /// + public static string NoPublishSettingsFilesFoundMessage + { + get + { + return ResourceManager.GetString("NoPublishSettingsFilesFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no subscription associated with account {0}.. + /// + public static string NoSubscriptionAddedMessage + { + get + { + return ResourceManager.GetString("NoSubscriptionAddedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No subscriptions are associated with the logged in account in Azure Service Management (RDFE). This means that the logged in user is not an administrator or co-administrator for any account.\r\nDid you mean to execute Connect-AzAccount?. + /// + public static string NoSubscriptionFoundForTenant + { + get + { + return ResourceManager.GetString("NoSubscriptionFoundForTenant", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' must be a cache worker role. Verify that it has proper cache worker role configuration.. + /// + public static string NotCacheWorkerRole + { + get + { + return ResourceManager.GetString("NotCacheWorkerRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Certificate can't be null.. + /// + public static string NullCertificateMessage + { + get + { + return ResourceManager.GetString("NullCertificateMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} could not be null or empty. + /// + public static string NullObjectMessage + { + get + { + return ResourceManager.GetString("NullObjectMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to add a null RoleSettings to {0}. + /// + public static string NullRoleSettingsMessage + { + get + { + return ResourceManager.GetString("NullRoleSettingsMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to add new role to null service definition. + /// + public static string NullServiceDefinitionMessage + { + get + { + return ResourceManager.GetString("NullServiceDefinitionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request offer '{0}' is not found.. + /// + public static string OfferNotFoundMessage + { + get + { + return ResourceManager.GetString("OfferNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation "{0}" failed on VM with ID: {1}. + /// + public static string OperationFailedErrorMessage + { + get + { + return ResourceManager.GetString("OperationFailedErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The REST operation failed with message '{0}' and error code '{1}'. + /// + public static string OperationFailedMessage + { + get + { + return ResourceManager.GetString("OperationFailedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Job Id {0} did not complete within expected time or it is in Failed/Canceled/Invalid state.. + /// + public static string OperationTimedOutOrError + { + get + { + return ResourceManager.GetString("OperationTimedOutOrError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to package. + /// + public static string Package + { + get + { + return ResourceManager.GetString("Package", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Package is created at service root path {0}.. + /// + public static string PackageCreated + { + get + { + return ResourceManager.GetString("PackageCreated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {{ + /// "author": "", + /// + /// "name": "{0}", + /// "version": "0.0.0", + /// "dependencies":{{}}, + /// "devDependencies":{{}}, + /// "optionalDependencies": {{}}, + /// "engines": {{ + /// "node": "*", + /// "iisnode": "*" + /// }} + /// + ///}} + ///. + /// + public static string PackageJsonDefaultFile + { + get + { + return ResourceManager.GetString("PackageJsonDefaultFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to package.json. + /// + public static string PackageJsonFileName + { + get + { + return ResourceManager.GetString("PackageJsonFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path {0} doesn't exist.. + /// + public static string PathDoesNotExist + { + get + { + return ResourceManager.GetString("PathDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path for {0} doesn't exist in {1}.. + /// + public static string PathDoesNotExistForElement + { + get + { + return ResourceManager.GetString("PathDoesNotExistForElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the Peer Asn has to be provided.. + /// + public static string PeerAsnRequired + { + get + { + return ResourceManager.GetString("PeerAsnRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 5.4.0. + /// + public static string PHPDefaultRuntimeVersion + { + get + { + return ResourceManager.GetString("PHPDefaultRuntimeVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to php. + /// + public static string PhpRuntimeValue + { + get + { + return ResourceManager.GetString("PhpRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\PHP. + /// + public static string PHPScaffolding + { + get + { + return ResourceManager.GetString("PHPScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.PHP. + /// + public static string PHPScaffoldingResources + { + get + { + return ResourceManager.GetString("PHPScaffoldingResources", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing PHP version {0} for Role '{1}' (the PHP version locally installed is: {2}). + /// + public static string PHPVersionWarningText + { + get + { + return ResourceManager.GetString("PHPVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must create your first web site using the Microsoft Azure portal. + ///Please follow these steps in the portal: + ///1. At the bottom of the page, click on New > Web Site > Quick Create + ///2. Type {0} in the URL field + ///3. Click on "Create Web Site" + ///4. Once the site has been created, click on the site name + ///5. Click on "Set up Git publishing" or "Reset deployment credentials" and setup a publishing username and password. Use those credentials for all new websites you create.. + /// + public static string PortalInstructions + { + get + { + return ResourceManager.GetString("PortalInstructions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 6. Back in the console window, rerun this command by typing "New-AzureWebsite <site name> -Git". + /// + public static string PortalInstructionsGit + { + get + { + return ResourceManager.GetString("PortalInstructionsGit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This cmdlet is in preview. The functionality may not be available in the selected subscription. + /// + public static string PreviewCmdletMessage + { + get + { + return ResourceManager.GetString("PreviewCmdletMessage", resourceCulture); + } + } + + + /// + /// Looks up a localized string similar to A value for the Primary Peer Subnet has to be provided.. + /// + public static string PrimaryPeerSubnetRequired + { + get + { + return ResourceManager.GetString("PrimaryPeerSubnetRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Promotion code can be used only when updating to a new plan.. + /// + public static string PromotionCodeWithCurrentPlanMessage + { + get + { + return ResourceManager.GetString("PromotionCodeWithCurrentPlanMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service not published at user request.. + /// + public static string PublishAbortedAtUserRequest + { + get + { + return ResourceManager.GetString("PublishAbortedAtUserRequest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complete.. + /// + public static string PublishCompleteMessage + { + get + { + return ResourceManager.GetString("PublishCompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connecting.... + /// + public static string PublishConnectingMessage + { + get + { + return ResourceManager.GetString("PublishConnectingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created Deployment ID: {0}.. + /// + public static string PublishCreatedDeploymentMessage + { + get + { + return ResourceManager.GetString("PublishCreatedDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created hosted service '{0}'.. + /// + public static string PublishCreatedServiceMessage + { + get + { + return ResourceManager.GetString("PublishCreatedServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created Website URL: {0}.. + /// + public static string PublishCreatedWebsiteMessage + { + get + { + return ResourceManager.GetString("PublishCreatedWebsiteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating.... + /// + public static string PublishCreatingServiceMessage + { + get + { + return ResourceManager.GetString("PublishCreatingServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Initializing.... + /// + public static string PublishInitializingMessage + { + get + { + return ResourceManager.GetString("PublishInitializingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to busy. + /// + public static string PublishInstanceStatusBusy + { + get + { + return ResourceManager.GetString("PublishInstanceStatusBusy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to creating the virtual machine. + /// + public static string PublishInstanceStatusCreating + { + get + { + return ResourceManager.GetString("PublishInstanceStatusCreating", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Instance {0} of role {1} is {2}.. + /// + public static string PublishInstanceStatusMessage + { + get + { + return ResourceManager.GetString("PublishInstanceStatusMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ready. + /// + public static string PublishInstanceStatusReady + { + get + { + return ResourceManager.GetString("PublishInstanceStatusReady", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preparing deployment for {0} with Subscription ID: {1}.... + /// + public static string PublishPreparingDeploymentMessage + { + get + { + return ResourceManager.GetString("PublishPreparingDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publishing {0} to Microsoft Azure. This may take several minutes.... + /// + public static string PublishServiceStartMessage + { + get + { + return ResourceManager.GetString("PublishServiceStartMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to publish settings. + /// + public static string PublishSettings + { + get + { + return ResourceManager.GetString("PublishSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure. + /// + public static string PublishSettingsElementName + { + get + { + return ResourceManager.GetString("PublishSettingsElementName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to .PublishSettings. + /// + public static string PublishSettingsFileExtention + { + get + { + return ResourceManager.GetString("PublishSettingsFileExtention", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to publishSettings.xml. + /// + public static string PublishSettingsFileName + { + get + { + return ResourceManager.GetString("PublishSettingsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to &whr={0}. + /// + public static string PublishSettingsFileRealmFormat + { + get + { + return ResourceManager.GetString("PublishSettingsFileRealmFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publish settings imported. + /// + public static string PublishSettingsSetSuccessfully + { + get + { + return ResourceManager.GetString("PublishSettingsSetSuccessfully", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_PUBLISHINGPROFILE_URL. + /// + public static string PublishSettingsUrlEnv + { + get + { + return ResourceManager.GetString("PublishSettingsUrlEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting.... + /// + public static string PublishStartingMessage + { + get + { + return ResourceManager.GetString("PublishStartingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upgrading.... + /// + public static string PublishUpgradingMessage + { + get + { + return ResourceManager.GetString("PublishUpgradingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Uploading Package to storage service {0}.... + /// + public static string PublishUploadingPackageMessage + { + get + { + return ResourceManager.GetString("PublishUploadingPackageMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Verifying storage account '{0}'.... + /// + public static string PublishVerifyingStorageMessage + { + get + { + return ResourceManager.GetString("PublishVerifyingStorageMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path '{0}' not found.. + /// + public static string PublishVMDscExtensionAdditionalContentPathNotExist + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionAdditionalContentPathNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration published to {0}. + /// + public static string PublishVMDscExtensionArchiveUploadedMessage + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionArchiveUploadedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy '{0}' to '{1}'.. + /// + public static string PublishVMDscExtensionCopyFileVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionCopyFileVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy the module '{0}' to '{1}'.. + /// + public static string PublishVMDscExtensionCopyModuleVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionCopyModuleVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid configuration file: {0}. + ///The file needs to be a PowerShell script (.ps1 or .psm1).. + /// + public static string PublishVMDscExtensionCreateArchiveConfigFileInvalidExtension + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionCreateArchiveConfigFileInvalidExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleted '{0}'. + /// + public static string PublishVMDscExtensionDeletedFileMessage + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionDeletedFileMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot delete '{0}': {1}. + /// + public static string PublishVMDscExtensionDeleteErrorMessage + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionDeleteErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path '{0}' not found.. + /// + public static string PublishVMDscExtensionDirectoryNotExist + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionDirectoryNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot get module for DscResource '{0}'. Possible solutions: + ///1) Specify -ModuleName for Import-DscResource in your configuration. + ///2) Unblock module that contains resource. + ///3) Move Import-DscResource inside Node block. + ///. + /// + public static string PublishVMDscExtensionGetDscResourceFailed + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionGetDscResourceFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to List of required modules: [{0}].. + /// + public static string PublishVMDscExtensionRequiredModulesVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionRequiredModulesVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your current PowerShell version {1} is less then required by this cmdlet {0}. Consider download and install latest PowerShell version.. + /// + public static string PublishVMDscExtensionRequiredPsVersion + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionRequiredPsVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration script '{0}' contained parse errors: + ///{1}. + /// + public static string PublishVMDscExtensionStorageParserErrors + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionStorageParserErrors", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Temp folder '{0}' created.. + /// + public static string PublishVMDscExtensionTempFolderVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionTempFolderVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid configuration file: {0}. + ///The file needs to be a PowerShell script (.ps1 or .psm1) or a ZIP archive (.zip).. + /// + public static string PublishVMDscExtensionUploadArchiveConfigFileInvalidExtension + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionUploadArchiveConfigFileInvalidExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration file '{0}' not found.. + /// + public static string PublishVMDscExtensionUploadArchiveConfigFileNotExist + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionUploadArchiveConfigFileNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure PowerShell collects usage data in order to improve your experience. + ///The data is anonymous and does not include commandline argument values. + ///The data is collected by Microsoft. + /// + ///Use the Disable-AzureDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Azure module. To disable data collection: PS > Disable-AzureDataCollection. + ///Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Azure module. To enable data collection: PS > Enab [rest of string was truncated]";. + /// + public static string RDFEDataCollectionMessage + { + get + { + return ResourceManager.GetString("RDFEDataCollectionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Replace current deployment with '{0}' Id ?. + /// + public static string RedeployCommit + { + get + { + return ResourceManager.GetString("RedeployCommit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to regenerate key?. + /// + public static string RegenerateKeyWarning + { + get + { + return ResourceManager.GetString("RegenerateKeyWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Generate new key.. + /// + public static string RegenerateKeyWhatIfMessage + { + get + { + return ResourceManager.GetString("RegenerateKeyWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove account '{0}'?. + /// + public static string RemoveAccountConfirmation + { + get + { + return ResourceManager.GetString("RemoveAccountConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing account. + /// + public static string RemoveAccountMessage + { + get + { + return ResourceManager.GetString("RemoveAccountMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove Add-On Confirmation. + /// + public static string RemoveAddOnConformation + { + get + { + return ResourceManager.GetString("RemoveAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If you delete this add-on, your data may be deleted and the operation may not be undone. You may have to purchase it again from the Microsoft Azure Store to use it. The price of the add-on may not be refunded. Are you sure you want to delete this add-on? Enter “Yes” to confirm.. + /// + public static string RemoveAddOnMessage + { + get + { + return ResourceManager.GetString("RemoveAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureBGPPeering Operation failed.. + /// + public static string RemoveAzureBGPPeeringFailed + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Bgp Peering. + /// + public static string RemoveAzureBGPPeeringMessage + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Bgp Peering with Service Key {0}.. + /// + public static string RemoveAzureBGPPeeringSucceeded + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Bgp Peering with service key '{0}'?. + /// + public static string RemoveAzureBGPPeeringWarning + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Dedicated Circuit with service key '{0}'?. + /// + public static string RemoveAzureDedicatdCircuitWarning + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatdCircuitWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureDedicatedCircuit Operation failed.. + /// + public static string RemoveAzureDedicatedCircuitFailed + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureDedicatedCircuitLink Operation failed.. + /// + public static string RemoveAzureDedicatedCircuitLinkFailed + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Dedicated Circui Link. + /// + public static string RemoveAzureDedicatedCircuitLinkMessage + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Dedicated Circuit Link with Service Key {0} and Vnet Name {1}. + /// + public static string RemoveAzureDedicatedCircuitLinkSucceeded + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Dedicated Circuit Link with service key '{0}' and virtual network name '{1}'?. + /// + public static string RemoveAzureDedicatedCircuitLinkWarning + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Dedicated Circuit. + /// + public static string RemoveAzureDedicatedCircuitMessage + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Dedicated Circuit with Service Key {0}.. + /// + public static string RemoveAzureDedicatedCircuitSucceeded + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing cloud service {0}.... + /// + public static string RemoveAzureServiceWaitMessage + { + get + { + return ResourceManager.GetString("RemoveAzureServiceWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The default subscription is being removed. Use Select-AzureSubscription -Default <subscriptionName> to select a new default subscription.. + /// + public static string RemoveDefaultSubscription + { + get + { + return ResourceManager.GetString("RemoveDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing {0} deployment for {1} service. + /// + public static string RemoveDeploymentWaitMessage + { + get + { + return ResourceManager.GetString("RemoveDeploymentWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing an environment will remove all associated subscriptions and accounts. Are you sure you want to remove an environment '{0}'?. + /// + public static string RemoveEnvironmentConfirmation + { + get + { + return ResourceManager.GetString("RemoveEnvironmentConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing environment. + /// + public static string RemoveEnvironmentMessage + { + get + { + return ResourceManager.GetString("RemoveEnvironmentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing job collection. + /// + public static string RemoveJobCollectionMessage + { + get + { + return ResourceManager.GetString("RemoveJobCollectionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the job collection "{0}". + /// + public static string RemoveJobCollectionWarning + { + get + { + return ResourceManager.GetString("RemoveJobCollectionWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing job. + /// + public static string RemoveJobMessage + { + get + { + return ResourceManager.GetString("RemoveJobMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the job "{0}". + /// + public static string RemoveJobWarning + { + get + { + return ResourceManager.GetString("RemoveJobWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the account?. + /// + public static string RemoveMediaAccountWarning + { + get + { + return ResourceManager.GetString("RemoveMediaAccountWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account removed.. + /// + public static string RemoveMediaAccountWhatIfMessage + { + get + { + return ResourceManager.GetString("RemoveMediaAccountWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen because the namespace does not exist or it does not exist under your subscription.. + /// + public static string RemoveNamespaceErrorMessage + { + get + { + return ResourceManager.GetString("RemoveNamespaceErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing old package {0}.... + /// + public static string RemovePackage + { + get + { + return ResourceManager.GetString("RemovePackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing the Azure profile will remove all associated environments, subscriptions, and accounts. Are you sure you want to remove the Azure profile?. + /// + public static string RemoveProfileConfirmation + { + get + { + return ResourceManager.GetString("RemoveProfileConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing the Azure profile. + /// + public static string RemoveProfileMessage + { + get + { + return ResourceManager.GetString("RemoveProfileMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the namespace '{0}'?. + /// + public static string RemoveServiceBusNamespaceConfirmation + { + get + { + return ResourceManager.GetString("RemoveServiceBusNamespaceConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove cloud service?. + /// + public static string RemoveServiceWarning + { + get + { + return ResourceManager.GetString("RemoveServiceWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove cloud service and all it's deployments. + /// + public static string RemoveServiceWhatIfMessage + { + get + { + return ResourceManager.GetString("RemoveServiceWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove subscription '{0}'?. + /// + public static string RemoveSubscriptionConfirmation + { + get + { + return ResourceManager.GetString("RemoveSubscriptionConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing subscription. + /// + public static string RemoveSubscriptionMessage + { + get + { + return ResourceManager.GetString("RemoveSubscriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint {0} cannot be removed from profile {1} because it's not in the profile.. + /// + public static string RemoveTrafficManagerEndpointMissing + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerEndpointMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureTrafficManagerProfile Operation failed.. + /// + public static string RemoveTrafficManagerProfileFailed + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerProfileFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Traffic Manager profile with name {0}.. + /// + public static string RemoveTrafficManagerProfileSucceeded + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerProfileSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Traffic Manager profile "{0}"?. + /// + public static string RemoveTrafficManagerProfileWarning + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerProfileWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the VM '{0}'?. + /// + public static string RemoveVMConfirmationMessage + { + get + { + return ResourceManager.GetString("RemoveVMConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting VM.. + /// + public static string RemoveVMMessage + { + get + { + return ResourceManager.GetString("RemoveVMMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing WebJob.... + /// + public static string RemoveWebJobMessage + { + get + { + return ResourceManager.GetString("RemoveWebJobMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove job '{0}'?. + /// + public static string RemoveWebJobWarning + { + get + { + return ResourceManager.GetString("RemoveWebJobWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing website. + /// + public static string RemoveWebsiteMessage + { + get + { + return ResourceManager.GetString("RemoveWebsiteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the website "{0}". + /// + public static string RemoveWebsiteWarning + { + get + { + return ResourceManager.GetString("RemoveWebsiteWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing public environment is not supported.. + /// + public static string RemovingDefaultEnvironmentsNotSupported + { + get + { + return ResourceManager.GetString("RemovingDefaultEnvironmentsNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting namespace. + /// + public static string RemovingNamespaceMessage + { + get + { + return ResourceManager.GetString("RemovingNamespaceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Repository is not setup. You need to pass a valid site name.. + /// + public static string RepositoryNotSetup + { + get + { + return ResourceManager.GetString("RepositoryNotSetup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reserved IP with the Name:'{0}' will no longer be in use after the deployment is deleted, and it is still reserved for later use.. + /// + public static string ReservedIPNameNoLongerInUseButStillBeingReserved + { + get + { + return ResourceManager.GetString("ReservedIPNameNoLongerInUseButStillBeingReserved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resource with ID : {0} does not exist.. + /// + public static string ResourceNotFound + { + get + { + return ResourceManager.GetString("ResourceNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Restart. + /// + public static string Restart + { + get + { + return ResourceManager.GetString("Restart", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resume. + /// + public static string Resume + { + get + { + return ResourceManager.GetString("Resume", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /role:{0};"{1}/{0}" . + /// + public static string RoleArgTemplate + { + get + { + return ResourceManager.GetString("RoleArgTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to bin. + /// + public static string RoleBinFolderName + { + get + { + return ResourceManager.GetString("RoleBinFolderName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} is {1}. + /// + public static string RoleInstanceWaitMsg + { + get + { + return ResourceManager.GetString("RoleInstanceWaitMsg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 20. + /// + public static string RoleMaxInstances + { + get + { + return ResourceManager.GetString("RoleMaxInstances", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to role name. + /// + public static string RoleName + { + get + { + return ResourceManager.GetString("RoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided role name {0} doesn't exist. + /// + public static string RoleNotFoundMessage + { + get + { + return ResourceManager.GetString("RoleNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RoleSettings.xml. + /// + public static string RoleSettingsTemplateFileName + { + get + { + return ResourceManager.GetString("RoleSettingsTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role type {0} doesn't exist. + /// + public static string RoleTypeDoesNotExist + { + get + { + return ResourceManager.GetString("RoleTypeDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to public static Dictionary<string, Location> ReverseLocations { get; private set; }. + /// + public static string RuntimeDeploymentLocationError + { + get + { + return ResourceManager.GetString("RuntimeDeploymentLocationError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preparing runtime deployment for service '{0}'. + /// + public static string RuntimeDeploymentStart + { + get + { + return ResourceManager.GetString("RuntimeDeploymentStart", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WARNING Runtime Mismatch: Are you sure that you want to publish service '{0}' using an Azure runtime version that does not match your local runtime version?. + /// + public static string RuntimeMismatchWarning + { + get + { + return ResourceManager.GetString("RuntimeMismatchWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEOVERRIDEURL. + /// + public static string RuntimeOverrideKey + { + get + { + return ResourceManager.GetString("RuntimeOverrideKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /runtimemanifest/runtimes/runtime. + /// + public static string RuntimeQuery + { + get + { + return ResourceManager.GetString("RuntimeQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEID. + /// + public static string RuntimeTypeKey + { + get + { + return ResourceManager.GetString("RuntimeTypeKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEURL. + /// + public static string RuntimeUrlKey + { + get + { + return ResourceManager.GetString("RuntimeUrlKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEVERSIONPRIMARYKEY. + /// + public static string RuntimeVersionPrimaryKey + { + get + { + return ResourceManager.GetString("RuntimeVersionPrimaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to scaffold.xml. + /// + public static string ScaffoldXml + { + get + { + return ResourceManager.GetString("ScaffoldXml", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid location entered. Pick one of the locations from Get-AzureSchedulerLocation. + /// + public static string SchedulerInvalidLocation + { + get + { + return ResourceManager.GetString("SchedulerInvalidLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the Secondary Peer Subnet has to be provided.. + /// + public static string SecondaryPeerSubnetRequired + { + get + { + return ResourceManager.GetString("SecondaryPeerSubnetRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} already exists on disk in location {1}. + /// + public static string ServiceAlreadyExistsOnDisk + { + get + { + return ResourceManager.GetString("ServiceAlreadyExistsOnDisk", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No ServiceBus authorization rule with the given characteristics was found. + /// + public static string ServiceBusAuthorizationRuleNotFound + { + get + { + return ResourceManager.GetString("ServiceBusAuthorizationRuleNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service bus entity '{0}' is not found.. + /// + public static string ServiceBusEntityTypeNotFound + { + get + { + return ResourceManager.GetString("ServiceBusEntityTypeNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen due to an incorrect/missing namespace. + /// + public static string ServiceBusNamespaceMissingMessage + { + get + { + return ResourceManager.GetString("ServiceBusNamespaceMissingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service configuration. + /// + public static string ServiceConfiguration + { + get + { + return ResourceManager.GetString("ServiceConfiguration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service definition. + /// + public static string ServiceDefinition + { + get + { + return ResourceManager.GetString("ServiceDefinition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceDefinition.csdef. + /// + public static string ServiceDefinitionFileName + { + get + { + return ResourceManager.GetString("ServiceDefinitionFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Deploy. + /// + public static string ServiceDeploymentName + { + get + { + return ResourceManager.GetString("ServiceDeploymentName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified cloud service "{0}" does not exist.. + /// + public static string ServiceDoesNotExist + { + get + { + return ResourceManager.GetString("ServiceDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} slot for service {1} is in {2} state, please wait until it finish and update it's status. + /// + public static string ServiceIsInTransitionState + { + get + { + return ResourceManager.GetString("ServiceIsInTransitionState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "An exception occurred when calling the ServiceManagement API. HTTP Status Code: {0}. Service Management Error Code: {1}. Message: {2}. Operation Tracking ID: {3}.". + /// + public static string ServiceManagementClientExceptionStringFormat + { + get + { + return ResourceManager.GetString("ServiceManagementClientExceptionStringFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionBeginOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionCompletedOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionInOCSBeginOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionInOCSBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionInOCSCompletedOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionInOCSCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service name. + /// + public static string ServiceName + { + get + { + return ResourceManager.GetString("ServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided service name {0} already exists, please pick another name. + /// + public static string ServiceNameExists + { + get + { + return ResourceManager.GetString("ServiceNameExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please provide name for the hosted service. + /// + public static string ServiceNameMissingMessage + { + get + { + return ResourceManager.GetString("ServiceNameMissingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service parent directory. + /// + public static string ServiceParentDirectory + { + get + { + return ResourceManager.GetString("ServiceParentDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} removed successfully. + /// + public static string ServiceRemovedMessage + { + get + { + return ResourceManager.GetString("ServiceRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service directory. + /// + public static string ServiceRoot + { + get + { + return ResourceManager.GetString("ServiceRoot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service settings. + /// + public static string ServiceSettings + { + get + { + return ResourceManager.GetString("ServiceSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.. + /// + public static string ServiceSettings_ValidateStorageAccountName_InvalidName + { + get + { + return ResourceManager.GetString("ServiceSettings_ValidateStorageAccountName_InvalidName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} slot for cloud service {1} doesn't exist.. + /// + public static string ServiceSlotDoesNotExist + { + get + { + return ResourceManager.GetString("ServiceSlotDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} slot for service {1} is {2}. + /// + public static string ServiceStatusChanged + { + get + { + return ResourceManager.GetString("ServiceStatusChanged", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Set Add-On Confirmation. + /// + public static string SetAddOnConformation + { + get + { + return ResourceManager.GetString("SetAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Profile {0} does not contain endpoint {1}. Adding it.. + /// + public static string SetInexistentTrafficManagerEndpointMessage + { + get + { + return ResourceManager.GetString("SetInexistentTrafficManagerEndpointMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note - You will be charged the amount for the new plan, without being refunded for time remaining + ///in the existing plan. + ///By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my + ///contact information with {2}.. + /// + public static string SetMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("SetMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note - You will be charged the amount for the new plan, without being refunded for time remaining + ///in the existing plan. + ///By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of + ///use and privacy statement at <url> and (c) agree to sharing my contact information with {2}.. + /// + public static string SetNonMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("SetNonMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} instances are set to {1}. + /// + public static string SetRoleInstancesMessage + { + get + { + return ResourceManager.GetString("SetRoleInstancesMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {"Slot":"","Location":"","Subscription":"","StorageAccountName":""}. + /// + public static string SettingsFileEmptyContent + { + get + { + return ResourceManager.GetString("SettingsFileEmptyContent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to deploymentSettings.json. + /// + public static string SettingsFileName + { + get + { + return ResourceManager.GetString("SettingsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Insufficient parameters passed to create a new endpoint.. + /// + public static string SetTrafficManagerEndpointNeedsParameters + { + get + { + return ResourceManager.GetString("SetTrafficManagerEndpointNeedsParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ambiguous operation: the profile name specified doesn't match the name of the profile object.. + /// + public static string SetTrafficManagerProfileAmbiguous + { + get + { + return ResourceManager.GetString("SetTrafficManagerProfileAmbiguous", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please execute the cmdlet again and include the 'Force' parameter, if available, to avoid unnecessary prompts.. + /// + public static string ShouldContinueFail + { + get + { + return ResourceManager.GetString("ShouldContinueFail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Confirm. + /// + public static string ShouldProcessCaption + { + get + { + return ResourceManager.GetString("ShouldProcessCaption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please execute the cmdlet again and omit the 'Confirm' parameter when using the 'AsJob' parameter.. + /// + public static string ShouldProcessFailConfirm + { + get + { + return ResourceManager.GetString("ShouldProcessFailConfirm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please increase the user $ConfirmPreference setting, or include turn off confirmation using '-Confirm:$false' when using the 'AsJob' parameter and execute the cmdet again.. + /// + public static string ShouldProcessFailImpact + { + get + { + return ResourceManager.GetString("ShouldProcessFailImpact", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please execute the cmdlet again and omit the 'WhatIf' parameter when using the 'AsJob' parameter.. + /// + public static string ShouldProcessFailWhatIf + { + get + { + return ResourceManager.GetString("ShouldProcessFailWhatIf", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Shutdown. + /// + public static string Shutdown + { + get + { + return ResourceManager.GetString("Shutdown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /sites:{0};{1};"{2}/{0}" . + /// + public static string SitesArgTemplate + { + get + { + return ResourceManager.GetString("SitesArgTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1000. + /// + public static string StandardRetryDelayInMs + { + get + { + return ResourceManager.GetString("StandardRetryDelayInMs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start. + /// + public static string Start + { + get + { + return ResourceManager.GetString("Start", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Started. + /// + public static string StartedEmulator + { + get + { + return ResourceManager.GetString("StartedEmulator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting Emulator.... + /// + public static string StartingEmulator + { + get + { + return ResourceManager.GetString("StartingEmulator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to start. + /// + public static string StartStorageEmulatorCommandArgument + { + get + { + return ResourceManager.GetString("StartStorageEmulatorCommandArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stop. + /// + public static string Stop + { + get + { + return ResourceManager.GetString("Stop", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stopping emulator.... + /// + public static string StopEmulatorMessage + { + get + { + return ResourceManager.GetString("StopEmulatorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stopped. + /// + public static string StoppedEmulatorMessage + { + get + { + return ResourceManager.GetString("StoppedEmulatorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to stop. + /// + public static string StopStorageEmulatorCommandArgument + { + get + { + return ResourceManager.GetString("StopStorageEmulatorCommandArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Name:. + /// + public static string StorageAccountName + { + get + { + return ResourceManager.GetString("StorageAccountName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find storage account '{0}' please type the name of an existing storage account.. + /// + public static string StorageAccountNotFound + { + get + { + return ResourceManager.GetString("StorageAccountNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AzureStorageEmulator.exe. + /// + public static string StorageEmulatorExe + { + get + { + return ResourceManager.GetString("StorageEmulatorExe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to InstallPath. + /// + public static string StorageEmulatorInstallPathRegistryKeyValue + { + get + { + return ResourceManager.GetString("StorageEmulatorInstallPathRegistryKeyValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SOFTWARE\Microsoft\Windows Azure Storage Emulator. + /// + public static string StorageEmulatorRegistryKey + { + get + { + return ResourceManager.GetString("StorageEmulatorRegistryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Primary Key:. + /// + public static string StoragePrimaryKey + { + get + { + return ResourceManager.GetString("StoragePrimaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Secondary Key:. + /// + public static string StorageSecondaryKey + { + get + { + return ResourceManager.GetString("StorageSecondaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named {0} already exists.. + /// + public static string SubscriptionAlreadyExists + { + get + { + return ResourceManager.GetString("SubscriptionAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SubscriptionDataFile parameter is deprecated. This parameter will be removed in a future release. See https://github.com/Azure/azure-powershell/wiki/Proposed-Design-Stateless-Azure-Profile for a description of the upcoming mechanism for providing alternate sources of subscription information.. + /// + public static string SubscriptionDataFileDeprecated + { + get + { + return ResourceManager.GetString("SubscriptionDataFileDeprecated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DefaultSubscriptionData.xml. + /// + public static string SubscriptionDataFileName + { + get + { + return ResourceManager.GetString("SubscriptionDataFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription data file {0} does not exist.. + /// + public static string SubscriptionDataFileNotFound + { + get + { + return ResourceManager.GetString("SubscriptionDataFileNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription id {0} doesn't exist.. + /// + public static string SubscriptionIdNotFoundMessage + { + get + { + return ResourceManager.GetString("SubscriptionIdNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription must not be null. + /// + public static string SubscriptionMustNotBeNull + { + get + { + return ResourceManager.GetString("SubscriptionMustNotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription name needs to be specified.. + /// + public static string SubscriptionNameNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("SubscriptionNameNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription name {0} doesn't exist.. + /// + public static string SubscriptionNameNotFoundMessage + { + get + { + return ResourceManager.GetString("SubscriptionNameNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription needs to be specified.. + /// + public static string SubscriptionNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("SubscriptionNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Suspend. + /// + public static string Suspend + { + get + { + return ResourceManager.GetString("Suspend", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Swapping website production slot .... + /// + public static string SwappingWebsite + { + get + { + return ResourceManager.GetString("SwappingWebsite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to swap the website '{0}' production slot with slot '{1}'?. + /// + public static string SwapWebsiteSlotWarning + { + get + { + return ResourceManager.GetString("SwapWebsiteSlotWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Switch-AzureMode cmdlet is deprecated and will be removed in a future release.. + /// + public static string SwitchAzureModeDeprecated + { + get + { + return ResourceManager.GetString("SwitchAzureModeDeprecated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Starting cmdlet execution, setting for cmdlet confirmation required: '{0}'. + /// + public static string TraceBeginLROJob + { + get + { + return ResourceManager.GetString("TraceBeginLROJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Blocking job for ShouldMethod '{0}'. + /// + public static string TraceBlockLROThread + { + get + { + return ResourceManager.GetString("TraceBlockLROThread", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Completing cmdlet execution in RunJob. + /// + public static string TraceEndLROJob + { + get + { + return ResourceManager.GetString("TraceEndLROJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: State change from '{0}' to '{1}' because '{2}'. + /// + public static string TraceHandleLROStateChange + { + get + { + return ResourceManager.GetString("TraceHandleLROStateChange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Unblocking job due to stoppage or failure. + /// + public static string TraceHandlerCancelJob + { + get + { + return ResourceManager.GetString("TraceHandlerCancelJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Unblocking job that was previously blocked.. + /// + public static string TraceHandlerUnblockJob + { + get + { + return ResourceManager.GetString("TraceHandlerUnblockJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Error in cmdlet execution. + /// + public static string TraceLROJobException + { + get + { + return ResourceManager.GetString("TraceLROJobException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Removing state changed event handler, exception '{0}'. + /// + public static string TraceRemoveLROEventHandler + { + get + { + return ResourceManager.GetString("TraceRemoveLROEventHandler", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: ShouldMethod '{0}' unblocked.. + /// + public static string TraceUnblockLROThread + { + get + { + return ResourceManager.GetString("TraceUnblockLROThread", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to decode string from base 64. Please make sure the string is correctly encoded: {0}.. + /// + public static string UnableToDecodeBase64String + { + get + { + return ResourceManager.GetString("UnableToDecodeBase64String", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to update mismatching Json structured: {0} {1}.. + /// + public static string UnableToPatchJson + { + get + { + return ResourceManager.GetString("UnableToPatchJson", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provider {0} is unknown.. + /// + public static string UnknownProviderMessage + { + get + { + return ResourceManager.GetString("UnknownProviderMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Update. + /// + public static string Update + { + get + { + return ResourceManager.GetString("Update", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Updated settings for subscription '{0}'. Current subscription is '{1}'.. + /// + public static string UpdatedSettings + { + get + { + return ResourceManager.GetString("UpdatedSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User name is not valid.. + /// + public static string UserNameIsNotValid + { + get + { + return ResourceManager.GetString("UserNameIsNotValid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User name needs to be specified.. + /// + public static string UserNameNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("UserNameNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the VLan Id has to be provided.. + /// + public static string VlanIdRequired + { + get + { + return ResourceManager.GetString("VlanIdRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please wait.... + /// + public static string WaitMessage + { + get + { + return ResourceManager.GetString("WaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The azure storage emulator is not installed, skip launching.... + /// + public static string WarningWhenStorageEmulatorIsMissing + { + get + { + return ResourceManager.GetString("WarningWhenStorageEmulatorIsMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Web.cloud.config. + /// + public static string WebCloudConfig + { + get + { + return ResourceManager.GetString("WebCloudConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to web.config. + /// + public static string WebConfigTemplateFileName + { + get + { + return ResourceManager.GetString("WebConfigTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MSDeploy. + /// + public static string WebDeployKeywordInWebSitePublishProfile + { + get + { + return ResourceManager.GetString("WebDeployKeywordInWebSitePublishProfile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot build the project successfully. Please see logs in {0}.. + /// + public static string WebProjectBuildFailTemplate + { + get + { + return ResourceManager.GetString("WebProjectBuildFailTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebRole. + /// + public static string WebRole + { + get + { + return ResourceManager.GetString("WebRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to setup_web.cmd > log.txt. + /// + public static string WebRoleStartupTaskCommandLine + { + get + { + return ResourceManager.GetString("WebRoleStartupTaskCommandLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebRole.xml. + /// + public static string WebRoleTemplateFileName + { + get + { + return ResourceManager.GetString("WebRoleTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSite with given name {0} already exists in the specified Subscription and Webspace.. + /// + public static string WebsiteAlreadyExists + { + get + { + return ResourceManager.GetString("WebsiteAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSite with given name {0} already exists in the specified Subscription and Location.. + /// + public static string WebsiteAlreadyExistsReplacement + { + get + { + return ResourceManager.GetString("WebsiteAlreadyExistsReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Site {0} already has repository created for it.. + /// + public static string WebsiteRepositoryAlreadyExists + { + get + { + return ResourceManager.GetString("WebsiteRepositoryAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Workspaces/WebsiteExtension/Website/{0}/dashboard/. + /// + public static string WebsiteSufixUrl + { + get + { + return ResourceManager.GetString("WebsiteSufixUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://{0}/msdeploy.axd?site={1}. + /// + public static string WebSiteWebDeployUriTemplate + { + get + { + return ResourceManager.GetString("WebSiteWebDeployUriTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WorkerRole. + /// + public static string WorkerRole + { + get + { + return ResourceManager.GetString("WorkerRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to setup_worker.cmd > log.txt. + /// + public static string WorkerRoleStartupTaskCommandLine + { + get + { + return ResourceManager.GetString("WorkerRoleStartupTaskCommandLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WorkerRole.xml. + /// + public static string WorkerRoleTemplateFileName + { + get + { + return ResourceManager.GetString("WorkerRoleTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (x86). + /// + public static string x86InProgramFiles + { + get + { + return ResourceManager.GetString("x86InProgramFiles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Yes. + /// + public static string Yes + { + get + { + return ResourceManager.GetString("Yes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Yes, I agree. + /// + public static string YesHint + { + get + { + return ResourceManager.GetString("YesHint", resourceCulture); + } + } + } +} diff --git a/src/Cdn/generated/runtime/Properties/Resources.resx b/src/Cdn/generated/runtime/Properties/Resources.resx new file mode 100644 index 000000000000..598cd53e958a --- /dev/null +++ b/src/Cdn/generated/runtime/Properties/Resources.resx @@ -0,0 +1,1741 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The remote server returned an error: (401) Unauthorized. + + + Account "{0}" has been added. + + + To switch to a different subscription, please use Select-AzureSubscription. + + + Subscription "{0}" is selected as the default subscription. + + + To view all the subscriptions, please use Get-AzureSubscription. + + + Add-On {0} is created successfully. + + + Add-on name {0} is already used. + + + Add-On {0} not found. + + + Add-on {0} is removed successfully. + + + Add-On {0} is updated successfully. + + + Role has been created at {0}\{1}. + + + Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Node.js by running ‘npm install azure’. + + + Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for PHP by running "pear WindowsAzure/WindowsAzure". + + + Unable to set role permissions. Please give the 'Network Service' user 'Read & execute' and 'Modify' permissions to the role folder, or run PowerShell as an Administrator + + + A role name '{0}' already exists + + + Windows Azure Powershell\ + + + https://manage.windowsazure.com + + + AZURE_PORTAL_URL + + + Azure SDK\{0}\ + + + Base Uri was empty. + WAPackIaaS + + + {0} begin processing without ParameterSet. + + + {0} begin processing with ParameterSet '{1}'. + + + Blob with the name {0} already exists in the account. + + + https://{0}.blob.core.windows.net/ + + + AZURE_BLOBSTORAGE_TEMPLATE + + + CACHERUNTIMEURL + + + cache + + + CacheRuntimeVersion + + + Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}) + + + Cannot find {0} with name {1}. + + + Deployment for service {0} with {1} slot doesn't exist + + + Can't find valid Microsoft Azure role in current directory {0} + + + service {0} configuration file (ServiceConfiguration.Cloud.cscfg) is either null or doesn't exist + + + Invalid service path! Cannot locate ServiceDefinition.csdef in current folder or parent folders. + + + The subscription named {0} with id {1} is not currently imported. You must import this subscription before it can be updated. + + + ManagementCertificate + + + certificate.pfx + + + Certificate imported into CurrentUser\My\{0} + + + Your account does not have access to the private key for certificate {0} + + + {0} {1} deployment for {2} service + + + Cloud service {0} is in {1} state. + + + Changing/Removing public environment '{0}' is not allowed. + + + Service {0} is set to value {1} + + + Choose which publish settings file to use: + + + Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel + + + 1 + + + cloud_package.cspkg + + + ServiceConfiguration.Cloud.cscfg + + + Add-ons for {0} + + + Communication could not be established. This could be due to an invalid subscription ID. Note that subscription IDs are case sensitive. + + + Complete + + + config.json + + + VirtualMachine creation failed. + WAPackIaaS + + + Creating the website failed. If this is the first website for this subscription, please create it using the management portal instead. + + + Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core + + + //blobcontainer[@datacenter='{0}'] + + + Setting: {0} as the default and current subscription. To view other subscriptions use Get-AzureSubscription + + + none + + + There are no hostnames which could be used for validation. + + + 8080 + + + 1000 + + + Auto + + + 80 + + + Delete + WAPackIaaS + + + The {0} slot for service {1} is already in {2} state + + + The deployment in {0} slot for service {1} is removed + + + Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel + + + 1 + + + The key to add already exists in the dictionary. + + + The array index cannot be less than zero. + + + The supplied array does not have enough room to contain the copied elements. + + + The provided dns {0} doesn't exist + + + Microsoft Azure Certificate + + + Endpoint can't be retrieved for storage account + + + {0} end processing. + + + To use Active Directory authentication, you must configure the ActiveDirectoryEndpoint, ActiveDirectoryTenantId, and ActiveDirectorServiceEndpointResourceId for environment of '{0}'. You can configure these properties for this environment using the Set-AzureEnvironment cmdlet. + + + The environment '{0}' already exists. + + + environments.xml + + + Error creating VirtualMachine + WAPackIaaS + + + Unable to download available runtimes for location '{0}' + + + Error updating VirtualMachine + WAPackIaaS + + + Job Id {0} failed. Error: {1}, ExceptionDetails: {2} + WAPackIaaS + + + The HTTP request was forbidden with client authentication scheme 'Anonymous'. + + + This add-on requires you to purchase the first instance through the Microsoft Azure Portal. Subsequent purchases can be performed through PowerShell. + + + Operation Status: + + + Resources\Scaffolding\General + + + Getting all available Microsoft Azure Add-Ons, this may take few minutes... + + + Name{0}Primary Key{0}Seconday Key + + + Git not found. Please install git and place it in your command line path. + + + Could not find publish settings. Please run Import-AzurePublishSettingsFile. + + + iisnode.dll + + + iisnode + + + iisnode-dev\\release\\x64 + + + iisnode + + + Installing IISNode version {0} in Azure for WebRole '{1}' (the version locally installed is: {2}) + + + Internal Server Error + + + Cannot enable memcach protocol on a cache worker role {0}. + + + Invalid certificate format. + + + The provided configuration path is invalid or doesn't exist + + + The country name is invalid, please use a valid two character country code, as described in ISO 3166-1 alpha-2. + + + Deployment with {0} does not exist + + + The deployment slot name {0} is invalid. Slot name must be either "Staging" or "Production". + + + Invalid service endpoint. + + + File {0} has invalid characters + + + You must create your git publishing credentials using the Microsoft Azure portal. +Please follow these steps in the portal: +1. On the left side open "Web Sites" +2. Click on any website +3. Choose "Setup Git Publishing" or "Reset deployment credentials" +4. Back in the PowerShell window, rerun this command by typing "New-AzureWebSite {site name} -Git -PublishingUsername {username} + + + The value {0} provided is not a valid GUID. Please provide a valid GUID. + + + The specified hostname does not exist. Please specify a valid hostname for the site. + + + Role {0} instances must be greater than or equal 0 and less than or equal 20 + + + There was an error creating your webjob. Please make sure that the script is in the root folder of the zip file. + + + Could not download a valid runtime manifest, Please check your internet connection and try again. + + + The account {0} was not found. Please specify a valid account name. + + + The provided name "{0}" does not match the service bus namespace naming rules. + + + Value cannot be null. Parameter name: '{0}' + + + The provided package path is invalid or doesn't exist + + + '{0}' is an invalid parameter set name. + + + {0} doesn't exist in {1} or you've not passed valid value for it + + + Path {0} has invalid characters + + + The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile + + + The provided role name "{0}" has invalid characters + + + A valid name for the service root folder is required + + + {0} is not a recognized runtime type + + + A valid language is required + + + No subscription is currently selected. Use Select-Subscription to activate a subscription. + + + The provided location "{0}" does not exist in the available locations use Get-AzureSBLocation for listing available locations. + + + Please provide a service name or run this command from inside a service project directory. + + + You must provide valid value for {0} + + + settings.json is invalid or doesn't exist + + + The subscription named '{0}' cannot be found. Use Set-AzureSubscription to initialize the subscription data. + + + The provided subscription id {0} is not valid + + + A valid subscription name is required. This can be provided using the -Subscription parameter or by setting the subscription via the Set-AzureSubscription cmdlet + + + The provided subscriptions file {0} has invalid content. + + + Role {0} VM size should be ExtraSmall, Small, Medium, Large or ExtraLarge. + + + The web job file must have *.zip extension + + + Singleton option works for continuous jobs only. + + + The website {0} was not found. Please specify a valid website name. + + + No job for id: {0} was found. + WAPackIaaS + + + engines + + + Scaffolding for this language is not yet supported + + + Link already established + + + local_package.csx + + + ServiceConfiguration.Local.cscfg + + + Looking for {0} deployment for {1} cloud service... + + + Looking for cloud service {0}... + + + managementCertificate.pem + + + ?whr={0} + + + //baseuri + + + uri + + + http://az413943.vo.msecnd.net/node/runtimemanifest_0.7.5.2.xml + + + Multiple Add-Ons found holding name {0} + + + Multiple possible publishing users. Please go to the Portal and use the listed deployment user, or click 'set/reset deployment credentials' to set up a new user account, then reurn this cmdlet and specify PublishingUsername. + + + The first publish settings file "{0}" is used. If you want to use another file specify the file name. + + + Microsoft.WindowsAzure.Plugins.Caching.NamedCaches + + + {"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]} + + + A publishing username is required. Please specify one using the argument PublishingUsername. + + + New Add-On Confirmation + + + By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my +contact information with {2}. + + + Internal Server Error. This could happen because the namespace name is already used or due to an incorrect location name. Use Get-AzureSBLocation cmdlet to list valid names. + + + By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of +use and privacy statement at {0} and (c) agree to sharing my contact information with {2}. + + + Service has been created at {0} + + + No + + + There is no access token cached for subscription {0}, user id {1}. Use the Add-AzureAccount cmdlet to log in again and get a token for this subscription. + + + The service does not have any cache worker roles, add one first by running cmdlet Add-AzureCacheWorkerRole. + + + No clouds available + WAPackIaaS + + + nodejs + + + node + + + node.exe + + + There is no default subscription set, please set a default subscription by running Set-AzureSubscription -Default <subscription name> + + + Microsoft SDKs\Azure\Nodejs\Nov2011 + + + nodejs + + + node + + + Resources\Scaffolding\Node + + + Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.Node + + + Installing Node version {0} in Azure for Role '{1}' (the Node version locally installed is: {2}) + + + No, I do not agree + + + No publish settings files with extension *.publishsettings are found in the directory "{0}". + + + '{0}' must be a cache worker role. Verify that it has proper cache worker role configuration. + + + Certificate can't be null. + + + {0} could not be null or empty + + + Unable to add a null RoleSettings to {0} + + + Unable to add new role to null service definition + + + The request offer '{0}' is not found. + + + Operation "{0}" failed on VM with ID: {1} + WAPackIaaS + + + The REST operation failed with message '{0}' and error code '{1}' + + + Job Id {0} did not complete within expected time or it is in Failed/Canceled/Invalid state. + WAPackIaaS + + + package + + + Package is created at service root path {0}. + + + {{ + "author": "", + + "name": "{0}", + "version": "0.0.0", + "dependencies":{{}}, + "devDependencies":{{}}, + "optionalDependencies": {{}}, + "engines": {{ + "node": "*", + "iisnode": "*" + }} + +}} + + + + package.json + + + A value for the Peer Asn has to be provided. + + + 5.4.0 + + + php + + + Resources\Scaffolding\PHP + + + Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.PHP + + + Installing PHP version {0} for Role '{1}' (the PHP version locally installed is: {2}) + + + You must create your first web site using the Microsoft Azure portal. +Please follow these steps in the portal: +1. At the bottom of the page, click on New > Web Site > Quick Create +2. Type {0} in the URL field +3. Click on "Create Web Site" +4. Once the site has been created, click on the site name +5. Click on "Set up Git publishing" or "Reset deployment credentials" and setup a publishing username and password. Use those credentials for all new websites you create. + + + 6. Back in the console window, rerun this command by typing "New-AzureWebsite <site name> -Git" + + + A value for the Primary Peer Subnet has to be provided. + + + Promotion code can be used only when updating to a new plan. + + + Service not published at user request. + + + Complete. + + + Connecting... + + + Created Deployment ID: {0}. + + + Created hosted service '{0}'. + + + Created Website URL: {0}. + + + Creating... + + + Initializing... + + + busy + + + creating the virtual machine + + + Instance {0} of role {1} is {2}. + + + ready + + + Preparing deployment for {0} with Subscription ID: {1}... + + + Publishing {0} to Microsoft Azure. This may take several minutes... + + + publish settings + + + Azure + + + .PublishSettings + + + publishSettings.xml + + + Publish settings imported + + + AZURE_PUBLISHINGPROFILE_URL + + + Starting... + + + Upgrading... + + + Uploading Package to storage service {0}... + + + Verifying storage account '{0}'... + + + Replace current deployment with '{0}' Id ? + + + Are you sure you want to regenerate key? + + + Generate new key. + + + Are you sure you want to remove account '{0}'? + + + Removing account + + + Remove Add-On Confirmation + + + If you delete this add-on, your data may be deleted and the operation may not be undone. You may have to purchase it again from the Microsoft Azure Store to use it. The price of the add-on may not be refunded. Are you sure you want to delete this add-on? Enter “Yes” to confirm. + + + Remove-AzureBGPPeering Operation failed. + + + Removing Bgp Peering + + + Successfully removed Azure Bgp Peering with Service Key {0}. + + + Are you sure you want to remove the Bgp Peering with service key '{0}'? + + + Are you sure you want to remove the Dedicated Circuit with service key '{0}'? + + + Remove-AzureDedicatedCircuit Operation failed. + + + Remove-AzureDedicatedCircuitLink Operation failed. + + + Removing Dedicated Circui Link + + + Successfully removed Azure Dedicated Circuit Link with Service Key {0} and Vnet Name {1} + + + Are you sure you want to remove the Dedicated Circuit Link with service key '{0}' and virtual network name '{1}'? + + + Removing Dedicated Circuit + + + Successfully removed Azure Dedicated Circuit with Service Key {0}. + + + Removing cloud service {0}... + + + Removing {0} deployment for {1} service + + + Removing job collection + + + Are you sure you want to remove the job collection "{0}" + + + Removing job + + + Are you sure you want to remove the job "{0}" + + + Are you sure you want to remove the account? + + + Account removed. + + + Internal Server Error. This could happen because the namespace does not exist or it does not exist under your subscription. + + + Removing old package {0}... + + + Are you sure you want to delete the namespace '{0}'? + + + Are you sure you want to remove cloud service? + + + Remove cloud service and all it's deployments + + + Are you sure you want to remove subscription '{0}'? + + + Removing subscription + + + Are you sure you want to delete the VM '{0}'? + + + Deleting VM. + + + Removing WebJob... + + + Are you sure you want to remove job '{0}'? + + + Removing website + + + Are you sure you want to remove the website "{0}" + + + Deleting namespace + + + Repository is not setup. You need to pass a valid site name. + + + Reserved IP with the Name:'{0}' will no longer be in use after the deployment is deleted, and it is still reserved for later use. + + + Resource with ID : {0} does not exist. + WAPackIaaS + + + Restart + WAPackIaaS + + + Resume + WAPackIaaS + + + /role:{0};"{1}/{0}" + + + bin + + + Role {0} is {1} + + + 20 + + + role name + + + The provided role name {0} doesn't exist + + + RoleSettings.xml + + + Role type {0} doesn't exist + + + public static Dictionary<string, Location> ReverseLocations { get; private set; } + + + Preparing runtime deployment for service '{0}' + + + WARNING Runtime Mismatch: Are you sure that you want to publish service '{0}' using an Azure runtime version that does not match your local runtime version? + + + RUNTIMEOVERRIDEURL + + + /runtimemanifest/runtimes/runtime + + + RUNTIMEID + + + RUNTIMEURL + + + RUNTIMEVERSIONPRIMARYKEY + + + scaffold.xml + + + Invalid location entered. Pick one of the locations from Get-AzureSchedulerLocation + + + A value for the Secondary Peer Subnet has to be provided. + + + Service {0} already exists on disk in location {1} + + + No ServiceBus authorization rule with the given characteristics was found + + + The service bus entity '{0}' is not found. + + + Internal Server Error. This could happen due to an incorrect/missing namespace + + + service configuration + + + service definition + + + ServiceDefinition.csdef + + + {0}Deploy + + + The specified cloud service "{0}" does not exist. + + + {0} slot for service {1} is in {2} state, please wait until it finish and update it's status + + + Begin Operation: {0} + + + Completed Operation: {0} + + + Begin Operation: {0} + + + Completed Operation: {0} + + + service name + + + Please provide name for the hosted service + + + service parent directory + + + Service {0} removed successfully + + + service directory + + + service settings + + + The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + + + The {0} slot for cloud service {1} doesn't exist. + + + {0} slot for service {1} is {2} + + + Set Add-On Confirmation + + + Note - You will be charged the amount for the new plan, without being refunded for time remaining +in the existing plan. +By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my +contact information with {2}. + + + Note - You will be charged the amount for the new plan, without being refunded for time remaining +in the existing plan. +By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of +use and privacy statement at <url> and (c) agree to sharing my contact information with {2}. + + + Role {0} instances are set to {1} + + + {"Slot":"","Location":"","Subscription":"","StorageAccountName":""} + + + deploymentSettings.json + + + Confirm + + + Shutdown + WAPackIaaS + + + /sites:{0};{1};"{2}/{0}" + + + 1000 + + + Start + WAPackIaaS + + + Started + + + Starting Emulator... + + + start + + + Stop + WAPackIaaS + + + Stopping emulator... + + + Stopped + + + stop + + + Account Name: + + + Cannot find storage account '{0}' please type the name of an existing storage account. + + + AzureStorageEmulator.exe + + + InstallPath + + + SOFTWARE\Microsoft\Windows Azure Storage Emulator + + + Primary Key: + + + Secondary Key: + + + The subscription named {0} already exists. + + + DefaultSubscriptionData.xml + + + The subscription data file {0} does not exist. + + + Subscription must not be null + WAPackIaaS + + + Suspend + WAPackIaaS + + + Swapping website production slot ... + + + Are you sure you want to swap the website '{0}' production slot with slot '{1}'? + + + The provider {0} is unknown. + + + Update + WAPackIaaS + + + Updated settings for subscription '{0}'. Current subscription is '{1}'. + + + A value for the VLan Id has to be provided. + + + Please wait... + + + The azure storage emulator is not installed, skip launching... + + + Web.cloud.config + + + web.config + + + MSDeploy + + + Cannot build the project successfully. Please see logs in {0}. + + + WebRole + + + setup_web.cmd > log.txt + + + WebRole.xml + + + WebSite with given name {0} already exists in the specified Subscription and Webspace. + + + WebSite with given name {0} already exists in the specified Subscription and Location. + + + Site {0} already has repository created for it. + + + Workspaces/WebsiteExtension/Website/{0}/dashboard/ + + + https://{0}/msdeploy.axd?site={1} + + + WorkerRole + + + setup_worker.cmd > log.txt + + + WorkerRole.xml + + + Yes + + + Yes, I agree + + + Remove-AzureTrafficManagerProfile Operation failed. + + + Successfully removed Traffic Manager profile with name {0}. + + + Are you sure you want to remove the Traffic Manager profile "{0}"? + + + Profile {0} already has an endpoint with name {1} + + + Profile {0} does not contain endpoint {1}. Adding it. + + + The endpoint {0} cannot be removed from profile {1} because it's not in the profile. + + + Insufficient parameters passed to create a new endpoint. + + + Ambiguous operation: the profile name specified doesn't match the name of the profile object. + + + <NONE> + + + "An exception occurred when calling the ServiceManagement API. HTTP Status Code: {0}. Service Management Error Code: {1}. Message: {2}. Operation Tracking ID: {3}." + {0} is the HTTP status code. {1} is the Service Management Error Code. {2} is the Service Management Error message. {3} is the operation tracking ID. + + + Unable to decode string from base 64. Please make sure the string is correctly encoded: {0}. + {0} is the string that is not in a valid base 64 format. + + + Skipping external tenant {0}, because you are using a guest or a foreign principal object identity. In order to access this tenant, please run Add-AzureAccount without "-Credential". + + + Removing an environment will remove all associated subscriptions and accounts. Are you sure you want to remove an environment '{0}'? + + + Removing environment + + + There is no subscription associated with account {0}. + + + Account id doesn't match one in subscription. + + + Environment name doesn't match one in subscription. + + + Removing the Azure profile will remove all associated environments, subscriptions, and accounts. Are you sure you want to remove the Azure profile? + + + Removing the Azure profile + + + The SubscriptionDataFile parameter is deprecated. This parameter will be removed in a future release. See https://github.com/Azure/azure-powershell/wiki/Proposed-Design-Stateless-Azure-Profile for a description of the upcoming mechanism for providing alternate sources of subscription information. + + + Account needs to be specified + + + No default subscription has been designated. Use Select-AzureSubscription -Default <subscriptionName> to set the default subscription. + + + Path must specify a valid path to an Azure profile. + + + Property bag Hashtable must contain one of the following sets of properties: {SubscriptionId, Certificate}, {SubscriptionId, Username, Password}, {SubscriptionId, ServicePrincipal, Password, Tenant}, {SubscriptionId, AccountId, Token} + + + Property bag Hashtable must contain a 'Certificate' of type 'X509Certificate2'. + + + Property bag Hashtable must contain a 'Password' with an associated 'Username' or 'ServicePrincipal'. + + + Property bag Hashtable must contain a 'SubscriptionId'. + + + Selected profile must not be null. + + + The Switch-AzureMode cmdlet is deprecated and will be removed in a future release. + + + OperationID : '{0}' + + + Cannot get module for DscResource '{0}'. Possible solutions: +1) Specify -ModuleName for Import-DscResource in your configuration. +2) Unblock module that contains resource. +3) Move Import-DscResource inside Node block. + + 0 = name of DscResource + + + Your current PowerShell version {1} is less then required by this cmdlet {0}. Consider download and install latest PowerShell version. + {0} = minimal required PS version, {1} = current PS version + + + Parsing configuration script: {0} + {0} is the path to a script file + + + Configuration script '{0}' contained parse errors: +{1} + 0 = path to the configuration script, 1 = parser errors + + + List of required modules: [{0}]. + {0} = list of modules + + + Temp folder '{0}' created. + {0} = temp folder path + + + Copy '{0}' to '{1}'. + {0} = source, {1} = destination + + + Copy the module '{0}' to '{1}'. + {0} = source, {1} = destination + + + File '{0}' already exists. Use the -Force parameter to overwrite it. + {0} is the path to a file + + + Configuration file '{0}' not found. + 0 = path to the configuration file + + + Path '{0}' not found. + 0 = path to the additional content file/directory + + + Path '{0}' not found. + 0 = path to the additional content file/directory + + + Invalid configuration file: {0}. +The file needs to be a PowerShell script (.ps1 or .psm1) or a ZIP archive (.zip). + 0 = path to the configuration file + + + Invalid configuration file: {0}. +The file needs to be a PowerShell script (.ps1 or .psm1). + 0 = path to the configuration file + + + Create Archive + + + Upload '{0}' + {0} is the name of an storage blob + + + Storage Blob '{0}' already exists. Use the -Force parameter to overwrite it. + {0} is the name of an storage blob + + + Configuration published to {0} + {0} is an URI + + + Deleted '{0}' + {0} is the path of a file + + + Cannot delete '{0}': {1} + {0} is the path of a file, {1} is an error message + + + Cannot find the WadCfg end element in the config. + + + WadCfg start element in the config is not matching the end element. + + + Cannot find the WadCfg element in the config. + + + Cannot find configuration data file: {0} + + + The configuration data must be a .psd1 file + + + Cannot change built-in environment {0}. + + + Azure PowerShell collects usage data in order to improve your experience. +The data is anonymous and does not include commandline argument values. +The data is collected by Microsoft. + +Use the Disable-AzDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Az.Accounts module. To disable data collection: PS > Disable-AzDataCollection. +Use the Enable-AzDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Az.Accounts module. To enable data collection: PS > Enable-AzDataCollection. + + + Microsoft Azure PowerShell Data Collection Confirmation + + + You choose not to participate in Microsoft Azure PowerShell data collection. + + + This confirmation message will be dismissed in '{0}' second(s)... + + + You choose to participate in Microsoft Azure PowerShell data collection. + + + The setting profile has been saved to the following path '{0}'. + + + [Common.Authentication]: Authenticating for account {0} with single tenant {1}. + + + Changing public environment is not supported. + + + Environment name needs to be specified. + + + Environment needs to be specified. + + + The environment name '{0}' is not found. + + + File path is not valid. + + + Must specify a non-null subscription name. + + + The default subscription is being removed. Use Select-AzureSubscription -Default <subscriptionName> to select a new default subscription. + + + Removing public environment is not supported. + + + The subscription id {0} doesn't exist. + + + Subscription name needs to be specified. + + + The subscription name {0} doesn't exist. + + + Subscription needs to be specified. + + + User name is not valid. + + + User name needs to be specified. + + + "There is no current context, please log in using Connect-AzAccount." + + + No subscriptions are associated with the logged in account in Azure Service Management (RDFE). This means that the logged in user is not an administrator or co-administrator for any account.\r\nDid you mean to execute Connect-AzAccount? + + + No certificate was found in the certificate store with thumbprint {0} + + + Illegal characters in path. + + + Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings + + + "{0}" is an invalid DNS name for {1} + + + The provided file in {0} must be have {1} extension + + + {0} is invalid or empty + + + Please connect to internet before executing this cmdlet + + + Path {0} doesn't exist. + + + Path for {0} doesn't exist in {1}. + + + &whr={0} + + + The provided service name {0} already exists, please pick another name + + + Unable to update mismatching Json structured: {0} {1}. + + + (x86) + + + Azure PowerShell collects usage data in order to improve your experience. +The data is anonymous and does not include commandline argument values. +The data is collected by Microsoft. + +Use the Disable-AzureDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Azure module. To disable data collection: PS > Disable-AzureDataCollection. +Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Azure module. To enable data collection: PS > Enable-AzureDataCollection. + + + Execution failed because a background thread could not prompt the user. + + + Azure Long-Running Job + + + The cmdlet failed in background execution. The returned error was '{0}'. Please execute the cmdlet again. You may need to execute this cmdlet synchronously, by omitting the '-AsJob' parameter. + 0(string): exception message in background task + + + Please execute the cmdlet again and include the 'Force' parameter, if available, to avoid unnecessary prompts. + + + Please execute the cmdlet again and omit the 'Confirm' parameter when using the 'AsJob' parameter. + + + Please increase the user $ConfirmPreference setting, or include turn off confirmation using '-Confirm:$false' when using the 'AsJob' parameter and execute the cmdet again. + + + Please execute the cmdlet again and omit the 'WhatIf' parameter when using the 'AsJob' parameter. + + + [AzureLongRunningJob]: Starting cmdlet execution, setting for cmdlet confirmation required: '{0}' + 0(bool): whether cmdlet confirmation is required + + + [AzureLongRunningJob]: Blocking job for ShouldMethod '{0}' + 0(string): method type + + + [AzureLongRunningJob]: Completing cmdlet execution in RunJob + + + [AzureLongRunningJob]: State change from '{0}' to '{1}' because '{2}' + 0(string): last state, 1(string): new state, 2(string): state change reason + + + [AzureLongRunningJob]: Unblocking job due to stoppage or failure + + + [AzureLongRunningJob]: Unblocking job that was previously blocked. + + + [AzureLongRunningJob]: Error in cmdlet execution + + + [AzureLongRunningJob]: Removing state changed event handler, exception '{0}' + 0(string): exception message + + + [AzureLongRunningJob]: ShouldMethod '{0}' unblocked. + 0(string): methodType + + + +- The parameter : '{0}' is changing. + + + +- The parameter : '{0}' is becoming mandatory. + + + +- The parameter : '{0}' is being replaced by parameter : '{1}'. + + + +- The parameter : '{0}' is being replaced by mandatory parameter : '{1}'. + + + +- Change description : {0} + + + The cmdlet is being deprecated. There will be no replacement for it. + + + The cmdlet parameter set is being deprecated. There will be no replacement for it. + + + The cmdlet '{0}' is replacing this cmdlet. + + + +- The output type is changing from the existing type :'{0}' to the new type :'{1}' + + + +- The output type '{0}' is changing + + + +- The following properties are being added to the output type : + + + +- The following properties in the output type are being deprecated : + + + {0} + + + +- Cmdlet : '{0}' + - {1} + + + Upcoming breaking changes in the cmdlet '{0}' : + + + +- This change will take effect on '{0}' + + + +- The change is expected to take effect from the version : '{0}' + + + ```powershell +# Old +{0} + +# New +{1} +``` + + + + +Cmdlet invocation changes : + Old Way : {0} + New Way : {1} + + + +The output type '{0}' is being deprecated without a replacement. + + + +The type of the parameter is changing from '{0}' to '{1}'. + + + +Note : Go to {0} for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell. + + + This cmdlet is in preview. The functionality may not be available in the selected subscription. + + \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Response.cs b/src/Cdn/generated/runtime/Response.cs new file mode 100644 index 000000000000..94de4b6e70d7 --- /dev/null +++ b/src/Cdn/generated/runtime/Response.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + using System; + using System.Threading.Tasks; + public class Response : EventData + { + public Response() : base() + { + } + } + + public class Response : Response + { + private Func> _resultDelegate; + private Task _resultValue; + + public Response(T value) : base() => _resultValue = Task.FromResult(value); + public Response(Func value) : base() => _resultDelegate = () => Task.FromResult(value()); + public Response(Func> value) : base() => _resultDelegate = value; + public Task Result => _resultValue ?? (_resultValue = this._resultDelegate()); + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Serialization/JsonSerializer.cs b/src/Cdn/generated/runtime/Serialization/JsonSerializer.cs new file mode 100644 index 000000000000..697d8643c1ee --- /dev/null +++ b/src/Cdn/generated/runtime/Serialization/JsonSerializer.cs @@ -0,0 +1,350 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal class JsonSerializer + { + private int depth = 0; + + private SerializationOptions options = new SerializationOptions(); + + #region Deserialization + + internal T Deseralize(JsonObject json) + where T : new() + { + var contract = JsonModelCache.Get(typeof(T)); + + return (T)DeserializeObject(contract, json); + } + + internal object DeserializeObject(JsonModel contract, JsonObject json) + { + var instance = Activator.CreateInstance(contract.Type); + + depth++; + + // Ensure we don't recurse forever + if (depth > 5) throw new Exception("Depth greater than 5"); + + foreach (var field in json) + { + var member = contract[field.Key]; + + if (member != null) + { + var value = DeserializeValue(member, field.Value); + + member.SetValue(instance, value); + } + } + + depth--; + + return instance; + } + + private object DeserializeValue(JsonMember member, JsonNode value) + { + if (value.Type == JsonType.Null) return null; + + var type = member.Type; + + if (member.IsStringLike && value.Type != JsonType.String) + { + // Take the long path... + return DeserializeObject(JsonModelCache.Get(type), (JsonObject)value); + } + else if (member.Converter != null) + { + return member.Converter.FromJson(value); + } + else if (type.IsArray) + { + return DeserializeArray(type, (JsonArray)value); + } + else if (member.IsList) + { + return DeserializeList(type, (JsonArray)value); + } + else + { + var contract = JsonModelCache.Get(type); + + return DeserializeObject(contract, (JsonObject)value); + } + } + + private object DeserializeValue(Type type, JsonNode value) + { + if (type == null) throw new ArgumentNullException(nameof(type)); + + if (value.Type == JsonType.Null) return null; + + var typeDetails = TypeDetails.Get(type); + + if (typeDetails.JsonConverter != null) + { + return typeDetails.JsonConverter.FromJson(value); + } + else if (typeDetails.IsEnum) + { + return Enum.Parse(type, value.ToString(), ignoreCase: true); + } + else if (type.IsArray) + { + return DeserializeArray(type, (JsonArray)value); + } + else if (typeDetails.IsList) + { + return DeserializeList(type, (JsonArray)value); + } + else + { + var contract = JsonModelCache.Get(type); + + return DeserializeObject(contract, (JsonObject)value); + } + } + + internal Array DeserializeArray(Type type, JsonArray elements) + { + var elementType = type.GetElementType(); + + var elementTypeDetails = TypeDetails.Get(elementType); + + var array = Array.CreateInstance(elementType, elements.Count); + + int i = 0; + + if (elementTypeDetails.JsonConverter != null) + { + foreach (var value in elements) + { + array.SetValue(elementTypeDetails.JsonConverter.FromJson(value), i); + + i++; + } + } + else + { + foreach (var value in elements) + { + array.SetValue(DeserializeValue(elementType, value), i); + + i++; + } + } + + return array; + } + + internal IList DeserializeList(Type type, JsonArray jsonArray) + { + // TODO: Handle non-generic types + if (!type.IsGenericType) + throw new ArgumentException("Must be a generic type", nameof(type)); + + var elementType = type.GetGenericArguments()[0]; + + IList list; + + if (type.IsInterface) + { + // Create a concrete generic list + list = (IList)Activator.CreateInstance(typeof(List<>).MakeGenericType(elementType)); + } + else + { + list = (IList)Activator.CreateInstance(type); + } + + foreach (var value in jsonArray) + { + list.Add(DeserializeValue(elementType, value)); + } + + return list; + } + + #endregion + + #region Serialization + + internal JsonNode Serialize(object instance) => + Serialize(instance, SerializationOptions.Default); + + internal JsonNode Serialize(object instance, string[] include) => + Serialize(instance, new SerializationOptions { Include = include }); + + internal JsonNode Serialize(object instance, SerializationOptions options) + { + this.options = options; + + if (instance == null) + { + return XNull.Instance; + } + + return ReadValue(instance.GetType(), instance); + } + + #region Readers + + internal JsonArray ReadArray(IEnumerable collection) + { + var array = new XNodeArray(); + + foreach (var item in collection) + { + array.Add(ReadValue(item.GetType(), item)); + } + + return array; + } + + internal IEnumerable> ReadProperties(object instance) + { + var contract = JsonModelCache.Get(instance.GetType()); + + foreach (var member in contract.Members) + { + string name = member.Name; + + if (options.PropertyNameTransformer != null) + { + name = options.PropertyNameTransformer.Invoke(name); + } + + // Skip the field if it's not included + if ((depth == 1 && !options.IsIncluded(name))) + { + continue; + } + + var value = member.GetValue(instance); + + if (!member.EmitDefaultValue && (value == null || (member.IsList && ((IList)value).Count == 0) || value.Equals(member.DefaultValue))) + { + continue; + } + else if (options.IgnoreNullValues && value == null) // Ignore null values + { + continue; + } + + // Transform the value if there is one + if (options.Transformations != null) + { + var transform = options.GetTransformation(name); + + if (transform != null) + { + value = transform.Transformer(value); + } + } + + yield return new KeyValuePair(name, ReadValue(member.TypeDetails, value)); + } + } + + private JsonObject ReadObject(object instance) + { + depth++; + + // TODO: Guard against a self referencing graph + if (depth > options.MaxDepth) + { + depth--; + + return new JsonObject(); + } + + var node = new JsonObject(ReadProperties(instance)); + + depth--; + + return node; + } + + private JsonNode ReadValue(Type type, object value) + { + if (value == null) + { + return XNull.Instance; + } + + var member = TypeDetails.Get(type); + + return ReadValue(member, value); + } + + private JsonNode ReadValue(TypeDetails type, object value) + { + if (value == null) + { + return XNull.Instance; + } + + if (type.JsonConverter != null) + { + return type.JsonConverter.ToJson(value); + } + else if (type.IsArray) + { + switch (Type.GetTypeCode(type.ElementType)) + { + case TypeCode.String: return CreateArray((string[])value); + case TypeCode.UInt16: return CreateArray((ushort[])value); + case TypeCode.UInt32: return CreateArray((uint[])value); + case TypeCode.UInt64: return CreateArray((ulong[])value); + case TypeCode.Int16: return CreateArray((short[])value); + case TypeCode.Int32: return CreateArray((int[])value); + case TypeCode.Int64: return CreateArray((long[])value); + case TypeCode.Single: return CreateArray((float[])value); + case TypeCode.Double: return CreateArray((double[])value); + default: return ReadArray((IEnumerable)value); + } + } + else if (value is IEnumerable) + { + if (type.IsList && type.ElementType != null) + { + switch (Type.GetTypeCode(type.ElementType)) + { + case TypeCode.String: return CreateList(value); + case TypeCode.UInt16: return CreateList(value); + case TypeCode.UInt32: return CreateList(value); + case TypeCode.UInt64: return CreateList(value); + case TypeCode.Int16: return CreateList(value); + case TypeCode.Int32: return CreateList(value); + case TypeCode.Int64: return CreateList(value); + case TypeCode.Single: return CreateList(value); + case TypeCode.Double: return CreateList(value); + } + } + + return ReadArray((IEnumerable)value); + } + else + { + // Complex object + return ReadObject(value); + } + } + + private XList CreateList(object value) => new XList((IList)value); + + private XImmutableArray CreateArray(T[] array) => new XImmutableArray(array); + + #endregion + + #endregion + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Serialization/PropertyTransformation.cs b/src/Cdn/generated/runtime/Serialization/PropertyTransformation.cs new file mode 100644 index 000000000000..422cd1fb21a0 --- /dev/null +++ b/src/Cdn/generated/runtime/Serialization/PropertyTransformation.cs @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal class PropertyTransformation + { + internal PropertyTransformation(string name, Func transformer) + { + Name = name ?? throw new ArgumentNullException(nameof(name)); + Transformer = transformer ?? throw new ArgumentNullException(nameof(transformer)); + } + + internal string Name { get; } + + internal Func Transformer { get; } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Serialization/SerializationOptions.cs b/src/Cdn/generated/runtime/Serialization/SerializationOptions.cs new file mode 100644 index 000000000000..2354fcf12190 --- /dev/null +++ b/src/Cdn/generated/runtime/Serialization/SerializationOptions.cs @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal class SerializationOptions + { + internal static readonly SerializationOptions Default = new SerializationOptions(); + + internal SerializationOptions() { } + + internal SerializationOptions( + string[] include = null, + bool ingoreNullValues = false) + { + Include = include; + IgnoreNullValues = ingoreNullValues; + } + + internal string[] Include { get; set; } + + internal string[] Exclude { get; set; } + + internal bool IgnoreNullValues { get; set; } + + internal PropertyTransformation[] Transformations { get; set; } + + internal Func PropertyNameTransformer { get; set; } + + internal int MaxDepth { get; set; } = 5; + + internal bool IsIncluded(string name) + { + if (Exclude != null) + { + return !Exclude.Any(exclude => exclude.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + else if (Include != null) + { + return Include.Any(exclude => exclude.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + + return true; + } + + internal PropertyTransformation GetTransformation(string propertyName) + { + if (Transformations == null) return null; + + foreach (var t in Transformations) + { + if (t.Name.Equals(propertyName, StringComparison.OrdinalIgnoreCase)) + { + return t; + } + } + + return null; + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/SerializationMode.cs b/src/Cdn/generated/runtime/SerializationMode.cs new file mode 100644 index 000000000000..331db0d16175 --- /dev/null +++ b/src/Cdn/generated/runtime/SerializationMode.cs @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + [System.Flags] + public enum SerializationMode + { + None = 0, + IncludeHeaders = 1 << 0, + IncludeReadOnly = 1 << 1, + + IncludeAll = IncludeHeaders | IncludeReadOnly + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/TypeConverterExtensions.cs b/src/Cdn/generated/runtime/TypeConverterExtensions.cs new file mode 100644 index 000000000000..80a6574561a8 --- /dev/null +++ b/src/Cdn/generated/runtime/TypeConverterExtensions.cs @@ -0,0 +1,211 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.IO; +using System.Linq; +using System.Xml; +using System.Xml.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.PowerShell +{ + internal static class TypeConverterExtensions + { + internal static T[] SelectToArray(object source, System.Func converter) + { + // null begets null + if (source == null) + { + return null; + } + + // single values and strings are just encapsulated in the array. + if (source is string || !(source is System.Collections.IEnumerable)) + { + try + { + return new T[] { (T)converter(source) }; + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + return new T[0]; // empty result if couldn't convert. + } + + var result = new System.Collections.Generic.List(); + foreach (var each in (System.Collections.IEnumerable)source) + { + try + { + result.Add((T)converter(each)); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + } + return result.ToArray(); + } + + internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Collections.Generic.IDictionary dictionary) + { + if (null != dictionary) + { + foreach (var each in dictionary.Keys) + { + yield return each; + } + } + } + internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Collections.IDictionary dictionary) + { + if (null != dictionary) + { + foreach (var each in dictionary.Keys) + { + yield return each; + } + } + } + internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Management.Automation.PSObject instance) + { + if (null != instance) + { + foreach (var each in instance.Properties) + { + yield return each; + } + } + } + + internal static System.Collections.Generic.IEnumerable> GetFilteredProperties(this System.Collections.Generic.IDictionary instance, global::System.Collections.Generic.HashSet exclusions = null, global::System.Collections.Generic.HashSet inclusions = null) + { + return (null == instance || instance.Count == 0) ? + Enumerable.Empty>() : + instance.Keys + .Where(key => + !(true == exclusions?.Contains(key?.ToString())) + && (false != inclusions?.Contains(key?.ToString()))) + .Select(key => new System.Collections.Generic.KeyValuePair(key, instance[key])); + } + + internal static System.Collections.Generic.IEnumerable> GetFilteredProperties(this System.Collections.IDictionary instance, global::System.Collections.Generic.HashSet exclusions = null, global::System.Collections.Generic.HashSet inclusions = null) + { + return (null == instance || instance.Count == 0) ? + Enumerable.Empty>() : + instance.Keys.OfType() + .Where(key => + !(true == exclusions?.Contains(key?.ToString())) + && (false != inclusions?.Contains(key?.ToString()))) + .Select(key => new System.Collections.Generic.KeyValuePair(key, instance[key])); + } + + internal static System.Collections.Generic.IEnumerable> GetFilteredProperties(this System.Management.Automation.PSObject instance, global::System.Collections.Generic.HashSet exclusions = null, global::System.Collections.Generic.HashSet inclusions = null) + { + // new global::System.Collections.Generic.HashSet(System.StringComparer.InvariantCultureIgnoreCase) + return (null == instance || !instance.Properties.Any()) ? + Enumerable.Empty>() : + instance.Properties + .Where(property => + !(true == exclusions?.Contains(property.Name)) + && (false != inclusions?.Contains(property.Name))) + .Select(property => new System.Collections.Generic.KeyValuePair(property.Name, property.Value)); + } + + + internal static T GetValueForProperty(this System.Collections.Generic.IDictionary dictionary, string propertyName, T defaultValue, System.Func converter) + { + try + { + var key = System.Linq.Enumerable.FirstOrDefault(dictionary.Keys, each => System.String.Equals(each.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + return key == null ? defaultValue : (T)converter(dictionary[key]); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return defaultValue; + } + internal static T GetValueForProperty(this System.Collections.IDictionary dictionary, string propertyName, T defaultValue, System.Func converter) + { + try + { + var key = System.Linq.Enumerable.FirstOrDefault(dictionary.Keys.OfType(), each => System.String.Equals(each.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + return key == null ? defaultValue : (T)converter(dictionary[key]); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return defaultValue; + } + + internal static T GetValueForProperty(this System.Management.Automation.PSObject psObject, string propertyName, T defaultValue, System.Func converter) + { + try + { + var property = System.Linq.Enumerable.FirstOrDefault(psObject.Properties, each => System.String.Equals(each.Name.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + return property == null ? defaultValue : (T)converter(property.Value); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return defaultValue; + } + + internal static bool Contains(this System.Management.Automation.PSObject psObject, string propertyName) + { + bool result = false; + try + { + var property = System.Linq.Enumerable.FirstOrDefault(psObject.Properties, each => System.String.Equals(each.Name.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + result = property == null ? false : true; + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return result; + } + } +} diff --git a/src/Cdn/generated/runtime/UndeclaredResponseException.cs b/src/Cdn/generated/runtime/UndeclaredResponseException.cs new file mode 100644 index 000000000000..7008a75d54cf --- /dev/null +++ b/src/Cdn/generated/runtime/UndeclaredResponseException.cs @@ -0,0 +1,112 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + using System; + using System.Net.Http; + using System.Net.Http.Headers; + using static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Extensions; + + public class RestException : Exception, IDisposable + { + public System.Net.HttpStatusCode StatusCode { get; set; } + public string Code { get; protected set; } + protected string message; + public HttpRequestMessage RequestMessage { get; protected set; } + public HttpResponseHeaders ResponseHeaders { get; protected set; } + + public string ResponseBody { get; protected set; } + public string ClientRequestId { get; protected set; } + public string RequestId { get; protected set; } + + public override string Message => message; + public string Action { get; protected set; } + + public RestException(System.Net.Http.HttpResponseMessage response) + { + StatusCode = response.StatusCode; + //CloneWithContent will not work here since the content is disposed after sendAsync + //Besides, it seems there is no need for the request content cloned here. + RequestMessage = response.RequestMessage.Clone(); + ResponseBody = response.Content.ReadAsStringAsync().Result; + ResponseHeaders = response.Headers; + + RequestId = response.GetFirstHeader("x-ms-request-id"); + ClientRequestId = response.GetFirstHeader("x-ms-client-request-id"); + + try + { + // try to parse the body as JSON, and see if a code and message are in there. + var json = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonNode.Parse(ResponseBody) as Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json.JsonObject; + + // error message could be in properties.statusMessage + { message = If(json?.Property("properties"), out var p) + && If(p?.PropertyT("statusMessage"), out var sm) + ? (string)sm : (string)Message; } + + // see if there is an error block in the body + json = json?.Property("error") ?? json; + + { Code = If(json?.PropertyT("code"), out var c) ? (string)c : (string)StatusCode.ToString(); } + { message = If(json?.PropertyT("message"), out var m) ? (string)m : (string)Message; } + { Action = If(json?.PropertyT("action"), out var a) ? (string)a : (string)Action; } + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // couldn't get the code/message from the body response. + // In this case, we will assume the response is the expected error message + if(!string.IsNullOrEmpty(ResponseBody)) { + message = ResponseBody; + } + } +#endif + if (string.IsNullOrEmpty(message)) + { + if (StatusCode >= System.Net.HttpStatusCode.BadRequest && StatusCode < System.Net.HttpStatusCode.InternalServerError) + { + message = $"The server responded with a Request Error, Status: {StatusCode}"; + } + else if (StatusCode >= System.Net.HttpStatusCode.InternalServerError) + { + message = $"The server responded with a Server Error, Status: {StatusCode}"; + } + else + { + message = $"The server responded with an unrecognized response, Status: {StatusCode}"; + } + } + } + + public void Dispose() + { + ((IDisposable)RequestMessage).Dispose(); + } + } + + public class RestException : RestException + { + public T Error { get; protected set; } + public RestException(System.Net.Http.HttpResponseMessage response, T error) : base(response) + { + Error = error; + } + } + + + public class UndeclaredResponseException : RestException + { + public UndeclaredResponseException(System.Net.Http.HttpResponseMessage response) : base(response) + { + + } + } +} \ No newline at end of file diff --git a/src/Cdn/generated/runtime/Writers/JsonWriter.cs b/src/Cdn/generated/runtime/Writers/JsonWriter.cs new file mode 100644 index 000000000000..fd86c517b8df --- /dev/null +++ b/src/Cdn/generated/runtime/Writers/JsonWriter.cs @@ -0,0 +1,223 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Web; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Json +{ + internal class JsonWriter + { + const string indentation = " "; // 2 spaces + + private readonly bool pretty; + private readonly TextWriter writer; + + protected int currentLevel = 0; + + internal JsonWriter(TextWriter writer, bool pretty = true) + { + this.writer = writer ?? throw new ArgumentNullException(nameof(writer)); + this.pretty = pretty; + } + + internal void WriteNode(JsonNode node) + { + switch (node.Type) + { + case JsonType.Array: WriteArray((IEnumerable)node); break; + case JsonType.Object: WriteObject((JsonObject)node); break; + + // Primitives + case JsonType.Binary: WriteBinary((XBinary)node); break; + case JsonType.Boolean: WriteBoolean((bool)node); break; + case JsonType.Date: WriteDate((JsonDate)node); break; + case JsonType.Null: WriteNull(); break; + case JsonType.Number: WriteNumber((JsonNumber)node); break; + case JsonType.String: WriteString(node); break; + } + } + + internal void WriteArray(IEnumerable array) + { + currentLevel++; + + writer.Write('['); + + bool doIndentation = false; + + if (pretty) + { + foreach (var node in array) + { + if (node.Type == JsonType.Object || node.Type == JsonType.Array) + { + doIndentation = true; + + break; + } + } + } + + bool isFirst = true; + + foreach (JsonNode node in array) + { + if (!isFirst) writer.Write(','); + + if (doIndentation) + { + WriteIndent(); + } + else if (pretty) + { + writer.Write(' '); + } + + WriteNode(node); + + isFirst = false; + } + + currentLevel--; + + if (doIndentation) + { + WriteIndent(); + } + else if (pretty) + { + writer.Write(' '); + } + + writer.Write(']'); + } + + internal void WriteIndent() + { + if (pretty) + { + writer.Write(Environment.NewLine); + + for (int level = 0; level < currentLevel; level++) + { + writer.Write(indentation); + } + } + } + + internal void WriteObject(JsonObject obj) + { + currentLevel++; + + writer.Write('{'); + + bool isFirst = true; + + foreach (var field in obj) + { + if (!isFirst) writer.Write(','); + + WriteIndent(); + + WriteFieldName(field.Key); + + writer.Write(':'); + + if (pretty) + { + writer.Write(' '); + } + + // Write the field value + WriteNode(field.Value); + + isFirst = false; + } + + currentLevel--; + + WriteIndent(); + + writer.Write('}'); + } + + internal void WriteFieldName(string fieldName) + { + writer.Write('"'); + writer.Write(HttpUtility.JavaScriptStringEncode(fieldName)); + writer.Write('"'); + } + + #region Primitives + + internal void WriteBinary(XBinary value) + { + writer.Write('"'); + writer.Write(value.ToString()); + writer.Write('"'); + } + + internal void WriteBoolean(bool value) + { + writer.Write(value ? "true" : "false"); + } + + internal void WriteDate(JsonDate date) + { + if (date.ToDateTime().Year == 1) + { + WriteNull(); + } + else + { + writer.Write('"'); + writer.Write(date.ToIsoString()); + writer.Write('"'); + } + } + + internal void WriteNull() + { + writer.Write("null"); + } + + internal void WriteNumber(JsonNumber number) + { + if (number.Overflows) + { + writer.Write('"'); + writer.Write(number.Value); + writer.Write('"'); + } + else + { + writer.Write(number.Value); + } + } + + internal void WriteString(string text) + { + if (text == null) + { + WriteNull(); + } + else + { + writer.Write('"'); + + writer.Write(HttpUtility.JavaScriptStringEncode(text)); + + writer.Write('"'); + } + } + + #endregion + } +} + + +// TODO: Replace with System.Text.Json when available diff --git a/src/Cdn/generated/runtime/delegates.cs b/src/Cdn/generated/runtime/delegates.cs new file mode 100644 index 000000000000..d5486f4a476d --- /dev/null +++ b/src/Cdn/generated/runtime/delegates.cs @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData=System.Func; + + public delegate Task SendAsync(HttpRequestMessage request, IEventListener callback); + public delegate Task SendAsyncStep(HttpRequestMessage request, IEventListener callback, ISendAsync next); + public delegate Task SignalEvent(string id, CancellationToken token, GetEventData getEventData); + public delegate Task Event(EventData message); + public delegate void SynchEvent(EventData message); + public delegate Task OnResponse(Response message); + public delegate Task OnResponse(Response message); +} \ No newline at end of file diff --git a/src/Cdn/help/Az.Cdn.md b/src/Cdn/help/Az.Cdn.md new file mode 100644 index 000000000000..0577ab53afde --- /dev/null +++ b/src/Cdn/help/Az.Cdn.md @@ -0,0 +1,449 @@ +--- +Module Name: Az.Cdn +Module Guid: f9fae843-9c26-4513-9442-17f4379802bf +Download Help Link: https://docs.microsoft.com/powershell/module/az.cdn +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.Cdn Module +## Description +Microsoft Azure PowerShell: Cdn cmdlets + +## Az.Cdn Cmdlets +### [Clear-AzCdnEndpointContent](Clear-AzCdnEndpointContent.md) +Removes a content from CDN. + +### [Clear-AzFrontDoorCdnEndpointContent](Clear-AzFrontDoorCdnEndpointContent.md) +Removes a content from AzureFrontDoor. + +### [Disable-AzCdnCustomDomainCustomHttps](Disable-AzCdnCustomDomainCustomHttps.md) +Disable https delivery of the custom domain. + +### [Enable-AzCdnCustomDomainCustomHttps](Enable-AzCdnCustomDomainCustomHttps.md) +Enable https delivery of the custom domain. + +### [Get-AzCdnCustomDomain](Get-AzCdnCustomDomain.md) +Gets an existing custom domain within an endpoint. + +### [Get-AzCdnEdgeNode](Get-AzCdnEdgeNode.md) +Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users. + +### [Get-AzCdnEndpoint](Get-AzCdnEndpoint.md) +Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. + +### [Get-AzCdnEndpointResourceUsage](Get-AzCdnEndpointResourceUsage.md) +Checks the quota and usage of geo filters and custom domains under the given endpoint. + +### [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-AzCdnProfile](Get-AzCdnProfile.md) + + +### [Get-AzCdnProfileResourceUsage](Get-AzCdnProfileResourceUsage.md) +Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door Premium or CDN profile. + +### [Get-AzCdnProfileSupportedOptimizationType](Get-AzCdnProfileSupportedOptimizationType.md) +Gets the supported optimization types for the current profile. +A user can create an endpoint with an optimization type from the listed values. + +### [Get-AzCdnSubscriptionResourceUsage](Get-AzCdnSubscriptionResourceUsage.md) +Check the quota and actual usage of the CDN profiles under the given subscription. + +### [Get-AzFrontDoorCdnCustomDomain](Get-AzFrontDoorCdnCustomDomain.md) +Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. + +### [Get-AzFrontDoorCdnEndpoint](Get-AzFrontDoorCdnEndpoint.md) +Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. + +### [Get-AzFrontDoorCdnEndpointResourceUsage](Get-AzFrontDoorCdnEndpointResourceUsage.md) +Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. + +### [Get-AzFrontDoorCdnOrigin](Get-AzFrontDoorCdnOrigin.md) +Gets an existing origin within an origin group. + +### [Get-AzFrontDoorCdnOriginGroup](Get-AzFrontDoorCdnOriginGroup.md) +Gets an existing origin group within a profile. + +### [Get-AzFrontDoorCdnOriginGroupResourceUsage](Get-AzFrontDoorCdnOriginGroupResourceUsage.md) +Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN profile. + +### [Get-AzFrontDoorCdnProfile](Get-AzFrontDoorCdnProfile.md) + + +### [Get-AzFrontDoorCdnProfileResourceUsage](Get-AzFrontDoorCdnProfileResourceUsage.md) +Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. + +### [Get-AzFrontDoorCdnRoute](Get-AzFrontDoorCdnRoute.md) +Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. + +### [Get-AzFrontDoorCdnRule](Get-AzFrontDoorCdnRule.md) +Gets an existing delivery rule within a rule set. + +### [Get-AzFrontDoorCdnRuleSet](Get-AzFrontDoorCdnRuleSet.md) +Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. + +### [Get-AzFrontDoorCdnRuleSetResourceUsage](Get-AzFrontDoorCdnRuleSetResourceUsage.md) +Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. + +### [Get-AzFrontDoorCdnSecret](Get-AzFrontDoorCdnSecret.md) +Gets an existing Secret within a profile. + +### [Get-AzFrontDoorCdnSecurityPolicy](Get-AzFrontDoorCdnSecurityPolicy.md) +Gets an existing security policy within a profile. + +### [Import-AzCdnEndpointContent](Import-AzCdnEndpointContent.md) +Pre-loads a content to CDN. +Available for Verizon Profiles. + +### [New-AzCdnCustomDomain](New-AzCdnCustomDomain.md) +Creates a new custom domain within an endpoint. + +### [New-AzCdnDeliveryRuleCookiesConditionObject](New-AzCdnDeliveryRuleCookiesConditionObject.md) +Create an in-memory object for DeliveryRuleCookiesCondition. + +### [New-AzCdnDeliveryRuleHttpVersionConditionObject](New-AzCdnDeliveryRuleHttpVersionConditionObject.md) +Create an in-memory object for DeliveryRuleHttpVersionCondition. + +### [New-AzCdnDeliveryRuleIsDeviceConditionObject](New-AzCdnDeliveryRuleIsDeviceConditionObject.md) +Create an in-memory object for DeliveryRuleIsDeviceCondition. + +### [New-AzCdnDeliveryRuleObject](New-AzCdnDeliveryRuleObject.md) +Create an in-memory object for DeliveryRule. + +### [New-AzCdnDeliveryRulePostArgsConditionObject](New-AzCdnDeliveryRulePostArgsConditionObject.md) +Create an in-memory object for DeliveryRulePostArgsCondition. + +### [New-AzCdnDeliveryRuleQueryStringConditionObject](New-AzCdnDeliveryRuleQueryStringConditionObject.md) +Create an in-memory object for DeliveryRuleQueryStringCondition. + +### [New-AzCdnDeliveryRuleRemoteAddressConditionObject](New-AzCdnDeliveryRuleRemoteAddressConditionObject.md) +Create an in-memory object for DeliveryRuleRemoteAddressCondition. + +### [New-AzCdnDeliveryRuleRequestBodyConditionObject](New-AzCdnDeliveryRuleRequestBodyConditionObject.md) +Create an in-memory object for DeliveryRuleRequestBodyCondition. + +### [New-AzCdnDeliveryRuleRequestHeaderActionObject](New-AzCdnDeliveryRuleRequestHeaderActionObject.md) +Create an in-memory object for DeliveryRuleRequestHeaderAction. + +### [New-AzCdnDeliveryRuleRequestHeaderConditionObject](New-AzCdnDeliveryRuleRequestHeaderConditionObject.md) +Create an in-memory object for DeliveryRuleRequestHeaderCondition. + +### [New-AzCdnDeliveryRuleRequestMethodConditionObject](New-AzCdnDeliveryRuleRequestMethodConditionObject.md) +Create an in-memory object for DeliveryRuleRequestMethodCondition. + +### [New-AzCdnDeliveryRuleRequestSchemeConditionObject](New-AzCdnDeliveryRuleRequestSchemeConditionObject.md) +Create an in-memory object for DeliveryRuleRequestSchemeCondition. + +### [New-AzCdnDeliveryRuleRequestUriConditionObject](New-AzCdnDeliveryRuleRequestUriConditionObject.md) +Create an in-memory object for DeliveryRuleRequestUriCondition. + +### [New-AzCdnDeliveryRuleResponseHeaderActionObject](New-AzCdnDeliveryRuleResponseHeaderActionObject.md) +Create an in-memory object for DeliveryRuleResponseHeaderAction. + +### [New-AzCdnDeliveryRuleUrlFileExtensionConditionObject](New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.md) +Create an in-memory object for DeliveryRuleUrlFileExtensionCondition. + +### [New-AzCdnDeliveryRuleUrlFileNameConditionObject](New-AzCdnDeliveryRuleUrlFileNameConditionObject.md) +Create an in-memory object for DeliveryRuleUrlFileNameCondition. + +### [New-AzCdnDeliveryRuleUrlPathConditionObject](New-AzCdnDeliveryRuleUrlPathConditionObject.md) +Create an in-memory object for DeliveryRuleUrlPathCondition. + +### [New-AzCdnEndpoint](New-AzCdnEndpoint.md) +Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. + +### [New-AzCdnHealthProbeParametersObject](New-AzCdnHealthProbeParametersObject.md) +Create an in-memory object for HealthProbeParameters. + +### [New-AzCdnManagedHttpsParametersObject](New-AzCdnManagedHttpsParametersObject.md) +Create an in-memory object for CdnManagedHttpsParameters. + +### [New-AzCdnOrigin](New-AzCdnOrigin.md) +Creates a new origin within the specified endpoint. + +### [New-AzCdnOriginGroup](New-AzCdnOriginGroup.md) +Creates a new origin group within the specified endpoint. + +### [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-AzCdnResourceReferenceObject](New-AzCdnResourceReferenceObject.md) +Create an in-memory object for ResourceReference. + +### [New-AzCdnResponseBasedOriginErrorDetectionParametersObject](New-AzCdnResponseBasedOriginErrorDetectionParametersObject.md) +Create an in-memory object for ResponseBasedOriginErrorDetectionParameters. + +### [New-AzCdnUrlRedirectActionObject](New-AzCdnUrlRedirectActionObject.md) +Create an in-memory object for UrlRedirectAction. + +### [New-AzCdnUrlRewriteActionObject](New-AzCdnUrlRewriteActionObject.md) +Create an in-memory object for UrlRewriteAction. + +### [New-AzCdnUrlSigningActionObject](New-AzCdnUrlSigningActionObject.md) +Create an in-memory object for UrlSigningAction. + +### [New-AzCdnUserManagedHttpsParametersObject](New-AzCdnUserManagedHttpsParametersObject.md) +Create an in-memory object for UserManagedHttpsParameters. + +### [New-AzFrontDoorCdnCustomDomain](New-AzFrontDoorCdnCustomDomain.md) +Creates a new domain within the specified profile. + +### [New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject](New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.md) +Create an in-memory object for AFDDomainHttpsParameters. + +### [New-AzFrontDoorCdnEndpoint](New-AzFrontDoorCdnEndpoint.md) +Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. + +### [New-AzFrontDoorCdnOrigin](New-AzFrontDoorCdnOrigin.md) +Creates a new origin within the specified origin group. + +### [New-AzFrontDoorCdnOriginGroup](New-AzFrontDoorCdnOriginGroup.md) +Creates a new origin group within the specified profile. + +### [New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject](New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.md) +Create an in-memory object for HealthProbeParameters. + +### [New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject](New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.md) +Create an in-memory object for LoadBalancingSettingsParameters. + +### [New-AzFrontDoorCdnProfile](New-AzFrontDoorCdnProfile.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-AzFrontDoorCdnResourceReferenceObject](New-AzFrontDoorCdnResourceReferenceObject.md) +Create an in-memory object for ResourceReference. + +### [New-AzFrontDoorCdnRoute](New-AzFrontDoorCdnRoute.md) +Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. + +### [New-AzFrontDoorCdnRule](New-AzFrontDoorCdnRule.md) +Creates a new delivery rule within the specified rule set. + +### [New-AzFrontDoorCdnRuleClientPortConditionObject](New-AzFrontDoorCdnRuleClientPortConditionObject.md) +Create an in-memory object for DeliveryRuleClientPortCondition. + +### [New-AzFrontDoorCdnRuleCookiesConditionObject](New-AzFrontDoorCdnRuleCookiesConditionObject.md) +Create an in-memory object for DeliveryRuleCookiesCondition. + +### [New-AzFrontDoorCdnRuleHostNameConditionObject](New-AzFrontDoorCdnRuleHostNameConditionObject.md) +Create an in-memory object for DeliveryRuleHostNameCondition. + +### [New-AzFrontDoorCdnRuleHttpVersionConditionObject](New-AzFrontDoorCdnRuleHttpVersionConditionObject.md) +Create an in-memory object for DeliveryRuleHttpVersionCondition. + +### [New-AzFrontDoorCdnRuleIsDeviceConditionObject](New-AzFrontDoorCdnRuleIsDeviceConditionObject.md) +Create an in-memory object for DeliveryRuleIsDeviceCondition. + +### [New-AzFrontDoorCdnRulePostArgsConditionObject](New-AzFrontDoorCdnRulePostArgsConditionObject.md) +Create an in-memory object for DeliveryRulePostArgsCondition. + +### [New-AzFrontDoorCdnRuleQueryStringConditionObject](New-AzFrontDoorCdnRuleQueryStringConditionObject.md) +Create an in-memory object for DeliveryRuleQueryStringCondition. + +### [New-AzFrontDoorCdnRuleRemoteAddressConditionObject](New-AzFrontDoorCdnRuleRemoteAddressConditionObject.md) +Create an in-memory object for DeliveryRuleRemoteAddressCondition. + +### [New-AzFrontDoorCdnRuleRequestBodyConditionObject](New-AzFrontDoorCdnRuleRequestBodyConditionObject.md) +Create an in-memory object for DeliveryRuleRequestBodyCondition. + +### [New-AzFrontDoorCdnRuleRequestHeaderActionObject](New-AzFrontDoorCdnRuleRequestHeaderActionObject.md) +Create an in-memory object for DeliveryRuleRequestHeaderAction. + +### [New-AzFrontDoorCdnRuleRequestHeaderConditionObject](New-AzFrontDoorCdnRuleRequestHeaderConditionObject.md) +Create an in-memory object for DeliveryRuleRequestHeaderCondition. + +### [New-AzFrontDoorCdnRuleRequestMethodConditionObject](New-AzFrontDoorCdnRuleRequestMethodConditionObject.md) +Create an in-memory object for DeliveryRuleRequestMethodCondition. + +### [New-AzFrontDoorCdnRuleRequestSchemeConditionObject](New-AzFrontDoorCdnRuleRequestSchemeConditionObject.md) +Create an in-memory object for DeliveryRuleRequestSchemeCondition. + +### [New-AzFrontDoorCdnRuleRequestUriConditionObject](New-AzFrontDoorCdnRuleRequestUriConditionObject.md) +Create an in-memory object for DeliveryRuleRequestUriCondition. + +### [New-AzFrontDoorCdnRuleResponseHeaderActionObject](New-AzFrontDoorCdnRuleResponseHeaderActionObject.md) +Create an in-memory object for DeliveryRuleResponseHeaderAction. + +### [New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject](New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.md) +Create an in-memory object for DeliveryRuleRouteConfigurationOverrideAction. + +### [New-AzFrontDoorCdnRuleServerPortConditionObject](New-AzFrontDoorCdnRuleServerPortConditionObject.md) +Create an in-memory object for DeliveryRuleServerPortCondition. + +### [New-AzFrontDoorCdnRuleSet](New-AzFrontDoorCdnRuleSet.md) +Creates a new rule set within the specified profile. + +### [New-AzFrontDoorCdnRuleSocketAddrConditionObject](New-AzFrontDoorCdnRuleSocketAddrConditionObject.md) +Create an in-memory object for DeliveryRuleSocketAddrCondition. + +### [New-AzFrontDoorCdnRuleSslProtocolConditionObject](New-AzFrontDoorCdnRuleSslProtocolConditionObject.md) +Create an in-memory object for DeliveryRuleSslProtocolCondition. + +### [New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject](New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.md) +Create an in-memory object for DeliveryRuleUrlFileExtensionCondition. + +### [New-AzFrontDoorCdnRuleUrlFileNameConditionObject](New-AzFrontDoorCdnRuleUrlFileNameConditionObject.md) +Create an in-memory object for DeliveryRuleUrlFileNameCondition. + +### [New-AzFrontDoorCdnRuleUrlPathConditionObject](New-AzFrontDoorCdnRuleUrlPathConditionObject.md) +Create an in-memory object for DeliveryRuleUrlPathCondition. + +### [New-AzFrontDoorCdnRuleUrlRedirectActionObject](New-AzFrontDoorCdnRuleUrlRedirectActionObject.md) +Create an in-memory object for UrlRedirectAction. + +### [New-AzFrontDoorCdnRuleUrlRewriteActionObject](New-AzFrontDoorCdnRuleUrlRewriteActionObject.md) +Create an in-memory object for UrlRewriteAction. + +### [New-AzFrontDoorCdnRuleUrlSigningActionObject](New-AzFrontDoorCdnRuleUrlSigningActionObject.md) +Create an in-memory object for UrlSigningAction. + +### [New-AzFrontDoorCdnSecret](New-AzFrontDoorCdnSecret.md) +Creates a new Secret within the specified profile. + +### [New-AzFrontDoorCdnSecretCustomerCertificateParametersObject](New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.md) +Create an in-memory object for CustomerCertificateParameters. + +### [New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject](New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.md) +Create an in-memory object for AzureFirstPartyManagedCertificateParameters. + +### [New-AzFrontDoorCdnSecretManagedCertificateParametersObject](New-AzFrontDoorCdnSecretManagedCertificateParametersObject.md) +Create an in-memory object for ManagedCertificateParameters. + +### [New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject](New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.md) +Create an in-memory object for UrlSigningKeyParameters. + +### [New-AzFrontDoorCdnSecurityPolicy](New-AzFrontDoorCdnSecurityPolicy.md) +Creates a new security policy within the specified profile. + +### [New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject](New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.md) +Create an in-memory object for SecurityPolicyWebApplicationFirewallAssociation. + +### [New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject](New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.md) +Create an in-memory object for SecurityPolicyWebApplicationFirewallParameters. + +### [Remove-AzCdnCustomDomain](Remove-AzCdnCustomDomain.md) +Deletes an existing custom domain within an endpoint. + +### [Remove-AzCdnEndpoint](Remove-AzCdnEndpoint.md) +Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. + +### [Remove-AzCdnOrigin](Remove-AzCdnOrigin.md) +Deletes an existing origin within an endpoint. + +### [Remove-AzCdnOriginGroup](Remove-AzCdnOriginGroup.md) +Deletes an existing origin group within an endpoint. + +### [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. + +### [Remove-AzFrontDoorCdnCustomDomain](Remove-AzFrontDoorCdnCustomDomain.md) +Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. + +### [Remove-AzFrontDoorCdnEndpoint](Remove-AzFrontDoorCdnEndpoint.md) +Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. + +### [Remove-AzFrontDoorCdnOrigin](Remove-AzFrontDoorCdnOrigin.md) +Deletes an existing origin within an origin group. + +### [Remove-AzFrontDoorCdnOriginGroup](Remove-AzFrontDoorCdnOriginGroup.md) +Deletes an existing origin group within a profile. + +### [Remove-AzFrontDoorCdnProfile](Remove-AzFrontDoorCdnProfile.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. + +### [Remove-AzFrontDoorCdnRoute](Remove-AzFrontDoorCdnRoute.md) +Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. + +### [Remove-AzFrontDoorCdnRule](Remove-AzFrontDoorCdnRule.md) +Deletes an existing delivery rule within a rule set. + +### [Remove-AzFrontDoorCdnRuleSet](Remove-AzFrontDoorCdnRuleSet.md) +Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. + +### [Remove-AzFrontDoorCdnSecret](Remove-AzFrontDoorCdnSecret.md) +Deletes an existing Secret within profile. + +### [Remove-AzFrontDoorCdnSecurityPolicy](Remove-AzFrontDoorCdnSecurityPolicy.md) +Deletes an existing security policy within profile. + +### [Start-AzCdnEndpoint](Start-AzCdnEndpoint.md) +Starts an existing CDN endpoint that is on a stopped state. + +### [Stop-AzCdnEndpoint](Stop-AzCdnEndpoint.md) +Stops an existing running CDN endpoint. + +### [Test-AzCdnEndpointCustomDomain](Test-AzCdnEndpointCustomDomain.md) +Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. + +### [Test-AzCdnNameAvailability](Test-AzCdnNameAvailability.md) +Check the availability of a resource name. +This is needed for resources where name is globally unique, such as a CDN endpoint. + +### [Test-AzCdnProbe](Test-AzCdnProbe.md) +Check if the probe path is a valid path and the file can be accessed. +Probe path is the path to a file hosted on the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. +This path is relative to the origin path specified in the endpoint configuration. + +### [Test-AzFrontDoorCdnEndpointCustomDomain](Test-AzFrontDoorCdnEndpointCustomDomain.md) +Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api isn't work for apex domain. + +### [Test-AzFrontDoorCdnEndpointNameAvailability](Test-AzFrontDoorCdnEndpointNameAvailability.md) +Check the availability of a resource name. +This is needed for resources where name is globally unique, such as a afdx endpoint. + +### [Test-AzFrontDoorCdnProfileHostNameAvailability](Test-AzFrontDoorCdnProfileHostNameAvailability.md) +Check the name availability of a host name. + +### [Update-AzCdnEndpoint](Update-AzCdnEndpoint.md) +Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +Only tags can be updated after creating an endpoint. +To update origins, use the Update Origin operation. +To update origin groups, use the Update Origin group operation. +To update custom domains, use the Update Custom Domain operation. + +### [Update-AzCdnOrigin](Update-AzCdnOrigin.md) +Updates an existing origin within an endpoint. + +### [Update-AzCdnOriginGroup](Update-AzCdnOriginGroup.md) +Updates an existing origin group within an endpoint. + +### [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. + +### [Update-AzFrontDoorCdnCustomDomain](Update-AzFrontDoorCdnCustomDomain.md) +Updates an existing domain within a profile. + +### [Update-AzFrontDoorCdnCustomDomainValidationToken](Update-AzFrontDoorCdnCustomDomainValidationToken.md) +Updates the domain validation token. + +### [Update-AzFrontDoorCdnEndpoint](Update-AzFrontDoorCdnEndpoint.md) +Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +Only tags can be updated after creating an endpoint. +To update origins, use the Update Origin operation. +To update origin groups, use the Update Origin group operation. +To update domains, use the Update Custom Domain operation. + +### [Update-AzFrontDoorCdnOrigin](Update-AzFrontDoorCdnOrigin.md) +Updates an existing origin within an origin group. + +### [Update-AzFrontDoorCdnOriginGroup](Update-AzFrontDoorCdnOriginGroup.md) +Updates an existing origin group within a profile. + +### [Update-AzFrontDoorCdnProfile](Update-AzFrontDoorCdnProfile.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. + +### [Update-AzFrontDoorCdnRoute](Update-AzFrontDoorCdnRoute.md) +Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. + +### [Update-AzFrontDoorCdnRule](Update-AzFrontDoorCdnRule.md) +Updates an existing delivery rule within a rule set. + +### [Update-AzFrontDoorCdnSecurityPolicy](Update-AzFrontDoorCdnSecurityPolicy.md) +Updates an existing security policy within a profile. + diff --git a/src/Cdn/help/Clear-AzCdnEndpointContent.md b/src/Cdn/help/Clear-AzCdnEndpointContent.md new file mode 100644 index 000000000000..8a119a93a4e6 --- /dev/null +++ b/src/Cdn/help/Clear-AzCdnEndpointContent.md @@ -0,0 +1,310 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/clear-azcdnendpointcontent +schema: 2.0.0 +--- + +# Clear-AzCdnEndpointContent + +## SYNOPSIS +Removes a content from CDN. + +## SYNTAX + +### PurgeExpanded1 (Default) +``` +Clear-AzCdnEndpointContent -EndpointName -ProfileName -ResourceGroupName + -ContentPath [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### Purge1 +``` +Clear-AzCdnEndpointContent -EndpointName -ProfileName -ResourceGroupName + -ContentFilePath [-SubscriptionId ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### PurgeViaIdentity1 +``` +Clear-AzCdnEndpointContent -InputObject -ContentFilePath + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### PurgeViaIdentityExpanded1 +``` +Clear-AzCdnEndpointContent -InputObject -ContentPath [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Removes a content from CDN. + +## 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 +``` + +### -ContentFilePath +Parameters required for content purge. +To construct, see NOTES section for CONTENTFILEPATH properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IPurgeParameters +Parameter Sets: Purge1, PurgeViaIdentity1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ContentPath +The path to the content to be purged. +Can describe a file path or a wild card directory. + +```yaml +Type: System.String[] +Parameter Sets: PurgeExpanded1, PurgeViaIdentityExpanded1 +Aliases: + +Required: True +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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Purge1, PurgeExpanded1 +Aliases: + +Required: True +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: PurgeViaIdentity1, PurgeViaIdentityExpanded1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +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 +``` + +### -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 +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Purge1, PurgeExpanded1 +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: Purge1, PurgeExpanded1 +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: Purge1, PurgeExpanded1 +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.Api20210601.IPurgeParameters + +### 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. + + +CONTENTFILEPATH : Parameters required for content purge. + - `ContentPath `: The path to the content to be purged. Can describe a file path or a wild card directory. + +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. + - `[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/help/Clear-AzFrontDoorCdnEndpointContent.md b/src/Cdn/help/Clear-AzFrontDoorCdnEndpointContent.md new file mode 100644 index 000000000000..669dde1d1988 --- /dev/null +++ b/src/Cdn/help/Clear-AzFrontDoorCdnEndpointContent.md @@ -0,0 +1,326 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/clear-azfrontdoorcdnendpointcontent +schema: 2.0.0 +--- + +# Clear-AzFrontDoorCdnEndpointContent + +## SYNOPSIS +Removes a content from AzureFrontDoor. + +## SYNTAX + +### PurgeExpanded (Default) +``` +Clear-AzFrontDoorCdnEndpointContent -EndpointName -ProfileName -ResourceGroupName + -ContentPath [-SubscriptionId ] [-Domain ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### Purge +``` +Clear-AzFrontDoorCdnEndpointContent -EndpointName -ProfileName -ResourceGroupName + -Content [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### PurgeViaIdentity +``` +Clear-AzFrontDoorCdnEndpointContent -InputObject -Content + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### PurgeViaIdentityExpanded +``` +Clear-AzFrontDoorCdnEndpointContent -InputObject -ContentPath [-Domain ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Removes a content from AzureFrontDoor. + +## 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 +``` + +### -Content +Parameters required for content purge. +To construct, see NOTES section for CONTENT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdPurgeParameters +Parameter Sets: Purge, PurgeViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ContentPath +The path to the content to be purged. +Can describe a file path or a wild card directory. + +```yaml +Type: System.String[] +Parameter Sets: PurgeExpanded, PurgeViaIdentityExpanded +Aliases: + +Required: True +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 +``` + +### -Domain +List of domains. + +```yaml +Type: System.String[] +Parameter Sets: PurgeExpanded, PurgeViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Purge, PurgeExpanded +Aliases: + +Required: True +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: PurgeViaIdentity, PurgeViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +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 +``` + +### -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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Purge, PurgeExpanded +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: Purge, PurgeExpanded +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: Purge, PurgeExpanded +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.Api20210601.IAfdPurgeParameters + +### 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. + + +CONTENT : Parameters required for content purge. + - `ContentPath `: The path to the content to be purged. Can describe a file path or a wild card directory. + - `[Domain ]`: List of domains. + +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. + - `[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/help/Disable-AzCdnCustomDomainCustomHttps.md b/src/Cdn/help/Disable-AzCdnCustomDomainCustomHttps.md new file mode 100644 index 000000000000..b328130e7c5c --- /dev/null +++ b/src/Cdn/help/Disable-AzCdnCustomDomainCustomHttps.md @@ -0,0 +1,245 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/disable-azcdncustomdomaincustomhttps +schema: 2.0.0 +--- + +# Disable-AzCdnCustomDomainCustomHttps + +## SYNOPSIS +Disable https delivery of the custom domain. + +## SYNTAX + +### Disable (Default) +``` +Disable-AzCdnCustomDomainCustomHttps -CustomDomainName -EndpointName -ProfileName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-Confirm] + [-WhatIf] [] +``` + +### DisableViaIdentity +``` +Disable-AzCdnCustomDomainCustomHttps -InputObject [-DefaultProfile ] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Disable https delivery of the custom domain. + +## 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 + +### -CustomDomainName +Name of the custom domain within an endpoint. + +```yaml +Type: System.String +Parameter Sets: Disable +Aliases: + +Required: True +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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Disable +Aliases: + +Required: True +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: DisableViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +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 +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Disable +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: Disable +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: Disable +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 + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain + +## 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. + - `[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/help/Enable-AzCdnCustomDomainCustomHttps.md b/src/Cdn/help/Enable-AzCdnCustomDomainCustomHttps.md new file mode 100644 index 000000000000..c42cbc3d7916 --- /dev/null +++ b/src/Cdn/help/Enable-AzCdnCustomDomainCustomHttps.md @@ -0,0 +1,269 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/enable-azcdncustomdomaincustomhttps +schema: 2.0.0 +--- + +# Enable-AzCdnCustomDomainCustomHttps + +## SYNOPSIS +Enable https delivery of the custom domain. + +## SYNTAX + +### EnableViaIdentity (Default) +``` +Enable-AzCdnCustomDomainCustomHttps -InputObject + -CustomDomainHttpsParameter [-DefaultProfile ] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +### Enable +``` +Enable-AzCdnCustomDomainCustomHttps -CustomDomainName -EndpointName -ProfileName + -ResourceGroupName -CustomDomainHttpsParameter + [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Enable https delivery of the custom domain. + +## 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 + +### -CustomDomainHttpsParameter +The JSON object that contains the properties to secure a custom domain. +To construct, see NOTES section for CUSTOMDOMAINHTTPSPARAMETER properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomainHttpsParameters +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CustomDomainName +Name of the custom domain within an endpoint. + +```yaml +Type: System.String +Parameter Sets: Enable +Aliases: + +Required: True +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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Enable +Aliases: + +Required: True +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: EnableViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +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 +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Enable +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: Enable +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: Enable +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.Api20210601.ICustomDomainHttpsParameters + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain + +## 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. + + +CUSTOMDOMAINHTTPSPARAMETER : The JSON object that contains the properties to secure a custom domain. + - `CertificateSource `: Defines the source of the SSL certificate. + - `ProtocolType `: Defines the TLS extension protocol that is used for secure delivery. + - `[MinimumTlsVersion ]`: TLS protocol version that will be used for Https + +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. + - `[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/help/Get-AzCdnCustomDomain.md b/src/Cdn/help/Get-AzCdnCustomDomain.md new file mode 100644 index 000000000000..cdd894c97407 --- /dev/null +++ b/src/Cdn/help/Get-AzCdnCustomDomain.md @@ -0,0 +1,203 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdncustomdomain +schema: 2.0.0 +--- + +# Get-AzCdnCustomDomain + +## SYNOPSIS +Gets an existing custom domain within an endpoint. + +## SYNTAX + +### List1 (Default) +``` +Get-AzCdnCustomDomain -EndpointName -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get1 +``` +Get-AzCdnCustomDomain -EndpointName -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity1 +``` +Get-AzCdnCustomDomain -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets an existing custom domain within an endpoint. + +## 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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Get1, List1 +Aliases: + +Required: True +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: GetViaIdentity1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the custom domain within an endpoint. + +```yaml +Type: System.String +Parameter Sets: Get1 +Aliases: CustomDomainName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Get1, List1 +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: Get1, List1 +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: Get1, List1 +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.ICustomDomain + +## 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. + - `[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/help/Get-AzCdnEdgeNode.md b/src/Cdn/help/Get-AzCdnEdgeNode.md new file mode 100644 index 000000000000..359df432629f --- /dev/null +++ b/src/Cdn/help/Get-AzCdnEdgeNode.md @@ -0,0 +1,77 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnedgenode +schema: 2.0.0 +--- + +# Get-AzCdnEdgeNode + +## SYNOPSIS +Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users. + +## SYNTAX + +``` +Get-AzCdnEdgeNode [-DefaultProfile ] [] +``` + +## DESCRIPTION +Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users. + +## 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 +``` + +### 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.IEdgeNode + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/Get-AzCdnEndpoint.md b/src/Cdn/help/Get-AzCdnEndpoint.md new file mode 100644 index 000000000000..c5a1c14e84fa --- /dev/null +++ b/src/Cdn/help/Get-AzCdnEndpoint.md @@ -0,0 +1,188 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnendpoint +schema: 2.0.0 +--- + +# Get-AzCdnEndpoint + +## SYNOPSIS +Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. + +## SYNTAX + +### List1 (Default) +``` +Get-AzCdnEndpoint -ProfileName -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get1 +``` +Get-AzCdnEndpoint -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity1 +``` +Get-AzCdnEndpoint -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. + +## 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: GetViaIdentity1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Get1 +Aliases: EndpointName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Get1, List1 +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: Get1, List1 +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: Get1, List1 +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.IEndpoint + +## 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. + - `[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/help/Get-AzCdnEndpointResourceUsage.md b/src/Cdn/help/Get-AzCdnEndpointResourceUsage.md new file mode 100644 index 000000000000..2a4b7496eeda --- /dev/null +++ b/src/Cdn/help/Get-AzCdnEndpointResourceUsage.md @@ -0,0 +1,169 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnendpointresourceusage +schema: 2.0.0 +--- + +# Get-AzCdnEndpointResourceUsage + +## SYNOPSIS +Checks the quota and usage of geo filters and custom domains under the given endpoint. + +## SYNTAX + +``` +Get-AzCdnEndpointResourceUsage -EndpointName -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Checks the quota and usage of geo filters and custom domains under the given endpoint. + +## 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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +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: (All) +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 + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/Get-AzCdnOrigin.md b/src/Cdn/help/Get-AzCdnOrigin.md new file mode 100644 index 000000000000..9390b0eb56b2 --- /dev/null +++ b/src/Cdn/help/Get-AzCdnOrigin.md @@ -0,0 +1,203 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnorigin +schema: 2.0.0 +--- + +# Get-AzCdnOrigin + +## SYNOPSIS +Gets an existing origin within an endpoint. + +## SYNTAX + +### List1 (Default) +``` +Get-AzCdnOrigin -EndpointName -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get1 +``` +Get-AzCdnOrigin -EndpointName -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity1 +``` +Get-AzCdnOrigin -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets an existing origin within an endpoint. + +## 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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Get1, List1 +Aliases: + +Required: True +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: GetViaIdentity1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the origin which is unique within the endpoint. + +```yaml +Type: System.String +Parameter Sets: Get1 +Aliases: OriginName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Get1, List1 +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: Get1, List1 +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: Get1, List1 +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.IOrigin + +## 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. + - `[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/help/Get-AzCdnOriginGroup.md b/src/Cdn/help/Get-AzCdnOriginGroup.md new file mode 100644 index 000000000000..eef801fab530 --- /dev/null +++ b/src/Cdn/help/Get-AzCdnOriginGroup.md @@ -0,0 +1,203 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnorigingroup +schema: 2.0.0 +--- + +# Get-AzCdnOriginGroup + +## SYNOPSIS +Gets an existing origin group within an endpoint. + +## SYNTAX + +### List1 (Default) +``` +Get-AzCdnOriginGroup -EndpointName -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get1 +``` +Get-AzCdnOriginGroup -EndpointName -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity1 +``` +Get-AzCdnOriginGroup -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets an existing origin group within an endpoint. + +## 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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Get1, List1 +Aliases: + +Required: True +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: GetViaIdentity1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the origin group which is unique within the endpoint. + +```yaml +Type: System.String +Parameter Sets: Get1 +Aliases: OriginGroupName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Get1, List1 +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: Get1, List1 +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: Get1, List1 +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.IOriginGroup + +## 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. + - `[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/help/Get-AzCdnProfile.md b/src/Cdn/help/Get-AzCdnProfile.md new file mode 100644 index 000000000000..7c7d760da326 --- /dev/null +++ b/src/Cdn/help/Get-AzCdnProfile.md @@ -0,0 +1,177 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnprofile +schema: 2.0.0 +--- + +# Get-AzCdnProfile + +## SYNOPSIS + + +## SYNTAX + +### List (Default) +``` +Get-AzCdnProfile [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzCdnProfile -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzCdnProfile -InputObject [-DefaultProfile ] [] +``` + +### List1 +``` +Get-AzCdnProfile -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +## DESCRIPTION + + +## 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 + + +```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 +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 + + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: ProfileName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName + + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId + + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +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.IProfile + +## 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 : + - `[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. + - `[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/help/Get-AzCdnProfileResourceUsage.md b/src/Cdn/help/Get-AzCdnProfileResourceUsage.md new file mode 100644 index 000000000000..7a3ac9632f45 --- /dev/null +++ b/src/Cdn/help/Get-AzCdnProfileResourceUsage.md @@ -0,0 +1,154 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnprofileresourceusage +schema: 2.0.0 +--- + +# Get-AzCdnProfileResourceUsage + +## SYNOPSIS +Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door Premium or CDN profile. + +## SYNTAX + +``` +Get-AzCdnProfileResourceUsage -ProfileName -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door Premium or CDN profile. + +## 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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +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: (All) +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 + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceUsage + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/Get-AzCdnProfileSupportedOptimizationType.md b/src/Cdn/help/Get-AzCdnProfileSupportedOptimizationType.md new file mode 100644 index 000000000000..c43b19319117 --- /dev/null +++ b/src/Cdn/help/Get-AzCdnProfileSupportedOptimizationType.md @@ -0,0 +1,156 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnprofilesupportedoptimizationtype +schema: 2.0.0 +--- + +# Get-AzCdnProfileSupportedOptimizationType + +## SYNOPSIS +Gets the supported optimization types for the current profile. +A user can create an endpoint with an optimization type from the listed values. + +## SYNTAX + +``` +Get-AzCdnProfileSupportedOptimizationType -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Gets the supported optimization types for the current profile. +A user can create an endpoint with an optimization type from the listed values. + +## 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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +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: (All) +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 + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/Get-AzCdnSubscriptionResourceUsage.md b/src/Cdn/help/Get-AzCdnSubscriptionResourceUsage.md new file mode 100644 index 000000000000..ab363c5b10c5 --- /dev/null +++ b/src/Cdn/help/Get-AzCdnSubscriptionResourceUsage.md @@ -0,0 +1,124 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnsubscriptionresourceusage +schema: 2.0.0 +--- + +# Get-AzCdnSubscriptionResourceUsage + +## SYNOPSIS +Check the quota and actual usage of the CDN profiles under the given subscription. + +## SYNTAX + +``` +Get-AzCdnSubscriptionResourceUsage [-SubscriptionId ] [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Check the quota and actual usage of the CDN profiles under the given subscription. + +## 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 +``` + +### -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.IResourceUsage + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/Get-AzFrontDoorCdnCustomDomain.md b/src/Cdn/help/Get-AzFrontDoorCdnCustomDomain.md new file mode 100644 index 000000000000..b336e0def627 --- /dev/null +++ b/src/Cdn/help/Get-AzFrontDoorCdnCustomDomain.md @@ -0,0 +1,188 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdncustomdomain +schema: 2.0.0 +--- + +# Get-AzFrontDoorCdnCustomDomain + +## SYNOPSIS +Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. + +## SYNTAX + +### List (Default) +``` +Get-AzFrontDoorCdnCustomDomain -ProfileName -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzFrontDoorCdnCustomDomain -CustomDomainName -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzFrontDoorCdnCustomDomain -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. + +## 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 + +### -CustomDomainName +Name of the domain under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +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: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +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: 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.IAfdDomain + +## 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. + - `[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/help/Get-AzFrontDoorCdnEndpoint.md b/src/Cdn/help/Get-AzFrontDoorCdnEndpoint.md new file mode 100644 index 000000000000..4d4a0294c658 --- /dev/null +++ b/src/Cdn/help/Get-AzFrontDoorCdnEndpoint.md @@ -0,0 +1,188 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnendpoint +schema: 2.0.0 +--- + +# Get-AzFrontDoorCdnEndpoint + +## SYNOPSIS +Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. + +## SYNTAX + +### List (Default) +``` +Get-AzFrontDoorCdnEndpoint -ProfileName -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzFrontDoorCdnEndpoint -EndpointName -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzFrontDoorCdnEndpoint -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. + +## 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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +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: 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.IAfdEndpoint + +## 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. + - `[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/help/Get-AzFrontDoorCdnEndpointResourceUsage.md b/src/Cdn/help/Get-AzFrontDoorCdnEndpointResourceUsage.md new file mode 100644 index 000000000000..5b87af3552ba --- /dev/null +++ b/src/Cdn/help/Get-AzFrontDoorCdnEndpointResourceUsage.md @@ -0,0 +1,170 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnendpointresourceusage +schema: 2.0.0 +--- + +# Get-AzFrontDoorCdnEndpointResourceUsage + +## SYNOPSIS +Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. + +## SYNTAX + +``` +Get-AzFrontDoorCdnEndpointResourceUsage -EndpointName -ProfileName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. + +## 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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +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: (All) +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 + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/Get-AzFrontDoorCdnOrigin.md b/src/Cdn/help/Get-AzFrontDoorCdnOrigin.md new file mode 100644 index 000000000000..6077a0752896 --- /dev/null +++ b/src/Cdn/help/Get-AzFrontDoorCdnOrigin.md @@ -0,0 +1,203 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnorigin +schema: 2.0.0 +--- + +# Get-AzFrontDoorCdnOrigin + +## SYNOPSIS +Gets an existing origin within an origin group. + +## SYNTAX + +### List (Default) +``` +Get-AzFrontDoorCdnOrigin -OriginGroupName -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzFrontDoorCdnOrigin -OriginGroupName -OriginName -ProfileName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzFrontDoorCdnOrigin -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets an existing origin within an origin 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 +``` + +### -OriginGroupName +Name of the origin group which is unique within the profile. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OriginName +Name of the origin which is unique within the profile. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +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: 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.IAfdOrigin + +## 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. + - `[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/help/Get-AzFrontDoorCdnOriginGroup.md b/src/Cdn/help/Get-AzFrontDoorCdnOriginGroup.md new file mode 100644 index 000000000000..1e472fab9f9f --- /dev/null +++ b/src/Cdn/help/Get-AzFrontDoorCdnOriginGroup.md @@ -0,0 +1,188 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnorigingroup +schema: 2.0.0 +--- + +# Get-AzFrontDoorCdnOriginGroup + +## SYNOPSIS +Gets an existing origin group within a profile. + +## SYNTAX + +### List (Default) +``` +Get-AzFrontDoorCdnOriginGroup -ProfileName -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzFrontDoorCdnOriginGroup -OriginGroupName -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzFrontDoorCdnOriginGroup -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets an existing origin group within a profile. + +## 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 +``` + +### -OriginGroupName +Name of the origin group which is unique within the endpoint. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +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: 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.IAfdOriginGroup + +## 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. + - `[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/help/Get-AzFrontDoorCdnOriginGroupResourceUsage.md b/src/Cdn/help/Get-AzFrontDoorCdnOriginGroupResourceUsage.md new file mode 100644 index 000000000000..80b141397800 --- /dev/null +++ b/src/Cdn/help/Get-AzFrontDoorCdnOriginGroupResourceUsage.md @@ -0,0 +1,170 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnorigingroupresourceusage +schema: 2.0.0 +--- + +# Get-AzFrontDoorCdnOriginGroupResourceUsage + +## SYNOPSIS +Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN profile. + +## SYNTAX + +``` +Get-AzFrontDoorCdnOriginGroupResourceUsage -OriginGroupName -ProfileName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN profile. + +## 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 +``` + +### -OriginGroupName +Name of the origin group which is unique within the endpoint. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +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: (All) +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 + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/Get-AzFrontDoorCdnProfile.md b/src/Cdn/help/Get-AzFrontDoorCdnProfile.md new file mode 100644 index 000000000000..c6227d445980 --- /dev/null +++ b/src/Cdn/help/Get-AzFrontDoorCdnProfile.md @@ -0,0 +1,177 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnprofile +schema: 2.0.0 +--- + +# Get-AzFrontDoorCdnProfile + +## SYNOPSIS + + +## SYNTAX + +### List (Default) +``` +Get-AzFrontDoorCdnProfile [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzFrontDoorCdnProfile -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzFrontDoorCdnProfile -InputObject [-DefaultProfile ] [] +``` + +### List1 +``` +Get-AzFrontDoorCdnProfile -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION + + +## 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 + + +```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 +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 + + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: ProfileName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName + + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId + + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +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.IProfile + +## 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 : + - `[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. + - `[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/help/Get-AzFrontDoorCdnProfileResourceUsage.md b/src/Cdn/help/Get-AzFrontDoorCdnProfileResourceUsage.md new file mode 100644 index 000000000000..0b606dc7e2b9 --- /dev/null +++ b/src/Cdn/help/Get-AzFrontDoorCdnProfileResourceUsage.md @@ -0,0 +1,154 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnprofileresourceusage +schema: 2.0.0 +--- + +# Get-AzFrontDoorCdnProfileResourceUsage + +## SYNOPSIS +Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. + +## SYNTAX + +``` +Get-AzFrontDoorCdnProfileResourceUsage -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. + +## 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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +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: (All) +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 + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/Get-AzFrontDoorCdnRoute.md b/src/Cdn/help/Get-AzFrontDoorCdnRoute.md new file mode 100644 index 000000000000..19cfa9dcbc19 --- /dev/null +++ b/src/Cdn/help/Get-AzFrontDoorCdnRoute.md @@ -0,0 +1,203 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnroute +schema: 2.0.0 +--- + +# Get-AzFrontDoorCdnRoute + +## SYNOPSIS +Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. + +## SYNTAX + +### List (Default) +``` +Get-AzFrontDoorCdnRoute -EndpointName -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzFrontDoorCdnRoute -EndpointName -Name -ProfileName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzFrontDoorCdnRoute -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. + +## 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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +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 +Name of the routing rule. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: RouteName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +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: 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.IRoute + +## 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. + - `[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/help/Get-AzFrontDoorCdnRule.md b/src/Cdn/help/Get-AzFrontDoorCdnRule.md new file mode 100644 index 000000000000..fcdaffbae0e9 --- /dev/null +++ b/src/Cdn/help/Get-AzFrontDoorCdnRule.md @@ -0,0 +1,203 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnrule +schema: 2.0.0 +--- + +# Get-AzFrontDoorCdnRule + +## SYNOPSIS +Gets an existing delivery rule within a rule set. + +## SYNTAX + +### List (Default) +``` +Get-AzFrontDoorCdnRule -ProfileName -ResourceGroupName -SetName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzFrontDoorCdnRule -Name -ProfileName -ResourceGroupName -SetName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzFrontDoorCdnRule -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets an existing delivery rule within a rule set. + +## 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 +Name of the delivery rule which is unique within the endpoint. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: RuleName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +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: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SetName +Name of the rule set under the profile. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: RuleSetName + +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.IRule + +## 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. + - `[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/help/Get-AzFrontDoorCdnRuleSet.md b/src/Cdn/help/Get-AzFrontDoorCdnRuleSet.md new file mode 100644 index 000000000000..150d789edd83 --- /dev/null +++ b/src/Cdn/help/Get-AzFrontDoorCdnRuleSet.md @@ -0,0 +1,188 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnruleset +schema: 2.0.0 +--- + +# Get-AzFrontDoorCdnRuleSet + +## SYNOPSIS +Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. + +## SYNTAX + +### List (Default) +``` +Get-AzFrontDoorCdnRuleSet -ProfileName -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzFrontDoorCdnRuleSet -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzFrontDoorCdnRuleSet -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. + +## 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 +Name of the rule set under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: RuleSetName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +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: 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.IRuleSet + +## 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. + - `[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/help/Get-AzFrontDoorCdnRuleSetResourceUsage.md b/src/Cdn/help/Get-AzFrontDoorCdnRuleSetResourceUsage.md new file mode 100644 index 000000000000..4f19b7c47635 --- /dev/null +++ b/src/Cdn/help/Get-AzFrontDoorCdnRuleSetResourceUsage.md @@ -0,0 +1,169 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnrulesetresourceusage +schema: 2.0.0 +--- + +# Get-AzFrontDoorCdnRuleSetResourceUsage + +## SYNOPSIS +Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. + +## SYNTAX + +``` +Get-AzFrontDoorCdnRuleSetResourceUsage -ProfileName -ResourceGroupName -RuleSetName + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. + +## 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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RuleSetName +Name of the rule set under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +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 + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUsage + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/Get-AzFrontDoorCdnSecret.md b/src/Cdn/help/Get-AzFrontDoorCdnSecret.md new file mode 100644 index 000000000000..a2ee974dfe0c --- /dev/null +++ b/src/Cdn/help/Get-AzFrontDoorCdnSecret.md @@ -0,0 +1,188 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnsecret +schema: 2.0.0 +--- + +# Get-AzFrontDoorCdnSecret + +## SYNOPSIS +Gets an existing Secret within a profile. + +## SYNTAX + +### List (Default) +``` +Get-AzFrontDoorCdnSecret -ProfileName -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzFrontDoorCdnSecret -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzFrontDoorCdnSecret -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets an existing Secret within a profile. + +## 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 +Name of the Secret under the profile. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: SecretName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +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: 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.ISecret + +## 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. + - `[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/help/Get-AzFrontDoorCdnSecurityPolicy.md b/src/Cdn/help/Get-AzFrontDoorCdnSecurityPolicy.md new file mode 100644 index 000000000000..ac8150b75c49 --- /dev/null +++ b/src/Cdn/help/Get-AzFrontDoorCdnSecurityPolicy.md @@ -0,0 +1,188 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/get-azfrontdoorcdnsecuritypolicy +schema: 2.0.0 +--- + +# Get-AzFrontDoorCdnSecurityPolicy + +## SYNOPSIS +Gets an existing security policy within a profile. + +## SYNTAX + +### List (Default) +``` +Get-AzFrontDoorCdnSecurityPolicy -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzFrontDoorCdnSecurityPolicy -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzFrontDoorCdnSecurityPolicy -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets an existing security policy within a profile. + +## 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 +Name of the security policy under the profile. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: SecurityPolicyName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +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: 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.ISecurityPolicy + +## 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. + - `[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/help/Import-AzCdnEndpointContent.md b/src/Cdn/help/Import-AzCdnEndpointContent.md new file mode 100644 index 000000000000..50ced8927445 --- /dev/null +++ b/src/Cdn/help/Import-AzCdnEndpointContent.md @@ -0,0 +1,312 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/import-azcdnendpointcontent +schema: 2.0.0 +--- + +# Import-AzCdnEndpointContent + +## SYNOPSIS +Pre-loads a content to CDN. +Available for Verizon Profiles. + +## SYNTAX + +### LoadExpanded (Default) +``` +Import-AzCdnEndpointContent -EndpointName -ProfileName -ResourceGroupName + -ContentPath [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### Load +``` +Import-AzCdnEndpointContent -EndpointName -ProfileName -ResourceGroupName + -ContentFilePath [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### LoadViaIdentity +``` +Import-AzCdnEndpointContent -InputObject -ContentFilePath + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### LoadViaIdentityExpanded +``` +Import-AzCdnEndpointContent -InputObject -ContentPath [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Pre-loads a content to CDN. +Available for Verizon Profiles. + +## 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 +``` + +### -ContentFilePath +Parameters required for content load. +To construct, see NOTES section for CONTENTFILEPATH properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadParameters +Parameter Sets: Load, LoadViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ContentPath +The path to the content to be loaded. +Path should be a relative file URL of the origin. + +```yaml +Type: System.String[] +Parameter Sets: LoadExpanded, LoadViaIdentityExpanded +Aliases: + +Required: True +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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Load, LoadExpanded +Aliases: + +Required: True +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: LoadViaIdentity, LoadViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +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 +``` + +### -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 +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Load, LoadExpanded +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: Load, LoadExpanded +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: Load, LoadExpanded +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.Api20210601.ILoadParameters + +### 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. + + +CONTENTFILEPATH : Parameters required for content load. + - `ContentPath `: The path to the content to be loaded. Path should be a relative file URL of the origin. + +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. + - `[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/help/New-AzCdnCustomDomain.md b/src/Cdn/help/New-AzCdnCustomDomain.md new file mode 100644 index 000000000000..57a7a57f75df --- /dev/null +++ b/src/Cdn/help/New-AzCdnCustomDomain.md @@ -0,0 +1,231 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azcdncustomdomain +schema: 2.0.0 +--- + +# New-AzCdnCustomDomain + +## SYNOPSIS +Creates a new custom domain within an endpoint. + +## SYNTAX + +``` +New-AzCdnCustomDomain -EndpointName -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-HostName ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Creates a new custom domain within an endpoint. + +## 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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HostName +The host name of the custom domain. +Must be a domain name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of the custom domain within an endpoint. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: CustomDomainName + +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 +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +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: (All) +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 + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICustomDomain + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnDeliveryRuleCookiesConditionObject.md b/src/Cdn/help/New-AzCdnDeliveryRuleCookiesConditionObject.md new file mode 100644 index 000000000000..fb7074425d67 --- /dev/null +++ b/src/Cdn/help/New-AzCdnDeliveryRuleCookiesConditionObject.md @@ -0,0 +1,154 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleCookiesConditionObject +schema: 2.0.0 +--- + +# New-AzCdnDeliveryRuleCookiesConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleCookiesCondition. + +## SYNTAX + +``` +New-AzCdnDeliveryRuleCookiesConditionObject -Name -ParameterOperator + [-ParameterMatchValue ] [-ParameterNegateCondition ] [-ParameterSelector ] + [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleCookiesCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterSelector +Name of Cookies to be matched. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleCookiesCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnDeliveryRuleHttpVersionConditionObject.md b/src/Cdn/help/New-AzCdnDeliveryRuleHttpVersionConditionObject.md new file mode 100644 index 000000000000..434a4332c7ee --- /dev/null +++ b/src/Cdn/help/New-AzCdnDeliveryRuleHttpVersionConditionObject.md @@ -0,0 +1,123 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleHttpVersionConditionObject +schema: 2.0.0 +--- + +# New-AzCdnDeliveryRuleHttpVersionConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleHttpVersionCondition. + +## SYNTAX + +``` +New-AzCdnDeliveryRuleHttpVersionConditionObject -Name [-ParameterMatchValue ] + [-ParameterNegateCondition ] [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleHttpVersionCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleHttpVersionCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnDeliveryRuleIsDeviceConditionObject.md b/src/Cdn/help/New-AzCdnDeliveryRuleIsDeviceConditionObject.md new file mode 100644 index 000000000000..2e298f1076d2 --- /dev/null +++ b/src/Cdn/help/New-AzCdnDeliveryRuleIsDeviceConditionObject.md @@ -0,0 +1,123 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleIsDeviceConditionObject +schema: 2.0.0 +--- + +# New-AzCdnDeliveryRuleIsDeviceConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleIsDeviceCondition. + +## SYNTAX + +``` +New-AzCdnDeliveryRuleIsDeviceConditionObject -Name [-ParameterMatchValue ] + [-ParameterNegateCondition ] [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleIsDeviceCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleIsDeviceCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnDeliveryRuleObject.md b/src/Cdn/help/New-AzCdnDeliveryRuleObject.md new file mode 100644 index 000000000000..9a33540f99a3 --- /dev/null +++ b/src/Cdn/help/New-AzCdnDeliveryRuleObject.md @@ -0,0 +1,140 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleObject +schema: 2.0.0 +--- + +# New-AzCdnDeliveryRuleObject + +## SYNOPSIS +Create an in-memory object for DeliveryRule. + +## SYNTAX + +``` +New-AzCdnDeliveryRuleObject -Action -Order + [-Condition ] [-Name ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRule. + +## 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 + +### -Action +A list of actions that are executed when all the conditions of a rule are satisfied. +To construct, see NOTES section for ACTION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Condition +A list of conditions that must be matched for the actions to be executed. +To construct, see NOTES section for CONDITION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of the rule. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Order +The order in which the rules are applied for the endpoint. +Possible values {0,1,2,3,………}. +A rule with a lesser order will be applied before a rule with a greater order. +Rule with order 0 is a special rule. +It does not require any condition and actions listed in it will always be applied. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: True +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.DeliveryRule + +## 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. + + +ACTION : A list of actions that are executed when all the conditions of a rule are satisfied. + - `Name `: The name of the action for the delivery rule. + +CONDITION : A list of conditions that must be matched for the actions to be executed. + - `Name `: The name of the condition for the delivery rule. + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnDeliveryRulePostArgsConditionObject.md b/src/Cdn/help/New-AzCdnDeliveryRulePostArgsConditionObject.md new file mode 100644 index 000000000000..9f4e20506df7 --- /dev/null +++ b/src/Cdn/help/New-AzCdnDeliveryRulePostArgsConditionObject.md @@ -0,0 +1,154 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRulePostArgsConditionObject +schema: 2.0.0 +--- + +# New-AzCdnDeliveryRulePostArgsConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRulePostArgsCondition. + +## SYNTAX + +``` +New-AzCdnDeliveryRulePostArgsConditionObject -Name -ParameterOperator + [-ParameterMatchValue ] [-ParameterNegateCondition ] [-ParameterSelector ] + [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRulePostArgsCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterSelector +Name of PostArg to be matched. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRulePostArgsCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnDeliveryRuleQueryStringConditionObject.md b/src/Cdn/help/New-AzCdnDeliveryRuleQueryStringConditionObject.md new file mode 100644 index 000000000000..fbed4b7122a9 --- /dev/null +++ b/src/Cdn/help/New-AzCdnDeliveryRuleQueryStringConditionObject.md @@ -0,0 +1,139 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleQueryStringConditionObject +schema: 2.0.0 +--- + +# New-AzCdnDeliveryRuleQueryStringConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleQueryStringCondition. + +## SYNTAX + +``` +New-AzCdnDeliveryRuleQueryStringConditionObject -Name -ParameterOperator + [-ParameterMatchValue ] [-ParameterNegateCondition ] [-ParameterTransform ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleQueryStringCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleQueryStringCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnDeliveryRuleRemoteAddressConditionObject.md b/src/Cdn/help/New-AzCdnDeliveryRuleRemoteAddressConditionObject.md new file mode 100644 index 000000000000..5fc4fea6bddb --- /dev/null +++ b/src/Cdn/help/New-AzCdnDeliveryRuleRemoteAddressConditionObject.md @@ -0,0 +1,141 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRemoteAddressConditionObject +schema: 2.0.0 +--- + +# New-AzCdnDeliveryRuleRemoteAddressConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleRemoteAddressCondition. + +## SYNTAX + +``` +New-AzCdnDeliveryRuleRemoteAddressConditionObject -Name + -ParameterOperator [-ParameterMatchValue ] + [-ParameterNegateCondition ] [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleRemoteAddressCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +Match values to match against. +The operator will apply to each value in here with OR semantics. +If any of them match the variable with the given operator this match condition is considered a match. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleRemoteAddressCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnDeliveryRuleRequestBodyConditionObject.md b/src/Cdn/help/New-AzCdnDeliveryRuleRequestBodyConditionObject.md new file mode 100644 index 000000000000..a061547f23d3 --- /dev/null +++ b/src/Cdn/help/New-AzCdnDeliveryRuleRequestBodyConditionObject.md @@ -0,0 +1,139 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestBodyConditionObject +schema: 2.0.0 +--- + +# New-AzCdnDeliveryRuleRequestBodyConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleRequestBodyCondition. + +## SYNTAX + +``` +New-AzCdnDeliveryRuleRequestBodyConditionObject -Name -ParameterOperator + [-ParameterMatchValue ] [-ParameterNegateCondition ] [-ParameterTransform ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleRequestBodyCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleRequestBodyCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnDeliveryRuleRequestHeaderActionObject.md b/src/Cdn/help/New-AzCdnDeliveryRuleRequestHeaderActionObject.md new file mode 100644 index 000000000000..cedbf22ccd3e --- /dev/null +++ b/src/Cdn/help/New-AzCdnDeliveryRuleRequestHeaderActionObject.md @@ -0,0 +1,124 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestHeaderActionObject +schema: 2.0.0 +--- + +# New-AzCdnDeliveryRuleRequestHeaderActionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleRequestHeaderAction. + +## SYNTAX + +``` +New-AzCdnDeliveryRuleRequestHeaderActionObject -Name + -ParameterHeaderAction -ParameterHeaderName [-ParameterValue ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleRequestHeaderAction. + +## 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 + +### -Name +The name of the action for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterHeaderAction +Action to perform. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterHeaderName +Name of the header to modify. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterValue +Value for the specified action. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleRequestHeaderAction + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnDeliveryRuleRequestHeaderConditionObject.md b/src/Cdn/help/New-AzCdnDeliveryRuleRequestHeaderConditionObject.md new file mode 100644 index 000000000000..3332e7fc3790 --- /dev/null +++ b/src/Cdn/help/New-AzCdnDeliveryRuleRequestHeaderConditionObject.md @@ -0,0 +1,155 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestHeaderConditionObject +schema: 2.0.0 +--- + +# New-AzCdnDeliveryRuleRequestHeaderConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleRequestHeaderCondition. + +## SYNTAX + +``` +New-AzCdnDeliveryRuleRequestHeaderConditionObject -Name + -ParameterOperator [-ParameterMatchValue ] + [-ParameterNegateCondition ] [-ParameterSelector ] [-ParameterTransform ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleRequestHeaderCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterSelector +Name of Header to be matched. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleRequestHeaderCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnDeliveryRuleRequestMethodConditionObject.md b/src/Cdn/help/New-AzCdnDeliveryRuleRequestMethodConditionObject.md new file mode 100644 index 000000000000..7cd911b7c04d --- /dev/null +++ b/src/Cdn/help/New-AzCdnDeliveryRuleRequestMethodConditionObject.md @@ -0,0 +1,123 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestMethodConditionObject +schema: 2.0.0 +--- + +# New-AzCdnDeliveryRuleRequestMethodConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleRequestMethodCondition. + +## SYNTAX + +``` +New-AzCdnDeliveryRuleRequestMethodConditionObject -Name [-ParameterMatchValue ] + [-ParameterNegateCondition ] [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleRequestMethodCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleRequestMethodCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnDeliveryRuleRequestSchemeConditionObject.md b/src/Cdn/help/New-AzCdnDeliveryRuleRequestSchemeConditionObject.md new file mode 100644 index 000000000000..d3c903bab0c9 --- /dev/null +++ b/src/Cdn/help/New-AzCdnDeliveryRuleRequestSchemeConditionObject.md @@ -0,0 +1,123 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestSchemeConditionObject +schema: 2.0.0 +--- + +# New-AzCdnDeliveryRuleRequestSchemeConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleRequestSchemeCondition. + +## SYNTAX + +``` +New-AzCdnDeliveryRuleRequestSchemeConditionObject -Name [-ParameterMatchValue ] + [-ParameterNegateCondition ] [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleRequestSchemeCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleRequestSchemeCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnDeliveryRuleRequestUriConditionObject.md b/src/Cdn/help/New-AzCdnDeliveryRuleRequestUriConditionObject.md new file mode 100644 index 000000000000..222602d13b25 --- /dev/null +++ b/src/Cdn/help/New-AzCdnDeliveryRuleRequestUriConditionObject.md @@ -0,0 +1,139 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleRequestUriConditionObject +schema: 2.0.0 +--- + +# New-AzCdnDeliveryRuleRequestUriConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleRequestUriCondition. + +## SYNTAX + +``` +New-AzCdnDeliveryRuleRequestUriConditionObject -Name -ParameterOperator + [-ParameterMatchValue ] [-ParameterNegateCondition ] [-ParameterTransform ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleRequestUriCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleRequestUriCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnDeliveryRuleResponseHeaderActionObject.md b/src/Cdn/help/New-AzCdnDeliveryRuleResponseHeaderActionObject.md new file mode 100644 index 000000000000..a87b85420610 --- /dev/null +++ b/src/Cdn/help/New-AzCdnDeliveryRuleResponseHeaderActionObject.md @@ -0,0 +1,124 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleResponseHeaderActionObject +schema: 2.0.0 +--- + +# New-AzCdnDeliveryRuleResponseHeaderActionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleResponseHeaderAction. + +## SYNTAX + +``` +New-AzCdnDeliveryRuleResponseHeaderActionObject -Name + -ParameterHeaderAction -ParameterHeaderName [-ParameterValue ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleResponseHeaderAction. + +## 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 + +### -Name +The name of the action for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterHeaderAction +Action to perform. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterHeaderName +Name of the header to modify. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterValue +Value for the specified action. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleResponseHeaderAction + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.md b/src/Cdn/help/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.md new file mode 100644 index 000000000000..f9b21fde686d --- /dev/null +++ b/src/Cdn/help/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.md @@ -0,0 +1,139 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleUrlFileExtensionConditionObject +schema: 2.0.0 +--- + +# New-AzCdnDeliveryRuleUrlFileExtensionConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleUrlFileExtensionCondition. + +## SYNTAX + +``` +New-AzCdnDeliveryRuleUrlFileExtensionConditionObject -Name + -ParameterOperator [-ParameterMatchValue ] + [-ParameterNegateCondition ] [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleUrlFileExtensionCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleUrlFileExtensionCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnDeliveryRuleUrlFileNameConditionObject.md b/src/Cdn/help/New-AzCdnDeliveryRuleUrlFileNameConditionObject.md new file mode 100644 index 000000000000..a4ddb9c05f82 --- /dev/null +++ b/src/Cdn/help/New-AzCdnDeliveryRuleUrlFileNameConditionObject.md @@ -0,0 +1,139 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleUrlFileNameConditionObject +schema: 2.0.0 +--- + +# New-AzCdnDeliveryRuleUrlFileNameConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleUrlFileNameCondition. + +## SYNTAX + +``` +New-AzCdnDeliveryRuleUrlFileNameConditionObject -Name -ParameterOperator + [-ParameterMatchValue ] [-ParameterNegateCondition ] [-ParameterTransform ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleUrlFileNameCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleUrlFileNameCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnDeliveryRuleUrlPathConditionObject.md b/src/Cdn/help/New-AzCdnDeliveryRuleUrlPathConditionObject.md new file mode 100644 index 000000000000..6681159be1c3 --- /dev/null +++ b/src/Cdn/help/New-AzCdnDeliveryRuleUrlPathConditionObject.md @@ -0,0 +1,139 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnDeliveryRuleUrlPathConditionObject +schema: 2.0.0 +--- + +# New-AzCdnDeliveryRuleUrlPathConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleUrlPathCondition. + +## SYNTAX + +``` +New-AzCdnDeliveryRuleUrlPathConditionObject -Name -ParameterOperator + [-ParameterMatchValue ] [-ParameterNegateCondition ] [-ParameterTransform ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleUrlPathCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleUrlPathCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnEndpoint.md b/src/Cdn/help/New-AzCdnEndpoint.md new file mode 100644 index 000000000000..cf8e0279f0fa --- /dev/null +++ b/src/Cdn/help/New-AzCdnEndpoint.md @@ -0,0 +1,570 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnendpoint +schema: 2.0.0 +--- + +# New-AzCdnEndpoint + +## SYNOPSIS +Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. + +## SYNTAX + +``` +New-AzCdnEndpoint -Name -ProfileName -ResourceGroupName -Location + [-SubscriptionId ] [-ContentTypesToCompress ] [-DefaultOriginGroupId ] + [-DeliveryPolicyDescription ] [-DeliveryPolicyRule ] [-GeoFilter ] + [-IsCompressionEnabled] [-IsHttpAllowed] [-IsHttpsAllowed] [-OptimizationType ] + [-Origin ] [-OriginGroup ] [-OriginHostHeader ] + [-OriginPath ] [-ProbePath ] [-QueryStringCachingBehavior ] + [-Tag ] [-UrlSigningKey ] [-WebApplicationFirewallPolicyLinkId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. + +## 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 +``` + +### -ContentTypesToCompress +List of content types on which compression applies. +The value should be a valid MIME type. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultOriginGroupId +Resource ID. + +```yaml +Type: System.String +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 +``` + +### -DeliveryPolicyDescription +User-friendly description of the policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeliveryPolicyRule +A list of the delivery rules. +To construct, see NOTES section for DELIVERYPOLICYRULE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GeoFilter +List of rules defining the user's geo access within a CDN endpoint. +Each geo filter defines an access rule to a specified path or content, e.g. +block APAC for path /pictures/ +To construct, see NOTES section for GEOFILTER properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsCompressionEnabled +Indicates whether content compression is enabled on CDN. +Default value is false. +If compression is enabled, content will be served as compressed if user requests for a compressed version. +Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. + +```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 +``` + +### -IsHttpAllowed +Indicates whether HTTP traffic is allowed on the endpoint. +Default value is true. +At least one protocol (HTTP or HTTPS) must be allowed. + +```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 +``` + +### -IsHttpsAllowed +Indicates whether HTTPS traffic is allowed on the endpoint. +Default value is true. +At least one protocol (HTTP or HTTPS) must be allowed. + +```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 +``` + +### -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 +``` + +### -Name +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: EndpointName + +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 +``` + +### -OptimizationType +Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. +Download, Media services. +With this information, CDN can apply scenario driven optimization. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Origin +The source of the content being delivered via CDN. +To construct, see NOTES section for ORIGIN properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOrigin[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OriginGroup +The origin groups comprising of origins that are used for load balancing the traffic based on availability. +To construct, see NOTES section for ORIGINGROUP properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeepCreatedOriginGroup[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OriginHostHeader +The host header value sent to the origin with each request. +This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. +Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OriginPath +A directory path on the origin that CDN can use to retrieve content from, e.g. +contoso.cloudapp.net/originpath. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProbePath +Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. +This is relative to the origin path. +This property is only relevant when using a single origin. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -QueryStringCachingBehavior +Defines how CDN caches requests that include query strings. +You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior +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 +``` + +### -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 +``` + +### -UrlSigningKey +List of keys used to validate the signed URL hashes. +To construct, see NOTES section for URLSIGNINGKEY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WebApplicationFirewallPolicyLinkId +Resource ID. + +```yaml +Type: System.String +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.IEndpoint + +## 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. + + +DELIVERYPOLICYRULE : A list of the delivery rules. + - `Action `: A list of actions that are executed when all the conditions of a rule are satisfied. + - `Name `: The name of the action for the delivery rule. + - `Order `: The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + - `[Condition ]`: A list of conditions that must be matched for the actions to be executed + - `Name `: The name of the condition for the delivery rule. + - `[Name ]`: Name of the rule + +GEOFILTER : List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/ + - `Action `: Action of the geo filter, i.e. allow or block access. + - `CountryCode `: Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US. + - `RelativePath `: Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) + +ORIGIN : The source of the content being delivered via CDN. + - `Name `: Origin name which must be unique within the endpoint. + - `[Enabled ]`: Origin is enabled for load balancing or not. By default, origin is always enabled. + - `[HostName ]`: The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across all origins in an endpoint. + - `[HttpPort ]`: The value of the HTTP port. Must be between 1 and 65535. + - `[HttpsPort ]`: The value of the HTTPS port. Must be between 1 and 65535. + - `[OriginHostHeader ]`: The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + - `[Priority ]`: Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. + - `[PrivateLinkAlias ]`: The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + - `[PrivateLinkApprovalMessage ]`: A custom message to be included in the approval request to connect to the Private Link. + - `[PrivateLinkLocation ]`: The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + - `[PrivateLinkResourceId ]`: The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + - `[Weight ]`: Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + +ORIGINGROUP : The origin groups comprising of origins that are used for load balancing the traffic based on availability. + - `Name `: Origin group name which must be unique within the endpoint. + - `[HealthProbeSetting ]`: Health probe settings to the origin that is used to determine the health of the origin. + - `[ProbeIntervalInSecond ]`: The number of seconds between health probes.Default is 240sec. + - `[ProbePath ]`: The path relative to the origin that is used to determine the health of the origin. + - `[ProbeProtocol ]`: Protocol to use for health probe. + - `[ProbeRequestType ]`: The type of health probe request that is made. + - `[Origin ]`: The source of the content being delivered via CDN within given origin group. + - `[Id ]`: Resource ID. + - `[ResponseBasedOriginErrorDetectionSetting ]`: The JSON object that contains the properties to determine origin health using real requests/responses.This property is currently not supported. + - `[HttpErrorRange ]`: The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + - `[Begin ]`: The inclusive start of the http status code range. + - `[End ]`: The inclusive end of the http status code range. + - `[ResponseBasedDetectedErrorType ]`: Type of response errors for real user requests for which origin will be deemed unhealthy + - `[ResponseBasedFailoverThresholdPercentage ]`: The percentage of failed requests in the sample where failover should trigger. + - `[TrafficRestorationTimeToHealedOrNewEndpointsInMinute ]`: Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + +URLSIGNINGKEY : List of keys used to validate the signed URL hashes. + - `KeyId `: Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + - `KeySourceParameterResourceGroupName `: Resource group of the user's Key Vault containing the secret + - `KeySourceParameterSecretName `: The name of secret in Key Vault. + - `KeySourceParameterSecretVersion `: The version(GUID) of secret in Key Vault. + - `KeySourceParameterSubscriptionId `: Subscription Id of the user's Key Vault containing the secret + - `KeySourceParameterVaultName `: The name of the user's Key Vault containing the secret + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnHealthProbeParametersObject.md b/src/Cdn/help/New-AzCdnHealthProbeParametersObject.md new file mode 100644 index 000000000000..7736386e8f6e --- /dev/null +++ b/src/Cdn/help/New-AzCdnHealthProbeParametersObject.md @@ -0,0 +1,123 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnHealthProbeParametersObject +schema: 2.0.0 +--- + +# New-AzCdnHealthProbeParametersObject + +## SYNOPSIS +Create an in-memory object for HealthProbeParameters. + +## SYNTAX + +``` +New-AzCdnHealthProbeParametersObject [-ProbeIntervalInSecond ] [-ProbePath ] + [-ProbeProtocol ] [-ProbeRequestType ] [] +``` + +## DESCRIPTION +Create an in-memory object for HealthProbeParameters. + +## 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 + +### -ProbeIntervalInSecond +The number of seconds between health probes.Default is 240sec. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProbePath +The path relative to the origin that is used to determine the health of the origin. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProbeProtocol +Protocol to use for health probe. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProbeRequestType +The type of health probe request that is made. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType +Parameter Sets: (All) +Aliases: + +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.HealthProbeParameters + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnManagedHttpsParametersObject.md b/src/Cdn/help/New-AzCdnManagedHttpsParametersObject.md new file mode 100644 index 000000000000..9c54e211b610 --- /dev/null +++ b/src/Cdn/help/New-AzCdnManagedHttpsParametersObject.md @@ -0,0 +1,124 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnManagedHttpsParametersObject +schema: 2.0.0 +--- + +# New-AzCdnManagedHttpsParametersObject + +## SYNOPSIS +Create an in-memory object for CdnManagedHttpsParameters. + +## SYNTAX + +``` +New-AzCdnManagedHttpsParametersObject -CertificateSource + -CertificateSourceParameterCertificateType -ProtocolType + [-MinimumTlsVersion ] [] +``` + +## DESCRIPTION +Create an in-memory object for CdnManagedHttpsParameters. + +## 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 + +### -CertificateSource +Defines the source of the SSL certificate. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CertificateSourceParameterCertificateType +Type of certificate used. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateType +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MinimumTlsVersion +TLS protocol version that will be used for Https. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProtocolType +Defines the TLS extension protocol that is used for secure delivery. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType +Parameter Sets: (All) +Aliases: + +Required: True +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.CdnManagedHttpsParameters + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnOrigin.md b/src/Cdn/help/New-AzCdnOrigin.md new file mode 100644 index 000000000000..7069cb87b161 --- /dev/null +++ b/src/Cdn/help/New-AzCdnOrigin.md @@ -0,0 +1,393 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnorigin +schema: 2.0.0 +--- + +# New-AzCdnOrigin + +## SYNOPSIS +Creates a new origin within the specified endpoint. + +## SYNTAX + +``` +New-AzCdnOrigin -EndpointName -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-Enabled] [-HostName ] [-HttpPort ] [-HttpsPort ] + [-OriginHostHeader ] [-Priority ] [-PrivateLinkAlias ] + [-PrivateLinkApprovalMessage ] [-PrivateLinkLocation ] [-PrivateLinkResourceId ] + [-Weight ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates a new origin within the specified endpoint. + +## 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 +``` + +### -Enabled +Origin is enabled for load balancing or not + +```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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HostName +The address of the origin. +Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HttpPort +The value of the HTTP port. +Must be between 1 and 65535. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HttpsPort +The value of the HTTPS port. +Must be between 1 and 65535. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of the origin that is unique within the endpoint. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: OriginName + +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 +``` + +### -OriginHostHeader +The host header value sent to the origin with each request. +If you leave this blank, the request hostname determines this value. +Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. +This overrides the host header defined at Endpoint + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Priority +Priority of origin in given origin group for load balancing. +Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateLinkAlias +The Alias of the Private Link resource. +Populating this optional field indicates that this origin is 'Private' + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateLinkApprovalMessage +A custom message to be included in the approval request to connect to the Private Link. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateLinkLocation +The location of the Private Link resource. +Required only if 'privateLinkResourceId' is populated + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateLinkResourceId +The Resource Id of the Private Link resource. +Populating this optional field indicates that this backend is 'Private' + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +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: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Weight +Weight of the origin in given origin group for load balancing. +Must be between 1 and 1000 + +```yaml +Type: System.Int32 +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.IOrigin + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnOriginGroup.md b/src/Cdn/help/New-AzCdnOriginGroup.md new file mode 100644 index 000000000000..5843bce567ea --- /dev/null +++ b/src/Cdn/help/New-AzCdnOriginGroup.md @@ -0,0 +1,304 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnorigingroup +schema: 2.0.0 +--- + +# New-AzCdnOriginGroup + +## SYNOPSIS +Creates a new origin group within the specified endpoint. + +## SYNTAX + +``` +New-AzCdnOriginGroup -EndpointName -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-HealthProbeSetting ] [-Origin ] + [-ResponseBasedOriginErrorDetectionSetting ] + [-TrafficRestorationTimeToHealedOrNewEndpointsInMinute ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates a new origin group within the specified endpoint. + +## 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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HealthProbeSetting +Health probe settings to the origin that is used to determine the health of the origin. +To construct, see NOTES section for HEALTHPROBESETTING properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of the origin group which is unique within the endpoint. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: OriginGroupName + +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 +``` + +### -Origin +The source of the content being delivered via CDN within given origin group. +To construct, see NOTES section for ORIGIN properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResponseBasedOriginErrorDetectionSetting +The JSON object that contains the properties to determine origin health using real requests/responses. +This property is currently not supported. +To construct, see NOTES section for RESPONSEBASEDORIGINERRORDETECTIONSETTING properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters +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 +``` + +### -TrafficRestorationTimeToHealedOrNewEndpointsInMinute +Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. +Default is 10 mins. +This property is currently not supported. + +```yaml +Type: System.Int32 +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.IOriginGroup + +## 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. + + +HEALTHPROBESETTING : Health probe settings to the origin that is used to determine the health of the origin. + - `[ProbeIntervalInSecond ]`: The number of seconds between health probes.Default is 240sec. + - `[ProbePath ]`: The path relative to the origin that is used to determine the health of the origin. + - `[ProbeProtocol ]`: Protocol to use for health probe. + - `[ProbeRequestType ]`: The type of health probe request that is made. + +ORIGIN : The source of the content being delivered via CDN within given origin group. + - `[Id ]`: Resource ID. + +RESPONSEBASEDORIGINERRORDETECTIONSETTING : The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported. + - `[HttpErrorRange ]`: The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + - `[Begin ]`: The inclusive start of the http status code range. + - `[End ]`: The inclusive end of the http status code range. + - `[ResponseBasedDetectedErrorType ]`: Type of response errors for real user requests for which origin will be deemed unhealthy + - `[ResponseBasedFailoverThresholdPercentage ]`: The percentage of failed requests in the sample where failover should trigger. + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnProfile.md b/src/Cdn/help/New-AzCdnProfile.md new file mode 100644 index 000000000000..0f1a091d8ada --- /dev/null +++ b/src/Cdn/help/New-AzCdnProfile.md @@ -0,0 +1,246 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnprofile +schema: 2.0.0 +--- + +# New-AzCdnProfile + +## SYNOPSIS +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. + +## SYNTAX + +``` +New-AzCdnProfile -Name -ResourceGroupName -Location [-SubscriptionId ] + [-OriginResponseTimeoutSecond ] [-SkuName ] [-Tag ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +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. + +## 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 +``` + +### -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 +``` + +### -Name +Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ProfileName + +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 +``` + +### -OriginResponseTimeoutSecond +Send and receive timeout on forwarding request to the origin. +When timeout is reached, the request fails and returns. + +```yaml +Type: System.Int32 +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.IProfile + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnResourceReferenceObject.md b/src/Cdn/help/New-AzCdnResourceReferenceObject.md new file mode 100644 index 000000000000..0a6f774cec07 --- /dev/null +++ b/src/Cdn/help/New-AzCdnResourceReferenceObject.md @@ -0,0 +1,77 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnResourceReferenceObject +schema: 2.0.0 +--- + +# New-AzCdnResourceReferenceObject + +## SYNOPSIS +Create an in-memory object for ResourceReference. + +## SYNTAX + +``` +New-AzCdnResourceReferenceObject [-Id ] [] +``` + +## DESCRIPTION +Create an in-memory object for ResourceReference. + +## 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 + +### -Id +Resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +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.ResourceReference + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.md b/src/Cdn/help/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.md new file mode 100644 index 000000000000..3eda05135986 --- /dev/null +++ b/src/Cdn/help/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.md @@ -0,0 +1,119 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnResponseBasedOriginErrorDetectionParametersObject +schema: 2.0.0 +--- + +# New-AzCdnResponseBasedOriginErrorDetectionParametersObject + +## SYNOPSIS +Create an in-memory object for ResponseBasedOriginErrorDetectionParameters. + +## SYNTAX + +``` +New-AzCdnResponseBasedOriginErrorDetectionParametersObject [-HttpErrorRange ] + [-ResponseBasedDetectedErrorType ] + [-ResponseBasedFailoverThresholdPercentage ] [] +``` + +## DESCRIPTION +Create an in-memory object for ResponseBasedOriginErrorDetectionParameters. + +## 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 + +### -HttpErrorRange +The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. +To construct, see NOTES section for HTTPERRORRANGE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHttpErrorRangeParameters[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResponseBasedDetectedErrorType +Type of response errors for real user requests for which origin will be deemed unhealthy. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResponseBasedDetectedErrorTypes +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResponseBasedFailoverThresholdPercentage +The percentage of failed requests in the sample where failover should trigger. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +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.ResponseBasedOriginErrorDetectionParameters + +## 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. + + +HTTPERRORRANGE : The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + - `[Begin ]`: The inclusive start of the http status code range. + - `[End ]`: The inclusive end of the http status code range. + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnUrlRedirectActionObject.md b/src/Cdn/help/New-AzCdnUrlRedirectActionObject.md new file mode 100644 index 000000000000..985845b1d11c --- /dev/null +++ b/src/Cdn/help/New-AzCdnUrlRedirectActionObject.md @@ -0,0 +1,179 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnUrlRedirectActionObject +schema: 2.0.0 +--- + +# New-AzCdnUrlRedirectActionObject + +## SYNOPSIS +Create an in-memory object for UrlRedirectAction. + +## SYNTAX + +``` +New-AzCdnUrlRedirectActionObject -Name -ParameterRedirectType + [-ParameterCustomFragment ] [-ParameterCustomHostname ] [-ParameterCustomPath ] + [-ParameterCustomQueryString ] [-ParameterDestinationProtocol ] + [] +``` + +## DESCRIPTION +Create an in-memory object for UrlRedirectAction. + +## 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 + +### -Name +The name of the action for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterCustomFragment +Fragment to add to the redirect URL. +Fragment is the part of the URL that comes after #. +Do not include the #. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterCustomHostname +Host to redirect. +Leave empty to use the incoming host as the destination host. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterCustomPath +The full path to redirect. +Path cannot be empty and must start with /. +Leave empty to use the incoming path as destination path. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterCustomQueryString +The set of query strings to be placed in the redirect URL. +Setting this value would replace any existing query string; leave empty to preserve the incoming query string. +Query string must be in \=\ format. +? and & will be added automatically so do not include them. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterDestinationProtocol +Protocol to use for the redirect. +The default value is MatchRequest. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterRedirectType +The redirect type the rule will use when redirecting traffic. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType +Parameter Sets: (All) +Aliases: + +Required: True +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.UrlRedirectAction + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnUrlRewriteActionObject.md b/src/Cdn/help/New-AzCdnUrlRewriteActionObject.md new file mode 100644 index 000000000000..cf7d78f8c4d1 --- /dev/null +++ b/src/Cdn/help/New-AzCdnUrlRewriteActionObject.md @@ -0,0 +1,125 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnUrlRewriteActionObject +schema: 2.0.0 +--- + +# New-AzCdnUrlRewriteActionObject + +## SYNOPSIS +Create an in-memory object for UrlRewriteAction. + +## SYNTAX + +``` +New-AzCdnUrlRewriteActionObject -Name -ParameterDestination + -ParameterSourcePattern [-ParameterPreserveUnmatchedPath ] [] +``` + +## DESCRIPTION +Create an in-memory object for UrlRewriteAction. + +## 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 + +### -Name +The name of the action for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterDestination +Define the relative URL to which the above requests will be rewritten by. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterPreserveUnmatchedPath +Whether to preserve unmatched path. +Default value is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterSourcePattern +define a request URI pattern that identifies the type of requests that may be rewritten. +If value is blank, all strings are matched. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +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.UrlRewriteAction + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnUrlSigningActionObject.md b/src/Cdn/help/New-AzCdnUrlSigningActionObject.md new file mode 100644 index 000000000000..462d6c4bce14 --- /dev/null +++ b/src/Cdn/help/New-AzCdnUrlSigningActionObject.md @@ -0,0 +1,119 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnUrlSigningActionObject +schema: 2.0.0 +--- + +# New-AzCdnUrlSigningActionObject + +## SYNOPSIS +Create an in-memory object for UrlSigningAction. + +## SYNTAX + +``` +New-AzCdnUrlSigningActionObject -Name [-ParameterAlgorithm ] + [-ParameterNameOverride ] [] +``` + +## DESCRIPTION +Create an in-memory object for UrlSigningAction. + +## 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 + +### -Name +The name of the action for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterAlgorithm +Algorithm to use for URL signing. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNameOverride +Defines which query string parameters in the url to be considered for expires, key id etc. +. +To construct, see NOTES section for PARAMETERNAMEOVERRIDE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[] +Parameter Sets: (All) +Aliases: + +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.UrlSigningAction + +## 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. + + +PARAMETERNAMEOVERRIDE : Defines which query string parameters in the url to be considered for expires, key id etc. . + - `ParamIndicator `: Indicates the purpose of the parameter + - `ParamName `: Parameter name + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzCdnUserManagedHttpsParametersObject.md b/src/Cdn/help/New-AzCdnUserManagedHttpsParametersObject.md new file mode 100644 index 000000000000..8ea8eb827436 --- /dev/null +++ b/src/Cdn/help/New-AzCdnUserManagedHttpsParametersObject.md @@ -0,0 +1,186 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnUserManagedHttpsParametersObject +schema: 2.0.0 +--- + +# New-AzCdnUserManagedHttpsParametersObject + +## SYNOPSIS +Create an in-memory object for UserManagedHttpsParameters. + +## SYNTAX + +``` +New-AzCdnUserManagedHttpsParametersObject -CertificateSource + -CertificateSourceParameterResourceGroupName -CertificateSourceParameterSecretName + -CertificateSourceParameterSubscriptionId -CertificateSourceParameterVaultName + -ProtocolType [-CertificateSourceParameterSecretVersion ] + [-MinimumTlsVersion ] [] +``` + +## DESCRIPTION +Create an in-memory object for UserManagedHttpsParameters. + +## 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 + +### -CertificateSource +Defines the source of the SSL certificate. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CertificateSource +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CertificateSourceParameterResourceGroupName +Resource group of the user's Key Vault containing the SSL certificate. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CertificateSourceParameterSecretName +The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CertificateSourceParameterSecretVersion +The version(GUID) of Key Vault Secret in Key Vault. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CertificateSourceParameterSubscriptionId +Subscription Id of the user's Key Vault containing the SSL certificate. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CertificateSourceParameterVaultName +The name of the user's Key Vault containing the SSL certificate. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MinimumTlsVersion +TLS protocol version that will be used for Https. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MinimumTlsVersion +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProtocolType +Defines the TLS extension protocol that is used for secure delivery. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProtocolType +Parameter Sets: (All) +Aliases: + +Required: True +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.UserManagedHttpsParameters + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnCustomDomain.md b/src/Cdn/help/New-AzFrontDoorCdnCustomDomain.md new file mode 100644 index 000000000000..128f3fcf52ba --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnCustomDomain.md @@ -0,0 +1,275 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdncustomdomain +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnCustomDomain + +## SYNOPSIS +Creates a new domain within the specified profile. + +## SYNTAX + +``` +New-AzFrontDoorCdnCustomDomain -CustomDomainName -ProfileName -ResourceGroupName + [-SubscriptionId ] [-AzureDnsZoneId ] [-HostName ] + [-PropertiesPreValidatedCustomDomainResourceId ] [-TlsSetting ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates a new domain within the specified profile. + +## 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 +``` + +### -AzureDnsZoneId +Resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CustomDomainName +Name of the domain under the profile which is unique globally + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +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 +``` + +### -HostName +The host name of the domain. +Must be a domain name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PropertiesPreValidatedCustomDomainResourceId +Resource ID. + +```yaml +Type: System.String +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 +``` + +### -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 +``` + +### -TlsSetting +The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. +If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. +To construct, see NOTES section for TLSSETTING properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters +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.IAfdDomain + +## 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. + + +TLSSETTING : The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + - `CertificateType `: Defines the source of the SSL certificate. + - `[MinimumTlsVersion ]`: TLS protocol version that will be used for Https + - `[Secret ]`: Resource reference to the secret. ie. subs/rg/profile/secret + - `[Id ]`: Resource ID. + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.md b/src/Cdn/help/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.md new file mode 100644 index 000000000000..dc0ff3d1bc24 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.md @@ -0,0 +1,119 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnCustomDomainTlsSettingParametersObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject + +## SYNOPSIS +Create an in-memory object for AFDDomainHttpsParameters. + +## SYNTAX + +``` +New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject -CertificateType + [-MinimumTlsVersion ] [-Secret ] [] +``` + +## DESCRIPTION +Create an in-memory object for AFDDomainHttpsParameters. + +## 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 + +### -CertificateType +Defines the source of the SSL certificate. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdCertificateType +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MinimumTlsVersion +TLS protocol version that will be used for Https. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdMinimumTlsVersion +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Secret +Resource reference to the secret. +ie. +subs/rg/profile/secret. +To construct, see NOTES section for SECRET properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference +Parameter Sets: (All) +Aliases: + +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.AfdDomainHttpsParameters + +## 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. + + +SECRET : Resource reference to the secret. ie. subs/rg/profile/secret. + - `[Id ]`: Resource ID. + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnEndpoint.md b/src/Cdn/help/New-AzFrontDoorCdnEndpoint.md new file mode 100644 index 000000000000..29242f5ecc1d --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnEndpoint.md @@ -0,0 +1,263 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnendpoint +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnEndpoint + +## SYNOPSIS +Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. + +## SYNTAX + +``` +New-AzFrontDoorCdnEndpoint -EndpointName -ProfileName -ResourceGroupName + -Location [-SubscriptionId ] + [-AutoGeneratedDomainNameLabelScope ] [-EnabledState ] + [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. + +## 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 +``` + +### -AutoGeneratedDomainNameLabelScope +Indicates the endpoint name reuse scope. +The default value is TenantReuse. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope +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 +``` + +### -EnabledState +Whether to enable use of this rule. +Permitted values are 'Enabled' or 'Disabled' + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +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 +``` + +### -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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +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: (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.IAfdEndpoint + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnOrigin.md b/src/Cdn/help/New-AzFrontDoorCdnOrigin.md new file mode 100644 index 000000000000..35511ed6d6e2 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnOrigin.md @@ -0,0 +1,440 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnorigin +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnOrigin + +## SYNOPSIS +Creates a new origin within the specified origin group. + +## SYNTAX + +``` +New-AzFrontDoorCdnOrigin -OriginGroupName -OriginName -ProfileName + -ResourceGroupName [-SubscriptionId ] [-AzureOriginId ] + [-EnabledState ] [-EnforceCertificateNameCheck] [-HostName ] [-HttpPort ] + [-HttpsPort ] [-OriginHostHeader ] [-Priority ] [-PrivateLinkId ] + [-SharedPrivateLinkResourceGroupId ] [-SharedPrivateLinkResourcePrivateLinkLocation ] + [-SharedPrivateLinkResourceRequestMessage ] + [-SharedPrivateLinkResourceStatus ] [-Weight ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates a new origin within the specified origin 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 +``` + +### -AzureOriginId +Resource ID. + +```yaml +Type: System.String +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 +``` + +### -EnabledState +Whether to enable health probes to be made against backends defined under backendPools. +Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnforceCertificateNameCheck +Whether to enable certificate name check at origin level + +```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 +``` + +### -HostName +The address of the origin. +Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HttpPort +The value of the HTTP port. +Must be between 1 and 65535. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HttpsPort +The value of the HTTPS port. +Must be between 1 and 65535. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +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 +``` + +### -OriginGroupName +Name of the origin group which is unique within the profile. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OriginHostHeader +The host header value sent to the origin with each request. +If you leave this blank, the request hostname determines this value. +Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. +This overrides the host header defined at Endpoint + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OriginName +Name of the origin that is unique within the profile. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Priority +Priority of origin in given origin group for load balancing. +Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateLinkId +Resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SharedPrivateLinkResourceGroupId +The group id from the provider of resource the shared private link resource is for. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SharedPrivateLinkResourcePrivateLinkLocation +The location of the shared private link resource + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SharedPrivateLinkResourceRequestMessage +The request message for requesting approval of the shared private link resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SharedPrivateLinkResourceStatus +Status of the shared private link resource. +Can be Pending, Approved, Rejected, Disconnected, or Timeout. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus +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 +``` + +### -Weight +Weight of the origin in given origin group for load balancing. +Must be between 1 and 1000 + +```yaml +Type: System.Int32 +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.IAfdOrigin + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnOriginGroup.md b/src/Cdn/help/New-AzFrontDoorCdnOriginGroup.md new file mode 100644 index 000000000000..fecf553218ba --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnOriginGroup.md @@ -0,0 +1,283 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnorigingroup +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnOriginGroup + +## SYNOPSIS +Creates a new origin group within the specified profile. + +## SYNTAX + +``` +New-AzFrontDoorCdnOriginGroup -OriginGroupName -ProfileName -ResourceGroupName + [-SubscriptionId ] [-HealthProbeSetting ] + [-LoadBalancingSetting ] [-SessionAffinityState ] + [-TrafficRestorationTimeToHealedOrNewEndpointsInMinute ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates a new origin group within the specified profile. + +## 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 +``` + +### -HealthProbeSetting +Health probe settings to the origin that is used to determine the health of the origin. +To construct, see NOTES section for HEALTHPROBESETTING properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LoadBalancingSetting +Load balancing settings for a backend pool +To construct, see NOTES section for LOADBALANCINGSETTING properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters +Parameter Sets: (All) +Aliases: + +Required: False +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 +``` + +### -OriginGroupName +Name of the origin group which is unique within the endpoint. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SessionAffinityState +Whether to allow session affinity on this host. +Valid options are 'Enabled' or 'Disabled' + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState +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 +``` + +### -TrafficRestorationTimeToHealedOrNewEndpointsInMinute +Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. +Default is 10 mins. +This property is currently not supported. + +```yaml +Type: System.Int32 +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.IAfdOriginGroup + +## 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. + + +HEALTHPROBESETTING : Health probe settings to the origin that is used to determine the health of the origin. + - `[ProbeIntervalInSecond ]`: The number of seconds between health probes.Default is 240sec. + - `[ProbePath ]`: The path relative to the origin that is used to determine the health of the origin. + - `[ProbeProtocol ]`: Protocol to use for health probe. + - `[ProbeRequestType ]`: The type of health probe request that is made. + +LOADBALANCINGSETTING : Load balancing settings for a backend pool + - `[AdditionalLatencyInMillisecond ]`: The additional latency in milliseconds for probes to fall into the lowest latency bucket + - `[SampleSize ]`: The number of samples to consider for load balancing decisions + - `[SuccessfulSamplesRequired ]`: The number of samples within the sample period that must succeed + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.md b/src/Cdn/help/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.md new file mode 100644 index 000000000000..8eb659a98667 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.md @@ -0,0 +1,123 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnOriginGroupHealthProbeSettingObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject + +## SYNOPSIS +Create an in-memory object for HealthProbeParameters. + +## SYNTAX + +``` +New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject [-ProbeIntervalInSecond ] [-ProbePath ] + [-ProbeProtocol ] [-ProbeRequestType ] [] +``` + +## DESCRIPTION +Create an in-memory object for HealthProbeParameters. + +## 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 + +### -ProbeIntervalInSecond +The number of seconds between health probes.Default is 240sec. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProbePath +The path relative to the origin that is used to determine the health of the origin. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProbeProtocol +Protocol to use for health probe. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ProbeProtocol +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProbeRequestType +The type of health probe request that is made. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HealthProbeRequestType +Parameter Sets: (All) +Aliases: + +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.HealthProbeParameters + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.md b/src/Cdn/help/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.md new file mode 100644 index 000000000000..0b721ef7b28d --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.md @@ -0,0 +1,108 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject + +## SYNOPSIS +Create an in-memory object for LoadBalancingSettingsParameters. + +## SYNTAX + +``` +New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject [-AdditionalLatencyInMillisecond ] + [-SampleSize ] [-SuccessfulSamplesRequired ] [] +``` + +## DESCRIPTION +Create an in-memory object for LoadBalancingSettingsParameters. + +## 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 + +### -AdditionalLatencyInMillisecond +The additional latency in milliseconds for probes to fall into the lowest latency bucket. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SampleSize +The number of samples to consider for load balancing decisions. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SuccessfulSamplesRequired +The number of samples within the sample period that must succeed. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +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.LoadBalancingSettingsParameters + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnProfile.md b/src/Cdn/help/New-AzFrontDoorCdnProfile.md new file mode 100644 index 000000000000..3f4c69a86d4e --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnProfile.md @@ -0,0 +1,246 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnprofile +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnProfile + +## SYNOPSIS +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. + +## SYNTAX + +``` +New-AzFrontDoorCdnProfile -Name -ResourceGroupName -Location + [-SubscriptionId ] [-OriginResponseTimeoutSecond ] [-SkuName ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +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. + +## 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 +``` + +### -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 +``` + +### -Name +Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ProfileName + +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 +``` + +### -OriginResponseTimeoutSecond +Send and receive timeout on forwarding request to the origin. +When timeout is reached, the request fails and returns. + +```yaml +Type: System.Int32 +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.IProfile + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnResourceReferenceObject.md b/src/Cdn/help/New-AzFrontDoorCdnResourceReferenceObject.md new file mode 100644 index 000000000000..00352e57087d --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnResourceReferenceObject.md @@ -0,0 +1,77 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnResourceReferenceObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnResourceReferenceObject + +## SYNOPSIS +Create an in-memory object for ResourceReference. + +## SYNTAX + +``` +New-AzFrontDoorCdnResourceReferenceObject [-Id ] [] +``` + +## DESCRIPTION +Create an in-memory object for ResourceReference. + +## 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 + +### -Id +Resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +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.ResourceReference + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRoute.md b/src/Cdn/help/New-AzFrontDoorCdnRoute.md new file mode 100644 index 000000000000..38709e29adb5 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRoute.md @@ -0,0 +1,452 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnroute +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRoute + +## SYNOPSIS +Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. + +## SYNTAX + +``` +New-AzFrontDoorCdnRoute -EndpointName -Name -ProfileName + -ResourceGroupName [-SubscriptionId ] [-CacheConfigurationQueryParameter ] + [-CacheConfigurationQueryStringCachingBehavior ] + [-CompressionSettingContentTypesToCompress ] [-CompressionSettingIsCompressionEnabled] + [-CustomDomain ] [-EnabledState ] + [-ForwardingProtocol ] [-HttpsRedirect ] + [-LinkToDefaultDomain ] [-OriginGroupId ] [-OriginPath ] + [-PatternsToMatch ] [-RuleSet ] [-SupportedProtocol ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. + +## 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 +``` + +### -CacheConfigurationQueryParameter +query parameters to include or exclude (comma separated). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CacheConfigurationQueryStringCachingBehavior +Defines how Frontdoor caches requests that include query strings. +You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CompressionSettingContentTypesToCompress +List of content types on which compression applies. +The value should be a valid MIME type. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CompressionSettingIsCompressionEnabled +Indicates whether content compression is enabled on AzureFrontDoor. +Default value is false. +If compression is enabled, content will be served as compressed if user requests for a compressed version. +Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + +```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 +``` + +### -CustomDomain +Domains referenced by this endpoint. +To construct, see NOTES section for CUSTOMDOMAIN properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] +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 +``` + +### -EnabledState +Whether to enable use of this rule. +Permitted values are 'Enabled' or 'Disabled' + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ForwardingProtocol +Protocol this rule will use when forwarding traffic to backends. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HttpsRedirect +Whether to automatically redirect HTTP traffic to HTTPS traffic. +Note that this is a easy way to set up this rule and it will be the first rule that gets executed. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LinkToDefaultDomain +whether this route will be linked to the default endpoint domain. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of the routing rule. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: RouteName + +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 +``` + +### -OriginGroupId +Resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OriginPath +A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. +contoso.cloudapp.net/originpath. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PatternsToMatch +The route patterns of the rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RuleSet +rule sets referenced by this endpoint. +To construct, see NOTES section for RULESET properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] +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 +``` + +### -SupportedProtocol +List of supported protocols for this route. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[] +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.IRoute + +## 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. + + +CUSTOMDOMAIN : Domains referenced by this endpoint. + - `[Id ]`: Resource ID. + +RULESET : rule sets referenced by this endpoint. + - `[Id ]`: Resource ID. + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRule.md b/src/Cdn/help/New-AzFrontDoorCdnRule.md new file mode 100644 index 000000000000..6fcd24537cec --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRule.md @@ -0,0 +1,294 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnrule +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRule + +## SYNOPSIS +Creates a new delivery rule within the specified rule set. + +## SYNTAX + +``` +New-AzFrontDoorCdnRule -Name -ProfileName -ResourceGroupName -SetName + [-SubscriptionId ] [-Action ] [-Condition ] + [-MatchProcessingBehavior ] [-Order ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates a new delivery rule within the specified rule set. + +## 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 + +### -Action +A list of actions that are executed when all the conditions of a rule are satisfied. +To construct, see NOTES section for ACTION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -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 +``` + +### -Condition +A list of conditions that must be matched for the actions to be executed +To construct, see NOTES section for CONDITION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] +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 +``` + +### -MatchProcessingBehavior +If this rule is a match should the rules engine continue running the remaining rules or stop. +If not present, defaults to Continue. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of the delivery rule which is unique within the endpoint. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: RuleName + +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 +``` + +### -Order +The order in which the rules are applied for the endpoint. +Possible values {0,1,2,3,………}. +A rule with a lesser order will be applied before a rule with a greater order. +Rule with order 0 is a special rule. +It does not require any condition and actions listed in it will always be applied. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SetName +Name of the rule set under the profile. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: RuleSetName + +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: (All) +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 + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRule + +## 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. + + +ACTION : A list of actions that are executed when all the conditions of a rule are satisfied. + - `Name `: The name of the action for the delivery rule. + +CONDITION : A list of conditions that must be matched for the actions to be executed + - `Name `: The name of the condition for the delivery rule. + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleClientPortConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleClientPortConditionObject.md new file mode 100644 index 000000000000..23773ef93529 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleClientPortConditionObject.md @@ -0,0 +1,139 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleClientPortConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleClientPortConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleClientPortCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleClientPortConditionObject -Name -ParameterOperator + [-ParameterMatchValue ] [-ParameterNegateCondition ] [-ParameterTransform ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleClientPortCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ClientPortOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleClientPortCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleCookiesConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleCookiesConditionObject.md new file mode 100644 index 000000000000..13c8cc8080c9 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleCookiesConditionObject.md @@ -0,0 +1,154 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleCookiesConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleCookiesConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleCookiesCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleCookiesConditionObject -Name -ParameterOperator + [-ParameterMatchValue ] [-ParameterNegateCondition ] [-ParameterSelector ] + [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleCookiesCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.CookiesOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterSelector +Name of Cookies to be matched. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleCookiesCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleHostNameConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleHostNameConditionObject.md new file mode 100644 index 000000000000..afd620229d15 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleHostNameConditionObject.md @@ -0,0 +1,139 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleHostNameConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleHostNameConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleHostNameCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleHostNameConditionObject -Name -ParameterOperator + [-ParameterMatchValue ] [-ParameterNegateCondition ] [-ParameterTransform ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleHostNameCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HostNameOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleHostNameCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleHttpVersionConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleHttpVersionConditionObject.md new file mode 100644 index 000000000000..d11a79446597 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleHttpVersionConditionObject.md @@ -0,0 +1,123 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleHttpVersionConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleHttpVersionConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleHttpVersionCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleHttpVersionConditionObject -Name [-ParameterMatchValue ] + [-ParameterNegateCondition ] [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleHttpVersionCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleHttpVersionCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleIsDeviceConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleIsDeviceConditionObject.md new file mode 100644 index 000000000000..fecf11b1fffd --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleIsDeviceConditionObject.md @@ -0,0 +1,123 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleIsDeviceConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleIsDeviceConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleIsDeviceCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleIsDeviceConditionObject -Name [-ParameterMatchValue ] + [-ParameterNegateCondition ] [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleIsDeviceCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleIsDeviceCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRulePostArgsConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRulePostArgsConditionObject.md new file mode 100644 index 000000000000..518dc091a9c9 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRulePostArgsConditionObject.md @@ -0,0 +1,154 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRulePostArgsConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRulePostArgsConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRulePostArgsCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRulePostArgsConditionObject -Name -ParameterOperator + [-ParameterMatchValue ] [-ParameterNegateCondition ] [-ParameterSelector ] + [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRulePostArgsCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.PostArgsOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterSelector +Name of PostArg to be matched. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRulePostArgsCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleQueryStringConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleQueryStringConditionObject.md new file mode 100644 index 000000000000..36f721f7c84c --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleQueryStringConditionObject.md @@ -0,0 +1,139 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleQueryStringConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleQueryStringConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleQueryStringCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleQueryStringConditionObject -Name + -ParameterOperator [-ParameterMatchValue ] + [-ParameterNegateCondition ] [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleQueryStringCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleQueryStringCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.md new file mode 100644 index 000000000000..325685263dd2 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.md @@ -0,0 +1,141 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRemoteAddressConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleRemoteAddressConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleRemoteAddressCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleRemoteAddressConditionObject -Name + -ParameterOperator [-ParameterMatchValue ] + [-ParameterNegateCondition ] [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleRemoteAddressCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +Match values to match against. +The operator will apply to each value in here with OR semantics. +If any of them match the variable with the given operator this match condition is considered a match. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RemoteAddressOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleRemoteAddressCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleRequestBodyConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleRequestBodyConditionObject.md new file mode 100644 index 000000000000..e12e9c01c643 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleRequestBodyConditionObject.md @@ -0,0 +1,139 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestBodyConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleRequestBodyConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleRequestBodyCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleRequestBodyConditionObject -Name + -ParameterOperator [-ParameterMatchValue ] + [-ParameterNegateCondition ] [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleRequestBodyCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestBodyOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleRequestBodyCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleRequestHeaderActionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleRequestHeaderActionObject.md new file mode 100644 index 000000000000..62dd52ef7d10 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleRequestHeaderActionObject.md @@ -0,0 +1,124 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestHeaderActionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleRequestHeaderActionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleRequestHeaderAction. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleRequestHeaderActionObject -Name + -ParameterHeaderAction -ParameterHeaderName [-ParameterValue ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleRequestHeaderAction. + +## 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 + +### -Name +The name of the action for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterHeaderAction +Action to perform. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterHeaderName +Name of the header to modify. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterValue +Value for the specified action. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleRequestHeaderAction + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.md new file mode 100644 index 000000000000..31b077136481 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.md @@ -0,0 +1,155 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestHeaderConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleRequestHeaderConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleRequestHeaderCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleRequestHeaderConditionObject -Name + -ParameterOperator [-ParameterMatchValue ] + [-ParameterNegateCondition ] [-ParameterSelector ] [-ParameterTransform ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleRequestHeaderCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestHeaderOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterSelector +Name of Header to be matched. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleRequestHeaderCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleRequestMethodConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleRequestMethodConditionObject.md new file mode 100644 index 000000000000..c8b19cd5497a --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleRequestMethodConditionObject.md @@ -0,0 +1,123 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestMethodConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleRequestMethodConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleRequestMethodCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleRequestMethodConditionObject -Name [-ParameterMatchValue ] + [-ParameterNegateCondition ] [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleRequestMethodCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleRequestMethodCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.md new file mode 100644 index 000000000000..1ff1ea49377e --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.md @@ -0,0 +1,123 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestSchemeConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleRequestSchemeConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleRequestSchemeCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleRequestSchemeConditionObject -Name [-ParameterMatchValue ] + [-ParameterNegateCondition ] [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleRequestSchemeCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleRequestSchemeCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleRequestUriConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleRequestUriConditionObject.md new file mode 100644 index 000000000000..d5bad88a68cc --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleRequestUriConditionObject.md @@ -0,0 +1,139 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRequestUriConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleRequestUriConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleRequestUriCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleRequestUriConditionObject -Name -ParameterOperator + [-ParameterMatchValue ] [-ParameterNegateCondition ] [-ParameterTransform ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleRequestUriCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RequestUriOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleRequestUriCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleResponseHeaderActionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleResponseHeaderActionObject.md new file mode 100644 index 000000000000..00366e144f9c --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleResponseHeaderActionObject.md @@ -0,0 +1,124 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleResponseHeaderActionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleResponseHeaderActionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleResponseHeaderAction. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleResponseHeaderActionObject -Name + -ParameterHeaderAction -ParameterHeaderName [-ParameterValue ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleResponseHeaderAction. + +## 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 + +### -Name +The name of the action for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterHeaderAction +Action to perform. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HeaderAction +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterHeaderName +Name of the header to modify. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterValue +Value for the specified action. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleResponseHeaderAction + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.md new file mode 100644 index 000000000000..85cae70ebc35 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.md @@ -0,0 +1,191 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleRouteConfigurationOverrideAction. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name + [-CacheConfigurationCacheBehavior ] [-CacheConfigurationCacheDuration ] + [-CacheConfigurationIsCompressionEnabled ] + [-CacheConfigurationQueryParameter ] + [-CacheConfigurationQueryStringCachingBehavior ] [-OriginGroupId ] + [-OriginGroupOverrideForwardingProtocol ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleRouteConfigurationOverrideAction. + +## 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 + +### -CacheConfigurationCacheBehavior +Caching behavior for the requests. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleCacheBehavior +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CacheConfigurationCacheDuration +The duration for which the content needs to be cached. +Allowed format is [d.]hh:mm:ss. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CacheConfigurationIsCompressionEnabled +Indicates whether content compression is enabled. +If compression is enabled, content will be served as compressed if user requests for a compressed version. +Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleIsCompressionEnabled +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CacheConfigurationQueryParameter +query parameters to include or exclude (comma separated). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CacheConfigurationQueryStringCachingBehavior +Defines how Frontdoor caches requests that include query strings. +You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RuleQueryStringCachingBehavior +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the action for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OriginGroupId +Resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OriginGroupOverrideForwardingProtocol +Protocol this rule will use when forwarding traffic to backends. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleRouteConfigurationOverrideAction + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleServerPortConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleServerPortConditionObject.md new file mode 100644 index 000000000000..b3b6102fbcaa --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleServerPortConditionObject.md @@ -0,0 +1,139 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleServerPortConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleServerPortConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleServerPortCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleServerPortConditionObject -Name -ParameterOperator + [-ParameterMatchValue ] [-ParameterNegateCondition ] [-ParameterTransform ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleServerPortCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ServerPortOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleServerPortCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleSet.md b/src/Cdn/help/New-AzFrontDoorCdnRuleSet.md new file mode 100644 index 000000000000..35316d0c6fb0 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleSet.md @@ -0,0 +1,169 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnruleset +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleSet + +## SYNOPSIS +Creates a new rule set within the specified profile. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleSet -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates a new rule set within the specified profile. + +## 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 +``` + +### -Name +Name of the rule set under the profile which is unique globally + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: RuleSetName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +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: (All) +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 + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRuleSet + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleSocketAddrConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleSocketAddrConditionObject.md new file mode 100644 index 000000000000..e2e381d0468c --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleSocketAddrConditionObject.md @@ -0,0 +1,139 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleSocketAddrConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleSocketAddrConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleSocketAddrCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleSocketAddrConditionObject -Name -ParameterOperator + [-ParameterMatchValue ] [-ParameterNegateCondition ] [-ParameterTransform ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleSocketAddrCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SocketAddrOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleSocketAddrCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleSslProtocolConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleSslProtocolConditionObject.md new file mode 100644 index 000000000000..83032be75356 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleSslProtocolConditionObject.md @@ -0,0 +1,123 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleSslProtocolConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleSslProtocolConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleSslProtocolCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleSslProtocolConditionObject -Name [-ParameterMatchValue ] + [-ParameterNegateCondition ] [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleSslProtocolCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SslProtocol[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleSslProtocolCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.md new file mode 100644 index 000000000000..492d95d34f91 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.md @@ -0,0 +1,139 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlFileExtensionConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleUrlFileExtensionCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject -Name + -ParameterOperator [-ParameterMatchValue ] + [-ParameterNegateCondition ] [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleUrlFileExtensionCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileExtensionOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleUrlFileExtensionCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.md new file mode 100644 index 000000000000..190706383789 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.md @@ -0,0 +1,139 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlFileNameConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleUrlFileNameConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleUrlFileNameCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleUrlFileNameConditionObject -Name + -ParameterOperator [-ParameterMatchValue ] + [-ParameterNegateCondition ] [-ParameterTransform ] [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleUrlFileNameCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlFileNameOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleUrlFileNameCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleUrlPathConditionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleUrlPathConditionObject.md new file mode 100644 index 000000000000..f742d86744a1 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleUrlPathConditionObject.md @@ -0,0 +1,139 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlPathConditionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleUrlPathConditionObject + +## SYNOPSIS +Create an in-memory object for DeliveryRuleUrlPathCondition. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleUrlPathConditionObject -Name -ParameterOperator + [-ParameterMatchValue ] [-ParameterNegateCondition ] [-ParameterTransform ] + [] +``` + +## DESCRIPTION +Create an in-memory object for DeliveryRuleUrlPathCondition. + +## 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 + +### -Name +The name of the condition for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchVariable +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterMatchValue +The match value for the condition of the delivery rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNegateCondition +Describes if this is negate condition or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterOperator +Describes operator to be matched. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.UrlPathOperator +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterTransform +List of transforms. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Transform[] +Parameter Sets: (All) +Aliases: + +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.DeliveryRuleUrlPathCondition + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleUrlRedirectActionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleUrlRedirectActionObject.md new file mode 100644 index 000000000000..0f35316bb9c2 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleUrlRedirectActionObject.md @@ -0,0 +1,179 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlRedirectActionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleUrlRedirectActionObject + +## SYNOPSIS +Create an in-memory object for UrlRedirectAction. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleUrlRedirectActionObject -Name -ParameterRedirectType + [-ParameterCustomFragment ] [-ParameterCustomHostname ] [-ParameterCustomPath ] + [-ParameterCustomQueryString ] [-ParameterDestinationProtocol ] + [] +``` + +## DESCRIPTION +Create an in-memory object for UrlRedirectAction. + +## 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 + +### -Name +The name of the action for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterCustomFragment +Fragment to add to the redirect URL. +Fragment is the part of the URL that comes after #. +Do not include the #. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterCustomHostname +Host to redirect. +Leave empty to use the incoming host as the destination host. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterCustomPath +The full path to redirect. +Path cannot be empty and must start with /. +Leave empty to use the incoming path as destination path. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterCustomQueryString +The set of query strings to be placed in the redirect URL. +Setting this value would replace any existing query string; leave empty to preserve the incoming query string. +Query string must be in \=\ format. +? and & will be added automatically so do not include them. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterDestinationProtocol +Protocol to use for the redirect. +The default value is MatchRequest. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DestinationProtocol +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterRedirectType +The redirect type the rule will use when redirecting traffic. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.RedirectType +Parameter Sets: (All) +Aliases: + +Required: True +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.UrlRedirectAction + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleUrlRewriteActionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleUrlRewriteActionObject.md new file mode 100644 index 000000000000..8f12b6484e39 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleUrlRewriteActionObject.md @@ -0,0 +1,125 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlRewriteActionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleUrlRewriteActionObject + +## SYNOPSIS +Create an in-memory object for UrlRewriteAction. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleUrlRewriteActionObject -Name -ParameterDestination + -ParameterSourcePattern [-ParameterPreserveUnmatchedPath ] [] +``` + +## DESCRIPTION +Create an in-memory object for UrlRewriteAction. + +## 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 + +### -Name +The name of the action for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterDestination +Define the relative URL to which the above requests will be rewritten by. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterPreserveUnmatchedPath +Whether to preserve unmatched path. +Default value is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterSourcePattern +define a request URI pattern that identifies the type of requests that may be rewritten. +If value is blank, all strings are matched. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +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.UrlRewriteAction + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnRuleUrlSigningActionObject.md b/src/Cdn/help/New-AzFrontDoorCdnRuleUrlSigningActionObject.md new file mode 100644 index 000000000000..c18bad91dc5a --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnRuleUrlSigningActionObject.md @@ -0,0 +1,119 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnRuleUrlSigningActionObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnRuleUrlSigningActionObject + +## SYNOPSIS +Create an in-memory object for UrlSigningAction. + +## SYNTAX + +``` +New-AzFrontDoorCdnRuleUrlSigningActionObject -Name [-ParameterAlgorithm ] + [-ParameterNameOverride ] [] +``` + +## DESCRIPTION +Create an in-memory object for UrlSigningAction. + +## 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 + +### -Name +The name of the action for the delivery rule. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.DeliveryRuleAction +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterAlgorithm +Algorithm to use for URL signing. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.Algorithm +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParameterNameOverride +Defines which query string parameters in the url to be considered for expires, key id etc. +. +To construct, see NOTES section for PARAMETERNAMEOVERRIDE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningParamIdentifier[] +Parameter Sets: (All) +Aliases: + +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.UrlSigningAction + +## 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. + + +PARAMETERNAMEOVERRIDE : Defines which query string parameters in the url to be considered for expires, key id etc. . + - `ParamIndicator `: Indicates the purpose of the parameter + - `ParamName `: Parameter name + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnSecret.md b/src/Cdn/help/New-AzFrontDoorCdnSecret.md new file mode 100644 index 000000000000..1244e81b65f6 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnSecret.md @@ -0,0 +1,224 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnsecret +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnSecret + +## SYNOPSIS +Creates a new Secret within the specified profile. + +## SYNTAX + +``` +New-AzFrontDoorCdnSecret -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-Parameter ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates a new Secret within the specified profile. + +## 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 +``` + +### -Name +Name of the Secret under the profile. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: SecretName + +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 +``` + +### -Parameter +object which contains secret parameters +To construct, see NOTES section for PARAMETER properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecretParameters +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +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: (All) +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 + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecret + +## 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. + + +PARAMETER : object which contains secret parameters + - `Type `: The type of the secret resource. + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.md b/src/Cdn/help/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.md new file mode 100644 index 000000000000..19292e3ffd8a --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.md @@ -0,0 +1,139 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecretCustomerCertificateParametersObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnSecretCustomerCertificateParametersObject + +## SYNOPSIS +Create an in-memory object for CustomerCertificateParameters. + +## SYNTAX + +``` +New-AzFrontDoorCdnSecretCustomerCertificateParametersObject -Type [-SecretSourceId ] + [-SecretVersion ] [-SubjectAlternativeName ] [-UseLatestVersion ] + [] +``` + +## DESCRIPTION +Create an in-memory object for CustomerCertificateParameters. + +## 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 + +### -SecretSourceId +Resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecretVersion +Version of the secret to be used. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubjectAlternativeName +The list of SANs. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type +The type of the secret resource. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UseLatestVersion +Whether to use the latest version for the certificate. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +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.CustomerCertificateParameters + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.md b/src/Cdn/help/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.md new file mode 100644 index 000000000000..9cb02a4da499 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.md @@ -0,0 +1,77 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject + +## SYNOPSIS +Create an in-memory object for AzureFirstPartyManagedCertificateParameters. + +## SYNTAX + +``` +New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject -Type [] +``` + +## DESCRIPTION +Create an in-memory object for AzureFirstPartyManagedCertificateParameters. + +## 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 + +### -Type +The type of the secret resource. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType +Parameter Sets: (All) +Aliases: + +Required: True +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.AzureFirstPartyManagedCertificateParameters + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.md b/src/Cdn/help/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.md new file mode 100644 index 000000000000..5c6d20aab3c6 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.md @@ -0,0 +1,77 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecretManagedCertificateParametersObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnSecretManagedCertificateParametersObject + +## SYNOPSIS +Create an in-memory object for ManagedCertificateParameters. + +## SYNTAX + +``` +New-AzFrontDoorCdnSecretManagedCertificateParametersObject -Type [] +``` + +## DESCRIPTION +Create an in-memory object for ManagedCertificateParameters. + +## 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 + +### -Type +The type of the secret resource. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType +Parameter Sets: (All) +Aliases: + +Required: True +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.ManagedCertificateParameters + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.md b/src/Cdn/help/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.md new file mode 100644 index 000000000000..09319624e0e1 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.md @@ -0,0 +1,124 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecretUrlSigningKeyParametersObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject + +## SYNOPSIS +Create an in-memory object for UrlSigningKeyParameters. + +## SYNTAX + +``` +New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject -KeyId -Type + [-SecretSourceId ] [-SecretVersion ] [] +``` + +## DESCRIPTION +Create an in-memory object for UrlSigningKeyParameters. + +## 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 + +### -KeyId +Defines the customer defined key Id. +This id will exist in the incoming request to indicate the key used to form the hash. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecretSourceId +Resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecretVersion +Version of the secret to be used. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type +The type of the secret resource. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType +Parameter Sets: (All) +Aliases: + +Required: True +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.UrlSigningKeyParameters + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnSecurityPolicy.md b/src/Cdn/help/New-AzFrontDoorCdnSecurityPolicy.md new file mode 100644 index 000000000000..c914a9484b5b --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnSecurityPolicy.md @@ -0,0 +1,215 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/new-azfrontdoorcdnsecuritypolicy +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnSecurityPolicy + +## SYNOPSIS +Creates a new security policy within the specified profile. + +## SYNTAX + +``` +New-AzFrontDoorCdnSecurityPolicy -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-Parameter ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates a new security policy within the specified profile. + +## 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 +``` + +### -Name +Name of the security policy under the profile. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: SecurityPolicyName + +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 +``` + +### -Parameter +object which contains security policy parameters + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +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: (All) +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 + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.md b/src/Cdn/help/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.md new file mode 100644 index 000000000000..81842eaec2c4 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.md @@ -0,0 +1,102 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject + +## SYNOPSIS +Create an in-memory object for SecurityPolicyWebApplicationFirewallAssociation. + +## SYNTAX + +``` +New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject + [-Domain ] [-PatternsToMatch ] [] +``` + +## DESCRIPTION +Create an in-memory object for SecurityPolicyWebApplicationFirewallAssociation. + +## 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 + +### -Domain +List of domains. +To construct, see NOTES section for DOMAIN properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PatternsToMatch +List of paths. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +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.SecurityPolicyWebApplicationFirewallAssociation + +## 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. + + +DOMAIN : List of domains. + - `[Id ]`: Resource ID. + +## RELATED LINKS + diff --git a/src/Cdn/help/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.md b/src/Cdn/help/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.md new file mode 100644 index 000000000000..da8d376f8019 --- /dev/null +++ b/src/Cdn/help/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.md @@ -0,0 +1,105 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.Cdn/new-AzCdnFrontDoorSecurityPolicyWebApplicationFirewallParametersObject +schema: 2.0.0 +--- + +# New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject + +## SYNOPSIS +Create an in-memory object for SecurityPolicyWebApplicationFirewallParameters. + +## SYNTAX + +``` +New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject + [-Association ] [-WafPolicyId ] + [] +``` + +## DESCRIPTION +Create an in-memory object for SecurityPolicyWebApplicationFirewallParameters. + +## 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 + +### -Association +Waf associations. +To construct, see NOTES section for ASSOCIATION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyWebApplicationFirewallAssociation[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WafPolicyId +Resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +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.SecurityPolicyWebApplicationFirewallParameters + +## 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. + + +ASSOCIATION : Waf associations. + - `[Domain ]`: List of domains. + - `[Id ]`: Resource ID. + - `[PatternsToMatch ]`: List of paths + +## RELATED LINKS + diff --git a/src/Cdn/help/Remove-AzCdnCustomDomain.md b/src/Cdn/help/Remove-AzCdnCustomDomain.md new file mode 100644 index 000000000000..ab01ceb3d0ac --- /dev/null +++ b/src/Cdn/help/Remove-AzCdnCustomDomain.md @@ -0,0 +1,275 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdncustomdomain +schema: 2.0.0 +--- + +# Remove-AzCdnCustomDomain + +## SYNOPSIS +Deletes an existing custom domain within an endpoint. + +## SYNTAX + +### Delete1 (Default) +``` +Remove-AzCdnCustomDomain -EndpointName -Name -ProfileName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity1 +``` +Remove-AzCdnCustomDomain -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes an existing custom domain within an endpoint. + +## 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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Delete1 +Aliases: + +Required: True +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: DeleteViaIdentity1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the custom domain within an endpoint. + +```yaml +Type: System.String +Parameter Sets: Delete1 +Aliases: CustomDomainName + +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 +``` + +### -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 +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Delete1 +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: Delete1 +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: Delete1 +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. + - `[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/help/Remove-AzCdnEndpoint.md b/src/Cdn/help/Remove-AzCdnEndpoint.md new file mode 100644 index 000000000000..55d858b8792a --- /dev/null +++ b/src/Cdn/help/Remove-AzCdnEndpoint.md @@ -0,0 +1,260 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnendpoint +schema: 2.0.0 +--- + +# Remove-AzCdnEndpoint + +## SYNOPSIS +Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. + +## SYNTAX + +### Delete1 (Default) +``` +Remove-AzCdnEndpoint -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity1 +``` +Remove-AzCdnEndpoint -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. + +## 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: DeleteViaIdentity1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Delete1 +Aliases: EndpointName + +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 +``` + +### -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 +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Delete1 +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: Delete1 +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: Delete1 +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. + - `[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/help/Remove-AzCdnOrigin.md b/src/Cdn/help/Remove-AzCdnOrigin.md new file mode 100644 index 000000000000..44565febedfa --- /dev/null +++ b/src/Cdn/help/Remove-AzCdnOrigin.md @@ -0,0 +1,275 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnorigin +schema: 2.0.0 +--- + +# Remove-AzCdnOrigin + +## SYNOPSIS +Deletes an existing origin within an endpoint. + +## SYNTAX + +### Delete1 (Default) +``` +Remove-AzCdnOrigin -EndpointName -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity1 +``` +Remove-AzCdnOrigin -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes an existing origin within an endpoint. + +## 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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Delete1 +Aliases: + +Required: True +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: DeleteViaIdentity1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the origin which is unique within the endpoint. + +```yaml +Type: System.String +Parameter Sets: Delete1 +Aliases: OriginName + +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 +``` + +### -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 +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Delete1 +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: Delete1 +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: Delete1 +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. + - `[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/help/Remove-AzCdnOriginGroup.md b/src/Cdn/help/Remove-AzCdnOriginGroup.md new file mode 100644 index 000000000000..975d639fb0ed --- /dev/null +++ b/src/Cdn/help/Remove-AzCdnOriginGroup.md @@ -0,0 +1,275 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnorigingroup +schema: 2.0.0 +--- + +# Remove-AzCdnOriginGroup + +## SYNOPSIS +Deletes an existing origin group within an endpoint. + +## SYNTAX + +### Delete1 (Default) +``` +Remove-AzCdnOriginGroup -EndpointName -Name -ProfileName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity1 +``` +Remove-AzCdnOriginGroup -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes an existing origin group within an endpoint. + +## 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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Delete1 +Aliases: + +Required: True +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: DeleteViaIdentity1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the origin group which is unique within the endpoint. + +```yaml +Type: System.String +Parameter Sets: Delete1 +Aliases: OriginGroupName + +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 +``` + +### -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 +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Delete1 +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: Delete1 +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: Delete1 +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. + - `[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/help/Remove-AzCdnProfile.md b/src/Cdn/help/Remove-AzCdnProfile.md new file mode 100644 index 000000000000..d46d846f87ca --- /dev/null +++ b/src/Cdn/help/Remove-AzCdnProfile.md @@ -0,0 +1,246 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnprofile +schema: 2.0.0 +--- + +# Remove-AzCdnProfile + +## SYNOPSIS +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. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzCdnProfile -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzCdnProfile -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +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. + +## 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: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: ProfileName + +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 +``` + +### -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. + - `[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/help/Remove-AzFrontDoorCdnCustomDomain.md b/src/Cdn/help/Remove-AzFrontDoorCdnCustomDomain.md new file mode 100644 index 000000000000..f03944849d92 --- /dev/null +++ b/src/Cdn/help/Remove-AzFrontDoorCdnCustomDomain.md @@ -0,0 +1,260 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdncustomdomain +schema: 2.0.0 +--- + +# Remove-AzFrontDoorCdnCustomDomain + +## SYNOPSIS +Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzFrontDoorCdnCustomDomain -CustomDomainName -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzFrontDoorCdnCustomDomain -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. + +## 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 +``` + +### -CustomDomainName +Name of the domain under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +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: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +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 +``` + +### -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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +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: 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. + - `[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/help/Remove-AzFrontDoorCdnEndpoint.md b/src/Cdn/help/Remove-AzFrontDoorCdnEndpoint.md new file mode 100644 index 000000000000..917b778c5e40 --- /dev/null +++ b/src/Cdn/help/Remove-AzFrontDoorCdnEndpoint.md @@ -0,0 +1,260 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnendpoint +schema: 2.0.0 +--- + +# Remove-AzFrontDoorCdnEndpoint + +## SYNOPSIS +Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzFrontDoorCdnEndpoint -EndpointName -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzFrontDoorCdnEndpoint -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. + +## 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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +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 +``` + +### -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 +``` + +### -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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +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: 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. + - `[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/help/Remove-AzFrontDoorCdnOrigin.md b/src/Cdn/help/Remove-AzFrontDoorCdnOrigin.md new file mode 100644 index 000000000000..21f0cd4e25f8 --- /dev/null +++ b/src/Cdn/help/Remove-AzFrontDoorCdnOrigin.md @@ -0,0 +1,275 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnorigin +schema: 2.0.0 +--- + +# Remove-AzFrontDoorCdnOrigin + +## SYNOPSIS +Deletes an existing origin within an origin group. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzFrontDoorCdnOrigin -OriginGroupName -OriginName -ProfileName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzFrontDoorCdnOrigin -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes an existing origin within an origin 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: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +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 +``` + +### -OriginGroupName +Name of the origin group which is unique within the profile. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OriginName +Name of the origin which is unique within the profile. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +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: 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. + - `[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/help/Remove-AzFrontDoorCdnOriginGroup.md b/src/Cdn/help/Remove-AzFrontDoorCdnOriginGroup.md new file mode 100644 index 000000000000..c891fd93e187 --- /dev/null +++ b/src/Cdn/help/Remove-AzFrontDoorCdnOriginGroup.md @@ -0,0 +1,260 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnorigingroup +schema: 2.0.0 +--- + +# Remove-AzFrontDoorCdnOriginGroup + +## SYNOPSIS +Deletes an existing origin group within a profile. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzFrontDoorCdnOriginGroup -OriginGroupName -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzFrontDoorCdnOriginGroup -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes an existing origin group within a profile. + +## 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: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +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 +``` + +### -OriginGroupName +Name of the origin group which is unique within the profile. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +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: 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. + - `[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/help/Remove-AzFrontDoorCdnProfile.md b/src/Cdn/help/Remove-AzFrontDoorCdnProfile.md new file mode 100644 index 000000000000..cf325620bbe9 --- /dev/null +++ b/src/Cdn/help/Remove-AzFrontDoorCdnProfile.md @@ -0,0 +1,246 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnprofile +schema: 2.0.0 +--- + +# Remove-AzFrontDoorCdnProfile + +## SYNOPSIS +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. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzFrontDoorCdnProfile -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzFrontDoorCdnProfile -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +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. + +## 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: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: ProfileName + +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 +``` + +### -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. + - `[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/help/Remove-AzFrontDoorCdnRoute.md b/src/Cdn/help/Remove-AzFrontDoorCdnRoute.md new file mode 100644 index 000000000000..a8a8d62cdb54 --- /dev/null +++ b/src/Cdn/help/Remove-AzFrontDoorCdnRoute.md @@ -0,0 +1,275 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnroute +schema: 2.0.0 +--- + +# Remove-AzFrontDoorCdnRoute + +## SYNOPSIS +Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzFrontDoorCdnRoute -EndpointName -Name -ProfileName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzFrontDoorCdnRoute -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. + +## 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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +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 +Name of the routing rule. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: RouteName + +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 +``` + +### -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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +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: 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. + - `[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/help/Remove-AzFrontDoorCdnRule.md b/src/Cdn/help/Remove-AzFrontDoorCdnRule.md new file mode 100644 index 000000000000..08e8f7a0404b --- /dev/null +++ b/src/Cdn/help/Remove-AzFrontDoorCdnRule.md @@ -0,0 +1,275 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnrule +schema: 2.0.0 +--- + +# Remove-AzFrontDoorCdnRule + +## SYNOPSIS +Deletes an existing delivery rule within a rule set. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzFrontDoorCdnRule -Name -ProfileName -ResourceGroupName -SetName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzFrontDoorCdnRule -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes an existing delivery rule within a rule set. + +## 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: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the delivery rule which is unique within the endpoint. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: RuleName + +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 +``` + +### -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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +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: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SetName +Name of the rule set under the profile. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: RuleSetName + +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. + - `[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/help/Remove-AzFrontDoorCdnRuleSet.md b/src/Cdn/help/Remove-AzFrontDoorCdnRuleSet.md new file mode 100644 index 000000000000..0dda4b5507ec --- /dev/null +++ b/src/Cdn/help/Remove-AzFrontDoorCdnRuleSet.md @@ -0,0 +1,260 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnruleset +schema: 2.0.0 +--- + +# Remove-AzFrontDoorCdnRuleSet + +## SYNOPSIS +Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzFrontDoorCdnRuleSet -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzFrontDoorCdnRuleSet -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. + +## 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: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the rule set under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: RuleSetName + +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 +``` + +### -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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +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: 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. + - `[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/help/Remove-AzFrontDoorCdnSecret.md b/src/Cdn/help/Remove-AzFrontDoorCdnSecret.md new file mode 100644 index 000000000000..7225b9eba09a --- /dev/null +++ b/src/Cdn/help/Remove-AzFrontDoorCdnSecret.md @@ -0,0 +1,260 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnsecret +schema: 2.0.0 +--- + +# Remove-AzFrontDoorCdnSecret + +## SYNOPSIS +Deletes an existing Secret within profile. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzFrontDoorCdnSecret -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzFrontDoorCdnSecret -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes an existing Secret within profile. + +## 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: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the Secret under the profile. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: SecretName + +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 +``` + +### -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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +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: 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. + - `[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/help/Remove-AzFrontDoorCdnSecurityPolicy.md b/src/Cdn/help/Remove-AzFrontDoorCdnSecurityPolicy.md new file mode 100644 index 000000000000..07c37a39d054 --- /dev/null +++ b/src/Cdn/help/Remove-AzFrontDoorCdnSecurityPolicy.md @@ -0,0 +1,260 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/remove-azfrontdoorcdnsecuritypolicy +schema: 2.0.0 +--- + +# Remove-AzFrontDoorCdnSecurityPolicy + +## SYNOPSIS +Deletes an existing security policy within profile. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzFrontDoorCdnSecurityPolicy -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzFrontDoorCdnSecurityPolicy -InputObject [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes an existing security policy within profile. + +## 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: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the security policy under the profile. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: SecurityPolicyName + +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 +``` + +### -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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +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: 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. + - `[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/help/Start-AzCdnEndpoint.md b/src/Cdn/help/Start-AzCdnEndpoint.md new file mode 100644 index 000000000000..a4fef5db525e --- /dev/null +++ b/src/Cdn/help/Start-AzCdnEndpoint.md @@ -0,0 +1,245 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/start-azcdnendpoint +schema: 2.0.0 +--- + +# Start-AzCdnEndpoint + +## SYNOPSIS +Starts an existing CDN endpoint that is on a stopped state. + +## SYNTAX + +### Start (Default) +``` +Start-AzCdnEndpoint -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### StartViaIdentity +``` +Start-AzCdnEndpoint -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Starts an existing CDN endpoint that is on a stopped state. + +## 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: StartViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Start +Aliases: EndpointName + +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 +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Start +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: Start +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: Start +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 + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint + +## 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. + - `[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/help/Stop-AzCdnEndpoint.md b/src/Cdn/help/Stop-AzCdnEndpoint.md new file mode 100644 index 000000000000..03df8779a8e6 --- /dev/null +++ b/src/Cdn/help/Stop-AzCdnEndpoint.md @@ -0,0 +1,244 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/stop-azcdnendpoint +schema: 2.0.0 +--- + +# Stop-AzCdnEndpoint + +## SYNOPSIS +Stops an existing running CDN endpoint. + +## SYNTAX + +### Stop (Default) +``` +Stop-AzCdnEndpoint -Name -ProfileName -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### StopViaIdentity +``` +Stop-AzCdnEndpoint -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Stops an existing running CDN endpoint. + +## 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: StopViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Stop +Aliases: EndpointName + +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 +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Stop +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: Stop +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: Stop +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 + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IEndpoint + +## 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. + - `[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/help/Test-AzCdnEndpointCustomDomain.md b/src/Cdn/help/Test-AzCdnEndpointCustomDomain.md new file mode 100644 index 000000000000..fa705cffef92 --- /dev/null +++ b/src/Cdn/help/Test-AzCdnEndpointCustomDomain.md @@ -0,0 +1,231 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/test-azcdnendpointcustomdomain +schema: 2.0.0 +--- + +# Test-AzCdnEndpointCustomDomain + +## SYNOPSIS +Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. + +## SYNTAX + +### ValidateExpanded1 (Default) +``` +Test-AzCdnEndpointCustomDomain -EndpointName -ProfileName -ResourceGroupName + -HostName [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +### ValidateViaIdentityExpanded1 +``` +Test-AzCdnEndpointCustomDomain -InputObject -HostName [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. + +## 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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: ValidateExpanded1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HostName +The host name of the custom domain. +Must be a domain name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +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: ValidateViaIdentityExpanded1 +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: ValidateExpanded1 +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: ValidateExpanded1 +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: ValidateExpanded1 +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 + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput + +## 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. + - `[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/help/Test-AzCdnNameAvailability.md b/src/Cdn/help/Test-AzCdnNameAvailability.md new file mode 100644 index 000000000000..79774270d91b --- /dev/null +++ b/src/Cdn/help/Test-AzCdnNameAvailability.md @@ -0,0 +1,163 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/test-azcdnnameavailability +schema: 2.0.0 +--- + +# Test-AzCdnNameAvailability + +## SYNOPSIS +Check the availability of a resource name. +This is needed for resources where name is globally unique, such as a CDN endpoint. + +## SYNTAX + +### CheckExpanded (Default) +``` +Test-AzCdnNameAvailability -Name -Type [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +### CheckExpanded1 +``` +Test-AzCdnNameAvailability -Name -Type [-SubscriptionId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Check the availability of a resource name. +This is needed for resources where name is globally unique, such as a CDN endpoint. + +## 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 +``` + +### -Name +The resource name to validate. + +```yaml +Type: System.String +Parameter Sets: (All) +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: CheckExpanded1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type +The type of the resource whose name is to be validated. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType +Parameter Sets: (All) +Aliases: + +Required: True +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.ICheckNameAvailabilityOutput + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/Test-AzCdnProbe.md b/src/Cdn/help/Test-AzCdnProbe.md new file mode 100644 index 000000000000..fe648b62398d --- /dev/null +++ b/src/Cdn/help/Test-AzCdnProbe.md @@ -0,0 +1,143 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/test-azcdnprobe +schema: 2.0.0 +--- + +# Test-AzCdnProbe + +## SYNOPSIS +Check if the probe path is a valid path and the file can be accessed. +Probe path is the path to a file hosted on the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. +This path is relative to the origin path specified in the endpoint configuration. + +## SYNTAX + +``` +Test-AzCdnProbe -ProbeUrl [-SubscriptionId ] [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Check if the probe path is a valid path and the file can be accessed. +Probe path is the path to a file hosted on the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. +This path is relative to the origin path specified in the endpoint configuration. + +## 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 +``` + +### -ProbeUrl +The probe URL to validate. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +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 + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateProbeOutput + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/Test-AzFrontDoorCdnEndpointCustomDomain.md b/src/Cdn/help/Test-AzFrontDoorCdnEndpointCustomDomain.md new file mode 100644 index 000000000000..6008916cdb40 --- /dev/null +++ b/src/Cdn/help/Test-AzFrontDoorCdnEndpointCustomDomain.md @@ -0,0 +1,231 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/test-azfrontdoorcdnendpointcustomdomain +schema: 2.0.0 +--- + +# Test-AzFrontDoorCdnEndpointCustomDomain + +## SYNOPSIS +Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api isn't work for apex domain. + +## SYNTAX + +### ValidateExpanded (Default) +``` +Test-AzFrontDoorCdnEndpointCustomDomain -EndpointName -ProfileName + -ResourceGroupName -HostName [-SubscriptionId ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### ValidateViaIdentityExpanded +``` +Test-AzFrontDoorCdnEndpointCustomDomain -InputObject -HostName + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api isn't work for apex domain. + +## 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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: ValidateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HostName +The host name of the custom domain. +Must be a domain name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +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: ValidateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: ValidateExpanded +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: ValidateExpanded +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: ValidateExpanded +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 + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateCustomDomainOutput + +## 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. + - `[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/help/Test-AzFrontDoorCdnEndpointNameAvailability.md b/src/Cdn/help/Test-AzFrontDoorCdnEndpointNameAvailability.md new file mode 100644 index 000000000000..6a441b2ab025 --- /dev/null +++ b/src/Cdn/help/Test-AzFrontDoorCdnEndpointNameAvailability.md @@ -0,0 +1,188 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/test-azfrontdoorcdnendpointnameavailability +schema: 2.0.0 +--- + +# Test-AzFrontDoorCdnEndpointNameAvailability + +## SYNOPSIS +Check the availability of a resource name. +This is needed for resources where name is globally unique, such as a afdx endpoint. + +## SYNTAX + +``` +Test-AzFrontDoorCdnEndpointNameAvailability -ResourceGroupName -Name -Type + [-SubscriptionId ] [-AutoGeneratedDomainNameLabelScope ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Check the availability of a resource name. +This is needed for resources where name is globally unique, such as a afdx endpoint. + +## 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 + +### -AutoGeneratedDomainNameLabelScope +Indicates the endpoint name reuse scope. +The default value is TenantReuse. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AutoGeneratedDomainNameLabelScope +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 +``` + +### -Name +The resource name to validate. + +```yaml +Type: System.String +Parameter Sets: (All) +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: (All) +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: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type +The type of the resource whose name is to be validated. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType +Parameter Sets: (All) +Aliases: + +Required: True +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.ICheckEndpointNameAvailabilityOutput + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Cdn/help/Test-AzFrontDoorCdnProfileHostNameAvailability.md b/src/Cdn/help/Test-AzFrontDoorCdnProfileHostNameAvailability.md new file mode 100644 index 000000000000..f9c3fd5da601 --- /dev/null +++ b/src/Cdn/help/Test-AzFrontDoorCdnProfileHostNameAvailability.md @@ -0,0 +1,215 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/test-azfrontdoorcdnprofilehostnameavailability +schema: 2.0.0 +--- + +# Test-AzFrontDoorCdnProfileHostNameAvailability + +## SYNOPSIS +Check the name availability of a host name. + +## SYNTAX + +### CheckExpanded (Default) +``` +Test-AzFrontDoorCdnProfileHostNameAvailability -ProfileName -ResourceGroupName + -HostName [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +### CheckViaIdentityExpanded +``` +Test-AzFrontDoorCdnProfileHostNameAvailability -InputObject -HostName + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Check the name availability of a host name. + +## 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 +``` + +### -HostName +The host name to validate. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +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: CheckViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: CheckExpanded +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: CheckExpanded +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: CheckExpanded +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 + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ICheckNameAvailabilityOutput + +## 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. + - `[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/help/Update-AzCdnEndpoint.md b/src/Cdn/help/Update-AzCdnEndpoint.md new file mode 100644 index 000000000000..8b49351b0aee --- /dev/null +++ b/src/Cdn/help/Update-AzCdnEndpoint.md @@ -0,0 +1,545 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/update-azcdnendpoint +schema: 2.0.0 +--- + +# Update-AzCdnEndpoint + +## SYNOPSIS +Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +Only tags can be updated after creating an endpoint. +To update origins, use the Update Origin operation. +To update origin groups, use the Update Origin group operation. +To update custom domains, use the Update Custom Domain operation. + +## SYNTAX + +### UpdateExpanded1 (Default) +``` +Update-AzCdnEndpoint -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-ContentTypesToCompress ] [-DefaultOriginGroupId ] + [-DeliveryPolicyDescription ] [-DeliveryPolicyRule ] [-GeoFilter ] + [-IsCompressionEnabled] [-IsHttpAllowed] [-IsHttpsAllowed] [-OptimizationType ] + [-OriginHostHeader ] [-OriginPath ] [-ProbePath ] + [-QueryStringCachingBehavior ] [-Tag ] + [-UrlSigningKey ] [-WebApplicationFirewallPolicyLinkId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded1 +``` +Update-AzCdnEndpoint -InputObject [-ContentTypesToCompress ] + [-DefaultOriginGroupId ] [-DeliveryPolicyDescription ] + [-DeliveryPolicyRule ] [-GeoFilter ] [-IsCompressionEnabled] [-IsHttpAllowed] + [-IsHttpsAllowed] [-OptimizationType ] [-OriginHostHeader ] [-OriginPath ] + [-ProbePath ] [-QueryStringCachingBehavior ] [-Tag ] + [-UrlSigningKey ] [-WebApplicationFirewallPolicyLinkId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. +Only tags can be updated after creating an endpoint. +To update origins, use the Update Origin operation. +To update origin groups, use the Update Origin group operation. +To update custom domains, use the Update Custom Domain operation. + +## 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 +``` + +### -ContentTypesToCompress +List of content types on which compression applies. +The value should be a valid MIME type. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultOriginGroupId +Resource ID. + +```yaml +Type: System.String +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 +``` + +### -DeliveryPolicyDescription +User-friendly description of the policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeliveryPolicyRule +A list of the delivery rules. +To construct, see NOTES section for DELIVERYPOLICYRULE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRule[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GeoFilter +List of rules defining the user's geo access within a CDN endpoint. +Each geo filter defines an access rule to a specified path or content, e.g. +block APAC for path /pictures/ +To construct, see NOTES section for GEOFILTER properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IGeoFilter[] +Parameter Sets: (All) +Aliases: + +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: UpdateViaIdentityExpanded1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IsCompressionEnabled +Indicates whether content compression is enabled on CDN. +Default value is false. +If compression is enabled, content will be served as compressed if user requests for a compressed version. +Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. + +```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 +``` + +### -IsHttpAllowed +Indicates whether HTTP traffic is allowed on the endpoint. +Default value is true. +At least one protocol (HTTP or HTTPS) must be allowed. + +```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 +``` + +### -IsHttpsAllowed +Indicates whether HTTPS traffic is allowed on the endpoint. +Default value is true. +At least one protocol (HTTP or HTTPS) must be allowed. + +```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 +``` + +### -Name +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded1 +Aliases: EndpointName + +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 +``` + +### -OptimizationType +Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. +Download, Media services. +With this information, CDN can apply scenario driven optimization. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.OptimizationType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OriginHostHeader +The host header value sent to the origin with each request. +This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. +Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OriginPath +A directory path on the origin that CDN can use to retrieve content from, e.g. +contoso.cloudapp.net/originpath. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProbePath +Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. +This is relative to the origin path. +This property is only relevant when using a single origin. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -QueryStringCachingBehavior +Defines how CDN caches requests that include query strings. +You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.QueryStringCachingBehavior +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: UpdateExpanded1 +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: UpdateExpanded1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Endpoint 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 +``` + +### -UrlSigningKey +List of keys used to validate the signed URL hashes. +To construct, see NOTES section for URLSIGNINGKEY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IUrlSigningKey[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WebApplicationFirewallPolicyLinkId +Resource ID. + +```yaml +Type: System.String +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.IEndpoint + +## 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. + + +DELIVERYPOLICYRULE : A list of the delivery rules. + - `Action `: A list of actions that are executed when all the conditions of a rule are satisfied. + - `Name `: The name of the action for the delivery rule. + - `Order `: The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + - `[Condition ]`: A list of conditions that must be matched for the actions to be executed + - `Name `: The name of the condition for the delivery rule. + - `[Name ]`: Name of the rule + +GEOFILTER : List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/ + - `Action `: Action of the geo filter, i.e. allow or block access. + - `CountryCode `: Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US. + - `RelativePath `: Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) + +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. + - `[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. + +URLSIGNINGKEY : List of keys used to validate the signed URL hashes. + - `KeyId `: Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + - `KeySourceParameterResourceGroupName `: Resource group of the user's Key Vault containing the secret + - `KeySourceParameterSecretName `: The name of secret in Key Vault. + - `KeySourceParameterSecretVersion `: The version(GUID) of secret in Key Vault. + - `KeySourceParameterSubscriptionId `: Subscription Id of the user's Key Vault containing the secret + - `KeySourceParameterVaultName `: The name of the user's Key Vault containing the secret + +## RELATED LINKS + diff --git a/src/Cdn/help/Update-AzCdnOrigin.md b/src/Cdn/help/Update-AzCdnOrigin.md new file mode 100644 index 000000000000..188c154e62c1 --- /dev/null +++ b/src/Cdn/help/Update-AzCdnOrigin.md @@ -0,0 +1,440 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/update-azcdnorigin +schema: 2.0.0 +--- + +# Update-AzCdnOrigin + +## SYNOPSIS +Updates an existing origin within an endpoint. + +## SYNTAX + +### UpdateExpanded1 (Default) +``` +Update-AzCdnOrigin -EndpointName -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-Enabled] [-HostName ] [-HttpPort ] [-HttpsPort ] + [-OriginHostHeader ] [-Priority ] [-PrivateLinkAlias ] + [-PrivateLinkApprovalMessage ] [-PrivateLinkLocation ] [-PrivateLinkResourceId ] + [-Weight ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded1 +``` +Update-AzCdnOrigin -InputObject [-Enabled] [-HostName ] [-HttpPort ] + [-HttpsPort ] [-OriginHostHeader ] [-Priority ] [-PrivateLinkAlias ] + [-PrivateLinkApprovalMessage ] [-PrivateLinkLocation ] [-PrivateLinkResourceId ] + [-Weight ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates an existing origin within an endpoint. + +## 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 +``` + +### -Enabled +Origin is enabled for load balancing or not + +```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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HostName +The address of the origin. +Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HttpPort +The value of the HTTP port. +Must be between 1 and 65535. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HttpsPort +The value of the HTTPS port. +Must be between 1 and 65535. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +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: UpdateViaIdentityExpanded1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the origin which is unique within the endpoint. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded1 +Aliases: OriginName + +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 +``` + +### -OriginHostHeader +The host header value sent to the origin with each request. +If you leave this blank, the request hostname determines this value. +Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. +This overrides the host header defined at Endpoint + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Priority +Priority of origin in given origin group for load balancing. +Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateLinkAlias +The Alias of the Private Link resource. +Populating this optional field indicates that this origin is 'Private' + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateLinkApprovalMessage +A custom message to be included in the approval request to connect to the Private Link. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateLinkLocation +The location of the Private Link resource. +Required only if 'privateLinkResourceId' is populated + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateLinkResourceId +The Resource Id of the Private Link resource. +Populating this optional field indicates that this backend is 'Private' + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded1 +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: UpdateExpanded1 +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: UpdateExpanded1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Weight +Weight of the origin in given origin group for load balancing. +Must be between 1 and 1000 + +```yaml +Type: System.Int32 +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.IOrigin + +## 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. + - `[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/help/Update-AzCdnOriginGroup.md b/src/Cdn/help/Update-AzCdnOriginGroup.md new file mode 100644 index 000000000000..2f45fd9fc853 --- /dev/null +++ b/src/Cdn/help/Update-AzCdnOriginGroup.md @@ -0,0 +1,348 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/update-azcdnorigingroup +schema: 2.0.0 +--- + +# Update-AzCdnOriginGroup + +## SYNOPSIS +Updates an existing origin group within an endpoint. + +## SYNTAX + +### UpdateExpanded1 (Default) +``` +Update-AzCdnOriginGroup -EndpointName -Name -ProfileName + -ResourceGroupName [-SubscriptionId ] [-HealthProbeSetting ] + [-Origin ] + [-ResponseBasedOriginErrorDetectionSetting ] + [-TrafficRestorationTimeToHealedOrNewEndpointsInMinute ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded1 +``` +Update-AzCdnOriginGroup -InputObject [-HealthProbeSetting ] + [-Origin ] + [-ResponseBasedOriginErrorDetectionSetting ] + [-TrafficRestorationTimeToHealedOrNewEndpointsInMinute ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates an existing origin group within an endpoint. + +## 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 +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HealthProbeSetting +Health probe settings to the origin that is used to determine the health of the origin. +To construct, see NOTES section for HEALTHPROBESETTING properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters +Parameter Sets: (All) +Aliases: + +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: UpdateViaIdentityExpanded1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the origin group which is unique within the endpoint. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded1 +Aliases: OriginGroupName + +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 +``` + +### -Origin +The source of the content being delivered via CDN within given origin group. +To construct, see NOTES section for ORIGIN properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded1 +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: UpdateExpanded1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResponseBasedOriginErrorDetectionSetting +The JSON object that contains the properties to determine origin health using real requests/responses. +This property is currently not supported. +To construct, see NOTES section for RESPONSEBASEDORIGINERRORDETECTIONSETTING properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResponseBasedOriginErrorDetectionParameters +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: UpdateExpanded1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TrafficRestorationTimeToHealedOrNewEndpointsInMinute +Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. +Default is 10 mins. +This property is currently not supported. + +```yaml +Type: System.Int32 +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.IOriginGroup + +## 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. + + +HEALTHPROBESETTING : Health probe settings to the origin that is used to determine the health of the origin. + - `[ProbeIntervalInSecond ]`: The number of seconds between health probes.Default is 240sec. + - `[ProbePath ]`: The path relative to the origin that is used to determine the health of the origin. + - `[ProbeProtocol ]`: Protocol to use for health probe. + - `[ProbeRequestType ]`: The type of health probe request that is made. + +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. + - `[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. + +ORIGIN : The source of the content being delivered via CDN within given origin group. + - `[Id ]`: Resource ID. + +RESPONSEBASEDORIGINERRORDETECTIONSETTING : The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported. + - `[HttpErrorRange ]`: The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + - `[Begin ]`: The inclusive start of the http status code range. + - `[End ]`: The inclusive end of the http status code range. + - `[ResponseBasedDetectedErrorType ]`: Type of response errors for real user requests for which origin will be deemed unhealthy + - `[ResponseBasedFailoverThresholdPercentage ]`: The percentage of failed requests in the sample where failover should trigger. + +## RELATED LINKS + diff --git a/src/Cdn/help/Update-AzCdnProfile.md b/src/Cdn/help/Update-AzCdnProfile.md new file mode 100644 index 000000000000..7edea227f2ff --- /dev/null +++ b/src/Cdn/help/Update-AzCdnProfile.md @@ -0,0 +1,261 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/update-azcdnprofile +schema: 2.0.0 +--- + +# Update-AzCdnProfile + +## SYNOPSIS +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. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzCdnProfile -Name -ResourceGroupName [-SubscriptionId ] + [-OriginResponseTimeoutSecond ] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzCdnProfile -InputObject [-OriginResponseTimeoutSecond ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +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. + +## 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 +Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: ProfileName + +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 +``` + +### -OriginResponseTimeoutSecond +Send and receive timeout on forwarding request to the origin. +When timeout is reached, the request fails and returns. + +```yaml +Type: System.Int32 +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 +Profile 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.IProfile + +## 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. + - `[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/help/Update-AzFrontDoorCdnCustomDomain.md b/src/Cdn/help/Update-AzFrontDoorCdnCustomDomain.md new file mode 100644 index 000000000000..cb14f56ac01c --- /dev/null +++ b/src/Cdn/help/Update-AzFrontDoorCdnCustomDomain.md @@ -0,0 +1,300 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdncustomdomain +schema: 2.0.0 +--- + +# Update-AzFrontDoorCdnCustomDomain + +## SYNOPSIS +Updates an existing domain within a profile. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzFrontDoorCdnCustomDomain -CustomDomainName -ProfileName -ResourceGroupName + [-SubscriptionId ] [-AzureDnsZoneId ] + [-PropertiesPreValidatedCustomDomainResourceId ] [-TlsSetting ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzFrontDoorCdnCustomDomain -InputObject [-AzureDnsZoneId ] + [-PropertiesPreValidatedCustomDomainResourceId ] [-TlsSetting ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates an existing domain within a profile. + +## 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 +``` + +### -AzureDnsZoneId +Resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CustomDomainName +Name of the domain under the profile which is unique globally + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +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 +``` + +### -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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PropertiesPreValidatedCustomDomainResourceId +Resource ID. + +```yaml +Type: System.String +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 +``` + +### -TlsSetting +The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. +If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. +To construct, see NOTES section for TLSSETTING properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IAfdDomainHttpsParameters +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.IAfdDomain + +## 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. + - `[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. + +TLSSETTING : The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + - `CertificateType `: Defines the source of the SSL certificate. + - `[MinimumTlsVersion ]`: TLS protocol version that will be used for Https + - `[Secret ]`: Resource reference to the secret. ie. subs/rg/profile/secret + - `[Id ]`: Resource ID. + +## RELATED LINKS + diff --git a/src/Cdn/help/Update-AzFrontDoorCdnCustomDomainValidationToken.md b/src/Cdn/help/Update-AzFrontDoorCdnCustomDomainValidationToken.md new file mode 100644 index 000000000000..cf288616b0de --- /dev/null +++ b/src/Cdn/help/Update-AzFrontDoorCdnCustomDomainValidationToken.md @@ -0,0 +1,260 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdncustomdomainvalidationtoken +schema: 2.0.0 +--- + +# Update-AzFrontDoorCdnCustomDomainValidationToken + +## SYNOPSIS +Updates the domain validation token. + +## SYNTAX + +### Refresh (Default) +``` +Update-AzFrontDoorCdnCustomDomainValidationToken -CustomDomainName -ProfileName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### RefreshViaIdentity +``` +Update-AzFrontDoorCdnCustomDomainValidationToken -InputObject [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates the domain validation token. + +## 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 +``` + +### -CustomDomainName +Name of the domain under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: Refresh +Aliases: + +Required: True +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: RefreshViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +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 +``` + +### -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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: Refresh +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: Refresh +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: Refresh +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. + - `[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/help/Update-AzFrontDoorCdnEndpoint.md b/src/Cdn/help/Update-AzFrontDoorCdnEndpoint.md new file mode 100644 index 000000000000..0732e52fe47d --- /dev/null +++ b/src/Cdn/help/Update-AzFrontDoorCdnEndpoint.md @@ -0,0 +1,284 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnendpoint +schema: 2.0.0 +--- + +# Update-AzFrontDoorCdnEndpoint + +## SYNOPSIS +Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +Only tags can be updated after creating an endpoint. +To update origins, use the Update Origin operation. +To update origin groups, use the Update Origin group operation. +To update domains, use the Update Custom Domain operation. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzFrontDoorCdnEndpoint -EndpointName -ProfileName -ResourceGroupName + [-SubscriptionId ] [-EnabledState ] [-Tag ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzFrontDoorCdnEndpoint -InputObject [-EnabledState ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. +Only tags can be updated after creating an endpoint. +To update origins, use the Update Origin operation. +To update origin groups, use the Update Origin group operation. +To update domains, use the Update Custom Domain operation. + +## 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 +``` + +### -EnabledState +Whether to enable use of this rule. +Permitted values are 'Enabled' or 'Disabled' + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +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 +``` + +### -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 +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +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: 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 +Endpoint 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.IAfdEndpoint + +## 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. + - `[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/help/Update-AzFrontDoorCdnOrigin.md b/src/Cdn/help/Update-AzFrontDoorCdnOrigin.md new file mode 100644 index 000000000000..bd930cdf66a5 --- /dev/null +++ b/src/Cdn/help/Update-AzFrontDoorCdnOrigin.md @@ -0,0 +1,490 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnorigin +schema: 2.0.0 +--- + +# Update-AzFrontDoorCdnOrigin + +## SYNOPSIS +Updates an existing origin within an origin group. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzFrontDoorCdnOrigin -OriginGroupName -OriginName -ProfileName + -ResourceGroupName [-SubscriptionId ] [-AzureOriginId ] + [-EnabledState ] [-EnforceCertificateNameCheck] [-HostName ] [-HttpPort ] + [-HttpsPort ] [-OriginHostHeader ] [-Priority ] [-PrivateLinkId ] + [-SharedPrivateLinkResourceGroupId ] [-SharedPrivateLinkResourcePrivateLinkLocation ] + [-SharedPrivateLinkResourceRequestMessage ] + [-SharedPrivateLinkResourceStatus ] [-Weight ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzFrontDoorCdnOrigin -InputObject [-AzureOriginId ] + [-EnabledState ] [-EnforceCertificateNameCheck] [-HostName ] [-HttpPort ] + [-HttpsPort ] [-OriginHostHeader ] [-Priority ] [-PrivateLinkId ] + [-SharedPrivateLinkResourceGroupId ] [-SharedPrivateLinkResourcePrivateLinkLocation ] + [-SharedPrivateLinkResourceRequestMessage ] + [-SharedPrivateLinkResourceStatus ] [-Weight ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates an existing origin within an origin 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 +``` + +### -AzureOriginId +Resource ID. + +```yaml +Type: System.String +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 +``` + +### -EnabledState +Whether to enable health probes to be made against backends defined under backendPools. +Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnforceCertificateNameCheck +Whether to enable certificate name check at origin level + +```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 +``` + +### -HostName +The address of the origin. +Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HttpPort +The value of the HTTP port. +Must be between 1 and 65535. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HttpsPort +The value of the HTTPS port. +Must be between 1 and 65535. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +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 +``` + +### -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 +``` + +### -OriginGroupName +Name of the origin group which is unique within the profile. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OriginHostHeader +The host header value sent to the origin with each request. +If you leave this blank, the request hostname determines this value. +Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. +This overrides the host header defined at Endpoint + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OriginName +Name of the origin which is unique within the profile. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Priority +Priority of origin in given origin group for load balancing. +Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateLinkId +Resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +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: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SharedPrivateLinkResourceGroupId +The group id from the provider of resource the shared private link resource is for. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SharedPrivateLinkResourcePrivateLinkLocation +The location of the shared private link resource + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SharedPrivateLinkResourceRequestMessage +The request message for requesting approval of the shared private link resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SharedPrivateLinkResourceStatus +Status of the shared private link resource. +Can be Pending, Approved, Rejected, Disconnected, or Timeout. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SharedPrivateLinkResourceStatus +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: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Weight +Weight of the origin in given origin group for load balancing. +Must be between 1 and 1000 + +```yaml +Type: System.Int32 +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.IAfdOrigin + +## 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. + - `[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/help/Update-AzFrontDoorCdnOriginGroup.md b/src/Cdn/help/Update-AzFrontDoorCdnOriginGroup.md new file mode 100644 index 000000000000..0a1377c57dc1 --- /dev/null +++ b/src/Cdn/help/Update-AzFrontDoorCdnOriginGroup.md @@ -0,0 +1,325 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnorigingroup +schema: 2.0.0 +--- + +# Update-AzFrontDoorCdnOriginGroup + +## SYNOPSIS +Updates an existing origin group within a profile. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzFrontDoorCdnOriginGroup -OriginGroupName -ProfileName -ResourceGroupName + [-SubscriptionId ] [-HealthProbeSetting ] + [-LoadBalancingSetting ] [-SessionAffinityState ] + [-TrafficRestorationTimeToHealedOrNewEndpointsInMinute ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzFrontDoorCdnOriginGroup -InputObject [-HealthProbeSetting ] + [-LoadBalancingSetting ] [-SessionAffinityState ] + [-TrafficRestorationTimeToHealedOrNewEndpointsInMinute ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates an existing origin group within a profile. + +## 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 +``` + +### -HealthProbeSetting +Health probe settings to the origin that is used to determine the health of the origin. +To construct, see NOTES section for HEALTHPROBESETTING properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IHealthProbeParameters +Parameter Sets: (All) +Aliases: + +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 +``` + +### -LoadBalancingSetting +Load balancing settings for a backend pool +To construct, see NOTES section for LOADBALANCINGSETTING properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ILoadBalancingSettingsParameters +Parameter Sets: (All) +Aliases: + +Required: False +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 +``` + +### -OriginGroupName +Name of the origin group which is unique within the profile. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +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: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SessionAffinityState +Whether to allow session affinity on this host. +Valid options are 'Enabled' or 'Disabled' + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState +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: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TrafficRestorationTimeToHealedOrNewEndpointsInMinute +Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. +Default is 10 mins. +This property is currently not supported. + +```yaml +Type: System.Int32 +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.IAfdOriginGroup + +## 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. + + +HEALTHPROBESETTING : Health probe settings to the origin that is used to determine the health of the origin. + - `[ProbeIntervalInSecond ]`: The number of seconds between health probes.Default is 240sec. + - `[ProbePath ]`: The path relative to the origin that is used to determine the health of the origin. + - `[ProbeProtocol ]`: Protocol to use for health probe. + - `[ProbeRequestType ]`: The type of health probe request that is made. + +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. + - `[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. + +LOADBALANCINGSETTING : Load balancing settings for a backend pool + - `[AdditionalLatencyInMillisecond ]`: The additional latency in milliseconds for probes to fall into the lowest latency bucket + - `[SampleSize ]`: The number of samples to consider for load balancing decisions + - `[SuccessfulSamplesRequired ]`: The number of samples within the sample period that must succeed + +## RELATED LINKS + diff --git a/src/Cdn/help/Update-AzFrontDoorCdnProfile.md b/src/Cdn/help/Update-AzFrontDoorCdnProfile.md new file mode 100644 index 000000000000..819571647767 --- /dev/null +++ b/src/Cdn/help/Update-AzFrontDoorCdnProfile.md @@ -0,0 +1,261 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnprofile +schema: 2.0.0 +--- + +# Update-AzFrontDoorCdnProfile + +## SYNOPSIS +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. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzFrontDoorCdnProfile -Name -ResourceGroupName [-SubscriptionId ] + [-OriginResponseTimeoutSecond ] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzFrontDoorCdnProfile -InputObject [-OriginResponseTimeoutSecond ] + [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +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. + +## 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 +Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: ProfileName + +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 +``` + +### -OriginResponseTimeoutSecond +Send and receive timeout on forwarding request to the origin. +When timeout is reached, the request fails and returns. + +```yaml +Type: System.Int32 +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 +Profile 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.IProfile + +## 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. + - `[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/help/Update-AzFrontDoorCdnRoute.md b/src/Cdn/help/Update-AzFrontDoorCdnRoute.md new file mode 100644 index 000000000000..3820286e135f --- /dev/null +++ b/src/Cdn/help/Update-AzFrontDoorCdnRoute.md @@ -0,0 +1,498 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnroute +schema: 2.0.0 +--- + +# Update-AzFrontDoorCdnRoute + +## SYNOPSIS +Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzFrontDoorCdnRoute -EndpointName -Name -ProfileName + -ResourceGroupName [-SubscriptionId ] [-CacheConfigurationQueryParameter ] + [-CacheConfigurationQueryStringCachingBehavior ] + [-CompressionSettingContentTypesToCompress ] [-CompressionSettingIsCompressionEnabled] + [-CustomDomain ] [-EnabledState ] + [-ForwardingProtocol ] [-HttpsRedirect ] + [-LinkToDefaultDomain ] [-OriginGroupId ] [-OriginPath ] + [-PatternsToMatch ] [-RuleSet ] [-SupportedProtocol ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzFrontDoorCdnRoute -InputObject [-CacheConfigurationQueryParameter ] + [-CacheConfigurationQueryStringCachingBehavior ] + [-CompressionSettingContentTypesToCompress ] [-CompressionSettingIsCompressionEnabled] + [-CustomDomain ] [-EnabledState ] + [-ForwardingProtocol ] [-HttpsRedirect ] + [-LinkToDefaultDomain ] [-OriginGroupId ] [-OriginPath ] + [-PatternsToMatch ] [-RuleSet ] [-SupportedProtocol ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. + +## 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 +``` + +### -CacheConfigurationQueryParameter +query parameters to include or exclude (comma separated). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CacheConfigurationQueryStringCachingBehavior +Defines how Frontdoor caches requests that include query strings. +You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdQueryStringCachingBehavior +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CompressionSettingContentTypesToCompress +List of content types on which compression applies. +The value should be a valid MIME type. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CompressionSettingIsCompressionEnabled +Indicates whether content compression is enabled on AzureFrontDoor. +Default value is false. +If compression is enabled, content will be served as compressed if user requests for a compressed version. +Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + +```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 +``` + +### -CustomDomain +Domains referenced by this endpoint. +To construct, see NOTES section for CUSTOMDOMAIN properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IActivatedResourceReference[] +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 +``` + +### -EnabledState +Whether to enable use of this rule. +Permitted values are 'Enabled' or 'Disabled' + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.EnabledState +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EndpointName +Name of the endpoint under the profile which is unique globally. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ForwardingProtocol +Protocol this rule will use when forwarding traffic to backends. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ForwardingProtocol +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HttpsRedirect +Whether to automatically redirect HTTP traffic to HTTPS traffic. +Note that this is a easy way to set up this rule and it will be the first rule that gets executed. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.HttpsRedirect +Parameter Sets: (All) +Aliases: + +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 +``` + +### -LinkToDefaultDomain +whether this route will be linked to the default endpoint domain. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LinkToDefaultDomain +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of the routing rule. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: RouteName + +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 +``` + +### -OriginGroupId +Resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OriginPath +A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. +contoso.cloudapp.net/originpath. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PatternsToMatch +The route patterns of the rule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +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: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RuleSet +rule sets referenced by this endpoint. +To construct, see NOTES section for RULESET properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourceReference[] +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: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SupportedProtocol +List of supported protocols for this route. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.AfdEndpointProtocols[] +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.IRoute + +## 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. + + +CUSTOMDOMAIN : Domains referenced by this endpoint. + - `[Id ]`: Resource ID. + +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. + - `[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. + +RULESET : rule sets referenced by this endpoint. + - `[Id ]`: Resource ID. + +## RELATED LINKS + diff --git a/src/Cdn/help/Update-AzFrontDoorCdnRule.md b/src/Cdn/help/Update-AzFrontDoorCdnRule.md new file mode 100644 index 000000000000..affc106e5874 --- /dev/null +++ b/src/Cdn/help/Update-AzFrontDoorCdnRule.md @@ -0,0 +1,335 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnrule +schema: 2.0.0 +--- + +# Update-AzFrontDoorCdnRule + +## SYNOPSIS +Updates an existing delivery rule within a rule set. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzFrontDoorCdnRule -Name -ProfileName -ResourceGroupName -SetName + [-SubscriptionId ] [-Action ] [-Condition ] + [-MatchProcessingBehavior ] [-Order ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzFrontDoorCdnRule -InputObject [-Action ] + [-Condition ] [-MatchProcessingBehavior ] [-Order ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates an existing delivery rule within a rule set. + +## 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 + +### -Action +A list of actions that are executed when all the conditions of a rule are satisfied. +To construct, see NOTES section for ACTION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleAction1[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -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 +``` + +### -Condition +A list of conditions that must be matched for the actions to be executed +To construct, see NOTES section for CONDITION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IDeliveryRuleCondition[] +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 +``` + +### -MatchProcessingBehavior +If this rule is a match should the rules engine continue running the remaining rules or stop. +If not present, defaults to Continue. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.MatchProcessingBehavior +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of the delivery rule which is unique within the endpoint. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: RuleName + +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 +``` + +### -Order +The order in which the rules are applied for the endpoint. +Possible values {0,1,2,3,………}. +A rule with a lesser order will be applied before a rule with a greater order. +Rule with order 0 is a special rule. +It does not require any condition and actions listed in it will always be applied. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +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: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SetName +Name of the rule set under the profile. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: RuleSetName + +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 +``` + +### -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.IRule + +## 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. + + +ACTION : A list of actions that are executed when all the conditions of a rule are satisfied. + - `Name `: The name of the action for the delivery rule. + +CONDITION : A list of conditions that must be matched for the actions to be executed + - `Name `: The name of the condition for the delivery rule. + +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. + - `[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/help/Update-AzFrontDoorCdnSecurityPolicy.md b/src/Cdn/help/Update-AzFrontDoorCdnSecurityPolicy.md new file mode 100644 index 000000000000..a9006383c8b8 --- /dev/null +++ b/src/Cdn/help/Update-AzFrontDoorCdnSecurityPolicy.md @@ -0,0 +1,261 @@ +--- +external help file: +Module Name: Az.Cdn +online version: https://docs.microsoft.com/powershell/module/az.cdn/update-azfrontdoorcdnsecuritypolicy +schema: 2.0.0 +--- + +# Update-AzFrontDoorCdnSecurityPolicy + +## SYNOPSIS +Updates an existing security policy within a profile. + +## SYNTAX + +### PatchExpanded (Default) +``` +Update-AzFrontDoorCdnSecurityPolicy -Name -ProfileName -ResourceGroupName + [-SubscriptionId ] [-Parameter ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### PatchViaIdentityExpanded +``` +Update-AzFrontDoorCdnSecurityPolicy -InputObject + [-Parameter ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Updates an existing security policy within a profile. + +## 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: PatchViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the security policy under the profile. + +```yaml +Type: System.String +Parameter Sets: PatchExpanded +Aliases: SecurityPolicyName + +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 +``` + +### -Parameter +object which contains security policy parameters + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicyPropertiesParameters +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileName +Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + +```yaml +Type: System.String +Parameter Sets: PatchExpanded +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: PatchExpanded +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: PatchExpanded +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 + +### Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ISecurityPolicy + +## 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. + - `[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/how-to.md b/src/Cdn/how-to.md new file mode 100644 index 000000000000..8e46569b2617 --- /dev/null +++ b/src/Cdn/how-to.md @@ -0,0 +1,58 @@ +# How-To +This document describes how to develop for `Az.Cdn`. + +## Building `Az.Cdn` +To build, run the `build-module.ps1` at the root of the module directory. This will generate the proxy script cmdlets that are the cmdlets being exported by this module. After the build completes, the proxy script cmdlets will be output to the `exports` folder. To read more about the proxy script cmdlets, look at the [README.md](exports/README.md) in the `exports` folder. + +## Creating custom cmdlets +To add cmdlets that were not generated by the REST specification, use the `custom` folder. This folder allows you to add handwritten `.ps1` and `.cs` files. Currently, we support using `.ps1` scripts as new cmdlets or as additional low-level variants (via `ParameterSet`), and `.cs` files as low-level (variants) cmdlets that the exported script cmdlets call. We do not support exporting any `.cs` (dll) cmdlets directly. To read more about custom cmdlets, look at the [README.md](custom/README.md) in the `custom` folder. + +## Generating documentation +To generate documentation, the process is now integrated into the `build-module.ps1` script. If you don't want to run this process as part of `build-module.ps1`, you can provide the `-NoDocs` switch. If you want to run documentation generation after the build process, you may still run the `generate-help.ps1` script. Overall, the process will look at the documentation comments in the generated and custom cmdlets and types, and create `.md` files into the `docs` folder. Additionally, this pulls in any examples from the `examples` folder and adds them to the generated help markdown documents. To read more about examples, look at the [README.md](examples/README.md) in the `examples` folder. To read more about documentation, look at the [README.md](docs/README.md) in the `docs` folder. + +## Testing `Az.Cdn` +To test the cmdlets, we use [Pester](https://github.com/pester/Pester). Tests scripts (`.ps1`) should be added to the `test` folder. To execute the Pester tests, run the `test-module.ps1` script. This will run all tests in `playback` mode within the `test` folder. To read more about testing cmdlets, look at the [README.md](examples/README.md) in the `examples` folder. + +## Packing `Az.Cdn` +To pack `Az.Cdn` for distribution, run the `pack-module.ps1` script. This will take the contents of multiple directories and certain root-folder files to create a `.nupkg`. The structure of the `.nupkg` is created so it can be loaded part of a [PSRepository](https://docs.microsoft.com/powershell/module/powershellget/register-psrepository). Additionally, this package is in a format for distribution to the [PSGallery](https://www.powershellgallery.com/). For signing an Azure module, please contact the [Azure PowerShell](https://github.com/Azure/azure-powershell) team. + +## Module Script Details +There are multiple scripts created for performing different actions for developing `Az.Cdn`. +- `build-module.ps1` + - Builds the module DLL (`./bin/Az.Cdn.private.dll`), creates the exported cmdlets and documentation, generates custom cmdlet test stubs and exported cmdlet example stubs, and updates `./Az.Cdn.psd1` with Azure profile information. + - **Parameters**: [`Switch` parameters] + - `-Run`: After building, creates an isolated PowerShell session and loads `Az.Cdn`. + - `-Test`: After building, runs the `Pester` tests defined in the `test` folder. + - `-Docs`: After building, generates the Markdown documents for the modules into the `docs` folder. + - `-Pack`: After building, packages the module into a `.nupkg`. + - `-Code`: After building, opens a VSCode window with the module's directory and runs (see `-Run`) the module. + - `-Release`: Builds the module in `Release` configuration (as opposed to `Debug` configuration). + - `-NoDocs`: Supresses writing the documentation markdown files as part of the cmdlet exporting process. + - `-Debugger`: Used when attaching the debugger in Visual Studio to the PowerShell session, and running the build process without recompiling the DLL. This suppresses running the script as an isolated process. +- `run-module.ps1` + - Creates an isolated PowerShell session and loads `Az.Cdn` into the session. + - Same as `-Run` in `build-module.ps1`. + - **Parameters**: [`Switch` parameters] + - `-Code`: Opens a VSCode window with the module's directory. + - Same as `-Code` in `build-module.ps1`. +- `generate-help.ps1` + - Generates the Markdown documents for the modules into the `docs` folder. + - Same as `-Docs` in `build-module.ps1`. +- `test-module.ps1` + - Runs the `Pester` tests defined in the `test` folder. + - Same as `-Test` in `build-module.ps1`. +- `pack-module.ps1` + - Packages the module into a `.nupkg` for distribution. + - Same as `-Pack` in `build-module.ps1`. +- `generate-help.ps1` + - Generates the Markdown documents for the modules into the `docs` folder. + - Same as `-Docs` in `build-module.ps1`. + - This process is now integrated into `build-module.ps1` automatically. To disable, use `-NoDocs` when running `build-module.ps1`. +- `export-surface.ps1` + - Generates Markdown documents for both the cmdlet surface and the model (class) surface of the module. + - These files are placed into the `resources` folder. + - Used for investigating the surface of your module. These are *not* documentation for distribution. +- `check-dependencies.ps1` + - Used in `run-module.ps1` and `test-module.ps1` to verify dependent modules are available to run those tasks. + - It will download local (within the module's directory structure) versions of those modules as needed. + - This script *does not* need to be ran by-hand. \ No newline at end of file diff --git a/src/Cdn/internal/Az.Cdn.internal.psm1 b/src/Cdn/internal/Az.Cdn.internal.psm1 new file mode 100644 index 000000000000..534003ce3f83 --- /dev/null +++ b/src/Cdn/internal/Az.Cdn.internal.psm1 @@ -0,0 +1,38 @@ +# region Generated + # Load the private module dll + $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Cdn.private.dll') + + # Get the private module's instance + $instance = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module]::Instance + + # Export nothing to clear implicit exports + Export-ModuleMember + + # Export proxy cmdlet scripts + $exportsPath = $PSScriptRoot + $directories = Get-ChildItem -Directory -Path $exportsPath + $profileDirectory = $null + if($instance.ProfileName) { + if(($directories | ForEach-Object { $_.Name }) -contains $instance.ProfileName) { + $profileDirectory = $directories | Where-Object { $_.Name -eq $instance.ProfileName } + } else { + # Don't export anything if the profile doesn't exist for the module + $exportsPath = $null + Write-Warning "Selected Azure profile '$($instance.ProfileName)' does not exist for module '$($instance.Name)'. No cmdlets were loaded." + } + } elseif(($directories | Measure-Object).Count -gt 0) { + # Load the last folder if no profile is selected + $profileDirectory = $directories | Select-Object -Last 1 + } + + if($profileDirectory) { + Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'" + $exportsPath = $profileDirectory.FullName + } + + if($exportsPath) { + Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName } + $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath + Export-ModuleMember -Function $cmdletNames -Alias (Get-ScriptCmdlet -ScriptFolder $exportsPath -AsAlias) + } +# endregion diff --git a/src/Cdn/internal/Get-AzCdnLogAnalyticLocation.ps1 b/src/Cdn/internal/Get-AzCdnLogAnalyticLocation.ps1 new file mode 100644 index 000000000000..bfc7c91b9777 --- /dev/null +++ b/src/Cdn/internal/Get-AzCdnLogAnalyticLocation.ps1 @@ -0,0 +1,176 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get all available location names for AFD log analytics report. +.Description +Get all available location names for AFD log analytics report. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponse +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnloganalyticlocation +#> +function Get-AzCdnLogAnalyticLocation { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponse])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + # which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzCdnLogAnalyticLocation_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzCdnLogAnalyticLocation_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Cdn/internal/Get-AzCdnLogAnalyticMetric.ps1 b/src/Cdn/internal/Get-AzCdnLogAnalyticMetric.ps1 new file mode 100644 index 000000000000..e0288f1f5f58 --- /dev/null +++ b/src/Cdn/internal/Get-AzCdnLogAnalyticMetric.ps1 @@ -0,0 +1,239 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get log report for AFD profile +.Description +Get log report for AFD profile +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponse +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnloganalyticmetric +#> +function Get-AzCdnLogAnalyticMetric { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponse])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + # which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.String[]] + # . + ${CustomDomain}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.DateTime] + # . + ${DateTimeBegin}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.DateTime] + # . + ${DateTimeEnd}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity] + # . + ${Granularity}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric[]] + # . + ${Metric}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.String[]] + # . + ${Protocol}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.String[]] + # . + ${Continent}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.String[]] + # . + ${CountryOrRegion}, + + [Parameter()] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy[]] + # . + ${GroupBy}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzCdnLogAnalyticMetric_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzCdnLogAnalyticMetric_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Cdn/internal/Get-AzCdnLogAnalyticRanking.ps1 b/src/Cdn/internal/Get-AzCdnLogAnalyticRanking.ps1 new file mode 100644 index 000000000000..099dc8a9762c --- /dev/null +++ b/src/Cdn/internal/Get-AzCdnLogAnalyticRanking.ps1 @@ -0,0 +1,217 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get log analytics ranking report for AFD profile +.Description +Get log analytics ranking report for AFD profile +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponse +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnloganalyticranking +#> +function Get-AzCdnLogAnalyticRanking { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponse])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + # which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.DateTime] + # . + ${DateTimeBegin}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.DateTime] + # . + ${DateTimeEnd}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.Int32] + # . + ${MaxRanking}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric[]] + # . + ${Metric}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking[]] + # . + ${Ranking}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.String[]] + # . + ${CustomDomain}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzCdnLogAnalyticRanking_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzCdnLogAnalyticRanking_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Cdn/internal/Get-AzCdnLogAnalyticResource.ps1 b/src/Cdn/internal/Get-AzCdnLogAnalyticResource.ps1 new file mode 100644 index 000000000000..21db2f0e751b --- /dev/null +++ b/src/Cdn/internal/Get-AzCdnLogAnalyticResource.ps1 @@ -0,0 +1,176 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get all endpoints and custom domains available for AFD log report +.Description +Get all endpoints and custom domains available for AFD log report +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponse +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnloganalyticresource +#> +function Get-AzCdnLogAnalyticResource { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponse])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + # which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzCdnLogAnalyticResource_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzCdnLogAnalyticResource_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Cdn/internal/Get-AzCdnLogAnalyticWafLogAnalyticMetric.ps1 b/src/Cdn/internal/Get-AzCdnLogAnalyticWafLogAnalyticMetric.ps1 new file mode 100644 index 000000000000..1cdffd1de298 --- /dev/null +++ b/src/Cdn/internal/Get-AzCdnLogAnalyticWafLogAnalyticMetric.ps1 @@ -0,0 +1,227 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get Waf related log analytics report for AFD profile. +.Description +Get Waf related log analytics report for AFD profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponse +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnloganalyticwafloganalyticmetric +#> +function Get-AzCdnLogAnalyticWafLogAnalyticMetric { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponse])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + # which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.DateTime] + # . + ${DateTimeBegin}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.DateTime] + # . + ${DateTimeEnd}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity] + # . + ${Granularity}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric[]] + # . + ${Metric}, + + [Parameter()] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction[]] + # . + ${Action}, + + [Parameter()] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy[]] + # . + ${GroupBy}, + + [Parameter()] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType[]] + # . + ${RuleType}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzCdnLogAnalyticWafLogAnalyticMetric_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzCdnLogAnalyticWafLogAnalyticMetric_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Cdn/internal/Get-AzCdnLogAnalyticWafLogAnalyticRanking.ps1 b/src/Cdn/internal/Get-AzCdnLogAnalyticWafLogAnalyticRanking.ps1 new file mode 100644 index 000000000000..3ed2af5e1169 --- /dev/null +++ b/src/Cdn/internal/Get-AzCdnLogAnalyticWafLogAnalyticRanking.ps1 @@ -0,0 +1,226 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get WAF log analytics charts for AFD profile +.Description +Get WAF log analytics charts for AFD profile +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponse +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnloganalyticwafloganalyticranking +#> +function Get-AzCdnLogAnalyticWafLogAnalyticRanking { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponse])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + # which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.DateTime] + # . + ${DateTimeBegin}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.DateTime] + # . + ${DateTimeEnd}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.Int32] + # . + ${MaxRanking}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric[]] + # . + ${Metric}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType[]] + # . + ${Ranking}, + + [Parameter()] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction[]] + # . + ${Action}, + + [Parameter()] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType[]] + # . + ${RuleType}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzCdnLogAnalyticWafLogAnalyticRanking_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzCdnLogAnalyticWafLogAnalyticRanking_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Cdn/internal/Get-AzCdnOperation.ps1 b/src/Cdn/internal/Get-AzCdnOperation.ps1 new file mode 100644 index 000000000000..ba4c0d47f038 --- /dev/null +++ b/src/Cdn/internal/Get-AzCdnOperation.ps1 @@ -0,0 +1,124 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Lists all of the available CDN REST API operations. +.Description +Lists all of the available CDN REST API operations. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnoperation +#> +function Get-AzCdnOperation { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + List = 'Az.Cdn.private\Get-AzCdnOperation_List'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Cdn/internal/Get-AzCdnProfile.ps1 b/src/Cdn/internal/Get-AzCdnProfile.ps1 new file mode 100644 index 000000000000..09f9aef56408 --- /dev/null +++ b/src/Cdn/internal/Get-AzCdnProfile.ps1 @@ -0,0 +1,181 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group. +.Description +Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnprofile +#> +function Get-AzCdnProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzCdnProfile_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzCdnProfile_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzCdnProfile_List'; + List1 = 'Az.Cdn.private\Get-AzCdnProfile_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Cdn/internal/Invoke-AzCdnSecretValidate.ps1 b/src/Cdn/internal/Invoke-AzCdnSecretValidate.ps1 new file mode 100644 index 000000000000..8f810e113656 --- /dev/null +++ b/src/Cdn/internal/Invoke-AzCdnSecretValidate.ps1 @@ -0,0 +1,204 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Validate a Secret in the profile. +.Description +Validate a Secret in the profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput +.Notes +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. + [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. + +VALIDATESECRETINPUT : Input of the secret to be validated. + SecretType : The secret type. + [SecretSourceId ]: Resource ID. + [SecretVersion ]: Secret version, if customer is using a specific version. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/invoke-azcdnsecretvalidate +#> +function Invoke-AzCdnSecretValidate { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput])] +[CmdletBinding(DefaultParameterSetName='SecretExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Secret')] + [Parameter(ParameterSetName='SecretExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='SecretViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='SecretViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Secret', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='SecretViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput] + # Input of the secret to be validated. + # To construct, see NOTES section for VALIDATESECRETINPUT properties and create a hash table. + ${ValidateSecretInput}, + + [Parameter(ParameterSetName='SecretExpanded', Mandatory)] + [Parameter(ParameterSetName='SecretViaIdentityExpanded', Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType] + # The secret type. + ${SecretType}, + + [Parameter(ParameterSetName='SecretExpanded')] + [Parameter(ParameterSetName='SecretViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${SecretSourceId}, + + [Parameter(ParameterSetName='SecretExpanded')] + [Parameter(ParameterSetName='SecretViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Secret version, if customer is using a specific version. + ${SecretVersion}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Secret = 'Az.Cdn.private\Invoke-AzCdnSecretValidate_Secret'; + SecretExpanded = 'Az.Cdn.private\Invoke-AzCdnSecretValidate_SecretExpanded'; + SecretViaIdentity = 'Az.Cdn.private\Invoke-AzCdnSecretValidate_SecretViaIdentity'; + SecretViaIdentityExpanded = 'Az.Cdn.private\Invoke-AzCdnSecretValidate_SecretViaIdentityExpanded'; + } + if (('Secret', 'SecretExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Cdn/internal/New-AzCdnProfile.ps1 b/src/Cdn/internal/New-AzCdnProfile.ps1 new file mode 100644 index 000000000000..b281e0d9d328 --- /dev/null +++ b/src/Cdn/internal/New-AzCdnProfile.ps1 @@ -0,0 +1,186 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +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. +.Description +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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnprofile +#> +function New-AzCdnProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource location. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Send and receive timeout on forwarding request to the origin. + # When timeout is reached, the request fails and returns. + ${OriginResponseTimeoutSecond}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName] + # Name of the pricing tier. + ${SkuName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + CreateExpanded = 'Az.Cdn.private\New-AzCdnProfile_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Cdn/internal/New-AzCdnProfileSsoUri.ps1 b/src/Cdn/internal/New-AzCdnProfileSsoUri.ps1 new file mode 100644 index 000000000000..eeae619e2891 --- /dev/null +++ b/src/Cdn/internal/New-AzCdnProfileSsoUri.ps1 @@ -0,0 +1,179 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.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. +.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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.String +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnprofilessouri +#> +function New-AzCdnProfileSsoUri { +[OutputType([System.String])] +[CmdletBinding(DefaultParameterSetName='Generate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Generate', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Generate', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Generate')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GenerateViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Generate = 'Az.Cdn.private\New-AzCdnProfileSsoUri_Generate'; + GenerateViaIdentity = 'Az.Cdn.private\New-AzCdnProfileSsoUri_GenerateViaIdentity'; + } + if (('Generate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Cdn/internal/ProxyCmdletDefinitions.ps1 b/src/Cdn/internal/ProxyCmdletDefinitions.ps1 new file mode 100644 index 000000000000..d6c5ae141aff --- /dev/null +++ b/src/Cdn/internal/ProxyCmdletDefinitions.ps1 @@ -0,0 +1,2353 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get all available location names for AFD log analytics report. +.Description +Get all available location names for AFD log analytics report. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponse +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnloganalyticlocation +#> +function Get-AzCdnLogAnalyticLocation { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IContinentsResponse])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + # which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzCdnLogAnalyticLocation_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzCdnLogAnalyticLocation_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +Get log report for AFD profile +.Description +Get log report for AFD profile +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponse +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnloganalyticmetric +#> +function Get-AzCdnLogAnalyticMetric { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IMetricsResponse])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + # which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.String[]] + # . + ${CustomDomain}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.DateTime] + # . + ${DateTimeBegin}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.DateTime] + # . + ${DateTimeEnd}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGranularity] + # . + ${Granularity}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetric[]] + # . + ${Metric}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.String[]] + # . + ${Protocol}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.String[]] + # . + ${Continent}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.String[]] + # . + ${CountryOrRegion}, + + [Parameter()] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogMetricsGroupBy[]] + # . + ${GroupBy}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzCdnLogAnalyticMetric_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzCdnLogAnalyticMetric_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +Get log analytics ranking report for AFD profile +.Description +Get log analytics ranking report for AFD profile +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponse +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnloganalyticranking +#> +function Get-AzCdnLogAnalyticRanking { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IRankingsResponse])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + # which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.DateTime] + # . + ${DateTimeBegin}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.DateTime] + # . + ${DateTimeEnd}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.Int32] + # . + ${MaxRanking}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRankingMetric[]] + # . + ${Metric}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.LogRanking[]] + # . + ${Ranking}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.String[]] + # . + ${CustomDomain}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzCdnLogAnalyticRanking_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzCdnLogAnalyticRanking_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +Get all endpoints and custom domains available for AFD log report +.Description +Get all endpoints and custom domains available for AFD log report +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponse +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnloganalyticresource +#> +function Get-AzCdnLogAnalyticResource { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IResourcesResponse])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + # which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzCdnLogAnalyticResource_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzCdnLogAnalyticResource_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +Get Waf related log analytics report for AFD profile. +.Description +Get Waf related log analytics report for AFD profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponse +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnloganalyticwafloganalyticmetric +#> +function Get-AzCdnLogAnalyticWafLogAnalyticMetric { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafMetricsResponse])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + # which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.DateTime] + # . + ${DateTimeBegin}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.DateTime] + # . + ${DateTimeEnd}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafGranularity] + # . + ${Granularity}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric[]] + # . + ${Metric}, + + [Parameter()] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction[]] + # . + ${Action}, + + [Parameter()] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingGroupBy[]] + # . + ${GroupBy}, + + [Parameter()] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType[]] + # . + ${RuleType}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzCdnLogAnalyticWafLogAnalyticMetric_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzCdnLogAnalyticWafLogAnalyticMetric_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +Get WAF log analytics charts for AFD profile +.Description +Get WAF log analytics charts for AFD profile +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponse +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnloganalyticwafloganalyticranking +#> +function Get-AzCdnLogAnalyticWafLogAnalyticRanking { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IWafRankingsResponse])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + # which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.DateTime] + # . + ${DateTimeBegin}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.DateTime] + # . + ${DateTimeEnd}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [System.Int32] + # . + ${MaxRanking}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafMetric[]] + # . + ${Metric}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRankingType[]] + # . + ${Ranking}, + + [Parameter()] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafAction[]] + # . + ${Action}, + + [Parameter()] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.WafRuleType[]] + # . + ${RuleType}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzCdnLogAnalyticWafLogAnalyticRanking_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzCdnLogAnalyticWafLogAnalyticRanking_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +Lists all of the available CDN REST API operations. +.Description +Lists all of the available CDN REST API operations. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnoperation +#> +function Get-AzCdnOperation { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IOperation])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + List = 'Az.Cdn.private\Get-AzCdnOperation_List'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group. +.Description +Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/get-azcdnprofile +#> +function Get-AzCdnProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Get = 'Az.Cdn.private\Get-AzCdnProfile_Get'; + GetViaIdentity = 'Az.Cdn.private\Get-AzCdnProfile_GetViaIdentity'; + List = 'Az.Cdn.private\Get-AzCdnProfile_List'; + List1 = 'Az.Cdn.private\Get-AzCdnProfile_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +Validate a Secret in the profile. +.Description +Validate a Secret in the profile. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput +.Notes +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. + [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. + +VALIDATESECRETINPUT : Input of the secret to be validated. + SecretType : The secret type. + [SecretSourceId ]: Resource ID. + [SecretVersion ]: Secret version, if customer is using a specific version. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/invoke-azcdnsecretvalidate +#> +function Invoke-AzCdnSecretValidate { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretOutput])] +[CmdletBinding(DefaultParameterSetName='SecretExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Secret')] + [Parameter(ParameterSetName='SecretExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='SecretViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='SecretViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Secret', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='SecretViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IValidateSecretInput] + # Input of the secret to be validated. + # To construct, see NOTES section for VALIDATESECRETINPUT properties and create a hash table. + ${ValidateSecretInput}, + + [Parameter(ParameterSetName='SecretExpanded', Mandatory)] + [Parameter(ParameterSetName='SecretViaIdentityExpanded', Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SecretType] + # The secret type. + ${SecretType}, + + [Parameter(ParameterSetName='SecretExpanded')] + [Parameter(ParameterSetName='SecretViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource ID. + ${SecretSourceId}, + + [Parameter(ParameterSetName='SecretExpanded')] + [Parameter(ParameterSetName='SecretViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Secret version, if customer is using a specific version. + ${SecretVersion}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Secret = 'Az.Cdn.private\Invoke-AzCdnSecretValidate_Secret'; + SecretExpanded = 'Az.Cdn.private\Invoke-AzCdnSecretValidate_SecretExpanded'; + SecretViaIdentity = 'Az.Cdn.private\Invoke-AzCdnSecretValidate_SecretViaIdentity'; + SecretViaIdentityExpanded = 'Az.Cdn.private\Invoke-AzCdnSecretValidate_SecretViaIdentityExpanded'; + } + if (('Secret', 'SecretExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.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. +.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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.String +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnprofilessouri +#> +function New-AzCdnProfileSsoUri { +[OutputType([System.String])] +[CmdletBinding(DefaultParameterSetName='Generate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Generate', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the CDN profile which is unique within the resource group. + ${ProfileName}, + + [Parameter(ParameterSetName='Generate', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Generate')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GenerateViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Generate = 'Az.Cdn.private\New-AzCdnProfileSsoUri_Generate'; + GenerateViaIdentity = 'Az.Cdn.private\New-AzCdnProfileSsoUri_GenerateViaIdentity'; + } + if (('Generate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +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. +.Description +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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Link +https://docs.microsoft.com/powershell/module/az.cdn/new-azcdnprofile +#> +function New-AzCdnProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.String] + # Resource location. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Send and receive timeout on forwarding request to the origin. + # When timeout is reached, the request fails and returns. + ${OriginResponseTimeoutSecond}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.SkuName] + # Name of the pricing tier. + ${SkuName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + CreateExpanded = 'Az.Cdn.private\New-AzCdnProfile_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +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. +.Description +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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnprofile +#> +function Remove-AzCdnProfile { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzCdnProfile_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzCdnProfile_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} + +<# +.Synopsis +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. +.Description +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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azcdnprofile +#> +function Update-AzCdnProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Send and receive timeout on forwarding request to the origin. + # When timeout is reached, the request fails and returns. + ${OriginResponseTimeoutSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags]))] + [System.Collections.Hashtable] + # Profile tags + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + UpdateExpanded = 'Az.Cdn.private\Update-AzCdnProfile_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Cdn.private\Update-AzCdnProfile_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Cdn/internal/README.md b/src/Cdn/internal/README.md new file mode 100644 index 000000000000..f1874d0fdc12 --- /dev/null +++ b/src/Cdn/internal/README.md @@ -0,0 +1,14 @@ +# Internal +This directory contains a module to handle *internal only* cmdlets. Cmdlets that you **hide** in configuration are created here. For more information on hiding, see [cmdlet hiding](https://github.com/Azure/autorest.powershell/blob/main/docs/directives.md#cmdlet-hiding-exportation-suppression). The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation. + +## Info +- Modifiable: no +- Generated: all +- Committed: no +- Packaged: yes + +## Details +The `Az.Cdn.internal.psm1` file is generated to this folder. This module file handles the hidden cmdlets. These cmdlets will not be exported by `Az.Cdn`. Instead, this sub-module is imported by the `..\custom\Az.Cdn.custom.psm1` module, allowing you to use hidden cmdlets in your custom, exposed cmdlets. To call these cmdlets in your custom scripts, simply use [module-qualified calls](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_command_precedence?view=powershell-6#qualified-names). For example, `Az.Cdn.internal\Get-Example` would call an internal cmdlet named `Get-Example`. + +## Purpose +This allows you to include REST specifications for services that you *do not wish to expose from your module*, but simply want to call within custom cmdlets. For example, if you want to make a custom cmdlet that uses `Storage` services, you could include a simplified `Storage` REST specification that has only the operations you need. When you run the generator and build this module, note the generated `Storage` cmdlets. Then, in your readme configuration, use [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) on the `Storage` cmdlets and they will *only be exposed to the custom cmdlets* you want to write, and not be exported as part of `Az.Cdn`. diff --git a/src/Cdn/internal/Remove-AzCdnProfile.ps1 b/src/Cdn/internal/Remove-AzCdnProfile.ps1 new file mode 100644 index 000000000000..2542e0ae4e38 --- /dev/null +++ b/src/Cdn/internal/Remove-AzCdnProfile.ps1 @@ -0,0 +1,196 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +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. +.Description +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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +System.Boolean +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/remove-azcdnprofile +#> +function Remove-AzCdnProfile { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + Delete = 'Az.Cdn.private\Remove-AzCdnProfile_Delete'; + DeleteViaIdentity = 'Az.Cdn.private\Remove-AzCdnProfile_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Cdn/internal/Update-AzCdnProfile.ps1 b/src/Cdn/internal/Update-AzCdnProfile.ps1 new file mode 100644 index 000000000000..41d9b5d15d38 --- /dev/null +++ b/src/Cdn/internal/Update-AzCdnProfile.ps1 @@ -0,0 +1,202 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +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. +.Description +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. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile +.Notes +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. + [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. +.Link +https://docs.microsoft.com/powershell/module/az.cdn/update-azcdnprofile +#> +function Update-AzCdnProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfile])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('ProfileName')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [System.String] + # Name of the Resource group within the Azure subscription. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.ICdnIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [System.Int32] + # Send and receive timeout on forwarding request to the origin. + # When timeout is reached, the request fails and returns. + ${OriginResponseTimeoutSecond}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.IProfileUpdateParametersTags]))] + [System.Collections.Hashtable] + # Profile tags + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + UpdateExpanded = 'Az.Cdn.private\Update-AzCdnProfile_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Cdn.private\Update-AzCdnProfile_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Cdn/pack-module.ps1 b/src/Cdn/pack-module.ps1 new file mode 100644 index 000000000000..2f30ca3fffa0 --- /dev/null +++ b/src/Cdn/pack-module.ps1 @@ -0,0 +1,17 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +Write-Host -ForegroundColor Green 'Packing module...' +dotnet pack $PSScriptRoot --no-build /nologo +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/src/Cdn/run-module.ps1 b/src/Cdn/run-module.ps1 new file mode 100644 index 000000000000..f033aded1948 --- /dev/null +++ b/src/Cdn/run-module.ps1 @@ -0,0 +1,62 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated, [switch]$Code) +$ErrorActionPreference = 'Stop' + +if(-not $Isolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + return +} + +$isAzure = $true +if($isAzure) { + . (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts + # Load the latest version of Az.Accounts installed + Import-Module -Name Az.Accounts -RequiredVersion (Get-Module -Name Az.Accounts -ListAvailable | Sort-Object -Property Version -Descending)[0].Version +} + +$localModulesPath = Join-Path $PSScriptRoot 'generated\modules' +if(Test-Path -Path $localModulesPath) { + $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" +} + +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.Cdn.psd1') +$modulePath = $modulePsd1.FullName +$moduleName = $modulePsd1.BaseName + +function Prompt { + Write-Host -NoNewline -ForegroundColor Green "PS $(Get-Location)" + Write-Host -NoNewline -ForegroundColor Gray ' [' + Write-Host -NoNewline -ForegroundColor White -BackgroundColor DarkCyan $moduleName + ']> ' +} + +# where we would find the launch.json file +$vscodeDirectory = New-Item -ItemType Directory -Force -Path (Join-Path $PSScriptRoot '.vscode') +$launchJson = Join-Path $vscodeDirectory 'launch.json' + +# if there is a launch.json file, let's just assume -Code, and update the file +if(($Code) -or (test-Path $launchJson) ) { + $launchContent = '{ "version": "0.2.0", "configurations":[{ "name":"Attach to PowerShell", "type":"coreclr", "request":"attach", "processId":"' + ([System.Diagnostics.Process]::GetCurrentProcess().Id) + '", "justMyCode":false }] }' + Set-Content -Path $launchJson -Value $launchContent + if($Code) { + # only launch vscode if they say -code + code $PSScriptRoot + } +} + +Import-Module -Name $modulePath \ No newline at end of file diff --git a/src/Cdn/test-module.ps1 b/src/Cdn/test-module.ps1 new file mode 100644 index 000000000000..5a514b80a264 --- /dev/null +++ b/src/Cdn/test-module.ps1 @@ -0,0 +1,94 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName) +$ErrorActionPreference = 'Stop' + +if(-not $Isolated) +{ + Write-Host -ForegroundColor Green 'Creating isolated process...' + if ($PSBoundParameters.ContainsKey("TestName")) { + $PSBoundParameters["TestName"] = $PSBoundParameters["TestName"] -join "," + } + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + return +} + +# This is a workaround, since for string array parameter, pwsh -File will only take the first element +if ($PSBoundParameters.ContainsKey("TestName") -and ($TestName.count -eq 1) -and ($TestName[0].Contains(','))) { + $TestName = $TestName[0].Split(",") +} + +$ProgressPreference = 'SilentlyContinue' +$baseName = $PSScriptRoot.BaseName +$requireResourceModule = (($baseName -ne "Resources") -and ($Record.IsPresent -or $Live.IsPresent)) +. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule +. ("$PSScriptRoot\test\utils.ps1") + +if ($requireResourceModule) +{ + # Load the latest Az.Accounts installed + Import-Module -Name Az.Accounts -RequiredVersion (Get-Module -Name Az.Accounts -ListAvailable | Sort-Object -Property Version -Descending)[0].Version + $resourceModulePSD = Get-Item -Path (Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psd1') + Import-Module -Name $resourceModulePSD.FullName +} + +$localModulesPath = Join-Path $PSScriptRoot 'generated\modules' +if(Test-Path -Path $localModulesPath) +{ + $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" +} + +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.Cdn.psd1') +$modulePath = $modulePsd1.FullName +$moduleName = $modulePsd1.BaseName + +Import-Module -Name Pester +Import-Module -Name $modulePath + +$TestMode = 'playback' +$ExcludeTag = @("LiveOnly") +if($Live) +{ + $TestMode = 'live' + $ExcludeTag = @() +} +if($Record) +{ + $TestMode = 'record' +} +try +{ + if ($TestMode -ne 'playback') + { + setupEnv + } + $testFolder = Join-Path $PSScriptRoot 'test' + if ($null -ne $TestName) + { + Invoke-Pester -Script @{ Path = $testFolder } -TestName $TestName -ExcludeTag $ExcludeTag -EnableExit -OutputFile (Join-Path $testFolder "$moduleName-TestResults.xml") + } else + { + Invoke-Pester -Script @{ Path = $testFolder } -ExcludeTag $ExcludeTag -EnableExit -OutputFile (Join-Path $testFolder "$moduleName-TestResults.xml") + } +} Finally +{ + if ($TestMode -ne 'playback') + { + cleanupEnv + } +} + +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/src/Cdn/test/Clear-AzCdnEndpointContent.Tests.ps1 b/src/Cdn/test/Clear-AzCdnEndpointContent.Tests.ps1 new file mode 100644 index 000000000000..6c2c183a8644 --- /dev/null +++ b/src/Cdn/test/Clear-AzCdnEndpointContent.Tests.ps1 @@ -0,0 +1,189 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Clear-AzCdnEndpointContent')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Clear-AzCdnEndpointContent.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 'Clear-AzCdnEndpointContent' { + It 'PurgeExpanded' { + { + $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_Verizon"; + New-AzCdnProfile -SkuName $profileSku -Name $cdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -IsHttpAllowed -IsHttpsAllowed ` + -Location $location -Origin $origin -IsCompressionEnabled -ContentTypesToCompress "text/html","text/css" ` + -OriginHostHeader "www.bing.com" -OriginPath "/photos" -QueryStringCachingBehavior "IgnoreQueryString" + $contentPath = @("/movies/*","/pictures/pic1.jpg") + + # Purge content on endpoint should succeed + Clear-AzCdnEndpointContent -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -ContentPath $contentPath + # Purge content on non-existing endpoint should fail + { Clear-AzCdnEndpointContent -EndpointName "fakeEndpoint" -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -ContentPath $contentPath } | Should -Throw + # Purge content on endpoint with invalid content paths should fail + { Clear-AzCdnEndpointContent -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -ContentPath "invalidpath!" } | Should -Throw + # Purge content on stopped endpoint should fail + Stop-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName + { Clear-AzCdnEndpointContent -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -ContentPath $contentPath } | Should -Throw + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'Purge' { + { + $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_Verizon"; + New-AzCdnProfile -SkuName $profileSku -Name $cdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -IsHttpAllowed -IsHttpsAllowed ` + -Location $location -Origin $origin -IsCompressionEnabled -ContentTypesToCompress "text/html","text/css" ` + -OriginHostHeader "www.bing.com" -OriginPath "/photos" -QueryStringCachingBehavior "IgnoreQueryString" + $contentPath = @{ ContentPath = @("/movies/*","/pictures/pic1.jpg") } + + # Purge content on endpoint should succeed + Clear-AzCdnEndpointContent -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -ContentFilePath $contentPath + # Purge content on non-existing endpoint should fail + { Clear-AzCdnEndpointContent -EndpointName "fakeEndpoint" -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -ContentFilePath $contentPath } | Should -Throw + # Purge content on endpoint with invalid content paths should fail + { Clear-AzCdnEndpointContent -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -ContentFilePath @{ ContentPath = "invalidpath!" } } | Should -Throw + # Purge content on stopped endpoint should fail + Stop-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName + { Clear-AzCdnEndpointContent -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -ContentFilePath $contentPath } | Should -Throw + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'PurgeViaIdentityExpanded' { + { + $PSDefaultParameterValues['Disabled'] = $true + $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_Verizon"; + New-AzCdnProfile -SkuName $profileSku -Name $cdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -IsHttpAllowed -IsHttpsAllowed ` + -Location $location -Origin $origin -IsCompressionEnabled -ContentTypesToCompress "text/html","text/css" ` + -OriginHostHeader "www.bing.com" -OriginPath "/photos" -QueryStringCachingBehavior "IgnoreQueryString" + $contentPath = @("/movies/*","/pictures/pic1.jpg") + + # Purge content on endpoint should succeed + $endpoint = Get-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + $endpoint | Clear-AzCdnEndpointContent -ContentPath $contentPath + # Purge content on endpoint with invalid content paths should fail + { $endpoint | Clear-AzCdnEndpointContent -ContentPath "invalidpath!" } | Should -Throw + # Purge content on stopped endpoint should fail + Stop-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName + { $endpoint | Clear-AzCdnEndpointContent -ContentPath $contentPath } | Should -Throw + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'PurgeViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $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_Verizon"; + New-AzCdnProfile -SkuName $profileSku -Name $cdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -IsHttpAllowed -IsHttpsAllowed ` + -Location $location -Origin $origin -IsCompressionEnabled -ContentTypesToCompress "text/html","text/css" ` + -OriginHostHeader "www.bing.com" -OriginPath "/photos" -QueryStringCachingBehavior "IgnoreQueryString" + $contentPath = @{ ContentPath = @("/movies/*","/pictures/pic1.jpg") } + + # Purge content on endpoint should succeed + $endpoint = Get-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + $endpoint | Clear-AzCdnEndpointContent -ContentFilePath $contentPath + # Purge content on endpoint with invalid content paths should fail + { $endpoint | Clear-AzCdnEndpointContent -ContentFilePath @{ ContentPath = "invalidpath!" } } | Should -Throw + # Purge content on stopped endpoint should fail + Stop-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName + { $endpoint | Clear-AzCdnEndpointContent -ContentFilePath $contentPath } | Should -Throw + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Clear-AzFrontDoorCdnEndpointContent.Tests.ps1 b/src/Cdn/test/Clear-AzFrontDoorCdnEndpointContent.Tests.ps1 new file mode 100644 index 000000000000..2d90f5f58d23 --- /dev/null +++ b/src/Cdn/test/Clear-AzFrontDoorCdnEndpointContent.Tests.ps1 @@ -0,0 +1,125 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Clear-AzFrontDoorCdnEndpointContent')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Clear-AzFrontDoorCdnEndpointContent.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 'Clear-AzFrontDoorCdnEndpointContent' { + It 'PurgeExpanded' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + Clear-AzFrontDoorCdnEndpointContent -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -ContentPath "/a" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'Purge' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $afdPurgeParameters = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdPurgeParameters]::new() + $afdPurgeParameters.ContentPath = @("/a") + + Clear-AzFrontDoorCdnEndpointContent -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -Content $afdPurgeParameters + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'PurgeViaIdentityExpanded' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + Get-AzFrontdoorCdnEndpoint -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName ` + | Clear-AzFrontDoorCdnEndpointContent -ContentPath "/a" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'PurgeViaIdentity' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $afdPurgeParameters = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20210601.AfdPurgeParameters]::new() + $afdPurgeParameters.ContentPath = @("/a") + + Get-AzFrontdoorCdnEndpoint -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName ` + | Clear-AzFrontDoorCdnEndpointContent -Content $afdPurgeParameters + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Disable-AzCdnCustomDomainCustomHttps.Tests.ps1 b/src/Cdn/test/Disable-AzCdnCustomDomainCustomHttps.Tests.ps1 new file mode 100644 index 000000000000..b58ccad8a41b --- /dev/null +++ b/src/Cdn/test/Disable-AzCdnCustomDomainCustomHttps.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Disable-AzCdnCustomDomainCustomHttps')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Disable-AzCdnCustomDomainCustomHttps.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 'Disable-AzCdnCustomDomainCustomHttps' { + It 'Disable' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DisableViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Enable-AzCdnCustomDomainCustomHttps.Tests.ps1 b/src/Cdn/test/Enable-AzCdnCustomDomainCustomHttps.Tests.ps1 new file mode 100644 index 000000000000..64b4d05ffdbc --- /dev/null +++ b/src/Cdn/test/Enable-AzCdnCustomDomainCustomHttps.Tests.ps1 @@ -0,0 +1,100 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Enable-AzCdnCustomDomainCustomHttps')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Enable-AzCdnCustomDomainCustomHttps.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 'Enable-AzCdnCustomDomainCustomHttps' { + It 'Enable' { + { + $subId = "27cafca8-b9a4-4264-b399-45d0c9cca1ab" + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location -SubscriptionId $subId + + $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 -SubscriptionId $subId + + # Hard-coding host and endpoint names due to requirement for DNS CNAME + $endpointName = 'e-powershell-20220407-oigr9w' + $customDomainHostName = 'e-powershell-20220407-oigr9w.cdne2e.azfdtest.xyz' + $customDomainName = 'cd-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin -SubscriptionId $subId + New-AzCdnCustomDomain -EndpointName $endpointName -Name $customDomainName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -HostName $customDomainHostName -SubscriptionId $subId + $httpsParameter = New-AzCdnUserManagedHttpsParametersObject -CertificateSource "AzureKeyVault" ` + -CertificateSourceParameterResourceGroupName $ResourceGroupName -CertificateSourceParameterSecretName "wildcard-cdne2e-azfdtest-xyz" ` + -CertificateSourceParameterSubscriptionId $subId -CertificateSourceParameterVaultName "huaiyizkvtest" ` + -ProtocolType "ServerNameIndication" + $customDomain = Enable-AzCdnCustomDomainCustomHttps -CustomDomainName $customDomainName -EndpointName $endpointName ` + -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -CustomDomainHttpsParameter $httpsParameter -SubscriptionId $subId + + $customDomain.CustomHttpsProvisioningState | Should -Not -Be "Disabled" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -SubscriptionId $subId -NoWait + } + } | Should -Not -Throw + } + + It 'EnableViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $subId = "27cafca8-b9a4-4264-b399-45d0c9cca1ab" + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location -SubscriptionId $subId + + $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 -SubscriptionId $subId + + # Hard-coding host and endpoint names due to requirement for DNS CNAME + $endpointName = 'e-powershell-20220407-2clpwi' + $customDomainHostName = 'e-powershell-20220407-2clpwi.cdne2e.azfdtest.xyz' + $customDomainName = 'cd-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin -SubscriptionId $subId + $customDomain = New-AzCdnCustomDomain -EndpointName $endpointName -Name $customDomainName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -HostName $customDomainHostName -SubscriptionId $subId + $httpsParameter = New-AzCdnManagedHttpsParametersObject -CertificateSource "Cdn" -CertificateSourceParameterCertificateType "Dedicated" -ProtocolType "ServerNameIndication" + $customDomain = $customDomain | Enable-AzCdnCustomDomainCustomHttps -CustomDomainHttpsParameter $httpsParameter + + $customDomain.CustomHttpsProvisioningState | Should -Not -Be "Disabled" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -SubscriptionId $subId -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Get-AzCdnCustomDomain.Tests.ps1 b/src/Cdn/test/Get-AzCdnCustomDomain.Tests.ps1 new file mode 100644 index 000000000000..55bd5f0e4825 --- /dev/null +++ b/src/Cdn/test/Get-AzCdnCustomDomain.Tests.ps1 @@ -0,0 +1,134 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzCdnCustomDomain')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzCdnCustomDomain.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-AzCdnCustomDomain' { + It 'List' { + { + $subId = "27cafca8-b9a4-4264-b399-45d0c9cca1ab" + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location -SubscriptionId $subId + + $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 -SubscriptionId $subId + + # Hard-coding host and endpoint names due to requirement for DNS CNAME + $endpointName = 'e-20220407-cyzd8j' + $customDomainHostName = 'e-20220407-cyzd8j.ps.cdne2e.azfdtest.xyz' + $customDomainName = 'cd-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin -SubscriptionId $subId + New-AzCdnCustomDomain -EndpointName $endpointName -Name $customDomainName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -HostName $customDomainHostName -SubscriptionId $subId + $customDomains = Get-AzCdnCustomDomain -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -SubscriptionId $subId + + $customDomains.Count | Should -Be 1 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -SubscriptionId $subId -NoWait + } + } | Should -Not -Throw + } + + It 'Get' { + { + $subId = "27cafca8-b9a4-4264-b399-45d0c9cca1ab" + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location -SubscriptionId $subId + + $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 -SubscriptionId $subId + + # Hard-coding host and endpoint names due to requirement for DNS CNAME + $endpointName = 'e-20220407-k0eyx9' + $customDomainHostName = 'e-20220407-k0eyx9.ps.cdne2e.azfdtest.xyz' + $customDomainName = 'cd-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin -SubscriptionId $subId + New-AzCdnCustomDomain -EndpointName $endpointName -Name $customDomainName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -HostName $customDomainHostName -SubscriptionId $subId + $customDomain = Get-AzCdnCustomDomain -EndpointName $endpointName -Name $customDomainName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -SubscriptionId $subId + + $customDomain.Name | Should -Be $customDomainName + $customDomain.HostName | Should -Be $customDomainHostName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -SubscriptionId $subId -NoWait + } + } | Should -Not -Throw + } + + It 'GetViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $subId = "27cafca8-b9a4-4264-b399-45d0c9cca1ab" + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location -SubscriptionId $subId + + $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 -SubscriptionId $subId + + # Hard-coding host and endpoint names due to requirement for DNS CNAME + $endpointName = 'e-20220407-315rgw' + $customDomainHostName = 'e-20220407-315rgw.ps.cdne2e.azfdtest.xyz' + $customDomainName = 'cd-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin -SubscriptionId $subId + New-AzCdnCustomDomain -EndpointName $endpointName -Name $customDomainName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -HostName $customDomainHostName -SubscriptionId $subId + $customDomain = Get-AzCdnCustomDomain -EndpointName $endpointName -Name $customDomainName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -SubscriptionId $subId | Get-AzCdnCustomDomain + + $customDomain.Name | Should -Be $customDomainName + $customDomain.HostName | Should -Be $customDomainHostName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -SubscriptionId $subId -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Get-AzCdnEdgeNode.Tests.ps1 b/src/Cdn/test/Get-AzCdnEdgeNode.Tests.ps1 new file mode 100644 index 000000000000..ba0dc81949fa --- /dev/null +++ b/src/Cdn/test/Get-AzCdnEdgeNode.Tests.ps1 @@ -0,0 +1,48 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzCdnEdgeNode')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzCdnEdgeNode.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-AzCdnEdgeNode' { + It 'List' { + { + $minPrefixLength = 0; + $maxIpv4PrefixLength = 32; + $maxIpv6PrefixLength = 128; + $expectedEdgeNodeNames = @("Standard_Verizon", "Premium_Verizon", "Custom_Verizon") + $edgeNodes = Get-AzCdnEdgeNode + + $edgeNodes.Count | Should -Be 3 + foreach ($edgeNode in $edgeNodes) { + $edgeNode.Name | Should -BeIn $expectedEdgeNodeNames + $edgeNode.IpAddressGroup.Count | Should -BeGreaterThan 0 + foreach ($ipAddressGroup in $edgeNode.IpAddressGroup) { + $ipAddressGroup.DeliveryRegion | Should -Not -BeNullOrEmpty + $ipAddressGroup.Ipv4Address.Count | Should -BeGreaterThan 0 + foreach ($ipAddress in $ipAddressGroup.Ipv4Address) { + $ipAddress.BaseIpAddress | Should -Not -BeNullOrEmpty + $ipAddress.PrefixLength | Should -BeGreaterOrEqual $minPrefixLength + $ipAddress.PrefixLength | Should -BeLessOrEqual $maxIpv4PrefixLength + } + $ipAddressGroup.Ipv6Address.Count | Should -BeGreaterThan 0 + foreach ($ipAddress in $ipAddressGroup.Ipv6Address) { + $ipAddress.BaseIpAddress | Should -Not -BeNullOrEmpty + $ipAddress.PrefixLength | Should -BeGreaterOrEqual $minPrefixLength + $ipAddress.PrefixLength | Should -BeLessOrEqual $maxIpv6PrefixLength + } + } + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Get-AzCdnEndpoint.Tests.ps1 b/src/Cdn/test/Get-AzCdnEndpoint.Tests.ps1 new file mode 100644 index 000000000000..ff11efff97ac --- /dev/null +++ b/src/Cdn/test/Get-AzCdnEndpoint.Tests.ps1 @@ -0,0 +1,123 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzCdnEndpoint')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzCdnEndpoint.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-AzCdnEndpoint' { + 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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin + $endpoints = Get-AzCdnEndpoint -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + + $endpoints.Count | Should -BeGreaterOrEqual 1 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'Get' { + { + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin + $endpoint = Get-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + + $endpoint.Name | Should -Be $endpointName + $endpoint.Location | Should -Be $location + $endpoint.Origin.Name | Should -Be $origin.Name + $endpoint.Origin.HostName | Should -Be $origin.HostName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'GetViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin + $endpoint = Get-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName | Get-AzCdnEndpoint + + $endpoint.Name | Should -Be $endpointName + $endpoint.Location | Should -Be $location + $endpoint.Origin.Name | Should -Be $origin.Name + $endpoint.Origin.HostName | Should -Be $origin.HostName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Get-AzCdnEndpointResourceUsage.Tests.ps1 b/src/Cdn/test/Get-AzCdnEndpointResourceUsage.Tests.ps1 new file mode 100644 index 000000000000..1b09d9cc40a3 --- /dev/null +++ b/src/Cdn/test/Get-AzCdnEndpointResourceUsage.Tests.ps1 @@ -0,0 +1,72 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzCdnEndpointResourceUsage')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzCdnEndpointResourceUsage.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-AzCdnEndpointResourceUsage' { + 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_Akamai"; + New-AzCdnProfile -SkuName $profileSku -Name $cdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin + $endpointResourceUsages = Get-AzCdnEndpointResourceUsage -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + $geofilterUsage = $endpointResourceUsages | Where-Object -Property ResourceType -eq 'geofilter' + + $endpointResourceUsages.Count | Should -Be 3 + $geofilterUsage.Limit | Should -Be 25 + $geofilterUsage.CurrentValue | Should -Be 0 + + $geofilters = @( + @{ + RelativePath = "/mycar" + Action = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions]::Allow + CountryCode = "AU" + }, + @{ + RelativePath = "/mycars" + Action = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.GeoFilterActions]::Allow + CountryCode = "AU" + }) + Update-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -GeoFilter $geofilters + $endpointResourceUsages = Get-AzCdnEndpointResourceUsage -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + $geofilterUsage = $endpointResourceUsages | Where-Object -Property ResourceType -eq 'geofilter' + + $endpointResourceUsages.Count | Should -Be 3 + $geofilterUsage.Limit | Should -Be 25 + $geofilterUsage.CurrentValue | Should -Be 2 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Get-AzCdnOrigin.Tests.ps1 b/src/Cdn/test/Get-AzCdnOrigin.Tests.ps1 new file mode 100644 index 000000000000..4622304295f4 --- /dev/null +++ b/src/Cdn/test/Get-AzCdnOrigin.Tests.ps1 @@ -0,0 +1,131 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzCdnOrigin')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzCdnOrigin.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-AzCdnOrigin' { + 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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin + $origins = Get-AzCdnOrigin -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + + $origins.Count | Should -Be 1 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'Get' { + { + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $originName = "origin1" + $originHostName = "host1.hello.com" + $originHttpPort = 80 + $origin = @{ + Name = $originName + HostName = $originHostName + HttpPort = $originHttpPort + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin + $origin = Get-AzCdnOrigin -Name $originName -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + + $origin.Name | Should -Be $originName + $origin.HostName | Should -Be $originHostName + $origin.HttpPort | Should -Be $originHttpPort + $origin.HttpsPort | Should -Be $null + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'GetViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $originName = "origin1" + $originHostName = "host1.hello.com" + $originHttpPort = 80 + $origin = @{ + Name = $originName + HostName = $originHostName + HttpPort = $originHttpPort + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin + $origin = Get-AzCdnOrigin -Name $originName -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName | Get-AzCdnOrigin + + $origin.Name | Should -Be $originName + $origin.HostName | Should -Be $originHostName + $origin.HttpPort | Should -Be $originHttpPort + $origin.HttpsPort | Should -Be $null + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Get-AzCdnOriginGroup.Tests.ps1 b/src/Cdn/test/Get-AzCdnOriginGroup.Tests.ps1 new file mode 100644 index 000000000000..340a52086d13 --- /dev/null +++ b/src/Cdn/test/Get-AzCdnOriginGroup.Tests.ps1 @@ -0,0 +1,163 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzCdnOriginGroup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzCdnOriginGroup.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-AzCdnOriginGroup' { + It 'List' { + { + $subId = $env.SubscriptionId + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName)" + + $location = "westus" + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $originId = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origins/$($origin.Name)" + $healthProbeParametersObject = New-AzCdnHealthProbeParametersObject -ProbeIntervalInSecond 240 -ProbePath "/health.aspx" -ProbeProtocol "Https" -ProbeRequestType "GET" + $originGroup = @{ + Name = "originGroup1" + healthProbeSetting = $healthProbeParametersObject + Origin = @(@{ + Id = $originId + }) + } + $defaultOriginGroup = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origingroups/$($originGroup.Name)" + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location ` + -Origin $origin -OriginGroup $originGroup -DefaultOriginGroupId $defaultOriginGroup + $originGroups = Get-AzCdnOriginGroup -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + + $originGroups.Count | Should -Be 1 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'Get' { + { + $subId = $env.SubscriptionId + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName)" + + $location = "westus" + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $originId = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origins/$($origin.Name)" + $healthProbeParametersObject = New-AzCdnHealthProbeParametersObject -ProbeIntervalInSecond 240 -ProbePath "/health.aspx" -ProbeProtocol "Https" -ProbeRequestType "GET" + $originGroup = @{ + Name = "originGroup1" + healthProbeSetting = $healthProbeParametersObject + Origin = @(@{ + Id = $originId + }) + } + $defaultOriginGroup = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origingroups/$($originGroup.Name)" + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location ` + -Origin $origin -OriginGroup $originGroup -DefaultOriginGroupId $defaultOriginGroup + $endpointOriginGroup = Get-AzCdnOriginGroup -Name $originGroup.Name -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + + $endpointOriginGroup.Name | Should -Be $originGroup.Name + $endpointOriginGroup.HealthProbeSetting.ProbeIntervalInSecond | Should -Be $originGroup.HealthProbeSetting.ProbeIntervalInSecond + $endpointOriginGroup.HealthProbeSetting.ProbePath | Should -Be $originGroup.HealthProbeSetting.ProbePath + $endpointOriginGroup.HealthProbeSetting.ProbeProtocol | Should -Be $originGroup.HealthProbeSetting.ProbeProtocol + $endpointOriginGroup.HealthProbeSetting.ProbeRequestType | Should -Be $originGroup.HealthProbeSetting.ProbeRequestType + $endpointOriginGroup.Origin[0].Id | Should -Be $originGroup.Origin[0].Id + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'GetViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $subId = $env.SubscriptionId + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName)" + + $location = "westus" + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $originId = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origins/$($origin.Name)" + $healthProbeParametersObject = New-AzCdnHealthProbeParametersObject -ProbeIntervalInSecond 240 -ProbePath "/health.aspx" -ProbeProtocol "Https" -ProbeRequestType "GET" + $originGroup = @{ + Name = "originGroup1" + healthProbeSetting = $healthProbeParametersObject + Origin = @(@{ + Id = $originId + }) + } + $defaultOriginGroup = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origingroups/$($originGroup.Name)" + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location ` + -Origin $origin -OriginGroup $originGroup -DefaultOriginGroupId $defaultOriginGroup + $endpointOriginGroup = Get-AzCdnOriginGroup -Name $originGroup.Name -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName | Get-AzCdnOriginGroup + + $endpointOriginGroup.Name | Should -Be $originGroup.Name + $endpointOriginGroup.HealthProbeSetting.ProbeIntervalInSecond | Should -Be $originGroup.HealthProbeSetting.ProbeIntervalInSecond + $endpointOriginGroup.HealthProbeSetting.ProbePath | Should -Be $originGroup.HealthProbeSetting.ProbePath + $endpointOriginGroup.HealthProbeSetting.ProbeProtocol | Should -Be $originGroup.HealthProbeSetting.ProbeProtocol + $endpointOriginGroup.HealthProbeSetting.ProbeRequestType | Should -Be $originGroup.HealthProbeSetting.ProbeRequestType + $endpointOriginGroup.Origin[0].Id | Should -Be $originGroup.Origin[0].Id + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Get-AzCdnProfile.Tests.ps1 b/src/Cdn/test/Get-AzCdnProfile.Tests.ps1 new file mode 100644 index 000000000000..f53f356f0666 --- /dev/null +++ b/src/Cdn/test/Get-AzCdnProfile.Tests.ps1 @@ -0,0 +1,118 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzCdnProfile')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzCdnProfile.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-AzCdnProfile' { + 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 + + $cdnProfiles = Get-AzCdnProfile -ResourceGroupName $ResourceGroupName + + $cdnProfiles.Count | Should -BeGreaterOrEqual 1 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'Get' { + { + $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 + + $cdnProfile = Get-AzCdnProfile -ResourceGroupName $ResourceGroupName -Name $cdnProfileName + + $cdnProfile.Name | Should -Be $cdnProfileName + $cdnProfile.SkuName | Should -Be $profileSku + $cdnProfile.Location | Should -Be "Global" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'List1' { + { + $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 + + $cdnProfiles = Get-AzCdnProfile -ResourceGroupName $ResourceGroupName + + $cdnProfiles.Count | Should -Be 1 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'GetViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $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 + + $cdnProfile = Get-AzCdnProfile -ResourceGroupName $ResourceGroupName -Name $cdnProfileName | Get-AzCdnProfile + + $cdnProfile.Name | Should -Be $cdnProfileName + $cdnProfile.SkuName | Should -Be $profileSku + $cdnProfile.Location | Should -Be "Global" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Get-AzCdnProfileResourceUsage.Tests.ps1 b/src/Cdn/test/Get-AzCdnProfileResourceUsage.Tests.ps1 new file mode 100644 index 000000000000..874867064ea4 --- /dev/null +++ b/src/Cdn/test/Get-AzCdnProfileResourceUsage.Tests.ps1 @@ -0,0 +1,41 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzCdnProfileResourceUsage')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzCdnProfileResourceUsage.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-AzCdnProfileResourceUsage' { + 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/test/Get-AzCdnProfileSupportedOptimizationType.Tests.ps1 b/src/Cdn/test/Get-AzCdnProfileSupportedOptimizationType.Tests.ps1 new file mode 100644 index 000000000000..1623e768a2a1 --- /dev/null +++ b/src/Cdn/test/Get-AzCdnProfileSupportedOptimizationType.Tests.ps1 @@ -0,0 +1,41 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzCdnProfileSupportedOptimizationType')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzCdnProfileSupportedOptimizationType.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-AzCdnProfileSupportedOptimizationType' { + 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/test/Get-AzCdnSubscriptionResourceUsage.Tests.ps1 b/src/Cdn/test/Get-AzCdnSubscriptionResourceUsage.Tests.ps1 new file mode 100644 index 000000000000..0122d0714738 --- /dev/null +++ b/src/Cdn/test/Get-AzCdnSubscriptionResourceUsage.Tests.ps1 @@ -0,0 +1,24 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzCdnSubscriptionResourceUsage')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzCdnSubscriptionResourceUsage.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-AzCdnSubscriptionResourceUsage' { + It 'List' { + { + $subscriptionResourceUsage = Get-AzCdnSubscriptionResourceUsage + $subscriptionResourceUsage.Count | Should -Be 2 + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Get-AzFrontDoorCdnCustomDomain.Tests.ps1 b/src/Cdn/test/Get-AzFrontDoorCdnCustomDomain.Tests.ps1 new file mode 100644 index 000000000000..7e46745834ef --- /dev/null +++ b/src/Cdn/test/Get-AzFrontDoorCdnCustomDomain.Tests.ps1 @@ -0,0 +1,123 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzFrontDoorCdnCustomDomain')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzFrontDoorCdnCustomDomain.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-AzFrontDoorCdnCustomDomain' { + 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 + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $secretName = "se-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use secretName : $($secretName)" + + $parameter = New-AzFrontDoorCdnSecretCustomerCertificateParametersObject -UseLatestVersion $true -SubjectAlternativeName @() -Type "CustomerCertificate"` + -SecretSourceId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourceGroups/powershelltest/providers/Microsoft.KeyVault/vaults/cdn-ps-kv/certificates/cdndevcn2022-0329" + + $secret = New-AzFrontDoorCdnSecret -Name $secretName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + $secretResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $secret.Id + $tlsSetting = New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject -CertificateType "CustomerCertificate" -MinimumTlsVersion "TLS12" -Secret $secretResoure + + $customDomainName = "domain-" + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnCustomDomain -CustomDomainName $customDomainName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -HostName "getdomain.dev.cdn.azure.cn" -TlsSetting $tlsSetting + + $customDomains = Get-AzFrontDoorCdnCustomDomain -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName + $customDomains.Count | Should -Be 1 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'Get' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $secretName = "se-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use secretName : $($secretName)" + + $parameter = New-AzFrontDoorCdnSecretCustomerCertificateParametersObject -UseLatestVersion $true -SubjectAlternativeName @() -Type "CustomerCertificate"` + -SecretSourceId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourceGroups/powershelltest/providers/Microsoft.KeyVault/vaults/cdn-ps-kv/certificates/cdndevcn2022-0329" + + $secret = New-AzFrontDoorCdnSecret -Name $secretName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + $secretResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $secret.Id + $tlsSetting = New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject -CertificateType "CustomerCertificate" -MinimumTlsVersion "TLS12" -Secret $secretResoure + + $customDomainName = "domain-" + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnCustomDomain -CustomDomainName $customDomainName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -HostName "getdomain.dev.cdn.azure.cn" -TlsSetting $tlsSetting + + $customDomain = Get-AzFrontDoorCdnCustomDomain -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -CustomDomainName $customDomainName + $customDomain.Name | Should -Be $customDomainName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'GetViaIdentity' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $secretName = "se-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use secretName : $($secretName)" + + $parameter = New-AzFrontDoorCdnSecretCustomerCertificateParametersObject -UseLatestVersion $true -SubjectAlternativeName @() -Type "CustomerCertificate"` + -SecretSourceId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourceGroups/powershelltest/providers/Microsoft.KeyVault/vaults/cdn-ps-kv/certificates/cdndevcn2022-0329" + + $secret = New-AzFrontDoorCdnSecret -Name $secretName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + $secretResoure = New-AzCdnResourceReferenceObject -Id $secret.Id + $tlsSetting = New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject -CertificateType "CustomerCertificate" -MinimumTlsVersion "TLS12" -Secret $secretResoure + + $customDomainName = "domain-" + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnCustomDomain -CustomDomainName $customDomainName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -HostName "getdomain.dev.cdn.azure.cn" -TlsSetting $tlsSetting + + $customDomain = Get-AzFrontDoorCdnCustomDomain -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -CustomDomainName $customDomainName | Get-AzFrontDoorCdnCustomDomain + $customDomain.Name | Should -Be $customDomainName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Get-AzFrontDoorCdnEndpoint.Tests.ps1 b/src/Cdn/test/Get-AzFrontDoorCdnEndpoint.Tests.ps1 new file mode 100644 index 000000000000..c6e3e5e61834 --- /dev/null +++ b/src/Cdn/test/Get-AzFrontDoorCdnEndpoint.Tests.ps1 @@ -0,0 +1,99 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzFrontDoorCdnEndpoint')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzFrontDoorCdnEndpoint.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-AzFrontDoorCdnEndpoint' { + 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 + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpoints = Get-AzFrontdoorCdnEndpoint -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName + $endpoints.Count | Should -Be 1 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'Get' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpoint = Get-AzFrontdoorCdnEndpoint -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName + + $endpoint.Name | Should -Be $endpointName + #$endpoint.ProfileName | Should -Be $frontDoorCdnProfileName + $endpoint.Location | Should -Be "Global" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'GetViaIdentity' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpoint = Get-AzFrontdoorCdnEndpoint -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName | Get-AzFrontdoorCdnEndpoint + + $endpoint.Name | Should -Be $endpointName + #$endpoint.ProfileName | Should -Be $frontDoorCdnProfileName + $endpoint.Location | Should -Be "Global" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Get-AzFrontDoorCdnEndpointResourceUsage.Tests.ps1 b/src/Cdn/test/Get-AzFrontDoorCdnEndpointResourceUsage.Tests.ps1 new file mode 100644 index 000000000000..9868b8cde9ef --- /dev/null +++ b/src/Cdn/test/Get-AzFrontDoorCdnEndpointResourceUsage.Tests.ps1 @@ -0,0 +1,44 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzFrontDoorCdnEndpointResourceUsage')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzFrontDoorCdnEndpointResourceUsage.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-AzFrontDoorCdnEndpointResourceUsage' { + 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 + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointUsage = Get-AzFrontDoorCdnEndpointResourceUsage -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName + $endpointUsage | Should -not -BeNullOrEmpty + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Get-AzFrontDoorCdnOrigin.Tests.ps1 b/src/Cdn/test/Get-AzFrontDoorCdnOrigin.Tests.ps1 new file mode 100644 index 000000000000..558dbe8ec458 --- /dev/null +++ b/src/Cdn/test/Get-AzFrontDoorCdnOrigin.Tests.ps1 @@ -0,0 +1,129 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzFrontDoorCdnOrigin')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzFrontDoorCdnOrigin.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-AzFrontDoorCdnOrigin' { + 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 + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + + $hostName = "en.wikipedia.org"; + $originName = 'ori' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName ` + -OriginName $originName -OriginHostHeader $hostName -HostName $hostName ` + -HttpPort 80 -HttpsPort 443 -Priority 1 -Weight 1000 + + $origins = Get-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + $origins.Count | Should -Be 1 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'Get' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + + $hostName = "en.wikipedia.org"; + $originName = 'ori' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName ` + -OriginName $originName -OriginHostHeader $hostName -HostName $hostName ` + -HttpPort 80 -HttpsPort 443 -Priority 1 -Weight 1000 + + $origin = Get-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName -OriginName $originName + $origin.Name | Should -Be $originName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'GetViaIdentity' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + + $hostName = "en.wikipedia.org"; + $originName = 'ori' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName ` + -OriginName $originName -OriginHostHeader $hostName -HostName $hostName ` + -HttpPort 80 -HttpsPort 443 -Priority 1 -Weight 1000 + + $origin = Get-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName -OriginName $originName | Get-AzFrontDoorCdnOrigin + $origin.Name | Should -Be $originName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Get-AzFrontDoorCdnOriginGroup.Tests.ps1 b/src/Cdn/test/Get-AzFrontDoorCdnOriginGroup.Tests.ps1 new file mode 100644 index 000000000000..d2e5ea57eaea --- /dev/null +++ b/src/Cdn/test/Get-AzFrontDoorCdnOriginGroup.Tests.ps1 @@ -0,0 +1,108 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzFrontDoorCdnOriginGroup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzFrontDoorCdnOriginGroup.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-AzFrontDoorCdnOriginGroup' { + 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 + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + + New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + $originGroups = Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName + $originGroups.Count | Should -Be 1 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'Get' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + + New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + $originGroup = Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + $originGroup.Name | Should -Be $originGroupName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'GetViaIdentity' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + + New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + $originGroup = Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName | Get-AzFrontDoorCdnOriginGroup + $originGroup.Name | Should -Be $originGroupName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Get-AzFrontDoorCdnOriginGroupResourceUsage.Tests.ps1 b/src/Cdn/test/Get-AzFrontDoorCdnOriginGroupResourceUsage.Tests.ps1 new file mode 100644 index 000000000000..d3fd414c68e4 --- /dev/null +++ b/src/Cdn/test/Get-AzFrontDoorCdnOriginGroupResourceUsage.Tests.ps1 @@ -0,0 +1,48 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzFrontDoorCdnOriginGroupResourceUsage')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzFrontDoorCdnOriginGroupResourceUsage.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-AzFrontDoorCdnOriginGroupResourceUsage' { + 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 + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + $originGroupUsage = Get-AzFrontDoorCdnOriginGroupResourceUsage -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + $originGroupUsage | Should -not -BeNullOrEmpty + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Get-AzFrontDoorCdnProfile.Tests.ps1 b/src/Cdn/test/Get-AzFrontDoorCdnProfile.Tests.ps1 new file mode 100644 index 000000000000..b2db36ce2681 --- /dev/null +++ b/src/Cdn/test/Get-AzFrontDoorCdnProfile.Tests.ps1 @@ -0,0 +1,112 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzFrontDoorCdnProfile')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzFrontDoorCdnProfile.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-AzFrontDoorCdnProfile' { + 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 + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $frontDoorCdnProfiles = Get-AzFrontDoorCdnProfile -ResourceGroupName $ResourceGroupName + + $frontDoorCdnProfiles.Count | Should -BeGreaterOrEqual 1 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'Get' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $frontDoorCdnProfile = Get-AzFrontDoorCdnProfile -ResourceGroupName $ResourceGroupName -Name $frontDoorCdnProfileName + + $frontDoorCdnProfile.Name | Should -Be $frontDoorCdnProfileName + $frontDoorCdnProfile.SkuName | Should -Be $profileSku + $frontDoorCdnProfile.Location | Should -Be "Global" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'List1' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $frontDoorCdnProfiles = Get-AzFrontDoorCdnProfile -ResourceGroupName $ResourceGroupName + + $frontDoorCdnProfiles.Count | Should -Be 1 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'GetViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $frontDoorCdnProfile = Get-AzFrontDoorCdnProfile -ResourceGroupName $ResourceGroupName -Name $frontDoorCdnProfileName | Get-AzFrontDoorCdnProfile + + $frontDoorCdnProfile.Name | Should -Be $frontDoorCdnProfileName + $frontDoorCdnProfile.SkuName | Should -Be $profileSku + $frontDoorCdnProfile.Location | Should -Be "Global" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Get-AzFrontDoorCdnProfileResourceUsage.Tests.ps1 b/src/Cdn/test/Get-AzFrontDoorCdnProfileResourceUsage.Tests.ps1 new file mode 100644 index 000000000000..03715a41f04d --- /dev/null +++ b/src/Cdn/test/Get-AzFrontDoorCdnProfileResourceUsage.Tests.ps1 @@ -0,0 +1,40 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzFrontDoorCdnProfileResourceUsage')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzFrontDoorCdnProfileResourceUsage.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-AzFrontDoorCdnProfileResourceUsage' { + 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 + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $frontDoorCdnProfileUsage = Get-AzFrontDoorCdnProfileResourceUsage -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName + $frontDoorCdnProfileUsage | Should -not -BeNullOrEmpty + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Get-AzFrontDoorCdnRoute.Tests.ps1 b/src/Cdn/test/Get-AzFrontDoorCdnRoute.Tests.ps1 new file mode 100644 index 000000000000..4bf2bddb2654 --- /dev/null +++ b/src/Cdn/test/Get-AzFrontDoorCdnRoute.Tests.ps1 @@ -0,0 +1,216 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzFrontDoorCdnRoute')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzFrontDoorCdnRoute.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-AzFrontDoorCdnRoute' { + 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 + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + $endpoint = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + $originGroup = New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + + $hostName = "en.wikipedia.org"; + $originName = 'ori' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName ` + -OriginName $originName -OriginHostHeader $hostName -HostName $hostName ` + -HttpPort 80 -HttpsPort 443 -Priority 1 -Weight 1000 + + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use rulesetName : $($rulesetName)" + $ruleSet = New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $uriConditon = New-AzFrontDoorCdnRuleRequestUriConditionObject -Name "RequestUri" -ParameterOperator "Any" + $conditions = @( + $uriConditon + ); + $overrideAction = New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name "RouteConfigurationOverride" ` + -CacheConfigurationQueryStringCachingBehavior "IgnoreSpecifiedQueryStrings" ` + -CacheConfigurationQueryParameter "a=test" ` + -CacheConfigurationIsCompressionEnabled "Enabled" ` + -CacheConfigurationCacheBehavior "HonorOrigin" + $actions = @($overrideAction); + + $ruleName = 'r' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use ruleName : $($ruleName)" + New-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName ` + -Action $actions -Condition $conditions + + $ruleSetResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $ruleSet.Id + + $routeName = 'route' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnRoute -Name $routeName -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -OriginGroupId $originGroup.Id -RuleSet @($ruleSetResoure) -PatternsToMatch "/*" -LinkToDefaultDomain "Enabled" -EnabledState "Enabled" + + $routes = Get-AzFrontDoorCdnRoute -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName + $routes.Count | Should -Be 1 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'Get' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + $endpoint = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + $originGroup = New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + + $hostName = "en.wikipedia.org"; + $originName = 'ori' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName ` + -OriginName $originName -OriginHostHeader $hostName -HostName $hostName ` + -HttpPort 80 -HttpsPort 443 -Priority 1 -Weight 1000 + + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use rulesetName : $($rulesetName)" + $ruleSet = New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $uriConditon = New-AzFrontDoorCdnRuleRequestUriConditionObject -Name "RequestUri" -ParameterOperator "Any" + $conditions = @( + $uriConditon + ); + $overrideAction = New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name "RouteConfigurationOverride" ` + -CacheConfigurationQueryStringCachingBehavior "IgnoreSpecifiedQueryStrings" ` + -CacheConfigurationQueryParameter "a=test" ` + -CacheConfigurationIsCompressionEnabled "Enabled" ` + -CacheConfigurationCacheBehavior "HonorOrigin" + $actions = @($overrideAction); + + $ruleName = 'r' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use ruleName : $($ruleName)" + New-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName ` + -Action $actions -Condition $conditions + + $ruleSetResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $ruleSet.Id + + $routeName = 'route' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnRoute -Name $routeName -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -OriginGroupId $originGroup.Id -RuleSet @($ruleSetResoure) -PatternsToMatch "/*" -LinkToDefaultDomain "Enabled" -EnabledState "Enabled" + + $route = Get-AzFrontDoorCdnRoute -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName -Name $routeName + $route.Name | Should -Be $routeName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'GetViaIdentity' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + $endpoint = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + $originGroup = New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + + $hostName = "en.wikipedia.org"; + $originName = 'ori' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName ` + -OriginName $originName -OriginHostHeader $hostName -HostName $hostName ` + -HttpPort 80 -HttpsPort 443 -Priority 1 -Weight 1000 + + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use rulesetName : $($rulesetName)" + $ruleSet = New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $uriConditon = New-AzFrontDoorCdnRuleRequestUriConditionObject -Name "RequestUri" -ParameterOperator "Any" + $conditions = @( + $uriConditon + ); + $overrideAction = New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name "RouteConfigurationOverride" ` + -CacheConfigurationQueryStringCachingBehavior "IgnoreSpecifiedQueryStrings" ` + -CacheConfigurationQueryParameter "a=test" ` + -CacheConfigurationIsCompressionEnabled "Enabled" ` + -CacheConfigurationCacheBehavior "HonorOrigin" + $actions = @($overrideAction); + + $ruleName = 'r' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use ruleName : $($ruleName)" + New-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName ` + -Action $actions -Condition $conditions + + $ruleSetResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $ruleSet.Id + + $routeName = 'route' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnRoute -Name $routeName -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -OriginGroupId $originGroup.Id -RuleSet @($ruleSetResoure) -PatternsToMatch "/*" -LinkToDefaultDomain "Enabled" -EnabledState "Enabled" + + $route = Get-AzFrontDoorCdnRoute -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName -Name $routeName | Get-AzFrontDoorCdnRoute + $route.Name | Should -Be $routeName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Get-AzFrontDoorCdnRule.Tests.ps1 b/src/Cdn/test/Get-AzFrontDoorCdnRule.Tests.ps1 new file mode 100644 index 000000000000..f2f49f38a405 --- /dev/null +++ b/src/Cdn/test/Get-AzFrontDoorCdnRule.Tests.ps1 @@ -0,0 +1,129 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzFrontDoorCdnRule')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzFrontDoorCdnRule.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-AzFrontDoorCdnRule' { + 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 + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use rulesetName : $($rulesetName)" + New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $uriConditon = New-AzFrontDoorCdnRuleRequestUriConditionObject -Name "RequestUri" -ParameterOperator "Any" + $conditions = @( + $uriConditon + ); + $overrideAction = New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name "RouteConfigurationOverride" ` + -CacheConfigurationQueryStringCachingBehavior "IgnoreSpecifiedQueryStrings" ` + -CacheConfigurationQueryParameter "a=test" ` + -CacheConfigurationIsCompressionEnabled "Enabled" ` + -CacheConfigurationCacheBehavior "HonorOrigin" + $actions = @($overrideAction); + + $ruleName = 'r' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use ruleName : $($ruleName)" + New-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName ` + -Action $actions -Condition $conditions + + $rules = Get-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName + $rules.Count | Should -Be 1 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'Get' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use rulesetName : $($rulesetName)" + New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $uriConditon = New-AzFrontDoorCdnRuleRequestUriConditionObject -Name "RequestUri" -ParameterOperator "Any" + $conditions = @( + $uriConditon + ); + $overrideAction = New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name "RouteConfigurationOverride" ` + -CacheConfigurationQueryStringCachingBehavior "IgnoreSpecifiedQueryStrings" ` + -CacheConfigurationQueryParameter "a=test" ` + -CacheConfigurationIsCompressionEnabled "Enabled" ` + -CacheConfigurationCacheBehavior "HonorOrigin" + $actions = @($overrideAction); + + $ruleName = 'r' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use ruleName : $($ruleName)" + New-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName ` + -Action $actions -Condition $conditions + + $rule = Get-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName + $rule.Name | Should -Be $ruleName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'GetViaIdentity' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use rulesetName : $($rulesetName)" + New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $uriConditon = New-AzFrontDoorCdnRuleRequestUriConditionObject -Name "RequestUri" -ParameterOperator "Any" + $conditions = @( + $uriConditon + ); + $overrideAction = New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name "RouteConfigurationOverride" ` + -CacheConfigurationQueryStringCachingBehavior "IgnoreSpecifiedQueryStrings" ` + -CacheConfigurationQueryParameter "a=test" ` + -CacheConfigurationIsCompressionEnabled "Enabled" ` + -CacheConfigurationCacheBehavior "HonorOrigin" + $actions = @($overrideAction); + + $ruleName = 'r' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use ruleName : $($ruleName)" + New-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName ` + -Action $actions -Condition $conditions + + $rule = Get-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName | Get-AzFrontDoorCdnRule + $rule.Name | Should -Be $ruleName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Get-AzFrontDoorCdnRuleSet.Tests.ps1 b/src/Cdn/test/Get-AzFrontDoorCdnRuleSet.Tests.ps1 new file mode 100644 index 000000000000..a788a14f13c8 --- /dev/null +++ b/src/Cdn/test/Get-AzFrontDoorCdnRuleSet.Tests.ps1 @@ -0,0 +1,87 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzFrontDoorCdnRuleSet')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzFrontDoorCdnRuleSet.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-AzFrontDoorCdnRuleSet' { + 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 + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $rulesets = Get-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName + $rulesets.Count | Should -Be 1 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'Get' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $ruleset = Get-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $ruleset.Name | Should -Be $rulesetName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'GetViaIdentity' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $ruleset = Get-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName | Get-AzFrontDoorCdnRuleSet + $ruleset.Name | Should -Be $rulesetName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Get-AzFrontDoorCdnRuleSetResourceUsage.Tests.ps1 b/src/Cdn/test/Get-AzFrontDoorCdnRuleSetResourceUsage.Tests.ps1 new file mode 100644 index 000000000000..5bb131b896e7 --- /dev/null +++ b/src/Cdn/test/Get-AzFrontDoorCdnRuleSetResourceUsage.Tests.ps1 @@ -0,0 +1,42 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzFrontDoorCdnRuleSetResourceUsage')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzFrontDoorCdnRuleSetResourceUsage.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-AzFrontDoorCdnRuleSetResourceUsage' { + 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 + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $rulesetUsage = Get-AzFrontDoorCdnRuleSetResourceUsage -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName + $rulesetUsage | Should -not -BeNullOrEmpty + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Get-AzFrontDoorCdnSecret.Tests.ps1 b/src/Cdn/test/Get-AzFrontDoorCdnSecret.Tests.ps1 new file mode 100644 index 000000000000..fbec229101ae --- /dev/null +++ b/src/Cdn/test/Get-AzFrontDoorCdnSecret.Tests.ps1 @@ -0,0 +1,107 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzFrontDoorCdnSecret')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzFrontDoorCdnSecret.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-AzFrontDoorCdnSecret' { + 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 + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $secretName = "se-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use secretName : $($secretName)" + + $parameter = New-AzFrontDoorCdnSecretCustomerCertificateParametersObject -UseLatestVersion $true -SubjectAlternativeName @() -Type "CustomerCertificate"` + -SecretSourceId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourceGroups/powershelltest/providers/Microsoft.KeyVault/vaults/cdn-ps-kv/certificates/cdndevcn2022-0329" + + New-AzFrontDoorCdnSecret -Name $secretName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + + $rules = Get-AzFrontDoorCdnSecret -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName + $rules.Count | Should -Be 1 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'Get' { + { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $secretName = "se-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use secretName : $($secretName)" + + $parameter = New-AzFrontDoorCdnSecretCustomerCertificateParametersObject -UseLatestVersion $true -SubjectAlternativeName @() -Type "CustomerCertificate"` + -SecretSourceId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourceGroups/powershelltest/providers/Microsoft.KeyVault/vaults/cdn-ps-kv/certificates/cdndevcn2022-0329" + + New-AzFrontDoorCdnSecret -Name $secretName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + + $secret = Get-AzFrontDoorCdnSecret -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $secretName + $secret.Name | Should -Be $secretName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'GetViaIdentity' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $secretName = "se-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use secretName : $($secretName)" + + $parameter = New-AzFrontDoorCdnSecretCustomerCertificateParametersObject -UseLatestVersion $true -SubjectAlternativeName @() -Type "CustomerCertificate"` + -SecretSourceId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourceGroups/powershelltest/providers/Microsoft.KeyVault/vaults/cdn-ps-kv/certificates/cdndevcn2022-0329" + + New-AzFrontDoorCdnSecret -Name $secretName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + + $secret = Get-AzFrontDoorCdnSecret -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $secretName + $secret.Name | Should -Be $secretName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Get-AzFrontDoorCdnSecurityPolicy.Tests.ps1 b/src/Cdn/test/Get-AzFrontDoorCdnSecurityPolicy.Tests.ps1 new file mode 100644 index 000000000000..b04ca2ff1eb6 --- /dev/null +++ b/src/Cdn/test/Get-AzFrontDoorCdnSecurityPolicy.Tests.ps1 @@ -0,0 +1,122 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzFrontDoorCdnSecurityPolicy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzFrontDoorCdnSecurityPolicy.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-AzFrontDoorCdnSecurityPolicy' { + 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 + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + $frontDoorCdnProfile = New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + $endpoint = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $policyName = "pol-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use policyName : $($policyName)" + + $association = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject -PatternsToMatch @("/*") -Domain @(@{"Id"=$($endpoint.Id)}) + $parameter = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject -Association $association ` + -WafPolicyId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourcegroups/powershelltest/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/powershelltestwaf" + + New-AzFrontDoorCdnSecurityPolicy -Name $policyName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + + $policies = Get-AzFrontDoorCdnSecurityPolicy -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName + $policies.Count | Should -Be 1 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'Get' { + { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + $frontDoorCdnProfile = New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + $endpoint = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $policyName = "pol-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use policyName : $($policyName)" + + $association = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject -PatternsToMatch @("/*") -Domain @(@{"Id"=$($endpoint.Id)}) + $parameter = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject -Association $association ` + -WafPolicyId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourcegroups/powershelltest/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/powershelltestwaf" + + New-AzFrontDoorCdnSecurityPolicy -Name $policyName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + + $policy = Get-AzFrontDoorCdnSecurityPolicy -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $policyName + $policy.Name | Should -Be $policyName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'GetViaIdentity' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + $frontDoorCdnProfile = New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + $endpoint = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $policyName = "pol-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use policyName : $($policyName)" + + $association = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject -PatternsToMatch @("/*") -Domain @(@{"Id"=$($endpoint.Id)}) + $parameter = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject -Association $association ` + -WafPolicyId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourcegroups/powershelltest/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/powershelltestwaf" + + New-AzFrontDoorCdnSecurityPolicy -Name $policyName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + + $policy = Get-AzFrontDoorCdnSecurityPolicy -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $policyName | Get-AzFrontDoorCdnSecurityPolicy + $policy.Name | Should -Be $policyName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Import-AzCdnEndpointContent.Tests.ps1 b/src/Cdn/test/Import-AzCdnEndpointContent.Tests.ps1 new file mode 100644 index 000000000000..df06b0a5d168 --- /dev/null +++ b/src/Cdn/test/Import-AzCdnEndpointContent.Tests.ps1 @@ -0,0 +1,189 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Import-AzCdnEndpointContent')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Import-AzCdnEndpointContent.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 'Import-AzCdnEndpointContent' { + It 'LoadExpanded' { + { + $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_Verizon"; + New-AzCdnProfile -SkuName $profileSku -Name $cdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -IsHttpAllowed -IsHttpsAllowed ` + -Location $location -Origin $origin -IsCompressionEnabled -ContentTypesToCompress "text/html","text/css" ` + -OriginHostHeader "www.bing.com" -OriginPath "/photos" -QueryStringCachingBehavior "IgnoreQueryString" + $contentPath = @("/movies/amazing.mp4","/pictures/pic1.jpg") + + # Load content on endpoint should succeed + Import-AzCdnEndpointContent -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -ContentPath $contentPath + # Load content on non-existing endpoint should fail + { Import-AzCdnEndpointContent -EndpointName "fakeEndpoint" -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -ContentPath $contentPath } | Should -Throw + # Load content on endpoint with invalid content paths should fail + { Import-AzCdnEndpointContent -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -ContentPath "/movies/*" } | Should -Throw + # Load content on stopped endpoint should fail + Stop-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName + { Import-AzCdnEndpointContent -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -ContentPath $contentPath } | Should -Throw + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'Load' { + { + $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_Verizon"; + New-AzCdnProfile -SkuName $profileSku -Name $cdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -IsHttpAllowed -IsHttpsAllowed ` + -Location $location -Origin $origin -IsCompressionEnabled -ContentTypesToCompress "text/html","text/css" ` + -OriginHostHeader "www.bing.com" -OriginPath "/photos" -QueryStringCachingBehavior "IgnoreQueryString" + $contentPath = @{ ContentPath = @("/movies/amazing.mp4","/pictures/pic1.jpg") } + + # Load content on endpoint should succeed + Import-AzCdnEndpointContent -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -ContentFilePath $contentPath + # Load content on non-existing endpoint should fail + { Import-AzCdnEndpointContent -EndpointName "fakeEndpoint" -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -ContentFilePath $contentPath } | Should -Throw + # Load content on endpoint with invalid content paths should fail + { Import-AzCdnEndpointContent -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -ContentFilePath @{ ContentPath = "/movies/*" } } | Should -Throw + # Load content on stopped endpoint should fail + Stop-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName + { Import-AzCdnEndpointContent -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -ContentFilePath $contentPath } | Should -Throw + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'LoadViaIdentityExpanded' { + { + $PSDefaultParameterValues['Disabled'] = $true + $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_Verizon"; + New-AzCdnProfile -SkuName $profileSku -Name $cdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -IsHttpAllowed -IsHttpsAllowed ` + -Location $location -Origin $origin -IsCompressionEnabled -ContentTypesToCompress "text/html","text/css" ` + -OriginHostHeader "www.bing.com" -OriginPath "/photos" -QueryStringCachingBehavior "IgnoreQueryString" + $contentPath = @("/movies/amazing.mp4","/pictures/pic1.jpg") + + # Load content on endpoint should succeed + $endpoint = Get-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + $endpoint | Import-AzCdnEndpointContent -ContentPath $contentPath + # Load content on endpoint with invalid content paths should fail + { $endpoint | Import-AzCdnEndpointContent -ContentPath "/movies/*" } | Should -Throw + # Load content on stopped endpoint should fail + Stop-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName + { $endpoint | Import-AzCdnEndpointContent -ContentPath $contentPath } | Should -Throw + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'LoadViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $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_Verizon"; + New-AzCdnProfile -SkuName $profileSku -Name $cdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -IsHttpAllowed -IsHttpsAllowed ` + -Location $location -Origin $origin -IsCompressionEnabled -ContentTypesToCompress "text/html","text/css" ` + -OriginHostHeader "www.bing.com" -OriginPath "/photos" -QueryStringCachingBehavior "IgnoreQueryString" + $contentPath = @{ ContentPath = @("/movies/amazing.mp4","/pictures/pic1.jpg") } + + # Load content on endpoint should succeed + $endpoint = Get-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + $endpoint | Import-AzCdnEndpointContent -ContentFilePath $contentPath + # Load content on endpoint with invalid content paths should fail + { $endpoint | Import-AzCdnEndpointContent -ContentFilePath @{ ContentPath = "/movies/*" } } | Should -Throw + # Load content on stopped endpoint should fail + Stop-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName + { $endpoint | Import-AzCdnEndpointContent -ContentFilePath $contentPath } | Should -Throw + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnCustomDomain.Tests.ps1 b/src/Cdn/test/New-AzCdnCustomDomain.Tests.ps1 new file mode 100644 index 000000000000..45710d92976f --- /dev/null +++ b/src/Cdn/test/New-AzCdnCustomDomain.Tests.ps1 @@ -0,0 +1,55 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnCustomDomain')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnCustomDomain.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-AzCdnCustomDomain' { + It 'CreateExpanded' { + { + $subId = "27cafca8-b9a4-4264-b399-45d0c9cca1ab" + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location -SubscriptionId $subId + + $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 -SubscriptionId $subId + + # Hard-coding host and endpoint names due to requirement for DNS CNAME + $endpointName = 'e-20220407-52wg49' + $customDomainHostName = 'e-20220407-52wg49.ps.cdne2e.azfdtest.xyz' + $customDomainName = 'cd-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin -SubscriptionId $subId + $customDomain = New-AzCdnCustomDomain -EndpointName $endpointName -Name $customDomainName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -HostName $customDomainHostName -SubscriptionId $subId + + $customDomain.Name | Should -Be $customDomainName + $customDomain.HostName | Should -Be $customDomainHostName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -SubscriptionId $subId -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnDeliveryRuleCookiesConditionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnDeliveryRuleCookiesConditionObject.Tests.ps1 new file mode 100644 index 000000000000..73d274242487 --- /dev/null +++ b/src/Cdn/test/New-AzCdnDeliveryRuleCookiesConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnDeliveryRuleCookiesConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnDeliveryRuleCookiesConditionObject.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-AzCdnDeliveryRuleCookiesConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnDeliveryRuleHttpVersionConditionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnDeliveryRuleHttpVersionConditionObject.Tests.ps1 new file mode 100644 index 000000000000..11970148bac6 --- /dev/null +++ b/src/Cdn/test/New-AzCdnDeliveryRuleHttpVersionConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnDeliveryRuleHttpVersionConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnDeliveryRuleHttpVersionConditionObject.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-AzCdnDeliveryRuleHttpVersionConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnDeliveryRuleIsDeviceConditionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnDeliveryRuleIsDeviceConditionObject.Tests.ps1 new file mode 100644 index 000000000000..7e899f7b0612 --- /dev/null +++ b/src/Cdn/test/New-AzCdnDeliveryRuleIsDeviceConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnDeliveryRuleIsDeviceConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnDeliveryRuleIsDeviceConditionObject.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-AzCdnDeliveryRuleIsDeviceConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnDeliveryRuleObject.Tests.ps1 b/src/Cdn/test/New-AzCdnDeliveryRuleObject.Tests.ps1 new file mode 100644 index 000000000000..2e6a20fe9c70 --- /dev/null +++ b/src/Cdn/test/New-AzCdnDeliveryRuleObject.Tests.ps1 @@ -0,0 +1,67 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnDeliveryRuleObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnDeliveryRuleObject.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-AzCdnDeliveryRuleObject' { + It '__AllParameterSets' { + { + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + $cond1 = New-AzCdnDeliveryRuleIsDeviceConditionObject -Name "IsDevice" -ParameterMatchValue "Desktop" + $action1 = New-AzCdnUrlRewriteActionObject -Name "UrlRewrite" -ParameterDestination "/def" -ParameterSourcePattern "/abc" -ParameterPreserveUnmatchedPath $true + $action2 = New-AzCdnDeliveryRuleCacheKeyQueryStringActionObject -Name "CacheKeyQueryString" -ParameterQueryStringBehavior "ExcludeAll" -ParameterQueryParameter "abc,def" + $action3 = New-AzCdnDeliveryRuleCacheKeyQueryStringActionObject -Name "CacheKeyQueryString" -ParameterQueryStringBehavior "IncludeAll" + $redirect = New-AzCdnUrlRedirectActionObject -Name "UrlRedirect" -ParameterRedirectType "Found" -ParameterDestinationProtocol "MatchRequest" + $rule0 = New-AzCdnDeliveryRuleObject -Name "EmptyCondition" -Action $redirect,$action3 -Order 0 + $rule1 = New-AzCdnDeliveryRuleObject -Name "Rule1" -Action $action1,$action2 -Condition $cond1 -Order 1 + $deliverypolicy = @($rule0,$rule1) + + $endpoint = New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin -DeliveryPolicyRule $deliverypolicy + + $endpoint.DeliveryPolicyRule.Count | Should -Be 2 + + $endpointName2 = 'e-' + (RandomString -allChars $false -len 6); + $action = New-AzCdnDeliveryRuleResponseHeaderActionObject -Name "ModifyResponseHeader" -ParameterHeaderAction "Append" -ParameterHeaderName "Access-Control-Allow-Origin" -ParameterValue "*" + $condition = New-AzCdnDeliveryRuleUrlPathConditionObject -Name "UrlPath" -ParameterOperator "Contains" -ParameterMatchValue "abc" + $newRule = New-AzCdnDeliveryRuleObject -Name "Rule1" -Condition $condition -Action $action -Order 1 + $deliverypolicy = @($newRule) + + $endpoint = New-AzCdnEndpoint -Name $endpointName2 -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin -DeliveryPolicyRule $deliverypolicy + + $endpoint.DeliveryPolicyRule.Count | Should -Be 1 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnDeliveryRulePostArgsConditionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnDeliveryRulePostArgsConditionObject.Tests.ps1 new file mode 100644 index 000000000000..04eb98e77541 --- /dev/null +++ b/src/Cdn/test/New-AzCdnDeliveryRulePostArgsConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnDeliveryRulePostArgsConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnDeliveryRulePostArgsConditionObject.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-AzCdnDeliveryRulePostArgsConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnDeliveryRuleQueryStringConditionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnDeliveryRuleQueryStringConditionObject.Tests.ps1 new file mode 100644 index 000000000000..05cf89724baf --- /dev/null +++ b/src/Cdn/test/New-AzCdnDeliveryRuleQueryStringConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnDeliveryRuleQueryStringConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnDeliveryRuleQueryStringConditionObject.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-AzCdnDeliveryRuleQueryStringConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnDeliveryRuleRemoteAddressConditionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnDeliveryRuleRemoteAddressConditionObject.Tests.ps1 new file mode 100644 index 000000000000..aaae42f3e0bd --- /dev/null +++ b/src/Cdn/test/New-AzCdnDeliveryRuleRemoteAddressConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnDeliveryRuleRemoteAddressConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnDeliveryRuleRemoteAddressConditionObject.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-AzCdnDeliveryRuleRemoteAddressConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnDeliveryRuleRequestBodyConditionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnDeliveryRuleRequestBodyConditionObject.Tests.ps1 new file mode 100644 index 000000000000..e331fb0e171c --- /dev/null +++ b/src/Cdn/test/New-AzCdnDeliveryRuleRequestBodyConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnDeliveryRuleRequestBodyConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnDeliveryRuleRequestBodyConditionObject.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-AzCdnDeliveryRuleRequestBodyConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnDeliveryRuleRequestHeaderActionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnDeliveryRuleRequestHeaderActionObject.Tests.ps1 new file mode 100644 index 000000000000..33994529d715 --- /dev/null +++ b/src/Cdn/test/New-AzCdnDeliveryRuleRequestHeaderActionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnDeliveryRuleRequestHeaderActionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnDeliveryRuleRequestHeaderActionObject.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-AzCdnDeliveryRuleRequestHeaderActionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnDeliveryRuleRequestHeaderConditionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnDeliveryRuleRequestHeaderConditionObject.Tests.ps1 new file mode 100644 index 000000000000..639af3964bb5 --- /dev/null +++ b/src/Cdn/test/New-AzCdnDeliveryRuleRequestHeaderConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnDeliveryRuleRequestHeaderConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnDeliveryRuleRequestHeaderConditionObject.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-AzCdnDeliveryRuleRequestHeaderConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnDeliveryRuleRequestMethodConditionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnDeliveryRuleRequestMethodConditionObject.Tests.ps1 new file mode 100644 index 000000000000..383f227d1498 --- /dev/null +++ b/src/Cdn/test/New-AzCdnDeliveryRuleRequestMethodConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnDeliveryRuleRequestMethodConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnDeliveryRuleRequestMethodConditionObject.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-AzCdnDeliveryRuleRequestMethodConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnDeliveryRuleRequestSchemeConditionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnDeliveryRuleRequestSchemeConditionObject.Tests.ps1 new file mode 100644 index 000000000000..7973863a54ef --- /dev/null +++ b/src/Cdn/test/New-AzCdnDeliveryRuleRequestSchemeConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnDeliveryRuleRequestSchemeConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnDeliveryRuleRequestSchemeConditionObject.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-AzCdnDeliveryRuleRequestSchemeConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnDeliveryRuleRequestUriConditionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnDeliveryRuleRequestUriConditionObject.Tests.ps1 new file mode 100644 index 000000000000..e33403a17ce5 --- /dev/null +++ b/src/Cdn/test/New-AzCdnDeliveryRuleRequestUriConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnDeliveryRuleRequestUriConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnDeliveryRuleRequestUriConditionObject.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-AzCdnDeliveryRuleRequestUriConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnDeliveryRuleResponseHeaderActionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnDeliveryRuleResponseHeaderActionObject.Tests.ps1 new file mode 100644 index 000000000000..9e03b83eea1f --- /dev/null +++ b/src/Cdn/test/New-AzCdnDeliveryRuleResponseHeaderActionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnDeliveryRuleResponseHeaderActionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnDeliveryRuleResponseHeaderActionObject.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-AzCdnDeliveryRuleResponseHeaderActionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.Tests.ps1 new file mode 100644 index 000000000000..cdcbc1dc14cd --- /dev/null +++ b/src/Cdn/test/New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnDeliveryRuleUrlFileExtensionConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnDeliveryRuleUrlFileExtensionConditionObject.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-AzCdnDeliveryRuleUrlFileExtensionConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnDeliveryRuleUrlFileNameConditionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnDeliveryRuleUrlFileNameConditionObject.Tests.ps1 new file mode 100644 index 000000000000..33597efa1f88 --- /dev/null +++ b/src/Cdn/test/New-AzCdnDeliveryRuleUrlFileNameConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnDeliveryRuleUrlFileNameConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnDeliveryRuleUrlFileNameConditionObject.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-AzCdnDeliveryRuleUrlFileNameConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnDeliveryRuleUrlPathConditionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnDeliveryRuleUrlPathConditionObject.Tests.ps1 new file mode 100644 index 000000000000..4b7963d85f62 --- /dev/null +++ b/src/Cdn/test/New-AzCdnDeliveryRuleUrlPathConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnDeliveryRuleUrlPathConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnDeliveryRuleUrlPathConditionObject.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-AzCdnDeliveryRuleUrlPathConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnEndpoint.Tests.ps1 b/src/Cdn/test/New-AzCdnEndpoint.Tests.ps1 new file mode 100644 index 000000000000..6cf13e414085 --- /dev/null +++ b/src/Cdn/test/New-AzCdnEndpoint.Tests.ps1 @@ -0,0 +1,52 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnEndpoint')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnEndpoint.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-AzCdnEndpoint' { + It 'CreateExpanded' { + { + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + $endpoint = New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin + + $endpoint.Name | Should -Be $endpointName + $endpoint.Location | Should -Be $location + $endpoint.Origin.Name | Should -Be $origin.Name + $endpoint.Origin.HostName | Should -Be $origin.HostName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnHealthProbeParametersObject.Tests.ps1 b/src/Cdn/test/New-AzCdnHealthProbeParametersObject.Tests.ps1 new file mode 100644 index 000000000000..3fffd8573ed7 --- /dev/null +++ b/src/Cdn/test/New-AzCdnHealthProbeParametersObject.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnHealthProbeParametersObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnHealthProbeParametersObject.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-AzCdnHealthProbeParametersObject' { + It '__AllParameterSets' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnManagedHttpsParametersObject.Tests.ps1 b/src/Cdn/test/New-AzCdnManagedHttpsParametersObject.Tests.ps1 new file mode 100644 index 000000000000..70f453549207 --- /dev/null +++ b/src/Cdn/test/New-AzCdnManagedHttpsParametersObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnManagedHttpsParametersObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnManagedHttpsParametersObject.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-AzCdnManagedHttpsParametersObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnOrigin.Tests.ps1 b/src/Cdn/test/New-AzCdnOrigin.Tests.ps1 new file mode 100644 index 000000000000..f35bbf151afd --- /dev/null +++ b/src/Cdn/test/New-AzCdnOrigin.Tests.ps1 @@ -0,0 +1,66 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnOrigin')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnOrigin.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-AzCdnOrigin' { + It 'CreateExpanded' { + { + $subId = $env.SubscriptionId + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName)" + + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + $originId = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origins/$($origin.Name)" + $originGroup = @{ + Name = "originGroup1" + HealthProbeSettingProbeIntervalInSecond = 240 + HealthProbeSettingProbePath = "/health.aspx" + HealthProbeSettingProbeProtocol = "Https" + HealthProbeSettingProbeRequestType = "GET" + Origin = @(@{ + Id = $originId + }) + } + $defaultOriginGroup = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origingroups/$($originGroup.Name)" + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location ` + -Origin $origin -OriginGroup $originGroup -DefaultOriginGroupId $defaultOriginGroup + + $origin = New-AzCdnOrigin -Name "origin2" -HostName "host2.hello.com" -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + + $origin.Name | Should -Be "origin2" + $origin.HostName | Should -Be "host2.hello.com" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnOriginGroup.Tests.ps1 b/src/Cdn/test/New-AzCdnOriginGroup.Tests.ps1 new file mode 100644 index 000000000000..b5aa4e9fca80 --- /dev/null +++ b/src/Cdn/test/New-AzCdnOriginGroup.Tests.ps1 @@ -0,0 +1,78 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnOriginGroup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnOriginGroup.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-AzCdnOriginGroup' { + It 'CreateExpanded' { + { + $subId = $env.SubscriptionId + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName)" + + $location = "westus" + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $originId = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origins/$($origin.Name)" + $healthProbeParametersObject = New-AzCdnHealthProbeParametersObject -ProbeIntervalInSecond 240 -ProbePath "/health.aspx" -ProbeProtocol "Https" -ProbeRequestType "GET" + $originGroup = @{ + Name = "originGroup1" + healthProbeSetting = $healthProbeParametersObject + Origin = @(@{ + Id = $originId + }) + } + $defaultOriginGroup = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origingroups/$($originGroup.Name)" + $createdEndpoint = New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location ` + -Origin $origin -OriginGroup $originGroup -DefaultOriginGroupId $defaultOriginGroup + + $originGroupName2 = "originGroup2" + $probeInterval2 = 120 + $probePath2 = "/check-health.aspx" + $probeProtocol2 = "Http" + $probeRequestType2 = "HEAD" + $healthProbeParametersObject2 = New-AzCdnHealthProbeParametersObject -ProbeIntervalInSecond $probeInterval2 ` + -ProbePath $probePath2 -ProbeProtocol $probeProtocol2 -ProbeRequestType $probeRequestType2 + + $createdOriginGroup = New-AzCdnOriginGroup -EndpointName $endpointName -Name $originGroupName2 -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName ` + -HealthProbeSetting $healthProbeParametersObject2 -Origin @(@{ Id = $originId }) + + $createdEndpoint.DefaultOriginGroupId | Should -Be $defaultOriginGroup + $createdOriginGroup.Name | Should -Be $originGroupName2 + $createdOriginGroup.HealthProbeSetting.ProbeIntervalInSecond | Should -Be $probeInterval2 + $createdOriginGroup.HealthProbeSetting.ProbePath | Should -Be $probePath2 + $createdOriginGroup.HealthProbeSetting.ProbeProtocol | Should -Be $probeProtocol2 + $createdOriginGroup.HealthProbeSetting.ProbeRequestType | Should -Be $probeRequestType2 + $createdOriginGroup.Origin[0].Id | Should -Be $originId + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnProfile.Tests.ps1 b/src/Cdn/test/New-AzCdnProfile.Tests.ps1 new file mode 100644 index 000000000000..ff517743b7c2 --- /dev/null +++ b/src/Cdn/test/New-AzCdnProfile.Tests.ps1 @@ -0,0 +1,39 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnProfile')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnProfile.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-AzCdnProfile' { + It 'CreateExpanded' { + $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"; + $frontDoorCdnProfile = New-AzCdnProfile -SkuName $profileSku -Name $cdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $frontDoorCdnProfile.Name | Should -Be $cdnProfileName + $frontDoorCdnProfile.SkuName | Should -Be $profileSku + $frontDoorCdnProfile.Location | Should -Be "Global" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/New-AzCdnResourceReferenceObject.Tests.ps1 b/src/Cdn/test/New-AzCdnResourceReferenceObject.Tests.ps1 new file mode 100644 index 000000000000..d9223b3774f7 --- /dev/null +++ b/src/Cdn/test/New-AzCdnResourceReferenceObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnResourceReferenceObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnResourceReferenceObject.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-AzCdnResourceReferenceObject' { + It '__AllParameterSets' { + { + New-AzCdnResourceReferenceObject -Id "Id" + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.Tests.ps1 b/src/Cdn/test/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.Tests.ps1 new file mode 100644 index 000000000000..7b3324b7a25d --- /dev/null +++ b/src/Cdn/test/New-AzCdnResponseBasedOriginErrorDetectionParametersObject.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnResponseBasedOriginErrorDetectionParametersObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnResponseBasedOriginErrorDetectionParametersObject.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-AzCdnResponseBasedOriginErrorDetectionParametersObject' { + It '__AllParameterSets' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnUrlRedirectActionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnUrlRedirectActionObject.Tests.ps1 new file mode 100644 index 000000000000..73229303b41a --- /dev/null +++ b/src/Cdn/test/New-AzCdnUrlRedirectActionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnUrlRedirectActionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnUrlRedirectActionObject.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-AzCdnUrlRedirectActionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnUrlRewriteActionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnUrlRewriteActionObject.Tests.ps1 new file mode 100644 index 000000000000..5a2c23eee93d --- /dev/null +++ b/src/Cdn/test/New-AzCdnUrlRewriteActionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnUrlRewriteActionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnUrlRewriteActionObject.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-AzCdnUrlRewriteActionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnUrlSigningActionObject.Tests.ps1 b/src/Cdn/test/New-AzCdnUrlSigningActionObject.Tests.ps1 new file mode 100644 index 000000000000..f4a9e2af9b74 --- /dev/null +++ b/src/Cdn/test/New-AzCdnUrlSigningActionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnUrlSigningActionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnUrlSigningActionObject.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-AzCdnUrlSigningActionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzCdnUserManagedHttpsParametersObject.Tests.ps1 b/src/Cdn/test/New-AzCdnUserManagedHttpsParametersObject.Tests.ps1 new file mode 100644 index 000000000000..5bb0b6aa24a2 --- /dev/null +++ b/src/Cdn/test/New-AzCdnUserManagedHttpsParametersObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzCdnUserManagedHttpsParametersObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzCdnUserManagedHttpsParametersObject.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-AzCdnUserManagedHttpsParametersObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnCustomDomain.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnCustomDomain.Tests.ps1 new file mode 100644 index 000000000000..a08e355cdee8 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnCustomDomain.Tests.ps1 @@ -0,0 +1,51 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnCustomDomain')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnCustomDomain.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-AzFrontDoorCdnCustomDomain' { + It 'CreateExpanded' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $secretName = "se-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use secretName : $($secretName)" + + $parameter = New-AzFrontDoorCdnSecretCustomerCertificateParametersObject -UseLatestVersion $true -SubjectAlternativeName @() -Type "CustomerCertificate"` + -SecretSourceId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourceGroups/powershelltest/providers/Microsoft.KeyVault/vaults/cdn-ps-kv/certificates/cdndevcn2022-0329" + + $secret = New-AzFrontDoorCdnSecret -Name $secretName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + Write-Host -ForegroundColor Green "Use secret id : $($secret.Id)" + $secretResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $secret.Id + $tlsSetting = New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject -CertificateType "CustomerCertificate" -MinimumTlsVersion "TLS12" -Secret $secretResoure + + $customDomainName = "domain-" + (RandomString -allChars $false -len 6); + $hostName = "pstestnew.dev.cdn.azure.cn" + New-AzFrontDoorCdnCustomDomain -CustomDomainName $customDomainName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -HostName $hostName -TlsSetting $tlsSetting + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.Tests.ps1 new file mode 100644 index 000000000000..fbfda184107c --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject.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-AzFrontDoorCdnCustomDomainTlsSettingParametersObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnEndpoint.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnEndpoint.Tests.ps1 new file mode 100644 index 000000000000..02dbb582f431 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnEndpoint.Tests.ps1 @@ -0,0 +1,47 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnEndpoint')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnEndpoint.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-AzFrontDoorCdnEndpoint' { + It 'CreateExpanded' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + $frontDoorCdnProfile = New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $frontDoorCdnProfile.Name | Should -Be $frontDoorCdnProfileName + $frontDoorCdnProfile.SkuName | Should -Be $profileSku + $frontDoorCdnProfile.Location | Should -Be "Global" + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + $endpoint = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpoint.Name | Should -Be $endpointName + #$endpoint.ProfileName | Should -Be $frontDoorCdnProfileName + $endpoint.Location | Should -Be "Global" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnOrigin.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnOrigin.Tests.ps1 new file mode 100644 index 000000000000..5b4f3cdb4397 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnOrigin.Tests.ps1 @@ -0,0 +1,51 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnOrigin')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnOrigin.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-AzFrontDoorCdnOrigin' { + It 'CreateExpanded' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + + $hostName = "en.wikipedia.org"; + $originName = 'ori' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName ` + -OriginName $originName -OriginHostHeader $hostName -HostName $hostName ` + -HttpPort 80 -HttpsPort 443 -Priority 1 -Weight 1000 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnOriginGroup.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnOriginGroup.Tests.ps1 new file mode 100644 index 000000000000..2abaf648ece4 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnOriginGroup.Tests.ps1 @@ -0,0 +1,45 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnOriginGroup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnOriginGroup.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-AzFrontDoorCdnOriginGroup' { + It 'CreateExpanded' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + + New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.Tests.ps1 new file mode 100644 index 000000000000..62867020f22d --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject.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-AzFrontDoorCdnOriginGroupHealthProbeSettingObject' { + It '__AllParameterSets' -skip { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.Tests.ps1 new file mode 100644 index 000000000000..0dd6be415dc8 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject.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-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject' { + It '__AllParameterSets' -skip { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnProfile.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnProfile.Tests.ps1 new file mode 100644 index 000000000000..673dc2eb1622 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnProfile.Tests.ps1 @@ -0,0 +1,39 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnProfile')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnProfile.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-AzFrontDoorCdnProfile' { + It 'CreateExpanded' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + $frontDoorCdnProfile = New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $frontDoorCdnProfile.Name | Should -Be $frontDoorCdnProfileName + $frontDoorCdnProfile.SkuName | Should -Be $profileSku + $frontDoorCdnProfile.Location | Should -Be "Global" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnResourceReferenceObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnResourceReferenceObject.Tests.ps1 new file mode 100644 index 000000000000..b32ce1e2a403 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnResourceReferenceObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnResourceReferenceObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnResourceReferenceObject.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-AzFrontDoorCdnResourceReferenceObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRoute.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRoute.Tests.ps1 new file mode 100644 index 000000000000..3366e802dc71 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRoute.Tests.ps1 @@ -0,0 +1,80 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRoute')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRoute.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-AzFrontDoorCdnRoute' { + It 'CreateExpanded' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + $endpoint = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + $originGroup = New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + + $hostName = "en.wikipedia.org"; + $originName = 'ori' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName ` + -OriginName $originName -OriginHostHeader $hostName -HostName $hostName ` + -HttpPort 80 -HttpsPort 443 -Priority 1 -Weight 1000 + + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use rulesetName : $($rulesetName)" + $ruleSet = New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $uriConditon = New-AzFrontDoorCdnRuleRequestUriConditionObject -Name "RequestUri" -ParameterOperator "Any" + $conditions = @( + $uriConditon + ); + $overrideAction = New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name "RouteConfigurationOverride" ` + -CacheConfigurationQueryStringCachingBehavior "IgnoreSpecifiedQueryStrings" ` + -CacheConfigurationQueryParameter "a=test" ` + -CacheConfigurationIsCompressionEnabled "Enabled" ` + -CacheConfigurationCacheBehavior "HonorOrigin" + $actions = @($overrideAction); + + $ruleName = 'r' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use ruleName : $($ruleName)" + New-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName ` + -Action $actions -Condition $conditions + + $ruleSetResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $ruleSet.Id + + $routeName = 'route' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnRoute -Name $routeName -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -OriginGroupId $originGroup.Id -RuleSet @($ruleSetResoure) -PatternsToMatch "/*" -LinkToDefaultDomain "Enabled" -EnabledState "Enabled" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRule.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRule.Tests.ps1 new file mode 100644 index 000000000000..4eade55acf31 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRule.Tests.ps1 @@ -0,0 +1,51 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRule')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRule.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-AzFrontDoorCdnRule' { + It 'CreateExpanded' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use rulesetName : $($rulesetName)" + New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $uriConditon = New-AzFrontDoorCdnRuleRequestUriConditionObject -Name "RequestUri" -ParameterOperator "Any" + $conditions = @( + $uriConditon + ); + $overrideAction = New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name "RouteConfigurationOverride" ` + -CacheConfigurationQueryStringCachingBehavior "IgnoreSpecifiedQueryStrings" ` + -CacheConfigurationQueryParameter "a=test" ` + -CacheConfigurationIsCompressionEnabled "Enabled" ` + -CacheConfigurationCacheBehavior "HonorOrigin" + $actions = @($overrideAction); + + $ruleName = 'r' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use ruleName : $($ruleName)" + New-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName ` + -Action $actions -Condition $conditions + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleClientPortConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleClientPortConditionObject.Tests.ps1 new file mode 100644 index 000000000000..f1fcd3e5b5f6 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleClientPortConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleClientPortConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleClientPortConditionObject.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-AzFrontDoorCdnRuleClientPortConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleCookiesConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleCookiesConditionObject.Tests.ps1 new file mode 100644 index 000000000000..65fa16eed0d6 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleCookiesConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleCookiesConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleCookiesConditionObject.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-AzFrontDoorCdnRuleCookiesConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleHostNameConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleHostNameConditionObject.Tests.ps1 new file mode 100644 index 000000000000..de10a43ee673 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleHostNameConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleHostNameConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleHostNameConditionObject.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-AzFrontDoorCdnRuleHostNameConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleHttpVersionConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleHttpVersionConditionObject.Tests.ps1 new file mode 100644 index 000000000000..429a1bbc6b2e --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleHttpVersionConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleHttpVersionConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleHttpVersionConditionObject.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-AzFrontDoorCdnRuleHttpVersionConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleIsDeviceConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleIsDeviceConditionObject.Tests.ps1 new file mode 100644 index 000000000000..82e7f330d91c --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleIsDeviceConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleIsDeviceConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleIsDeviceConditionObject.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-AzFrontDoorCdnRuleIsDeviceConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRulePostArgsConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRulePostArgsConditionObject.Tests.ps1 new file mode 100644 index 000000000000..6348f459d4b2 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRulePostArgsConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRulePostArgsConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRulePostArgsConditionObject.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-AzFrontDoorCdnRulePostArgsConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleQueryStringConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleQueryStringConditionObject.Tests.ps1 new file mode 100644 index 000000000000..9d0d46dff196 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleQueryStringConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleQueryStringConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleQueryStringConditionObject.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-AzFrontDoorCdnRuleQueryStringConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.Tests.ps1 new file mode 100644 index 000000000000..03d57fde3867 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleRemoteAddressConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleRemoteAddressConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleRemoteAddressConditionObject.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-AzFrontDoorCdnRuleRemoteAddressConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleRequestBodyConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleRequestBodyConditionObject.Tests.ps1 new file mode 100644 index 000000000000..f7469f38a3a2 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleRequestBodyConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleRequestBodyConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleRequestBodyConditionObject.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-AzFrontDoorCdnRuleRequestBodyConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleRequestHeaderActionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleRequestHeaderActionObject.Tests.ps1 new file mode 100644 index 000000000000..6b9dc257af96 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleRequestHeaderActionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleRequestHeaderActionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleRequestHeaderActionObject.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-AzFrontDoorCdnRuleRequestHeaderActionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.Tests.ps1 new file mode 100644 index 000000000000..dc8150b2180e --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleRequestHeaderConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleRequestHeaderConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleRequestHeaderConditionObject.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-AzFrontDoorCdnRuleRequestHeaderConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleRequestMethodConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleRequestMethodConditionObject.Tests.ps1 new file mode 100644 index 000000000000..f7719d1c1522 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleRequestMethodConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleRequestMethodConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleRequestMethodConditionObject.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-AzFrontDoorCdnRuleRequestMethodConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.Tests.ps1 new file mode 100644 index 000000000000..a804c9e926d3 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleRequestSchemeConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleRequestSchemeConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleRequestSchemeConditionObject.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-AzFrontDoorCdnRuleRequestSchemeConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleRequestUriConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleRequestUriConditionObject.Tests.ps1 new file mode 100644 index 000000000000..2836cae50d55 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleRequestUriConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleRequestUriConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleRequestUriConditionObject.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-AzFrontDoorCdnRuleRequestUriConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleResponseHeaderActionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleResponseHeaderActionObject.Tests.ps1 new file mode 100644 index 000000000000..478f932bbec2 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleResponseHeaderActionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleResponseHeaderActionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleResponseHeaderActionObject.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-AzFrontDoorCdnRuleResponseHeaderActionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.Tests.ps1 new file mode 100644 index 000000000000..eb79d5660497 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject.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-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleServerPortConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleServerPortConditionObject.Tests.ps1 new file mode 100644 index 000000000000..d51c41a9b69f --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleServerPortConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleServerPortConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleServerPortConditionObject.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-AzFrontDoorCdnRuleServerPortConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleSet.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleSet.Tests.ps1 new file mode 100644 index 000000000000..087bcc78d57a --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleSet.Tests.ps1 @@ -0,0 +1,38 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleSet')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleSet.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-AzFrontDoorCdnRuleSet' { + It 'Create' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleSocketAddrConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleSocketAddrConditionObject.Tests.ps1 new file mode 100644 index 000000000000..ddeaca4ab2cc --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleSocketAddrConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleSocketAddrConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleSocketAddrConditionObject.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-AzFrontDoorCdnRuleSocketAddrConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleSslProtocolConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleSslProtocolConditionObject.Tests.ps1 new file mode 100644 index 000000000000..8f0c24725b53 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleSslProtocolConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleSslProtocolConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleSslProtocolConditionObject.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-AzFrontDoorCdnRuleSslProtocolConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.Tests.ps1 new file mode 100644 index 000000000000..360dcfdf1b33 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleUrlFileExtensionConditionObject.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-AzFrontDoorCdnRuleUrlFileExtensionConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.Tests.ps1 new file mode 100644 index 000000000000..07e3264a3044 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleUrlFileNameConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleUrlFileNameConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleUrlFileNameConditionObject.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-AzFrontDoorCdnRuleUrlFileNameConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleUrlPathConditionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleUrlPathConditionObject.Tests.ps1 new file mode 100644 index 000000000000..48450274b64c --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleUrlPathConditionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleUrlPathConditionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleUrlPathConditionObject.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-AzFrontDoorCdnRuleUrlPathConditionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleUrlRedirectActionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleUrlRedirectActionObject.Tests.ps1 new file mode 100644 index 000000000000..5b484aa37384 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleUrlRedirectActionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleUrlRedirectActionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleUrlRedirectActionObject.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-AzFrontDoorCdnRuleUrlRedirectActionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleUrlRewriteActionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleUrlRewriteActionObject.Tests.ps1 new file mode 100644 index 000000000000..a9055be7d902 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleUrlRewriteActionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleUrlRewriteActionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleUrlRewriteActionObject.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-AzFrontDoorCdnRuleUrlRewriteActionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnRuleUrlSigningActionObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnRuleUrlSigningActionObject.Tests.ps1 new file mode 100644 index 000000000000..74f220ccfd0e --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnRuleUrlSigningActionObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnRuleUrlSigningActionObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnRuleUrlSigningActionObject.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-AzFrontDoorCdnRuleUrlSigningActionObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnSecret.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnSecret.Tests.ps1 new file mode 100644 index 000000000000..ac293b809697 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnSecret.Tests.ps1 @@ -0,0 +1,43 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnSecret')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnSecret.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-AzFrontDoorCdnSecret' { + It 'CreateExpanded' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $secretName = "se-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use secretName : $($secretName)" + + $parameter = New-AzFrontDoorCdnSecretCustomerCertificateParametersObject -UseLatestVersion $true -SubjectAlternativeName @() -Type "CustomerCertificate"` + -SecretSourceId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourceGroups/powershelltest/providers/Microsoft.KeyVault/vaults/cdn-ps-kv/certificates/cdndevcn2022-0329" + + New-AzFrontDoorCdnSecret -Name $secretName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.Tests.ps1 new file mode 100644 index 000000000000..ee5328831a58 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnSecretCustomerCertificateParametersObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnSecretCustomerCertificateParametersObject.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-AzFrontDoorCdnSecretCustomerCertificateParametersObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.Tests.ps1 new file mode 100644 index 000000000000..1ff1eae298d1 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject.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-AzFrontDoorCdnSecretFirstPartyManagedCertificateParametersObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.Tests.ps1 new file mode 100644 index 000000000000..3e8e500ad997 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnSecretManagedCertificateParametersObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnSecretManagedCertificateParametersObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnSecretManagedCertificateParametersObject.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-AzFrontDoorCdnSecretManagedCertificateParametersObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.Tests.ps1 new file mode 100644 index 000000000000..d58ad3f0c666 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnSecretUrlSigningKeyParametersObject.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-AzFrontDoorCdnSecretUrlSigningKeyParametersObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnSecurityPolicy.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnSecurityPolicy.Tests.ps1 new file mode 100644 index 000000000000..519908dd216a --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnSecurityPolicy.Tests.ps1 @@ -0,0 +1,48 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnSecurityPolicy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnSecurityPolicy.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-AzFrontDoorCdnSecurityPolicy' { + It 'CreateExpanded' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + $frontDoorCdnProfile = New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + $endpoint = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $policyName = "pol-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use policyName : $($policyName)" + + $association = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject -PatternsToMatch @("/*") -Domain @(@{"Id"=$($endpoint.Id)}) + $parameter = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject -Association $association ` + -WafPolicyId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourcegroups/powershelltest/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/powershelltestwaf" + + New-AzFrontDoorCdnSecurityPolicy -Name $policyName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.Tests.ps1 new file mode 100644 index 000000000000..60d8a0c1aaaf --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject.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-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.Tests.ps1 b/src/Cdn/test/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.Tests.ps1 new file mode 100644 index 000000000000..6accb82c5527 --- /dev/null +++ b/src/Cdn/test/New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject.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-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject' { + It '__AllParameterSets' { + { + # ignore + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/README.md b/src/Cdn/test/README.md new file mode 100644 index 000000000000..7c752b4c8c43 --- /dev/null +++ b/src/Cdn/test/README.md @@ -0,0 +1,17 @@ +# Test +This directory contains the [Pester](https://www.powershellgallery.com/packages/Pester) tests to run for the module. We use Pester as it is the unofficial standard for PowerShell unit testing. Test stubs for custom cmdlets (created in `..\custom`) will be generated into this folder when `build-module.ps1` is ran. These test stubs will fail automatically, to indicate that tests should be written for custom cmdlets. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: no + +## Details +We allow three testing modes: *live*, *record*, and *playback*. These can be selected using the `-Live`, `-Record`, and `-Playback` switches respectively on the `test-module.ps1` script. This script will run through any `.Tests.ps1` scripts in the `test` folder. If you choose the *record* mode, it will create a `.Recording.json` file of the REST calls between the client and server. Then, when you choose *playback* mode, it will use the `.Recording.json` file to mock the communication between server and client. The *live* mode runs the same as the *record* mode; however, it doesn't create the `.Recording.json` file. + +## Purpose +Custom cmdlets generally encompass additional functionality not described in the REST specification, or combines functionality generated from the REST spec. To validate this functionality continues to operate as intended, creating tests that can be ran and re-ran against custom cmdlets is part of the framework. + +## Usage +To execute tests, run the `test-module.ps1`. To write tests, [this example](https://github.com/pester/Pester/blob/8b9cf4248315e44f1ac6673be149f7e0d7f10466/Examples/Planets/Get-Planet.Tests.ps1#L1) from the Pester repository is very useful for getting started. \ No newline at end of file diff --git a/src/Cdn/test/Remove-AzCdnCustomDomain.Tests.ps1 b/src/Cdn/test/Remove-AzCdnCustomDomain.Tests.ps1 new file mode 100644 index 000000000000..4f8116b47b84 --- /dev/null +++ b/src/Cdn/test/Remove-AzCdnCustomDomain.Tests.ps1 @@ -0,0 +1,90 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzCdnCustomDomain')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzCdnCustomDomain.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-AzCdnCustomDomain' { + It 'Delete' { + { + $subId = "27cafca8-b9a4-4264-b399-45d0c9cca1ab" + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location -SubscriptionId $subId + + $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 -SubscriptionId $subId + + # Hard-coding host and endpoint names due to requirement for DNS CNAME + $endpointName = 'e-20220407-8fwkya' + $customDomainHostName = 'e-20220407-8fwkya.ps.cdne2e.azfdtest.xyz' + $customDomainName = 'cd-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin -SubscriptionId $subId + New-AzCdnCustomDomain -EndpointName $endpointName -Name $customDomainName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -HostName $customDomainHostName -SubscriptionId $subId + Remove-AzCdnCustomDomain -EndpointName $endpointName -Name $customDomainName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -SubscriptionId $subId + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -SubscriptionId $subId -NoWait + } + } | Should -Not -Throw + } + + It 'DeleteViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $subId = "27cafca8-b9a4-4264-b399-45d0c9cca1ab" + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location -SubscriptionId $subId + + $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 -SubscriptionId $subId + + # Hard-coding host and endpoint names due to requirement for DNS CNAME + $endpointName = 'e-20220407-lw8iyz' + $customDomainHostName = 'e-20220407-lw8iyz.ps.cdne2e.azfdtest.xyz' + $customDomainName = 'cd-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin -SubscriptionId $subId + New-AzCdnCustomDomain -EndpointName $endpointName -Name $customDomainName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -HostName $customDomainHostName -SubscriptionId $subId + Get-AzCdnCustomDomain -EndpointName $endpointName -Name $customDomainName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -SubscriptionId $subId | Remove-AzCdnCustomDomain + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -SubscriptionId $subId -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Remove-AzCdnEndpoint.Tests.ps1 b/src/Cdn/test/Remove-AzCdnEndpoint.Tests.ps1 new file mode 100644 index 000000000000..7610424d4df6 --- /dev/null +++ b/src/Cdn/test/Remove-AzCdnEndpoint.Tests.ps1 @@ -0,0 +1,80 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzCdnEndpoint')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzCdnEndpoint.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-AzCdnEndpoint' { + It 'Delete' { + { + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin + Remove-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'DeleteViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin + Get-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName | Remove-AzCdnEndpoint + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Remove-AzCdnOrigin.Tests.ps1 b/src/Cdn/test/Remove-AzCdnOrigin.Tests.ps1 new file mode 100644 index 000000000000..fd78c7927ce7 --- /dev/null +++ b/src/Cdn/test/Remove-AzCdnOrigin.Tests.ps1 @@ -0,0 +1,112 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzCdnOrigin')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzCdnOrigin.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-AzCdnOrigin' { + It 'Delete' { + { + $subId = $env.SubscriptionId + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName)" + + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + $originId = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origins/$($origin.Name)" + $originGroup = @{ + Name = "originGroup1" + HealthProbeSettingProbeIntervalInSecond = 240 + HealthProbeSettingProbePath = "/health.aspx" + HealthProbeSettingProbeProtocol = "Https" + HealthProbeSettingProbeRequestType = "GET" + Origin = @(@{ + Id = $originId + }) + } + $defaultOriginGroup = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origingroups/$($originGroup.Name)" + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location ` + -Origin $origin -OriginGroup $originGroup -DefaultOriginGroupId $defaultOriginGroup + + New-AzCdnOrigin -Name "origin2" -HostName "host2.hello.com" -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + Remove-AzCdnOrigin -Name "origin2" -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'DeleteViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $subId = $env.SubscriptionId + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName)" + + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + $originId = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origins/$($origin.Name)" + $originGroup = @{ + Name = "originGroup1" + HealthProbeSettingProbeIntervalInSecond = 240 + HealthProbeSettingProbePath = "/health.aspx" + HealthProbeSettingProbeProtocol = "Https" + HealthProbeSettingProbeRequestType = "GET" + Origin = @(@{ + Id = $originId + }) + } + $defaultOriginGroup = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origingroups/$($originGroup.Name)" + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location ` + -Origin $origin -OriginGroup $originGroup -DefaultOriginGroupId $defaultOriginGroup + + New-AzCdnOrigin -Name "origin2" -HostName "host2.hello.com" -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + Get-AzCdnOrigin -Name "origin2" -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName | Remove-AzCdnOrigin + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Remove-AzCdnOriginGroup.Tests.ps1 b/src/Cdn/test/Remove-AzCdnOriginGroup.Tests.ps1 new file mode 100644 index 000000000000..a1e23ef25af9 --- /dev/null +++ b/src/Cdn/test/Remove-AzCdnOriginGroup.Tests.ps1 @@ -0,0 +1,126 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzCdnOriginGroup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzCdnOriginGroup.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-AzCdnOriginGroup' { + It 'Delete' { + { + $subId = $env.SubscriptionId + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName)" + + $location = "westus" + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $originId = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origins/$($origin.Name)" + $healthProbeParametersObject = New-AzCdnHealthProbeParametersObject -ProbeIntervalInSecond 240 -ProbePath "/health.aspx" -ProbeProtocol "Https" -ProbeRequestType "GET" + $originGroup = @{ + Name = "originGroup1" + healthProbeSetting = $healthProbeParametersObject + Origin = @(@{ + Id = $originId + }) + } + $defaultOriginGroup = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origingroups/$($originGroup.Name)" + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location ` + -Origin $origin -OriginGroup $originGroup -DefaultOriginGroupId $defaultOriginGroup + + $originGroupName2 = "originGroup2" + $probeInterval2 = 120 + $probePath2 = "/check-health.aspx" + $probeProtocol2 = "Http" + $probeRequestType2 = "HEAD" + $healthProbeParametersObject2 = New-AzCdnHealthProbeParametersObject -ProbeIntervalInSecond $probeInterval2 ` + -ProbePath $probePath2 -ProbeProtocol $probeProtocol2 -ProbeRequestType $probeRequestType2 + + New-AzCdnOriginGroup -EndpointName $endpointName -Name $originGroupName2 -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName ` + -HealthProbeSetting $healthProbeParametersObject2 -Origin @(@{ Id = $originId }) + + Remove-AzCdnOriginGroup -EndpointName $endpointName -Name $originGroupName2 -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'DeleteViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $subId = $env.SubscriptionId + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName)" + + $location = "westus" + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $originId = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origins/$($origin.Name)" + $healthProbeParametersObject = New-AzCdnHealthProbeParametersObject -ProbeIntervalInSecond 240 -ProbePath "/health.aspx" -ProbeProtocol "Https" -ProbeRequestType "GET" + $originGroup = @{ + Name = "originGroup1" + healthProbeSetting = $healthProbeParametersObject + Origin = @(@{ + Id = $originId + }) + } + $defaultOriginGroup = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origingroups/$($originGroup.Name)" + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location ` + -Origin $origin -OriginGroup $originGroup -DefaultOriginGroupId $defaultOriginGroup + + $originGroupName2 = "originGroup2" + $probeInterval2 = 120 + $probePath2 = "/check-health.aspx" + $probeProtocol2 = "Http" + $probeRequestType2 = "HEAD" + + New-AzCdnOriginGroup -EndpointName $endpointName -Name $originGroupName2 -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName ` + -HealthProbeSetting $healthProbeParametersObject2 -Origin @(@{ Id = $originId }) + + Get-AzCdnOriginGroup -EndpointName $endpointName -Name $originGroupName2 -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName | Remove-AzCdnOriginGroup + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Remove-AzCdnProfile.Tests.ps1 b/src/Cdn/test/Remove-AzCdnProfile.Tests.ps1 new file mode 100644 index 000000000000..4043017a0817 --- /dev/null +++ b/src/Cdn/test/Remove-AzCdnProfile.Tests.ps1 @@ -0,0 +1,60 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzCdnProfile')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzCdnProfile.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-AzCdnProfile' { + It 'Delete' { + { + $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 + Remove-AzCdnProfile -Name $cdnProfileName -ResourceGroupName $ResourceGroupName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'DeleteViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $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 | Remove-AzCdnProfile + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Remove-AzFrontDoorCdnCustomDomain.Tests.ps1 b/src/Cdn/test/Remove-AzFrontDoorCdnCustomDomain.Tests.ps1 new file mode 100644 index 000000000000..8b76a688ce27 --- /dev/null +++ b/src/Cdn/test/Remove-AzFrontDoorCdnCustomDomain.Tests.ps1 @@ -0,0 +1,90 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzFrontDoorCdnCustomDomain')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzFrontDoorCdnCustomDomain.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-AzFrontDoorCdnCustomDomain' { + It 'Delete' { + { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $secretName = "se-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use secretName : $($secretName)" + + $parameter = New-AzFrontDoorCdnSecretCustomerCertificateParametersObject -UseLatestVersion $true -SubjectAlternativeName @() -Type "CustomerCertificate"` + -SecretSourceId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourceGroups/powershelltest/providers/Microsoft.KeyVault/vaults/cdn-ps-kv/certificates/cdndevcn2022-0329" + + $secret = New-AzFrontDoorCdnSecret -Name $secretName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + $secretResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $secret.Id + $tlsSetting = New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject -CertificateType "CustomerCertificate" -MinimumTlsVersion "TLS12" -Secret $secretResoure + + $customDomainName = "domain-" + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnCustomDomain -CustomDomainName $customDomainName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -HostName "removedomain.dev.cdn.azure.cn" -TlsSetting $tlsSetting + + Remove-AzFrontDoorCdnCustomDomain -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -CustomDomainName $customDomainName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'DeleteViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $secretName = "se-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use secretName : $($secretName)" + + $parameter = New-AzFrontDoorCdnSecretCustomerCertificateParametersObject -UseLatestVersion $true -SubjectAlternativeName @() -Type "CustomerCertificate"` + -SecretSourceId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourceGroups/powershelltest/providers/Microsoft.KeyVault/vaults/cdn-ps-kv/certificates/cdndevcn2022-0329" + + $secret = New-AzFrontDoorCdnSecret -Name $secretName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + $secretResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $secret.Id + $tlsSetting = New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject -CertificateType "CustomerCertificate" -MinimumTlsVersion "TLS12" -Secret $secretResoure + + $customDomainName = "domain-" + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnCustomDomain -CustomDomainName $customDomainName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -HostName "removedomain.dev.cdn.azure.cn" -TlsSetting $tlsSetting + + Get-AzFrontDoorCdnCustomDomain -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -CustomDomainName $customDomainName | Remove-AzFrontDoorCdnCustomDomain + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Remove-AzFrontDoorCdnEndpoint.Tests.ps1 b/src/Cdn/test/Remove-AzFrontDoorCdnEndpoint.Tests.ps1 new file mode 100644 index 000000000000..7d7fcc03b455 --- /dev/null +++ b/src/Cdn/test/Remove-AzFrontDoorCdnEndpoint.Tests.ps1 @@ -0,0 +1,66 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzFrontDoorCdnEndpoint')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzFrontDoorCdnEndpoint.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-AzFrontDoorCdnEndpoint' { + It 'Delete' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + Remove-AzFrontdoorCdnEndpoint -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'DeleteViaIdentity' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + Get-AzFrontdoorCdnEndpoint -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName | Remove-AzFrontdoorCdnEndpoint + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Remove-AzFrontDoorCdnOrigin.Tests.ps1 b/src/Cdn/test/Remove-AzFrontDoorCdnOrigin.Tests.ps1 new file mode 100644 index 000000000000..2e9648475da8 --- /dev/null +++ b/src/Cdn/test/Remove-AzFrontDoorCdnOrigin.Tests.ps1 @@ -0,0 +1,90 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzFrontDoorCdnOrigin')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzFrontDoorCdnOrigin.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-AzFrontDoorCdnOrigin' { + It 'Delete' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + + $hostName = "en.wikipedia.org"; + $originName = 'ori' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName ` + -OriginName $originName -OriginHostHeader $hostName -HostName $hostName ` + -HttpPort 80 -HttpsPort 443 -Priority 1 -Weight 1000 + + Remove-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName -OriginName $originName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'DeleteViaIdentity' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + + $hostName = "en.wikipedia.org"; + $originName = 'ori' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName ` + -OriginName $originName -OriginHostHeader $hostName -HostName $hostName ` + -HttpPort 80 -HttpsPort 443 -Priority 1 -Weight 1000 + + Get-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName -OriginName $originName | Remove-AzFrontDoorCdnOrigin + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Remove-AzFrontDoorCdnOriginGroup.Tests.ps1 b/src/Cdn/test/Remove-AzFrontDoorCdnOriginGroup.Tests.ps1 new file mode 100644 index 000000000000..25a693ae31d3 --- /dev/null +++ b/src/Cdn/test/Remove-AzFrontDoorCdnOriginGroup.Tests.ps1 @@ -0,0 +1,76 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzFrontDoorCdnOriginGroup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzFrontDoorCdnOriginGroup.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-AzFrontDoorCdnOriginGroup' { + It 'Delete' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + + New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + Remove-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'DeleteViaIdentity' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + + New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName | Remove-AzFrontDoorCdnOriginGroup + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Remove-AzFrontDoorCdnProfile.Tests.ps1 b/src/Cdn/test/Remove-AzFrontDoorCdnProfile.Tests.ps1 new file mode 100644 index 000000000000..2e145a4ee8e2 --- /dev/null +++ b/src/Cdn/test/Remove-AzFrontDoorCdnProfile.Tests.ps1 @@ -0,0 +1,60 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzFrontDoorCdnProfile')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzFrontDoorCdnProfile.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-AzFrontDoorCdnProfile' { + It 'Delete' { + { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + Remove-AzFrontDoorCdnProfile -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'DeleteViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + Get-AzFrontDoorCdnProfile -ResourceGroupName $ResourceGroupName -Name $frontDoorCdnProfileName | Remove-AzFrontDoorCdnProfile + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Remove-AzFrontDoorCdnRoute.Tests.ps1 b/src/Cdn/test/Remove-AzFrontDoorCdnRoute.Tests.ps1 new file mode 100644 index 000000000000..2bd07a84e099 --- /dev/null +++ b/src/Cdn/test/Remove-AzFrontDoorCdnRoute.Tests.ps1 @@ -0,0 +1,153 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzFrontDoorCdnRoute')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzFrontDoorCdnRoute.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-AzFrontDoorCdnRoute' { + It 'Delete' { + { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + $endpoint = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + $originGroup = New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + + $hostName = "en.wikipedia.org"; + $originName = 'ori' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName ` + -OriginName $originName -OriginHostHeader $hostName -HostName $hostName ` + -HttpPort 80 -HttpsPort 443 -Priority 1 -Weight 1000 + + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use rulesetName : $($rulesetName)" + $ruleSet = New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $uriConditon = New-AzFrontDoorCdnRuleRequestUriConditionObject -Name "RequestUri" -ParameterOperator "Any" + $conditions = @( + $uriConditon + ); + $overrideAction = New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name "RouteConfigurationOverride" ` + -CacheConfigurationQueryStringCachingBehavior "IgnoreSpecifiedQueryStrings" ` + -CacheConfigurationQueryParameter "a=test" ` + -CacheConfigurationIsCompressionEnabled "Enabled" ` + -CacheConfigurationCacheBehavior "HonorOrigin" + $actions = @($overrideAction); + + $ruleName = 'r' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use ruleName : $($ruleName)" + New-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName ` + -Action $actions -Condition $conditions + + $ruleSetResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $ruleSet.Id + + $routeName = 'route' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnRoute -Name $routeName -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -OriginGroupId $originGroup.Id -RuleSet @($ruleSetResoure) -PatternsToMatch "/*" -LinkToDefaultDomain "Enabled" -EnabledState "Enabled" + + Remove-AzFrontDoorCdnRoute -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName -Name $routeName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'DeleteViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + $endpoint = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + $originGroup = New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + + $hostName = "en.wikipedia.org"; + $originName = 'ori' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName ` + -OriginName $originName -OriginHostHeader $hostName -HostName $hostName ` + -HttpPort 80 -HttpsPort 443 -Priority 1 -Weight 1000 + + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use rulesetName : $($rulesetName)" + $ruleSet = New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $uriConditon = New-AzFrontDoorCdnRuleRequestUriConditionObject -Name "RequestUri" -ParameterOperator "Any" + $conditions = @( + $uriConditon + ); + $overrideAction = New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name "RouteConfigurationOverride" ` + -CacheConfigurationQueryStringCachingBehavior "IgnoreSpecifiedQueryStrings" ` + -CacheConfigurationQueryParameter "a=test" ` + -CacheConfigurationIsCompressionEnabled "Enabled" ` + -CacheConfigurationCacheBehavior "HonorOrigin" + $actions = @($overrideAction); + + $ruleName = 'r' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use ruleName : $($ruleName)" + New-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName ` + -Action $actions -Condition $conditions + + $ruleSetResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $ruleSet.Id + + $routeName = 'route' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnRoute -Name $routeName -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -OriginGroupId $originGroup.Id -RuleSet @($ruleSetResoure) -PatternsToMatch "/*" -LinkToDefaultDomain "Enabled" -EnabledState "Enabled" + + Get-AzFrontDoorCdnRoute -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName -Name $routeName ` + | Remove-AzFrontDoorCdnRoute + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Remove-AzFrontDoorCdnRule.Tests.ps1 b/src/Cdn/test/Remove-AzFrontDoorCdnRule.Tests.ps1 new file mode 100644 index 000000000000..217d4e616576 --- /dev/null +++ b/src/Cdn/test/Remove-AzFrontDoorCdnRule.Tests.ps1 @@ -0,0 +1,93 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzFrontDoorCdnRule')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzFrontDoorCdnRule.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-AzFrontDoorCdnRule' { + It 'Delete' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use rulesetName : $($rulesetName)" + New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $uriConditon = New-AzFrontDoorCdnRuleRequestUriConditionObject -Name "RequestUri" -ParameterOperator "Any" + $conditions = @( + $uriConditon + ); + $overrideAction = New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name "RouteConfigurationOverride" ` + -CacheConfigurationQueryStringCachingBehavior "IgnoreSpecifiedQueryStrings" ` + -CacheConfigurationQueryParameter "a=test" ` + -CacheConfigurationIsCompressionEnabled "Enabled" ` + -CacheConfigurationCacheBehavior "HonorOrigin" + $actions = @($overrideAction); + + $ruleName = 'r' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use ruleName : $($ruleName)" + New-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName ` + -Action $actions -Condition $conditions + + $rule = Get-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName + $rule.Name | Should -Be $ruleName + + Remove-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'DeleteViaIdentity' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use rulesetName : $($rulesetName)" + New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $uriConditon = New-AzFrontDoorCdnRuleRequestUriConditionObject -Name "RequestUri" -ParameterOperator "Any" + $conditions = @( + $uriConditon + ); + $overrideAction = New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name "RouteConfigurationOverride" ` + -CacheConfigurationQueryStringCachingBehavior "IgnoreSpecifiedQueryStrings" ` + -CacheConfigurationQueryParameter "a=test" ` + -CacheConfigurationIsCompressionEnabled "Enabled" ` + -CacheConfigurationCacheBehavior "HonorOrigin" + $actions = @($overrideAction); + + $ruleName = 'r' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use ruleName : $($ruleName)" + New-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName ` + -Action $actions -Condition $conditions + + Get-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName | Remove-AzFrontDoorCdnRule + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Remove-AzFrontDoorCdnRuleSet.Tests.ps1 b/src/Cdn/test/Remove-AzFrontDoorCdnRuleSet.Tests.ps1 new file mode 100644 index 000000000000..03f6a3146e48 --- /dev/null +++ b/src/Cdn/test/Remove-AzFrontDoorCdnRuleSet.Tests.ps1 @@ -0,0 +1,65 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzFrontDoorCdnRuleSet')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzFrontDoorCdnRuleSet.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-AzFrontDoorCdnRuleSet' { + It 'Delete' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + Remove-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'DeleteViaIdentity' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + Get-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName | Remove-AzFrontDoorCdnRuleSet + + $rulesets = Get-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName + $rulesets.Count | Should -Be 0 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Remove-AzFrontDoorCdnSecret.Tests.ps1 b/src/Cdn/test/Remove-AzFrontDoorCdnSecret.Tests.ps1 new file mode 100644 index 000000000000..aef85bac5dc8 --- /dev/null +++ b/src/Cdn/test/Remove-AzFrontDoorCdnSecret.Tests.ps1 @@ -0,0 +1,79 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzFrontDoorCdnSecret')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzFrontDoorCdnSecret.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-AzFrontDoorCdnSecret' { + It 'Delete' { + { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $secretName = "se-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use secretName : $($secretName)" + + $parameter = New-AzFrontDoorCdnSecretCustomerCertificateParametersObject -UseLatestVersion $true -SubjectAlternativeName @() -Type "CustomerCertificate"` + -SecretSourceId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourceGroups/powershelltest/providers/Microsoft.KeyVault/vaults/cdn-ps-kv/certificates/cdndevcn2022-0329" + + New-AzFrontDoorCdnSecret -Name $secretName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + + Remove-AzFrontDoorCdnSecret -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $secretName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'DeleteViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $secretName = "se-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use secretName : $($secretName)" + + $parameter = New-AzFrontDoorCdnSecretCustomerCertificateParametersObject -UseLatestVersion $true -SubjectAlternativeName @() -Type "CustomerCertificate"` + -SecretSourceId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourceGroups/powershelltest/providers/Microsoft.KeyVault/vaults/cdn-ps-kv/certificates/cdndevcn2022-0329" + + New-AzFrontDoorCdnSecret -Name $secretName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + + Get-AzFrontDoorCdnSecret -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $secretName ` + | Remove-AzFrontDoorCdnSecret + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Remove-AzFrontDoorCdnSecurityPolicy.Tests.ps1 b/src/Cdn/test/Remove-AzFrontDoorCdnSecurityPolicy.Tests.ps1 new file mode 100644 index 000000000000..b0b3e9e4d8d7 --- /dev/null +++ b/src/Cdn/test/Remove-AzFrontDoorCdnSecurityPolicy.Tests.ps1 @@ -0,0 +1,89 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzFrontDoorCdnSecurityPolicy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzFrontDoorCdnSecurityPolicy.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-AzFrontDoorCdnSecurityPolicy' { + It 'Delete' { + { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + $frontDoorCdnProfile = New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + $endpoint = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $policyName = "pol-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use policyName : $($policyName)" + + $association = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject -PatternsToMatch @("/*") -Domain @(@{"Id"=$($endpoint.Id)}) + $parameter = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject -Association $association ` + -WafPolicyId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourcegroups/powershelltest/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/powershelltestwaf" + + New-AzFrontDoorCdnSecurityPolicy -Name $policyName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + + Remove-AzFrontDoorCdnSecurityPolicy -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $policyName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'DeleteViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + $frontDoorCdnProfile = New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + $endpoint = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $policyName = "pol-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use policyName : $($policyName)" + + $association = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject -PatternsToMatch @("/*") -Domain @(@{"Id"=$($endpoint.Id)}) + $parameter = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject -Association $association ` + -WafPolicyId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourcegroups/powershelltest/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/powershelltestwaf" + + New-AzFrontDoorCdnSecurityPolicy -Name $policyName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + + Get-AzFrontDoorCdnSecurityPolicy -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $policyName ` + | Remove-AzFrontDoorCdnSecurityPolicy + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Start-AzCdnEndpoint.Tests.ps1 b/src/Cdn/test/Start-AzCdnEndpoint.Tests.ps1 new file mode 100644 index 000000000000..8df8a00d5629 --- /dev/null +++ b/src/Cdn/test/Start-AzCdnEndpoint.Tests.ps1 @@ -0,0 +1,87 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Start-AzCdnEndpoint')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzCdnEndpoint.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 'Start-AzCdnEndpoint' { + It 'Start' { + { + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin + Stop-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + Start-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName + $endpoint = Get-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName + + $endpoint.ResourceState | Should -Be "Running" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'StartViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin + Stop-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + $endpoint = Get-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName | Start-AzCdnEndpoint + + $endpoint.ResourceState | Should -Be "Running" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Stop-AzCdnEndpoint.Tests.ps1 b/src/Cdn/test/Stop-AzCdnEndpoint.Tests.ps1 new file mode 100644 index 000000000000..04dda8a3f298 --- /dev/null +++ b/src/Cdn/test/Stop-AzCdnEndpoint.Tests.ps1 @@ -0,0 +1,85 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Stop-AzCdnEndpoint')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Stop-AzCdnEndpoint.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 'Stop-AzCdnEndpoint' { + It 'Stop' { + { + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin + Stop-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + $endpoint = Get-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName + + $endpoint.ResourceState | Should -Be "Stopped" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'StopViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin + $endpoint = Get-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName | Stop-AzCdnEndpoint + + $endpoint.ResourceState | Should -Be "Stopped" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Test-AzCdnEndpointCustomDomain.Tests.ps1 b/src/Cdn/test/Test-AzCdnEndpointCustomDomain.Tests.ps1 new file mode 100644 index 000000000000..d9aae686feef --- /dev/null +++ b/src/Cdn/test/Test-AzCdnEndpointCustomDomain.Tests.ps1 @@ -0,0 +1,100 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Test-AzCdnEndpointCustomDomain')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzCdnEndpointCustomDomain.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 'Test-AzCdnEndpointCustomDomain' { + It 'ValidateExpanded' { + { + $subId = "27cafca8-b9a4-4264-b399-45d0c9cca1ab" + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location -SubscriptionId $subId + + $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 -SubscriptionId $subId + + # Hard-coding host and endpoint names due to requirement for DNS CNAME + $endpointName = 'e-20220418-sec26q' + $customDomainHostName = 'e-20220418-sec26q.ps.cdne2e.azfdtest.xyz' + $customDomainInvalidHostName = 'e-20220418-sec26w.ps.cdne2e.azfdtest.xyz' + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin -SubscriptionId $subId + $validateResult = Test-AzCdnEndpointCustomDomain -EndpointName $endpointName -HostName $customDomainHostName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -SubscriptionId $subId + + $validateResult.CustomDomainValidated | Should -BeTrue + + $validateResult = Test-AzCdnEndpointCustomDomain -EndpointName $endpointName -HostName $customDomainInvalidHostName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -SubscriptionId $subId + + $validateResult.CustomDomainValidated | Should -BeFalse + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -SubscriptionId $subId -NoWait + } + } | Should -Not -Throw + } + + It 'ValidateViaIdentityExpanded' { + { + $PSDefaultParameterValues['Disabled'] = $true + $subId = "27cafca8-b9a4-4264-b399-45d0c9cca1ab" + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location -SubscriptionId $subId + + $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 -SubscriptionId $subId + + # Hard-coding host and endpoint names due to requirement for DNS CNAME + $endpointName = 'e-20220418-ems6vw' + $customDomainHostName = 'e-20220418-ems6vw.ps.cdne2e.azfdtest.xyz' + $customDomainInvalidHostName = 'e-20220418-ems5vw.ps.cdne2e.azfdtest.xyz' + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + $endpoint = New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin -SubscriptionId $subId + $validateResult = $endpoint | Test-AzCdnEndpointCustomDomain -HostName $customDomainHostName + + $validateResult.CustomDomainValidated | Should -BeTrue + + $validateResult = $endpoint | Test-AzCdnEndpointCustomDomain -HostName $customDomainInvalidHostName + + $validateResult.CustomDomainValidated | Should -BeFalse + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -SubscriptionId $subId -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Test-AzCdnNameAvailability.Tests.ps1 b/src/Cdn/test/Test-AzCdnNameAvailability.Tests.ps1 new file mode 100644 index 000000000000..91e3c6e07e1e --- /dev/null +++ b/src/Cdn/test/Test-AzCdnNameAvailability.Tests.ps1 @@ -0,0 +1,90 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Test-AzCdnNameAvailability')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzCdnNameAvailability.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 'Test-AzCdnNameAvailability' { + It 'CheckExpanded' { + { + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + $resourceType = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType]::MicrosoftCdnProfilesEndpoints + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + $nameAvailability = Test-AzCdnNameAvailability -Name $endpointName -Type $resourceType + $nameAvailability.NameAvailable | Should -BeTrue + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin + $nameAvailability = Test-AzCdnNameAvailability -Name $endpointName -Type $resourceType + $nameAvailability.NameAvailable | Should -BeFalse + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'CheckExpanded1' { + { + $subId = $env.SubscriptionId + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + $resourceType = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType]::MicrosoftCdnProfilesEndpoints + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + $nameAvailability = Test-AzCdnNameAvailability -Name $endpointName -Type $resourceType -SubscriptionId $subId + $nameAvailability.NameAvailable | Should -BeTrue + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin + $nameAvailability = Test-AzCdnNameAvailability -Name $endpointName -Type $resourceType -SubscriptionId $subId + $nameAvailability.NameAvailable | Should -BeFalse + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Test-AzCdnProbe.Tests.ps1 b/src/Cdn/test/Test-AzCdnProbe.Tests.ps1 new file mode 100644 index 000000000000..4bc9ce02e322 --- /dev/null +++ b/src/Cdn/test/Test-AzCdnProbe.Tests.ps1 @@ -0,0 +1,45 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Test-AzCdnProbe')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzCdnProbe.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 'Test-AzCdnProbe' { + It 'ValidateExpanded' { + { + $probeUrl = "https://azurecdn-files.azureedge.net/dsa-test/probe-v.txt" + $validateProbeUrlResult = Test-AzCdnProbe -ProbeUrl $probeUrl + + $validateProbeUrlResult.IsValid | Should -BeTrue + + $probeUrl = "https://www.notexist.com/notexist/notexist.txt" + $validateProbeUrlResult = Test-AzCdnProbe -ProbeUrl $probeUrl + + $validateProbeUrlResult.IsValid | Should -BeFalse + } | Should -Not -Throw + } + + It 'Validate' { + { + $probeUrl = "https://azurecdn-files.azureedge.net/dsa-test/probe-v.txt" + $validateProbeUrlResult = Test-AzCdnProbe -ValidateProbeInput @{ ProbeUrl = $probeUrl } + + $validateProbeUrlResult.IsValid | Should -BeTrue + + $probeUrl = "https://www.notexist.com/notexist/notexist.txt" + $validateProbeUrlResult = Test-AzCdnProbe -ValidateProbeInput @{ ProbeUrl = $probeUrl } + + $validateProbeUrlResult.IsValid | Should -BeFalse + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Test-AzFrontDoorCdnEndpointCustomDomain.Tests.ps1 b/src/Cdn/test/Test-AzFrontDoorCdnEndpointCustomDomain.Tests.ps1 new file mode 100644 index 000000000000..9d3c1d0e5ecf --- /dev/null +++ b/src/Cdn/test/Test-AzFrontDoorCdnEndpointCustomDomain.Tests.ps1 @@ -0,0 +1,73 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Test-AzFrontDoorCdnEndpointCustomDomain')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzFrontDoorCdnEndpointCustomDomain.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 'Test-AzFrontDoorCdnEndpointCustomDomain' { + It 'ValidateExpanded' { + { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $hostName = "test.dev.cdn.azure.cn" + Test-AzFrontDoorCdnEndpointCustomDomain -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -HostName $hostName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'ValidateViaIdentityExpanded' { + { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $hostName = "test.dev.cdn.azure.cn" + Get-AzFrontdoorCdnEndpoint -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName ` + | Test-AzFrontDoorCdnEndpointCustomDomain -HostName $hostName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Test-AzFrontDoorCdnEndpointNameAvailability.Tests.ps1 b/src/Cdn/test/Test-AzFrontDoorCdnEndpointNameAvailability.Tests.ps1 new file mode 100644 index 000000000000..3d995865929d --- /dev/null +++ b/src/Cdn/test/Test-AzFrontDoorCdnEndpointNameAvailability.Tests.ps1 @@ -0,0 +1,85 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Test-AzFrontDoorCdnEndpointNameAvailability')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzFrontDoorCdnEndpointNameAvailability.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 'Test-AzFrontDoorCdnEndpointNameAvailability' { + It 'CheckExpanded' { + { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + + $resourceType = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType]::MicrosoftCdnProfilesAfdEndpoints + + $nameAvailability = Test-AzFrontDoorCdnEndpointNameAvailability -ResourceGroupName $ResourceGroupName -Name $endpointName -Type $resourceType + $nameAvailability.NameAvailable | Should -BeTrue + New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $nameAvailability = Test-AzFrontDoorCdnEndpointNameAvailability -ResourceGroupName $ResourceGroupName -Name $endpointName -Type $resourceType + $nameAvailability.NameAvailable | Should -BeFalse + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'Check' { + { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + + $resourceType = [Microsoft.Azure.PowerShell.Cmdlets.Cdn.Support.ResourceType]::MicrosoftCdnProfilesAfdEndpoints + $checkNameAvailabilityInput = @{ + Name = $endpointName + Type = $resourceType + } + + $nameAvailability = Test-AzFrontDoorCdnEndpointNameAvailability -ResourceGroupName $ResourceGroupName -CheckEndpointNameAvailabilityInput $checkNameAvailabilityInput + $nameAvailability.NameAvailable | Should -BeTrue + New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $nameAvailability = Test-AzFrontDoorCdnEndpointNameAvailability -ResourceGroupName $ResourceGroupName -CheckEndpointNameAvailabilityInput $checkNameAvailabilityInput + $nameAvailability.NameAvailable | Should -BeFalse + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Test-AzFrontDoorCdnProfileHostNameAvailability.Tests.ps1 b/src/Cdn/test/Test-AzFrontDoorCdnProfileHostNameAvailability.Tests.ps1 new file mode 100644 index 000000000000..cc333865fc34 --- /dev/null +++ b/src/Cdn/test/Test-AzFrontDoorCdnProfileHostNameAvailability.Tests.ps1 @@ -0,0 +1,61 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Test-AzFrontDoorCdnProfileHostNameAvailability')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzFrontDoorCdnProfileHostNameAvailability.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 'Test-AzFrontDoorCdnProfileHostNameAvailability' { + It 'CheckExpanded' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + $hostName = "hello1.dev.cdn.azure.cn"; + $result = Test-AzFrontDoorCdnProfileHostNameAvailability -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -HostName $hostName + $result.NameAvailable | Should -Be $true + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'CheckViaIdentityExpanded' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + $hostName = "hello1.dev.cdn.azure.cn"; + $result = Get-AzFrontDoorCdnProfile -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName | ` + Test-AzFrontDoorCdnProfileHostNameAvailability -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -HostName $hostName + $result.NameAvailable | Should -Be $true + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Update-AzCdnEndpoint.Tests.ps1 b/src/Cdn/test/Update-AzCdnEndpoint.Tests.ps1 new file mode 100644 index 000000000000..3a80560b62f5 --- /dev/null +++ b/src/Cdn/test/Update-AzCdnEndpoint.Tests.ps1 @@ -0,0 +1,104 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzCdnEndpoint')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzCdnEndpoint.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-AzCdnEndpoint' { + It 'UpdateExpanded' { + { + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + $tags = @{ + Tag1 = 1 + Tag2 = 2 + } + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin -Tag $tags + $tags = @{ + Tag1 = 11 + Tag2 = 22 + } + Update-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName -Tag $tags + $updatedEndpoint = Get-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + + $updatedEndpoint.Tag["Tag1"] | Should -Be "11" + $updatedEndpoint.Tag["Tag2"] | Should -Be "22" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' { + { + $PSDefaultParameterValues['Disabled'] = $true + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $location = "westus" + $tags = @{ + Tag1 = 1 + Tag2 = 2 + } + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin -Tag $tags + $tags = @{ + Tag1 = 11 + Tag2 = 22 + } + Get-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName | Update-AzCdnEndpoint -Tag $tags + $updatedEndpoint = Get-AzCdnEndpoint -Name $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + + $updatedEndpoint.Tag["Tag1"] | Should -Be "11" + $updatedEndpoint.Tag["Tag2"] | Should -Be "22" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Update-AzCdnOrigin.Tests.ps1 b/src/Cdn/test/Update-AzCdnOrigin.Tests.ps1 new file mode 100644 index 000000000000..d9d425da3dcc --- /dev/null +++ b/src/Cdn/test/Update-AzCdnOrigin.Tests.ps1 @@ -0,0 +1,113 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzCdnOrigin')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzCdnOrigin.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-AzCdnOrigin' { + It 'UpdateExpanded' { + { + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $originName = "origin1" + $originHostName = "host1.hello.com" + $originHttpPort = 80 + $origin = @{ + Name = $originName + HostName = $originHostName + HttpPort = $originHttpPort + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin + $origin = Get-AzCdnOrigin -Name $originName -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + + $origin.Name | Should -Be $originName + $origin.HostName | Should -Be $originHostName + $origin.HttpPort | Should -Be $originHttpPort + $origin.HttpsPort | Should -Be $null + + $origin = Update-AzCdnOrigin -Name $originName -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName ` + -HostName "www.azure.com" -HttpPort 456 -HttpsPort 789 + + $origin.Name | Should -Be $originName + $origin.HostName | Should -Be "www.azure.com" + $origin.HttpPort | Should -Be 456 + $origin.HttpsPort | Should -Be 789 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' { + { + $PSDefaultParameterValues['Disabled'] = $true + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + $originName = "origin1" + $originHostName = "host1.hello.com" + $originHttpPort = 80 + $origin = @{ + Name = $originName + HostName = $originHostName + HttpPort = $originHttpPort + }; + $location = "westus" + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName), origin.Name : $($origin.Name), origin.HostName : $($origin.HostName)" + + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location -Origin $origin + $origin = Get-AzCdnOrigin -Name $originName -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + + $origin.Name | Should -Be $originName + $origin.HostName | Should -Be $originHostName + $origin.HttpPort | Should -Be $originHttpPort + $origin.HttpsPort | Should -Be $null + + $origin = $origin | Update-AzCdnOrigin -HostName "www.azure.com" -HttpPort 456 -HttpsPort 789 + + $origin.Name | Should -Be $originName + $origin.HostName | Should -Be "www.azure.com" + $origin.HttpPort | Should -Be 456 + $origin.HttpsPort | Should -Be 789 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Update-AzCdnOriginGroup.Tests.ps1 b/src/Cdn/test/Update-AzCdnOriginGroup.Tests.ps1 new file mode 100644 index 000000000000..a2d875bb8bea --- /dev/null +++ b/src/Cdn/test/Update-AzCdnOriginGroup.Tests.ps1 @@ -0,0 +1,152 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzCdnOriginGroup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzCdnOriginGroup.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-AzCdnOriginGroup' { + It 'UpdateExpanded' { + { + $subId = $env.SubscriptionId + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName)" + + $location = "westus" + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $originId = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origins/$($origin.Name)" + $healthProbeParametersObject = New-AzCdnHealthProbeParametersObject -ProbeIntervalInSecond 240 -ProbePath "/health.aspx" -ProbeProtocol "Https" -ProbeRequestType "GET" + $originGroup = @{ + Name = "originGroup1" + healthProbeSetting = $healthProbeParametersObject + Origin = @(@{ + Id = $originId + }) + } + $defaultOriginGroup = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origingroups/$($originGroup.Name)" + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location ` + -Origin $origin -OriginGroup $originGroup -DefaultOriginGroupId $defaultOriginGroup + $endpointOriginGroup = Get-AzCdnOriginGroup -Name $originGroup.Name -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + + $endpointOriginGroup.Name | Should -Be $originGroup.Name + $endpointOriginGroup.HealthProbeSetting.ProbeIntervalInSecond | Should -Be $originGroup.HealthProbeSetting.ProbeIntervalInSecond + $endpointOriginGroup.HealthProbeSetting.ProbePath | Should -Be $originGroup.HealthProbeSetting.ProbePath + $endpointOriginGroup.HealthProbeSetting.ProbeProtocol | Should -Be $originGroup.HealthProbeSetting.ProbeProtocol + $endpointOriginGroup.HealthProbeSetting.ProbeRequestType | Should -Be $originGroup.HealthProbeSetting.ProbeRequestType + $endpointOriginGroup.Origin[0].Id | Should -Be $originGroup.Origin[0].Id + + $probeInterval2 = 120 + $probePath2 = "/check-health.aspx" + $probeProtocol2 = "Http" + $probeRequestType2 = "HEAD" + $healthProbeParametersObject2 = New-AzCdnHealthProbeParametersObject -ProbeIntervalInSecond $probeInterval2 ` + -ProbePath $probePath2 -ProbeProtocol $probeProtocol2 -ProbeRequestType $probeRequestType2 + + + Update-AzCdnOriginGroup -EndpointName $endpointName -Name $originGroup.Name -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName ` + -HealthProbeSetting $healthProbeParametersObject2 -Origin @(@{ Id = $originId }) + $updatedOriginGroup = Get-AzCdnOriginGroup -Name $originGroup.Name -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + + $updatedOriginGroup.Name | Should -Be $originGroup.Name + $updatedOriginGroup.HealthProbeSetting.ProbeIntervalInSecond | Should -Be $probeInterval2 + $updatedOriginGroup.HealthProbeSetting.ProbePath | Should -Be $probePath2 + $updatedOriginGroup.HealthProbeSetting.ProbeProtocol | Should -Be $probeProtocol2 + $updatedOriginGroup.HealthProbeSetting.ProbeRequestType | Should -Be $probeRequestType2 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' { + { + $PSDefaultParameterValues['Disabled'] = $true + $subId = $env.SubscriptionId + $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 + + $endpointName = 'e-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Create endpointName : $($endpointName)" + + $location = "westus" + $origin = @{ + Name = "origin1" + HostName = "host1.hello.com" + }; + $originId = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origins/$($origin.Name)" + $healthProbeParametersObject = New-AzCdnHealthProbeParametersObject -ProbeIntervalInSecond 240 -ProbePath "/health.aspx" -ProbeProtocol "Https" -ProbeRequestType "GET" + $originGroup = @{ + Name = "originGroup1" + healthProbeSetting = $healthProbeParametersObject + Origin = @(@{ + Id = $originId + }) + } + $defaultOriginGroup = "/subscriptions/$subId/resourcegroups/$ResourceGroupName/providers/Microsoft.Cdn/profiles/$cdnProfileName/endpoints/$endpointName/origingroups/$($originGroup.Name)" + New-AzCdnEndpoint -Name $endpointName -ResourceGroupName $ResourceGroupName -ProfileName $cdnProfileName -Location $location ` + -Origin $origin -OriginGroup $originGroup -DefaultOriginGroupId $defaultOriginGroup + $endpointOriginGroup = Get-AzCdnOriginGroup -Name $originGroup.Name -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + + $endpointOriginGroup.Name | Should -Be $originGroup.Name + $endpointOriginGroup.HealthProbeSetting.ProbeIntervalInSecond | Should -Be $originGroup.HealthProbeSetting.ProbeIntervalInSecond + $endpointOriginGroup.HealthProbeSetting.ProbePath | Should -Be $originGroup.HealthProbeSetting.ProbePath + $endpointOriginGroup.HealthProbeSetting.ProbeProtocol | Should -Be $originGroup.HealthProbeSetting.ProbeProtocol + $endpointOriginGroup.HealthProbeSetting.ProbeRequestType | Should -Be $originGroup.HealthProbeSetting.ProbeRequestType + $endpointOriginGroup.Origin[0].Id | Should -Be $originGroup.Origin[0].Id + + $probeInterval2 = 120 + $probePath2 = "/check-health.aspx" + $probeProtocol2 = "Http" + $probeRequestType2 = "HEAD" + $healthProbeParametersObject2 = New-AzCdnHealthProbeParametersObject -ProbeIntervalInSecond $probeInterval2 ` + -ProbePath $probePath2 -ProbeProtocol $probeProtocol2 -ProbeRequestType $probeRequestType2 + + $endpointOriginGroup | Update-AzCdnOriginGroup -HealthProbeSetting $healthProbeParametersObject2 -Origin @(@{ Id = $originId }) + $updatedOriginGroup = Get-AzCdnOriginGroup -Name $originGroup.Name -EndpointName $endpointName -ProfileName $cdnProfileName -ResourceGroupName $ResourceGroupName + + $updatedOriginGroup.Name | Should -Be $originGroup.Name + $updatedOriginGroup.HealthProbeSetting.ProbeIntervalInSecond | Should -Be $probeInterval2 + $updatedOriginGroup.HealthProbeSetting.ProbePath | Should -Be $probePath2 + $updatedOriginGroup.HealthProbeSetting.ProbeProtocol | Should -Be $probeProtocol2 + $updatedOriginGroup.HealthProbeSetting.ProbeRequestType | Should -Be $probeRequestType2 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Update-AzCdnProfile.Tests.ps1 b/src/Cdn/test/Update-AzCdnProfile.Tests.ps1 new file mode 100644 index 000000000000..437a85477211 --- /dev/null +++ b/src/Cdn/test/Update-AzCdnProfile.Tests.ps1 @@ -0,0 +1,84 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzCdnProfile')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzCdnProfile.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-AzCdnProfile' { + It 'UpdateExpanded' { + { + $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"; + $tags = @{ + Tag1 = 1 + Tag2 = 2 + } + New-AzCdnProfile -SkuName $profileSku -Name $cdnProfileName -ResourceGroupName $ResourceGroupName -Location Global -Tag $tags + $tags = @{ + Tag1 = 11 + Tag2 = 22 + } + Update-AzCdnProfile -Name $cdnProfileName -ResourceGroupName $ResourceGroupName -Tag $tags + $updatedProfile = Get-AzCdnProfile -Name $cdnProfileName -ResourceGroupName $ResourceGroupName + + $updatedProfile.Tag["Tag1"] | Should -Be "11" + $updatedProfile.Tag["Tag2"] | Should -Be "22" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' { + { + $PSDefaultParameterValues['Disabled'] = $true + $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"; + $tags = @{ + Tag1 = 1 + Tag2 = 2 + } + New-AzCdnProfile -SkuName $profileSku -Name $cdnProfileName -ResourceGroupName $ResourceGroupName -Location Global -Tag $tags + $tags = @{ + Tag1 = 11 + Tag2 = 22 + } + Get-AzCdnProfile -Name $cdnProfileName -ResourceGroupName $ResourceGroupName | Update-AzCdnProfile -Tag $tags + $updatedProfile = Get-AzCdnProfile -Name $cdnProfileName -ResourceGroupName $ResourceGroupName + + $updatedProfile.Tag["Tag1"] | Should -Be "11" + $updatedProfile.Tag["Tag2"] | Should -Be "22" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Update-AzFrontDoorCdnCustomDomain.Tests.ps1 b/src/Cdn/test/Update-AzFrontDoorCdnCustomDomain.Tests.ps1 new file mode 100644 index 000000000000..2817d632720b --- /dev/null +++ b/src/Cdn/test/Update-AzFrontDoorCdnCustomDomain.Tests.ps1 @@ -0,0 +1,60 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzFrontDoorCdnCustomDomain')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzFrontDoorCdnCustomDomain.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-AzFrontDoorCdnCustomDomain' { + It 'UpdateExpanded' { + { + $ResourceGroupName = 'powershelltest' + Write-Host -ForegroundColor Green "Use test group $($ResourceGroupName)" + $frontDoorCdnProfileName = 'fdp-powershelltest' + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + $secretName = "se-powershelltest" + Write-Host -ForegroundColor Green "Use secretName : $($secretName)" + + $customDomainName = "domain-powershelltest" + Write-Host -ForegroundColor Green "Use custom domain name : $($customDomainName)" + + $secret = Get-AzFrontDoorCdnSecret -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $secretName + $secretResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $secret.Id + $updateSetting = New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject -CertificateType "CustomerCertificate" -MinimumTlsVersion "TLS10" -Secret $secretResoure + + Update-AzFrontDoorCdnCustomDomain -CustomDomainName $customDomainName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -TlsSetting $updateSetting + } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' { + { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'powershelltest' + Write-Host -ForegroundColor Green "Use test group $($ResourceGroupName)" + $frontDoorCdnProfileName = 'fdp-powershelltest' + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + $secretName = "se-powershelltest" + Write-Host -ForegroundColor Green "Use secretName : $($secretName)" + + $customDomainName = "domain-powershelltest" + Write-Host -ForegroundColor Green "Use custom domain name : $($customDomainName)" + + $secret = Get-AzFrontDoorCdnSecret -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $secretName + $secretResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $secret.Id + $updateSetting = New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject -CertificateType "CustomerCertificate" -MinimumTlsVersion "TLS10" -Secret $secretResoure + + Get-AzFrontDoorCdnCustomDomain -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -CustomDomainName $customDomainName ` + | Update-AzFrontDoorCdnCustomDomain -TlsSetting $updateSetting + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Update-AzFrontDoorCdnCustomDomainValidationToken.Tests.ps1 b/src/Cdn/test/Update-AzFrontDoorCdnCustomDomainValidationToken.Tests.ps1 new file mode 100644 index 000000000000..b8fa59a71d28 --- /dev/null +++ b/src/Cdn/test/Update-AzFrontDoorCdnCustomDomainValidationToken.Tests.ps1 @@ -0,0 +1,97 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzFrontDoorCdnCustomDomainValidationToken')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzFrontDoorCdnCustomDomainValidationToken.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-AzFrontDoorCdnCustomDomainValidationToken' { + It 'Refresh' { + { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $secretName = "se-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use secretName : $($secretName)" + + $parameter = New-AzFrontDoorCdnSecretCustomerCertificateParametersObject -UseLatestVersion $true -SubjectAlternativeName @() -Type "CustomerCertificate"` + -SecretSourceId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourceGroups/powershelltest/providers/Microsoft.KeyVault/vaults/cdn-ps-kv/certificates/cdndevcn2022-0329" + + $secret = New-AzFrontDoorCdnSecret -Name $secretName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + $secretResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $secret.Id + $tlsSetting = New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject -CertificateType "CustomerCertificate" -MinimumTlsVersion "TLS12" -Secret $secretResoure + + $customDomainName = "domain-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use customDomainName : $($customDomainName)" + $hostName = "pstestrefresh1.dev.cdn.azure.cn" + $customDomain = New-AzFrontDoorCdnCustomDomain -CustomDomainName $customDomainName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -HostName $hostName -TlsSetting $tlsSetting + Write-Host -ForegroundColor Green "Use customDomain token : $($customDomain.ValidationPropertyValidationTokenex)" + + Update-AzFrontDoorCdnCustomDomainValidationToken -CustomDomainName $customDomainName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'RefreshViaIdentity' { + { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $secretName = "se-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use secretName : $($secretName)" + + $parameter = New-AzFrontDoorCdnSecretCustomerCertificateParametersObject -UseLatestVersion $true -SubjectAlternativeName @() -Type "CustomerCertificate"` + -SecretSourceId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourceGroups/powershelltest/providers/Microsoft.KeyVault/vaults/cdn-ps-kv/certificates/cdndevcn2022-0329" + + $secret = New-AzFrontDoorCdnSecret -Name $secretName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + $secretResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $secret.Id + $tlsSetting = New-AzFrontDoorCdnCustomDomainTlsSettingParametersObject -CertificateType "CustomerCertificate" -MinimumTlsVersion "TLS12" -Secret $secretResoure + + $customDomainName = "domain-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use customDomainName : $($customDomainName)" + $hostName = "pstestrefresh2.dev.cdn.azure.cn" + $customDomain = New-AzFrontDoorCdnCustomDomain -CustomDomainName $customDomainName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -HostName $hostName -TlsSetting $tlsSetting + Write-Host -ForegroundColor Green "Use customDomain token : $($customDomain.ValidationPropertyValidationTokenex)" + + $customDomain = Get-AzFrontDoorCdnCustomDomain -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -CustomDomainName $customDomainName ` + | Update-AzFrontDoorCdnCustomDomainValidationToken + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Update-AzFrontDoorCdnEndpoint.Tests.ps1 b/src/Cdn/test/Update-AzFrontDoorCdnEndpoint.Tests.ps1 new file mode 100644 index 000000000000..d1234f5a2254 --- /dev/null +++ b/src/Cdn/test/Update-AzFrontDoorCdnEndpoint.Tests.ps1 @@ -0,0 +1,74 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzFrontDoorCdnEndpoint')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzFrontDoorCdnEndpoint.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-AzFrontDoorCdnEndpoint' { + It 'UpdateExpanded' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpoint = Get-AzFrontdoorCdnEndpoint -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName + $endpoint.EnabledState | Should -Be "Enabled" + + Update-AzFrontdoorCdnEndpoint -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName -EnabledState "Disabled" + $updatedEndpoint = Get-AzFrontdoorCdnEndpoint -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName + $updatedEndpoint.EnabledState | Should -Be "Disabled" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'UpdateViaIdentityExpanded' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + Get-AzFrontdoorCdnEndpoint -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName | Update-AzFrontdoorCdnEndpoint -EnabledState "Disabled" + $updatedEndpoint = Get-AzFrontdoorCdnEndpoint -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName + $updatedEndpoint.EnabledState | Should -Be "Disabled" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Update-AzFrontDoorCdnOrigin.Tests.ps1 b/src/Cdn/test/Update-AzFrontDoorCdnOrigin.Tests.ps1 new file mode 100644 index 000000000000..762c22d6b991 --- /dev/null +++ b/src/Cdn/test/Update-AzFrontDoorCdnOrigin.Tests.ps1 @@ -0,0 +1,101 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzFrontDoorCdnOrigin')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzFrontDoorCdnOrigin.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-AzFrontDoorCdnOrigin' { + It 'UpdateExpanded' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + + $hostName = "en.wikipedia.org"; + $originName = 'ori' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName ` + -OriginName $originName -OriginHostHeader $hostName -HostName $hostName ` + -HttpPort 80 -HttpsPort 443 -Priority 1 -Weight 1000 + + $origin = Get-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName -OriginName $originName + $origin.Weight | Should -Be 1000 + + Update-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName -OriginName $originName -Weight 999 + $origin = Get-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName -OriginName $originName + $origin.Weight | Should -Be 999 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'UpdateViaIdentityExpanded' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + + $hostName = "en.wikipedia.org"; + $originName = 'ori' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName ` + -OriginName $originName -OriginHostHeader $hostName -HostName $hostName ` + -HttpPort 80 -HttpsPort 443 -Priority 1 -Weight 1000 + + $origin = Get-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName -OriginName $originName + $origin.Weight | Should -Be 1000 + + Get-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName -OriginName $originName | ` + Update-AzFrontDoorCdnOrigin -Weight 999 + $origin = Get-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName -OriginName $originName + $origin.Weight | Should -Be 999 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Update-AzFrontDoorCdnOriginGroup.Tests.ps1 b/src/Cdn/test/Update-AzFrontDoorCdnOriginGroup.Tests.ps1 new file mode 100644 index 000000000000..b0364d17ce89 --- /dev/null +++ b/src/Cdn/test/Update-AzFrontDoorCdnOriginGroup.Tests.ps1 @@ -0,0 +1,91 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzFrontDoorCdnOriginGroup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzFrontDoorCdnOriginGroup.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-AzFrontDoorCdnOriginGroup' { + It 'UpdateExpanded' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + $originGroup = Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + $originGroup.Name | Should -Be $originGroupName + $originGroup.LoadBalancingSetting.SuccessfulSamplesRequired | Should -Be 4 + + $updateLoadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 3 + Update-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName ` + -LoadBalancingSetting $updateLoadBalancingSetting + + $originGroup = Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + $originGroup.LoadBalancingSetting.SuccessfulSamplesRequired | Should -Be 3 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'UpdateViaIdentityExpanded' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + + New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + $updateLoadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 3 + Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName ` + | Update-AzFrontDoorCdnOriginGroup -LoadBalancingSetting $updateLoadBalancingSetting + + $originGroup = Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + $originGroup.LoadBalancingSetting.SuccessfulSamplesRequired | Should -Be 3 + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Update-AzFrontDoorCdnProfile.Tests.ps1 b/src/Cdn/test/Update-AzFrontDoorCdnProfile.Tests.ps1 new file mode 100644 index 000000000000..596bd40fdb78 --- /dev/null +++ b/src/Cdn/test/Update-AzFrontDoorCdnProfile.Tests.ps1 @@ -0,0 +1,84 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzFrontDoorCdnProfile')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzFrontDoorCdnProfile.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-AzFrontDoorCdnProfile' { + It 'UpdateExpanded' { + { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + $tags = @{ + Tag1 = 1 + Tag2 = 2 + } + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global -Tag $tags + $tags = @{ + Tag1 = 11 + Tag2 = 22 + } + Update-AzFrontDoorCdnProfile -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Tag $tags + $updatedProfile = Get-AzFrontDoorCdnProfile -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName + + $updatedProfile.Tag["Tag1"] | Should -Be "11" + $updatedProfile.Tag["Tag2"] | Should -Be "22" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' { + { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + $tags = @{ + Tag1 = 1 + Tag2 = 2 + } + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global -Tag $tags + $tags = @{ + Tag1 = 11 + Tag2 = 22 + } + Get-AzFrontDoorCdnProfile -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName | Update-AzFrontDoorCdnProfile -Tag $tags + $updatedProfile = Get-AzFrontDoorCdnProfile -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName + + $updatedProfile.Tag["Tag1"] | Should -Be "11" + $updatedProfile.Tag["Tag2"] | Should -Be "22" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Update-AzFrontDoorCdnRoute.Tests.ps1 b/src/Cdn/test/Update-AzFrontDoorCdnRoute.Tests.ps1 new file mode 100644 index 000000000000..bd25fe71eee8 --- /dev/null +++ b/src/Cdn/test/Update-AzFrontDoorCdnRoute.Tests.ps1 @@ -0,0 +1,155 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzFrontDoorCdnRoute')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzFrontDoorCdnRoute.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-AzFrontDoorCdnRoute' { + It 'UpdateExpanded' { + { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + $endpoint = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + $originGroup = New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + + $hostName = "en.wikipedia.org"; + $originName = 'ori' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName ` + -OriginName $originName -OriginHostHeader $hostName -HostName $hostName ` + -HttpPort 80 -HttpsPort 443 -Priority 1 -Weight 1000 + + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use rulesetName : $($rulesetName)" + $ruleSet = New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $uriConditon = New-AzFrontDoorCdnRuleRequestUriConditionObject -Name "RequestUri" -ParameterOperator "Any" + $conditions = @( + $uriConditon + ); + $overrideAction = New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name "RouteConfigurationOverride" ` + -CacheConfigurationQueryStringCachingBehavior "IgnoreSpecifiedQueryStrings" ` + -CacheConfigurationQueryParameter "a=test" ` + -CacheConfigurationIsCompressionEnabled "Enabled" ` + -CacheConfigurationCacheBehavior "HonorOrigin" + $actions = @($overrideAction); + + $ruleName = 'r' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use ruleName : $($ruleName)" + New-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName ` + -Action $actions -Condition $conditions + + $ruleSetResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $ruleSet.Id + + $routeName = 'route' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnRoute -Name $routeName -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -OriginGroupId $originGroup.Id -RuleSet @($ruleSetResoure) -PatternsToMatch "/*" -LinkToDefaultDomain "Enabled" -EnabledState "Enabled" + + Update-AzFrontDoorCdnRoute -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName -Name $routeName ` + -EnabledState "Disabled" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' { + { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + $endpoint = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $originGroupName = 'org' + (RandomString -allChars $false -len 6); + $healthProbeSetting = New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject -ProbeIntervalInSecond 1 -ProbePath "/" ` + -ProbeProtocol "Https" -ProbeRequestType "GET" + $loadBalancingSetting = New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject -AdditionalLatencyInMillisecond 200 ` + -SampleSize 5 -SuccessfulSamplesRequired 4 + $originGroup = New-AzFrontDoorCdnOriginGroup -OriginGroupName $originGroupName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -LoadBalancingSetting $loadBalancingSetting -HealthProbeSetting $healthProbeSetting + + Get-AzFrontDoorCdnOriginGroup -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName + + $hostName = "en.wikipedia.org"; + $originName = 'ori' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnOrigin -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -OriginGroupName $originGroupName ` + -OriginName $originName -OriginHostHeader $hostName -HostName $hostName ` + -HttpPort 80 -HttpsPort 443 -Priority 1 -Weight 1000 + + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use rulesetName : $($rulesetName)" + $ruleSet = New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $uriConditon = New-AzFrontDoorCdnRuleRequestUriConditionObject -Name "RequestUri" -ParameterOperator "Any" + $conditions = @( + $uriConditon + ); + $overrideAction = New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name "RouteConfigurationOverride" ` + -CacheConfigurationQueryStringCachingBehavior "IgnoreSpecifiedQueryStrings" ` + -CacheConfigurationQueryParameter "a=test" ` + -CacheConfigurationIsCompressionEnabled "Enabled" ` + -CacheConfigurationCacheBehavior "HonorOrigin" + $actions = @($overrideAction); + + $ruleName = 'r' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use ruleName : $($ruleName)" + New-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName ` + -Action $actions -Condition $conditions + + $ruleSetResoure = New-AzFrontDoorCdnResourceReferenceObject -Id $ruleSet.Id + + $routeName = 'route' + (RandomString -allChars $false -len 6); + New-AzFrontDoorCdnRoute -Name $routeName -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName ` + -OriginGroupId $originGroup.Id -RuleSet @($ruleSetResoure) -PatternsToMatch "/*" -LinkToDefaultDomain "Enabled" -EnabledState "Enabled" + + Get-AzFrontDoorCdnRoute -ResourceGroupName $ResourceGroupName -ProfileName $frontDoorCdnProfileName -EndpointName $endpointName -Name $routeName ` + | Update-AzFrontDoorCdnRoute -EnabledState "Disabled" + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/Update-AzFrontDoorCdnRule.Tests.ps1 b/src/Cdn/test/Update-AzFrontDoorCdnRule.Tests.ps1 new file mode 100644 index 000000000000..7b13fabbae41 --- /dev/null +++ b/src/Cdn/test/Update-AzFrontDoorCdnRule.Tests.ps1 @@ -0,0 +1,130 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzFrontDoorCdnRule')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzFrontDoorCdnRule.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-AzFrontDoorCdnRule' { + It 'UpdateExpanded' { + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use rulesetName : $($rulesetName)" + New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $uriConditon = New-AzFrontDoorCdnRuleRequestUriConditionObject -Name "RequestUri" -ParameterOperator "Any" + $conditions = @( + $uriConditon + ); + $overrideAction = New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name "RouteConfigurationOverride" ` + -CacheConfigurationQueryStringCachingBehavior "IgnoreSpecifiedQueryStrings" ` + -CacheConfigurationQueryParameter "a=test" ` + -CacheConfigurationIsCompressionEnabled "Enabled" ` + -CacheConfigurationCacheBehavior "HonorOrigin" + $actions = @($overrideAction); + + $ruleName = 'r' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use ruleName : $($ruleName)" + New-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName ` + -Action $actions -Condition $conditions + + $rule = Get-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName + $rule.Name | Should -Be $ruleName + $rule.Condition.Count | Should -Be $conditions.Count + $rule.Action.Count | Should -Be $actions.Count + + $updatedConditions = @( + + ); + $updatedOverrideAction = New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name "RouteConfigurationOverride" ` + -CacheConfigurationQueryStringCachingBehavior "IgnoreSpecifiedQueryStrings" ` + -CacheConfigurationQueryParameter "a=test1" ` + -CacheConfigurationIsCompressionEnabled "Enabled" ` + -CacheConfigurationCacheBehavior "HonorOrigin" + $updatedActions = @($updatedOverrideAction); + Update-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName ` + -Action $updatedActions -Condition $updatedConditions + + $updatedRule = Get-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName + $updatedRule.Name | Should -Be $ruleName + $updatedRule.Condition.Count | Should -Be $updatedConditions.Count + $updatedRule.Action.Count | Should -Be $actions.Count + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } + + It 'UpdateViaIdentityExpanded' { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + $rulesetName = 'rs' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use rulesetName : $($rulesetName)" + New-AzFrontDoorCdnRuleSet -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $rulesetName + $uriConditon = New-AzFrontDoorCdnRuleRequestUriConditionObject -Name "RequestUri" -ParameterOperator "Any" + $conditions = @( + $uriConditon + ); + $overrideAction = New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name "RouteConfigurationOverride" ` + -CacheConfigurationQueryStringCachingBehavior "IgnoreSpecifiedQueryStrings" ` + -CacheConfigurationQueryParameter "a=test" ` + -CacheConfigurationIsCompressionEnabled "Enabled" ` + -CacheConfigurationCacheBehavior "HonorOrigin" + $actions = @($overrideAction); + + $ruleName = 'r' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use ruleName : $($ruleName)" + New-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName ` + -Action $actions -Condition $conditions + + $rule = Get-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName + $rule.Name | Should -Be $ruleName + $rule.Condition.Count | Should -Be $conditions.Count + $rule.Action.Count | Should -Be $actions.Count + + $updatedConditions = @( + + ); + $updatedOverrideAction = New-AzFrontDoorCdnRuleRouteConfigurationOverrideActionObject -Name "RouteConfigurationOverride" ` + -CacheConfigurationQueryStringCachingBehavior "IgnoreSpecifiedQueryStrings" ` + -CacheConfigurationQueryParameter "a=test1" ` + -CacheConfigurationIsCompressionEnabled "Enabled" ` + -CacheConfigurationCacheBehavior "HonorOrigin" + $updatedActions = @($updatedOverrideAction); + Get-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName | Update-AzFrontDoorCdnRule ` + -Action $updatedActions -Condition $updatedConditions + + $updatedRule = Get-AzFrontDoorCdnRule -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -RuleSetName $rulesetName -Name $ruleName + $updatedRule.Name | Should -Be $ruleName + $updatedRule.Condition.Count | Should -Be $updatedConditions.Count + $updatedRule.Action.Count | Should -Be $actions.Count + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } +} diff --git a/src/Cdn/test/Update-AzFrontDoorCdnSecurityPolicy.Tests.ps1 b/src/Cdn/test/Update-AzFrontDoorCdnSecurityPolicy.Tests.ps1 new file mode 100644 index 000000000000..4be7caf44e24 --- /dev/null +++ b/src/Cdn/test/Update-AzFrontDoorCdnSecurityPolicy.Tests.ps1 @@ -0,0 +1,109 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzFrontDoorCdnSecurityPolicy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzFrontDoorCdnSecurityPolicy.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-AzFrontDoorCdnSecurityPolicy' { + It 'PatchExpanded' { + { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + $endpoint = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $policyName = "pol-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use policyName : $($policyName)" + + $association = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject -PatternsToMatch @("/*") -Domain @(@{"Id"=$($endpoint.Id)}) + $parameter = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject -Association $association ` + -WafPolicyId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourcegroups/powershelltest/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/powershelltestwaf" + + New-AzFrontDoorCdnSecurityPolicy -Name $policyName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + + $endpointName2 = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName2)" + $endpoint2 = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName2 -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $updateAssociation = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject -PatternsToMatch @("/*") -Domain @(@{"Id"=$($endpoint.Id)}) + $updateAssociation2 = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject -PatternsToMatch @("/*") -Domain @(@{"Id"=$($endpoint2.Id)}) + $updateParameter = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject -Association @($updateAssociation, $updateAssociation2) ` + -WafPolicyId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourcegroups/powershelltest/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/powershelltestwaf" + + Update-AzFrontDoorCdnSecurityPolicy -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $policyName ` + -Parameter $updateParameter + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } + + It 'PatchViaIdentityExpanded' { + { + $PSDefaultParameterValues['Disabled'] = $true + $ResourceGroupName = 'testps-rg-' + (RandomString -allChars $false -len 6) + try + { + Write-Host -ForegroundColor Green "Create test group $($ResourceGroupName)" + New-AzResourceGroup -Name $ResourceGroupName -Location $env.location + + $frontDoorCdnProfileName = 'fdp-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnProfileName : $($frontDoorCdnProfileName)" + + $profileSku = "Standard_AzureFrontDoor"; + New-AzFrontDoorCdnProfile -SkuName $profileSku -Name $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $endpointName = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName)" + $endpoint = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $policyName = "pol-" + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use policyName : $($policyName)" + + $association = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject -PatternsToMatch @("/*") -Domain @(@{"Id"=$($endpoint.Id)}) + $parameter = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject -Association $association ` + -WafPolicyId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourcegroups/powershelltest/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/powershelltestwaf" + + New-AzFrontDoorCdnSecurityPolicy -Name $policyName -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Parameter $parameter + + $endpointName2 = 'end-' + (RandomString -allChars $false -len 6); + Write-Host -ForegroundColor Green "Use frontDoorCdnEndpointName : $($endpointName2)" + $endpoint2 = New-AzFrontDoorCdnEndpoint -EndpointName $endpointName2 -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Location Global + + $updateAssociation = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject -PatternsToMatch @("/*") -Domain @(@{"Id"=$($endpoint.Id)}) + $updateAssociation2 = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallAssociationObject -PatternsToMatch @("/*") -Domain @(@{"Id"=$($endpoint2.Id)}) + $updateParameter = New-AzFrontDoorCdnSecurityPolicyWebApplicationFirewallParametersObject -Association @($updateAssociation, $updateAssociation2) ` + -WafPolicyId "/subscriptions/4d894474-aa7f-4611-b830-344860c3eb9c/resourcegroups/powershelltest/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/powershelltestwaf" + + Get-AzFrontDoorCdnSecurityPolicy -ProfileName $frontDoorCdnProfileName -ResourceGroupName $ResourceGroupName -Name $policyName ` + | Update-AzFrontDoorCdnSecurityPolicy -Parameter $updateParameter + } Finally + { + Remove-AzResourceGroup -Name $ResourceGroupName -NoWait + } + } | Should -Not -Throw + } +} diff --git a/src/Cdn/test/env.json b/src/Cdn/test/env.json new file mode 100644 index 000000000000..bdcd6f511808 --- /dev/null +++ b/src/Cdn/test/env.json @@ -0,0 +1,5 @@ +{ + "location": "westus", + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "SubscriptionId": "d7cfdb98-c118-458d-8bdf-246be66b1f5e" +} diff --git a/src/Cdn/test/loadEnv.ps1 b/src/Cdn/test/loadEnv.ps1 new file mode 100644 index 000000000000..5f079e89615e --- /dev/null +++ b/src/Cdn/test/loadEnv.ps1 @@ -0,0 +1,29 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json + $PSDefaultParameterValues=@{"*:SubscriptionId"=$env.SubscriptionId; "*:Tenant"=$env.Tenant} +} \ No newline at end of file diff --git a/src/Cdn/test/localEnv.json b/src/Cdn/test/localEnv.json new file mode 100644 index 000000000000..122188609e50 --- /dev/null +++ b/src/Cdn/test/localEnv.json @@ -0,0 +1,5 @@ +{ + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "location": "westus", + "SubscriptionId": "4d894474-aa7f-4611-b830-344860c3eb9c" +} diff --git a/src/Cdn/test/utils.ps1 b/src/Cdn/test/utils.ps1 new file mode 100644 index 000000000000..579192aa4ef4 --- /dev/null +++ b/src/Cdn/test/utils.ps1 @@ -0,0 +1,33 @@ +function RandomString([bool]$allChars, [int32]$len) { + if ($allChars) { + return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) + } else { + return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) + } +} +$env = @{} +if ($UsePreviousConfigForRecord) { + $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json + $previousEnv.psobject.properties | Foreach-Object { $env[$_.Name] = $_.Value } +} +# Add script method called AddWithCache to $env, when useCache is set true, it will try to get the value from the $env first. +# example: $val = $env.AddWithCache('key', $val, $true) +$env | Add-Member -Type ScriptMethod -Value { param( [string]$key, [object]$val, [bool]$useCache) if ($this.Contains($key) -and $useCache) { return $this[$key] } else { $this[$key] = $val; return $val } } -Name 'AddWithCache' +function setupEnv() { + # Preload subscriptionId and tenant from context, which will be used in test + # as default. You could change them if needed. + $env.SubscriptionId = (Get-AzContext).Subscription.Id + $env.Tenant = (Get-AzContext).Tenant.Id + # For any resources you created for test, you should add it to $env here. + $env.location = 'westus' + + $envFile = 'env.json' + if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' + } + set-content -Path (Join-Path $PSScriptRoot $envFile) -Value (ConvertTo-Json $env) +} +function cleanupEnv() { + # Clean resources you create for testing +} + diff --git a/src/Cdn/utils/Unprotect-SecureString.ps1 b/src/Cdn/utils/Unprotect-SecureString.ps1 new file mode 100644 index 000000000000..cb05b51a6220 --- /dev/null +++ b/src/Cdn/utils/Unprotect-SecureString.ps1 @@ -0,0 +1,16 @@ +#This script converts securestring to plaintext + +param( + [Parameter(Mandatory, ValueFromPipeline)] + [System.Security.SecureString] + ${SecureString} +) + +$ssPtr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecureString) +try { + $plaintext = [System.Runtime.InteropServices.Marshal]::PtrToStringBSTR($ssPtr) +} finally { + [System.Runtime.InteropServices.Marshal]::ZeroFreeBSTR($ssPtr) +} + +return $plaintext \ No newline at end of file From dea451830fdee42528234e6525d5125eade7ca48 Mon Sep 17 00:00:00 2001 From: Yunchi Wang <54880216+wyunchi-ms@users.noreply.github.com> Date: Sat, 14 May 2022 16:01:25 +0800 Subject: [PATCH 3/5] Revert Changelog.md and psd1 UUID --- src/Cdn/Az.Cdn.psd1 | 2 +- src/Cdn/Changelog.md | 57 ++++++++++++++++++++++++++++-- src/Cdn/Properties/AssemblyInfo.cs | 6 ++-- 3 files changed, 59 insertions(+), 6 deletions(-) diff --git a/src/Cdn/Az.Cdn.psd1 b/src/Cdn/Az.Cdn.psd1 index 6f0ffddd48d8..cc79407a2316 100644 --- a/src/Cdn/Az.Cdn.psd1 +++ b/src/Cdn/Az.Cdn.psd1 @@ -18,7 +18,7 @@ ModuleVersion = '0.1.0' CompatiblePSEditions = 'Core', 'Desktop' # ID used to uniquely identify this module -GUID = 'f9fae843-9c26-4513-9442-17f4379802bf' +GUID = '91832aaa-dc11-4583-8239-bce5fd531604' # Author of this module Author = 'Microsoft Corporation' diff --git a/src/Cdn/Changelog.md b/src/Cdn/Changelog.md index 6a48708abdff..559c449437ee 100644 --- a/src/Cdn/Changelog.md +++ b/src/Cdn/Changelog.md @@ -17,8 +17,61 @@ * Overview of change #1 - Additional information about change #1 --> + ## Upcoming Release -## Version 0.1.0 -* First preview release for module Az.Cdn +## Version 1.8.3 +* Added breaking change messages for all cmdlets in Az.CDN module + +## Version 1.8.2 +* Added breaking change messages for upcoming breaking change release of version 2.0.0 + +## Version 1.8.1 +* Fixed null reference exception and typos in `New-AzFrontDoorCdnRule` cmdlet + +## Version 1.8.0 +* Fixed mandatory parameters issue in `Get-AzCdnEndpointResourceUsage` cmdlet + +## Version 1.7.1 +* Fixed profile missing issue in `Remove-AzCdnProfile` cmdlet + +## Version 1.7.0 +* Added cmdlets to support new AFD Premium / Standard SKUs + +## Version 1.6.0 +* Added cmdlets to support multi-origin and private link functionality + +## Version 1.4.3 +* Fixed ChinaCDN related pricing SKU display + +## Version 1.4.2 +* Display error response detail in New-AzCdnEndpoint cmdlet + +## Version 1.4.1 +* Update references in .psd1 to use relative path + +## Version 1.4.0 +* Introduced UrlRewriteAction and CacheKeyQueryStringAction to RulesEngine. +* Fixed several bugs like missing "Selector" Input in New-AzDeliveryRuleCondition cmdlet. + +Fixed enabling CDN custom domain HTTPS for Microsoft and Akamai SKU's + +## Version 1.3.1 +* Fixed miscellaneous typos across module +* Fixed a typo in CDN module conversion helper + +## Version 1.3.0 +* Updated cmdlets to support rulesEngine feature based on API version 2019-04-15. + +## Version 1.2.0 +* Updated cmdlets with plural nouns to singular, and deprecated plural names. + +## Version 1.1.0 +* Added new Powershell cmdlets for Enable/Disable Custom Domain Https and deprecated the old ones + +## Version 1.0.1 +* Update incorrect online help URLs + +## Version 1.0.0 +* General availability of `Az.Cdn` module diff --git a/src/Cdn/Properties/AssemblyInfo.cs b/src/Cdn/Properties/AssemblyInfo.cs index 3675382a77f2..d916f940ba76 100644 --- a/src/Cdn/Properties/AssemblyInfo.cs +++ b/src/Cdn/Properties/AssemblyInfo.cs @@ -23,6 +23,6 @@ [assembly: ComVisible(false)] [assembly: CLSCompliant(false)] -[assembly: Guid("8eadbc78-9db8-41a7-854e-4802432c03ba")] -[assembly: AssemblyVersion("0.1.0")] -[assembly: AssemblyFileVersion("0.1.0")] +[assembly: Guid("d90791a2-8102-47fc-8150-de25ae796eb1")] +[assembly: AssemblyVersion("1.8.3")] +[assembly: AssemblyFileVersion("1.8.3")] From c78adc647f0fdf5f950cec5ee4581800ef66a113 Mon Sep 17 00:00:00 2001 From: Yunchi Wang <54880216+wyunchi-ms@users.noreply.github.com> Date: Mon, 16 May 2022 09:13:23 +0800 Subject: [PATCH 4/5] Update changelog.md and psd1 --- src/Cdn/Az.Cdn.psd1 | 2 +- src/Cdn/Changelog.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Cdn/Az.Cdn.psd1 b/src/Cdn/Az.Cdn.psd1 index cc79407a2316..ffea331e5681 100644 --- a/src/Cdn/Az.Cdn.psd1 +++ b/src/Cdn/Az.Cdn.psd1 @@ -12,7 +12,7 @@ RootModule = './Az.Cdn.psm1' # Version number of this module. -ModuleVersion = '0.1.0' +ModuleVersion = '1.8.3' # Supported PSEditions CompatiblePSEditions = 'Core', 'Desktop' diff --git a/src/Cdn/Changelog.md b/src/Cdn/Changelog.md index 559c449437ee..d5c0891c63e5 100644 --- a/src/Cdn/Changelog.md +++ b/src/Cdn/Changelog.md @@ -19,6 +19,7 @@ --> ## Upcoming Release +* Migrated the cmdlets from SDK based to autorest generated. ## Version 1.8.3 * Added breaking change messages for all cmdlets in Az.CDN module From a9e9fcf446c923ebd2b53ead77b237b4bcb6b13e Mon Sep 17 00:00:00 2001 From: Yunchi Wang <54880216+wyunchi-ms@users.noreply.github.com> Date: Mon, 16 May 2022 10:36:47 +0800 Subject: [PATCH 5/5] Add commit id of CDN --- src/Cdn/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Cdn/README.md b/src/Cdn/README.md index 311bb335755c..8a30241de8da 100644 --- a/src/Cdn/README.md +++ b/src/Cdn/README.md @@ -45,6 +45,7 @@ module-version: 0.1.0 # Normally, title is the service name title: Cdn subject-prefix: $(service-name) +branch: 1278b951080f769d400bb5d03090de8bc21dc355 # If there are post APIs for some kinds of actions in the RP, you may need to # uncomment following line to support viaIdentity for these post APIs